Commit df0f82ab authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: fixed conditionals for the different OS X release by adapting to the...

macosx: fixed conditionals for the different OS X release by adapting to the newly updated version defines
parent d5c02e56
......@@ -99,12 +99,12 @@ static AppleRemote *_o_sharedInstance = nil;
[mutableCookieToButtonMapping setObject:[NSNumber numberWithInt:k2009RemoteButtonPlay] forKey:@"33_21_20_8_2_33_21_20_8_2_"];
[mutableCookieToButtonMapping setObject:[NSNumber numberWithInt:k2009RemoteButtonFullscreen] forKey:@"33_21_20_3_2_33_21_20_3_2_"];
if( OSX_LION )
/* Lion cookies */
[mutableCookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteControl_Switched] forKey:@"42_33_23_21_20_2_33_23_21_20_2_"];
else
if( OSX_SNOW_LEOPARD )
/* 10.6.2+ Snow Leopard cookies */
[mutableCookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteControl_Switched] forKey:@"19_"];
else
/* Lion cookies */
[mutableCookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteControl_Switched] forKey:@"42_33_23_21_20_2_33_23_21_20_2_"];
_cookieToButtonMapping = [[NSDictionary alloc] initWithDictionary: mutableCookieToButtonMapping];
[mutableCookieToButtonMapping release];
......
......@@ -105,7 +105,7 @@ static VLCAudioEffects *_o_sharedInstance = nil;
[[o_tableView tabViewItemAtIndex:[o_tableView indexOfTabViewItemWithIdentifier:@"filter"]] setLabel:_NS("Filter")];
[o_window setTitle:_NS("Audio Effects")];
[o_window setExcludedFromWindowsMenu:YES];
if (OSX_LION)
if (!OSX_SNOW_LEOPARD)
[o_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[self setupEqualizer];
......
......@@ -954,8 +954,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
b_activeDragAndDrop = YES;
[self setNeedsDisplay:YES];
if (OSX_SNOW_LEOPARD || OSX_LION)
[[NSCursor dragCopyCursor] set];
[[NSCursor dragCopyCursor] set];
if ((NSDragOperationGeneric & [sender draggingSourceOperationMask]) == NSDragOperationGeneric)
return NSDragOperationGeneric;
......
......@@ -95,7 +95,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
if (b_dark_interface)
{
#ifdef MAC_OS_X_VERSION_10_7
if (OSX_LION)
if (!OSX_SNOW_LEOPARD)
styleMask = NSBorderlessWindowMask | NSResizableWindowMask;
else
styleMask = NSBorderlessWindowMask;
......@@ -114,7 +114,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[self setMovableByWindowBackground: YES];
/* we don't want this window to be restored on relaunch */
if (OSX_LION)
if (!OSX_SNOW_LEOPARD)
[self setRestorable:NO];
return self;
......@@ -187,7 +187,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
b_video_deco = var_InheritBool( VLCIntf, "video-deco" );
b_nativeFullscreenMode = NO;
#ifdef MAC_OS_X_VERSION_10_7
if( OSX_LION && b_video_deco )
if( !OSX_SNOW_LEOPARD && b_video_deco )
b_nativeFullscreenMode = var_InheritBool( VLCIntf, "macosx-nativefullscreenmode" );
#endif
t_hide_mouse_timer = nil;
......@@ -467,7 +467,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[o_detached_titlebar_view setFullscreenButtonHidden: YES];
}
if (OSX_LION)
if (!OSX_SNOW_LEOPARD)
{
/* the default small size of the search field is slightly different on Lion, let's work-around that */
NSRect frame;
......@@ -670,7 +670,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
frame.size.width = 0;
[o_detached_time_sld_fancygradient_view setFrame: frame];
if (OSX_LION)
if (!OSX_SNOW_LEOPARD)
{
[o_resize_view setImage: NULL];
[o_detached_resize_view setImage: NULL];
......@@ -3059,7 +3059,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
if (b_dark_interface || !b_video_deco)
{
#ifdef MAC_OS_X_VERSION_10_7
if (OSX_LION)
if (!OSX_SNOW_LEOPARD)
styleMask = NSBorderlessWindowMask | NSResizableWindowMask;
else
styleMask = NSBorderlessWindowMask;
......@@ -3075,7 +3075,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[self setMovableByWindowBackground: YES];
/* we don't want this window to be restored on relaunch */
if (OSX_LION)
if (!OSX_SNOW_LEOPARD)
[self setRestorable:NO];
return self;
......
......@@ -111,7 +111,7 @@
- (void)loadButtonIcons
{
if (OSX_LION)
if (!OSX_SNOW_LEOPARD)
{
if( [NSColor currentControlTint] == NSBlueControlTint )
{
......@@ -495,11 +495,7 @@
return;
NSArray * pathComponents;
if (OSX_SNOW_LEOPARD || OSX_LION)
pathComponents = [representedURL pathComponents];
else
pathComponents = [[representedURL path] pathComponents];
pathComponents = [representedURL pathComponents];
if (!pathComponents)
return;
......@@ -573,10 +569,7 @@
}
NSArray * pathComponents;
if (OSX_SNOW_LEOPARD || OSX_LION)
pathComponents = [representedURL pathComponents];
else
pathComponents = [[representedURL path] pathComponents];
pathComponents = [representedURL pathComponents];
if (!pathComponents)
return;
......
......@@ -93,7 +93,7 @@ static VLCTrackSynchronization *_o_sharedInstance = nil;
[[o_sv_dur_value_fld formatter] setFormat:[NSString stringWithFormat:@"#,##0.000%@", o_suffix]];
[o_sv_dur_value_fld setToolTip: o_toolTip];
if (OSX_LION)
if (!OSX_SNOW_LEOPARD)
[o_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[self resetValues:self];
......
......@@ -63,7 +63,7 @@ static VLCVideoEffects *_o_sharedInstance = nil;
{
[o_window setTitle: _NS("Video Effects")];
[o_window setExcludedFromWindowsMenu:YES];
if (OSX_LION)
if (!OSX_SNOW_LEOPARD)
[o_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[[o_tableView tabViewItemAtIndex:[o_tableView indexOfTabViewItemWithIdentifier:@"basic"]] setLabel:_NS("Basic")];
......
......@@ -71,7 +71,7 @@ static VLAboutBox *_o_sharedInstance = nil;
- (void)awakeFromNib
{
if (OSX_LION)
if (!OSX_SNOW_LEOPARD)
[o_about_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
/* add a colored backdrop to get a white window background */
......
......@@ -65,7 +65,7 @@ static VLCBookmarks *_o_sharedInstance = nil;
- (void)awakeFromNib
{
if (OSX_LION)
if (!OSX_SNOW_LEOPARD)
[o_bookmarks_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[self initStrings];
......
......@@ -269,7 +269,7 @@
BOOL b_invertedEventFromDevice = NO;
CGFloat f_deltaY, f_deltaX = .0;
if (OSX_LION)
if (!OSX_SNOW_LEOPARD)
{
if ([theEvent isDirectionInvertedFromDevice])
b_invertedEventFromDevice = YES;
......
......@@ -51,7 +51,7 @@
[win setOpaque:NO];
[win setHasShadow: NO];
[win setBackgroundColor:[NSColor clearColor]];
if (OSX_LION)
if (!OSX_SNOW_LEOPARD)
[win setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
/* let the window sit on top of everything else and start out completely transparent */
......
......@@ -597,7 +597,7 @@ static VLCMain *_o_sharedMainInstance = nil;
var_AddCallback(p_playlist, "volume", VolumeUpdated, self);
var_AddCallback(p_playlist, "mute", VolumeUpdated, self);
if (OSX_LION)
if (!OSX_SNOW_LEOPARD)
{
if ([NSApp currentSystemPresentationOptions] & NSApplicationPresentationFullScreen)
var_SetBool( p_playlist, "fullscreen", YES );
......@@ -630,7 +630,7 @@ static VLCMain *_o_sharedMainInstance = nil;
/* yeah, we are done */
b_nativeFullscreenMode = NO;
#ifdef MAC_OS_X_VERSION_10_7
if( OSX_LION && b_video_deco )
if( !OSX_SNOW_LEOPARD && b_video_deco )
b_nativeFullscreenMode = var_InheritBool( p_intf, "macosx-nativefullscreenmode" );
#endif
......
......@@ -268,7 +268,7 @@ static NSMutableArray *blackoutWindows = NULL;
{
b_isset_canBecomeKeyWindow = NO;
/* we don't want this window to be restored on relaunch */
if (OSX_LION)
if (!OSX_SNOW_LEOPARD)
[self setRestorable:NO];
}
return self;
......
......@@ -119,7 +119,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
- (void)awakeFromNib
{
if (OSX_LION)
if (!OSX_SNOW_LEOPARD)
[o_panel setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[o_panel setTitle: _NS("Open Source")];
......
......@@ -70,7 +70,7 @@ static VLCInfo *_o_sharedInstance = nil;
{
[o_info_window setExcludedFromWindowsMenu: YES];
[o_info_window setFloatingPanel: NO];
if (OSX_LION)
if (!OSX_SNOW_LEOPARD)
[o_info_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[o_info_window setTitle: _NS("Media Information")];
......
......@@ -179,7 +179,7 @@ static VLCPrefs *_o_sharedMainInstance = nil;
{
p_intf = VLCIntf;
if (OSX_LION)
if (!OSX_SNOW_LEOPARD)
[o_prefs_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[self initStrings];
......
......@@ -99,7 +99,7 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
[o_sprefs_toolbar setDelegate: self];
[o_sprefs_win setToolbar: o_sprefs_toolbar];
if (OSX_LION)
if (!OSX_SNOW_LEOPARD)
[o_sprefs_win setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[o_hotkeys_listbox setTarget:self];
......@@ -440,7 +440,7 @@ static inline char * __config_GetLabel( vlc_object_t *p_this, const char *psz_na
#ifdef MAC_OS_X_VERSION_10_7
b_correct_sdk = YES;
#endif
if( !( b_correct_sdk && OSX_LION ))
if( !( b_correct_sdk && !OSX_SNOW_LEOPARD ))
{
[o_intf_nativefullscreen_ckb setState: NSOffState];
[o_intf_nativefullscreen_ckb setEnabled: NO];
......
......@@ -73,7 +73,7 @@ static VLCWizard *_o_sharedInstance = nil;
- (void)awakeFromNib
{
if (OSX_LION)
if (!OSX_SNOW_LEOPARD)
[o_wizard_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
/* some minor cleanup */
......
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