Commit 0e608f94 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: only enable Lion's fullscreen mode in case VLC was linked against the 10.7 SDK

plus some other fixes
parent b9e10880
......@@ -486,20 +486,23 @@ static VLCMainMenu *_o_sharedInstance = nil;
}
NSArray * o_screens = [NSScreen screens];
NSMenuItem * o_mitem;
count = [o_screens count];
[o_submenu addItemWithTitle: _NS("Default") action:@selector(toggleFullscreenDevice:) keyEquivalent:@""];
[[o_submenu itemAtIndex: 0] setTag: 0];
[[o_submenu itemAtIndex: 0] setEnabled: YES];
[[o_submenu itemAtIndex: 0] setTarget: self];
o_mitem = [o_submenu itemAtIndex: 0];
[o_mitem setTag: 0];
[o_mitem setEnabled: YES];
[o_mitem setTarget: self];
NSRect s_rect;
for (NSUInteger i = 0; i < count; i++)
{
s_rect = [[o_screens objectAtIndex: i] frame];
[o_submenu addItemWithTitle: [NSString stringWithFormat: @"%@ %i (%ix%i)", _NS("Screen"), i+1,
(int)s_rect.size.width, (int)s_rect.size.height] action:@selector(toggleFullscreenDevice:) keyEquivalent:@""];
[[o_submenu itemAtIndex:i+1] setTag: (int)[[o_screens objectAtIndex: i] displayID]];
[[o_submenu itemAtIndex:i+1] setEnabled: YES];
[[o_submenu itemAtIndex:i+1] setTarget: self];
o_mitem = [o_submenu itemAtIndex:i+1];
[o_mitem setTag: (int)[[o_screens objectAtIndex: i] displayID]];
[o_mitem setEnabled: YES];
[o_mitem setTarget: self];
}
[[o_submenu itemWithTag: config_GetInt( VLCIntf, "macosx-vdev" )] setState: NSOnState];
}
......@@ -1169,7 +1172,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
}
else if( [o_title isEqualToString: _NS("Mute")] )
{
//FIXME [o_mi setState: p_intf->p_sys->b_mute ? NSOnState : NSOffState];
[o_mi setState: [[VLCCoreInteraction sharedInstance] isMuted] ? NSOnState : NSOffState];
[self setupMenus]; /* Make sure audio menu is up to date */
}
else if( [o_title isEqualToString: _NS("Half Size")] ||
......
......@@ -119,7 +119,11 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (void)awakeFromNib
{
/* setup the styled interface */
#ifdef MAC_OS_X_VERSION_10_7
b_nativeFullscreenMode = config_GetInt( VLCIntf, "macosx-nativefullscreenmode" );
#else
b_nativeFullscreenMode = NO;
#endif
i_lastShownVolume = -1;
t_hide_mouse_timer = nil;
......
......@@ -133,8 +133,9 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
if (OSX_LION)
[o_sprefs_win setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
else
[o_intf_nativefullscreen_ckb setEnabled:NO];
#ifndef MAC_OS_X_VERSION_10_7
[o_intf_nativefullscreen_ckb setEnabled:NO];
#endif
/* setup useful stuff */
o_hotkeysNonUseableKeys = [[NSArray arrayWithObjects: @"Command-c", @"Command-x", @"Command-v", @"Command-a", @"Command-," , @"Command-h", @"Command-Alt-h", @"Command-Shift-o", @"Command-o", @"Command-d", @"Command-n", @"Command-s", @"Command-z", @"Command-l", @"Command-r", @"Command-3", @"Command-m", @"Command-w", @"Command-Shift-w", @"Command-Shift-c", @"Command-Shift-p", @"Command-i", @"Command-e", @"Command-Shift-e", @"Command-b", @"Command-Shift-m", @"Command-Ctrl-m", @"Command-?", @"Command-Alt-?", nil] retain];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment