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

macosx: remove support for OS X 10.6 Snow Leopard

parent 4d4d1ea6
...@@ -156,7 +156,6 @@ EXTRA_DIST += \ ...@@ -156,7 +156,6 @@ EXTRA_DIST += \
extras/package/macosx/Resources/English.lproj/SharedDialogs.xib \ extras/package/macosx/Resources/English.lproj/SharedDialogs.xib \
extras/package/macosx/Resources/English.lproj/SyncTracks.xib \ extras/package/macosx/Resources/English.lproj/SyncTracks.xib \
extras/package/macosx/Resources/English.lproj/VideoEffects.xib \ extras/package/macosx/Resources/English.lproj/VideoEffects.xib \
extras/package/macosx/Resources/English.lproj/Wizard.xib \
extras/package/macosx/Resources/fspanel/fs_background.png \ extras/package/macosx/Resources/fspanel/fs_background.png \
extras/package/macosx/Resources/fspanel/fs_background@2x.png \ extras/package/macosx/Resources/fspanel/fs_background@2x.png \
extras/package/macosx/Resources/fspanel/fs_exit_fullscreen.png \ extras/package/macosx/Resources/fspanel/fs_exit_fullscreen.png \
...@@ -537,24 +536,6 @@ EXTRA_DIST += \ ...@@ -537,24 +536,6 @@ EXTRA_DIST += \
extras/package/macosx/Resources/mainwindow_dark/titlebar/lion/lion-window-zoom-over@2x.png \ extras/package/macosx/Resources/mainwindow_dark/titlebar/lion/lion-window-zoom-over@2x.png \
extras/package/macosx/Resources/mainwindow_dark/titlebar/lion/lion-window-zoom.png \ extras/package/macosx/Resources/mainwindow_dark/titlebar/lion/lion-window-zoom.png \
extras/package/macosx/Resources/mainwindow_dark/titlebar/lion/lion-window-zoom@2x.png \ extras/package/macosx/Resources/mainwindow_dark/titlebar/lion/lion-window-zoom@2x.png \
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-close-graphite.png \
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-close-on-graphite.png \
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-close-on.png \
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-close-over-graphite.png \
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-close-over.png \
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-close.png \
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-minimize-graphite.png \
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-minimize-on-graphite.png \
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-minimize-on.png \
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-minimize-over-graphite.png \
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-minimize-over.png \
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-minimize.png \
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-zoom-graphite.png \
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-zoom-on-graphite.png \
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-zoom-on.png \
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-zoom-over-graphite.png \
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-zoom-over.png \
extras/package/macosx/Resources/mainwindow_dark/titlebar/snowleo/snowleo-window-zoom.png \
extras/package/macosx/Resources/mainwindow_dark/titlebar/yosemite/yosemite-window-close-graphite.png \ extras/package/macosx/Resources/mainwindow_dark/titlebar/yosemite/yosemite-window-close-graphite.png \
extras/package/macosx/Resources/mainwindow_dark/titlebar/yosemite/yosemite-window-close-graphite@2x.png \ extras/package/macosx/Resources/mainwindow_dark/titlebar/yosemite/yosemite-window-close-graphite@2x.png \
extras/package/macosx/Resources/mainwindow_dark/titlebar/yosemite/yosemite-window-close-on-graphite.png \ extras/package/macosx/Resources/mainwindow_dark/titlebar/yosemite/yosemite-window-close-on-graphite.png \
......
...@@ -97,13 +97,7 @@ const NSTimeInterval HOLD_RECOGNITION_TIME_INTERVAL=0.4; ...@@ -97,13 +97,7 @@ const NSTimeInterval HOLD_RECOGNITION_TIME_INTERVAL=0.4;
[mutableCookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonPlay_Sleep] forKey:@"37_33_21_20_2_37_33_21_20_2_"]; [mutableCookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonPlay_Sleep] forKey:@"37_33_21_20_2_37_33_21_20_2_"];
[mutableCookieToButtonMapping setObject:[NSNumber numberWithInt:k2009RemoteButtonPlay] forKey:@"33_21_20_8_2_33_21_20_8_2_"]; [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_"]; [mutableCookieToButtonMapping setObject:[NSNumber numberWithInt:k2009RemoteButtonFullscreen] forKey:@"33_21_20_3_2_33_21_20_3_2_"];
[mutableCookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteControl_Switched] forKey:@"42_33_23_21_20_2_33_23_21_20_2_"];
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]; _cookieToButtonMapping = [[NSDictionary alloc] initWithDictionary: mutableCookieToButtonMapping];
......
...@@ -147,8 +147,7 @@ ...@@ -147,8 +147,7 @@
[[o_tableView tabViewItemAtIndex:[o_tableView indexOfTabViewItemWithIdentifier:@"filter"]] setLabel:_NS("Filter")]; [[o_tableView tabViewItemAtIndex:[o_tableView indexOfTabViewItemWithIdentifier:@"filter"]] setLabel:_NS("Filter")];
[o_window setTitle:_NS("Audio Effects")]; [o_window setTitle:_NS("Audio Effects")];
[o_window setExcludedFromWindowsMenu:YES]; [o_window setExcludedFromWindowsMenu:YES];
if (!OSX_SNOW_LEOPARD) [o_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[o_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[self equalizerUpdated]; [self equalizerUpdated];
[self resetCompressor]; [self resetCompressor];
......
...@@ -25,56 +25,7 @@ ...@@ -25,56 +25,7 @@
#pragma mark - #pragma mark -
#pragma OS detection code #pragma OS detection code
#define OSX_SNOW_LEOPARD (NSAppKitVersionNumber < 1115 && NSAppKitVersionNumber >= 1038)
#define OSX_LION (NSAppKitVersionNumber < 1162 && NSAppKitVersionNumber >= 1115.2) #define OSX_LION (NSAppKitVersionNumber < 1162 && NSAppKitVersionNumber >= 1115.2)
#define OSX_MOUNTAIN_LION (NSAppKitVersionNumber < 1244 && NSAppKitVersionNumber >= 1162) #define OSX_MOUNTAIN_LION (NSAppKitVersionNumber < 1244 && NSAppKitVersionNumber >= 1162)
#define OSX_MAVERICKS (NSAppKitVersionNumber < 1334 && NSAppKitVersionNumber >= 1244) #define OSX_MAVERICKS (NSAppKitVersionNumber < 1334 && NSAppKitVersionNumber >= 1244)
#define OSX_YOSEMITE (NSAppKitVersionNumber >= 1334) #define OSX_YOSEMITE (NSAppKitVersionNumber >= 1334)
#pragma mark -
#pragma Fixes for OS X Snow Leopard (10.6)
#ifndef MAC_OS_X_VERSION_10_7
enum {
NSWindowCollectionBehaviorFullScreenPrimary = 1 << 7,
NSWindowCollectionBehaviorFullScreenAuxiliary = 1 << 8
};
enum {
NSApplicationPresentationFullScreen = (1 << 10),
NSApplicationPresentationAutoHideToolbar = (1 << 11)
};
enum {
NSFullScreenWindowMask = 1 << 14
};
enum {
NSWindowAnimationBehaviorDefault = 0, // let AppKit infer animation behavior for this window
NSWindowAnimationBehaviorNone = 2, // suppress inferred animations (don't animate)
NSWindowAnimationBehaviorDocumentWindow = 3,
NSWindowAnimationBehaviorUtilityWindow = 4,
NSWindowAnimationBehaviorAlertPanel = 5
};
typedef NSInteger NSWindowAnimationBehavior;
/* the following is just to fix warnings, not for implementation! */
@interface NSWindow (IntroducedInLion)
- (void)setRestorable:(BOOL)b_value;
- (void)toggleFullScreen:(id)id_value;
- (void)windowWillEnterFullScreen:(NSNotification *)notification;
- (void)windowDidEnterFullScreen:(NSNotification *)notification;
- (void)windowWillExitFullScreen:(NSNotification *)notification;
- (void)setAnimationBehavior:(NSWindowAnimationBehavior)newAnimationBehavior;
@end
@interface NSEvent (IntroducedInLion)
- (BOOL)isDirectionInvertedFromDevice;
@end
@interface NSAnimationContext (IntroducedInLion)
+ (void)runAnimationGroup:(void (^)(NSAnimationContext *context))changes completionHandler:(void (^)(void))completionHandler;
@end
#endif
...@@ -57,11 +57,6 @@ ...@@ -57,11 +57,6 @@
_darkInterface = config_GetInt(VLCIntf, "macosx-interfacestyle"); _darkInterface = config_GetInt(VLCIntf, "macosx-interfacestyle");
_nativeFullscreenMode = NO; _nativeFullscreenMode = NO;
#ifdef MAC_OS_X_VERSION_10_7
if (!OSX_SNOW_LEOPARD)
_nativeFullscreenMode = var_InheritBool(VLCIntf, "macosx-nativefullscreenmode");
#endif
[o_drop_view setDrawBorder: NO]; [o_drop_view setDrawBorder: NO];
[o_play_btn setToolTip: _NS("Play/Pause")]; [o_play_btn setToolTip: _NS("Play/Pause")];
...@@ -149,8 +144,7 @@ ...@@ -149,8 +144,7 @@
[o_time_sld_fancygradient_view setFrame: frame]; [o_time_sld_fancygradient_view setFrame: frame];
// hide resize view if necessary // hide resize view if necessary
if (!OSX_SNOW_LEOPARD) [o_resize_view setImage: NULL];
[o_resize_view setImage: NULL];
if ([[self.bottomBarView window] styleMask] & NSResizableWindowMask) if ([[self.bottomBarView window] styleMask] & NSResizableWindowMask)
[o_resize_view removeFromSuperviewWithoutNeedingDisplay]; [o_resize_view removeFromSuperviewWithoutNeedingDisplay];
......
...@@ -304,8 +304,8 @@ static int InputEvent(vlc_object_t *p_this, const char *psz_var, ...@@ -304,8 +304,8 @@ static int InputEvent(vlc_object_t *p_this, const char *psz_var,
} }
IOReturn success; IOReturn success;
/* work-around a bug in 10.7.4 and 10.7.5, so check for 10.7.x < 10.7.4, 10.8 and 10.6 */ /* work-around a bug in 10.7.4 and 10.7.5, so check for 10.7.x < 10.7.4 and 10.8 */
if ((NSAppKitVersionNumber >= 1115.2 && NSAppKitVersionNumber < 1138.45) || OSX_MOUNTAIN_LION || OSX_MAVERICKS || OSX_YOSEMITE || OSX_SNOW_LEOPARD) { if ((NSAppKitVersionNumber >= 1115.2 && NSAppKitVersionNumber < 1138.45) || OSX_MOUNTAIN_LION || OSX_MAVERICKS || OSX_YOSEMITE) {
CFStringRef reasonForActivity = CFStringCreateWithCString(kCFAllocatorDefault, _("VLC media playback"), kCFStringEncodingUTF8); CFStringRef reasonForActivity = CFStringCreateWithCString(kCFAllocatorDefault, _("VLC media playback"), kCFStringEncodingUTF8);
if ([o_main activeVideoPlayback]) if ([o_main activeVideoPlayback])
success = IOPMAssertionCreateWithName(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, reasonForActivity, &systemSleepAssertionID); success = IOPMAssertionCreateWithName(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, reasonForActivity, &systemSleepAssertionID);
......
...@@ -162,16 +162,11 @@ static VLCMainWindow *sharedInstance = nil; ...@@ -162,16 +162,11 @@ static VLCMainWindow *sharedInstance = nil;
BOOL b_splitviewShouldBeHidden = NO; BOOL b_splitviewShouldBeHidden = NO;
if (!OSX_SNOW_LEOPARD) [self setRestorable: NO];
[self setRestorable: NO];
[self setFrameAutosaveName:@"mainwindow"]; [self setFrameAutosaveName:@"mainwindow"];
/* setup the styled interface */ /* setup the styled interface */
_nativeFullscreenMode = NO; _nativeFullscreenMode = var_InheritBool(VLCIntf, "macosx-nativefullscreenmode");
#ifdef MAC_OS_X_VERSION_10_7
if (!OSX_SNOW_LEOPARD)
_nativeFullscreenMode = var_InheritBool(VLCIntf, "macosx-nativefullscreenmode");
#endif
[self useOptimizedDrawing: YES]; [self useOptimizedDrawing: YES];
[[o_search_fld cell] setPlaceholderString: _NS("Search")]; [[o_search_fld cell] setPlaceholderString: _NS("Search")];
...@@ -215,14 +210,12 @@ static VLCMainWindow *sharedInstance = nil; ...@@ -215,14 +210,12 @@ static VLCMainWindow *sharedInstance = nil;
[o_dropzone_view setFrame: [o_playlist_table frame]]; [o_dropzone_view setFrame: [o_playlist_table frame]];
[o_left_split_view setFrame: [o_sidebar_view frame]]; [o_left_split_view setFrame: [o_sidebar_view frame]];
if (!OSX_SNOW_LEOPARD) { /* the default small size of the search field is slightly different on Lion, let's work-around that */
/* the default small size of the search field is slightly different on Lion, let's work-around that */ NSRect frame;
NSRect frame; frame = [o_search_fld frame];
frame = [o_search_fld frame]; frame.origin.y = frame.origin.y + 2.0;
frame.origin.y = frame.origin.y + 2.0; frame.size.height = frame.size.height - 1.0;
frame.size.height = frame.size.height - 1.0; [o_search_fld setFrame: frame];
[o_search_fld setFrame: frame];
}
/* reload the sidebar */ /* reload the sidebar */
[self reloadSidebar]; [self reloadSidebar];
......
...@@ -82,11 +82,7 @@ ...@@ -82,11 +82,7 @@
- (void)awakeFromNib - (void)awakeFromNib
{ {
b_nativeFullscreenMode = NO; b_nativeFullscreenMode = var_InheritBool(VLCIntf, "macosx-nativefullscreenmode");
#ifdef MAC_OS_X_VERSION_10_7
if (!OSX_SNOW_LEOPARD)
b_nativeFullscreenMode = var_InheritBool(VLCIntf, "macosx-nativefullscreenmode");
#endif
if (!b_nativeFullscreenMode || OSX_YOSEMITE) { if (!b_nativeFullscreenMode || OSX_YOSEMITE) {
[o_fullscreen_btn setHidden: YES]; [o_fullscreen_btn setHidden: YES];
...@@ -122,9 +118,7 @@ ...@@ -122,9 +118,7 @@
- (NSImage *)getButtonImage:(NSString *)o_id - (NSImage *)getButtonImage:(NSString *)o_id
{ {
NSString *o_name = @""; NSString *o_name = @"";
if (OSX_SNOW_LEOPARD) { if (OSX_YOSEMITE) {
o_name = @"snowleo-";
} else if (OSX_YOSEMITE) {
o_name = @"yosemite-"; o_name = @"yosemite-";
} else { // OSX_LION, OSX_MOUNTAIN_LION, OSX_MAVERICKS } else { // OSX_LION, OSX_MOUNTAIN_LION, OSX_MAVERICKS
o_name = @"lion-"; o_name = @"lion-";
......
...@@ -86,8 +86,7 @@ ...@@ -86,8 +86,7 @@
[[_sv_durTextField formatter] setFormat:[NSString stringWithFormat:@"#,##0.000%@", o_suffix]]; [[_sv_durTextField formatter] setFormat:[NSString stringWithFormat:@"#,##0.000%@", o_suffix]];
[_sv_durTextField setToolTip: o_toolTip]; [_sv_durTextField setToolTip: o_toolTip];
if (!OSX_SNOW_LEOPARD) [_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[self resetValues:self]; [self resetValues:self];
} }
......
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
window_rect = [[VLCMainWindow sharedInstance] frame]; window_rect = [[VLCMainWindow sharedInstance] frame];
NSUInteger mask = NSBorderlessWindowMask; NSUInteger mask = NSBorderlessWindowMask;
if (!OSX_SNOW_LEOPARD && !b_video_deco) if (!b_video_deco)
mask |= NSResizableWindowMask; mask |= NSResizableWindowMask;
BOOL b_no_video_deco_only = !b_video_wallpaper; BOOL b_no_video_deco_only = !b_video_wallpaper;
......
...@@ -72,8 +72,7 @@ ...@@ -72,8 +72,7 @@
{ {
[o_window setTitle: _NS("Video Effects")]; [o_window setTitle: _NS("Video Effects")];
[o_window setExcludedFromWindowsMenu:YES]; [o_window setExcludedFromWindowsMenu:YES];
if (!OSX_SNOW_LEOPARD) [o_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[o_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[[o_tableView tabViewItemAtIndex:[o_tableView indexOfTabViewItemWithIdentifier:@"basic"]] setLabel:_NS("Basic")]; [[o_tableView tabViewItemAtIndex:[o_tableView indexOfTabViewItemWithIdentifier:@"basic"]] setLabel:_NS("Basic")];
[[o_tableView tabViewItemAtIndex:[o_tableView indexOfTabViewItemWithIdentifier:@"crop"]] setLabel:_NS("Crop")]; [[o_tableView tabViewItemAtIndex:[o_tableView indexOfTabViewItemWithIdentifier:@"crop"]] setLabel:_NS("Crop")];
......
...@@ -210,7 +210,7 @@ ...@@ -210,7 +210,7 @@
CGFloat f_deltaX = [theEvent deltaX]; CGFloat f_deltaX = [theEvent deltaX];
CGFloat f_deltaY = [theEvent deltaY]; CGFloat f_deltaY = [theEvent deltaY];
if (!OSX_SNOW_LEOPARD && [theEvent isDirectionInvertedFromDevice]) { if ([theEvent isDirectionInvertedFromDevice]) {
f_deltaX = -f_deltaX; f_deltaX = -f_deltaX;
f_deltaY = -f_deltaY; f_deltaY = -f_deltaY;
} }
......
...@@ -58,8 +58,7 @@ ...@@ -58,8 +58,7 @@
self = [super initWithContentRect:contentRect styleMask:styleMask backing:backingType defer:flag]; self = [super initWithContentRect:contentRect styleMask:styleMask backing:backingType defer:flag];
if (self) { if (self) {
/* we don't want this window to be restored on relaunch */ /* we don't want this window to be restored on relaunch */
if (!OSX_SNOW_LEOPARD) [self setRestorable:NO];
[self setRestorable:NO];
} }
return self; return self;
} }
...@@ -313,11 +312,7 @@ ...@@ -313,11 +312,7 @@
_darkInterface = config_GetInt(VLCIntf, "macosx-interfacestyle"); _darkInterface = config_GetInt(VLCIntf, "macosx-interfacestyle");
if (_darkInterface) { if (_darkInterface) {
styleMask = NSBorderlessWindowMask; styleMask = NSBorderlessWindowMask | NSResizableWindowMask;
#ifdef MAC_OS_X_VERSION_10_7
if (!OSX_SNOW_LEOPARD)
styleMask |= NSResizableWindowMask;
#endif
} }
self = [super initWithContentRect:contentRect styleMask:styleMask self = [super initWithContentRect:contentRect styleMask:styleMask
...@@ -335,17 +330,12 @@ ...@@ -335,17 +330,12 @@
- (void)awakeFromNib - (void)awakeFromNib
{ {
BOOL b_nativeFullscreenMode = NO; BOOL b_nativeFullscreenMode = var_InheritBool(VLCIntf, "macosx-nativefullscreenmode");
#ifdef MAC_OS_X_VERSION_10_7
if (!OSX_SNOW_LEOPARD)
b_nativeFullscreenMode = var_InheritBool(VLCIntf, "macosx-nativefullscreenmode");
#endif
if (b_nativeFullscreenMode) { if (b_nativeFullscreenMode) {
[self setCollectionBehavior: NSWindowCollectionBehaviorFullScreenPrimary]; [self setCollectionBehavior: NSWindowCollectionBehaviorFullScreenPrimary];
} }
[super awakeFromNib]; [super awakeFromNib];
} }
......
...@@ -91,8 +91,7 @@ ...@@ -91,8 +91,7 @@
- (void)windowDidLoad - (void)windowDidLoad
{ {
if (!OSX_SNOW_LEOPARD) [[self window] setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[[self window] setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
/* Get the localized info dictionary (InfoPlist.strings) */ /* Get the localized info dictionary (InfoPlist.strings) */
NSDictionary *o_local_dict; NSDictionary *o_local_dict;
......
...@@ -63,8 +63,7 @@ ...@@ -63,8 +63,7 @@
- (void)awakeFromNib - (void)awakeFromNib
{ {
if (!OSX_SNOW_LEOPARD) [_bookmarksWindow setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[_bookmarksWindow setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
_dataTable.dataSource = self; _dataTable.dataSource = self;
_dataTable.delegate = self; _dataTable.delegate = self;
......
...@@ -72,8 +72,7 @@ ...@@ -72,8 +72,7 @@
[win setOpaque:NO]; [win setOpaque:NO];
[win setHasShadow: NO]; [win setHasShadow: NO];
[win setBackgroundColor:[NSColor clearColor]]; [win setBackgroundColor:[NSColor clearColor]];
if (!OSX_SNOW_LEOPARD) [win setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[win setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
/* let the window sit on top of everything else and start out completely transparent */ /* let the window sit on top of everything else and start out completely transparent */
[win setLevel:NSModalPanelWindowLevel]; [win setLevel:NSModalPanelWindowLevel];
...@@ -90,8 +89,7 @@ ...@@ -90,8 +89,7 @@
if (!isInside) if (!isInside)
[self mouseExited:NULL]; [self mouseExited:NULL];
if (!OSX_SNOW_LEOPARD) [self setAnimationBehavior:NSWindowAnimationBehaviorNone];
[self setAnimationBehavior:NSWindowAnimationBehaviorNone];
/* get a notification if VLC isn't the active app anymore */ /* get a notification if VLC isn't the active app anymore */
[[NSNotificationCenter defaultCenter] [[NSNotificationCenter defaultCenter]
......
...@@ -618,10 +618,8 @@ audio_output_t *getAout(void) ...@@ -618,10 +618,8 @@ audio_output_t *getAout(void)
var_AddCallback(p_playlist, "volume", VolumeUpdated, (__bridge void *)self); var_AddCallback(p_playlist, "volume", VolumeUpdated, (__bridge void *)self);
var_AddCallback(p_playlist, "mute", VolumeUpdated, (__bridge void *)self); var_AddCallback(p_playlist, "mute", VolumeUpdated, (__bridge void *)self);
if (!OSX_SNOW_LEOPARD) { if ([NSApp currentSystemPresentationOptions] & NSApplicationPresentationFullScreen)
if ([NSApp currentSystemPresentationOptions] & NSApplicationPresentationFullScreen) var_SetBool(p_playlist, "fullscreen", YES);
var_SetBool(p_playlist, "fullscreen", YES);
}
/* load our Shared Dialogs nib */ /* load our Shared Dialogs nib */
[NSBundle loadNibNamed:@"SharedDialogs" owner: NSApp]; [NSBundle loadNibNamed:@"SharedDialogs" owner: NSApp];
...@@ -644,12 +642,7 @@ audio_output_t *getAout(void) ...@@ -644,12 +642,7 @@ audio_output_t *getAout(void)
[o_remote setClickCountEnabledButtons: kRemoteButtonPlay]; [o_remote setClickCountEnabledButtons: kRemoteButtonPlay];
[o_remote setDelegate: self]; [o_remote setDelegate: self];
/* yeah, we are done */ _nativeFullscreenMode = var_InheritBool(p_intf, "macosx-nativefullscreenmode");
_nativeFullscreenMode = NO;
#ifdef MAC_OS_X_VERSION_10_7
if (!OSX_SNOW_LEOPARD)
_nativeFullscreenMode = var_InheritBool(p_intf, "macosx-nativefullscreenmode");
#endif
if (config_GetInt(VLCIntf, "macosx-icon-change")) { if (config_GetInt(VLCIntf, "macosx-icon-change")) {
/* After day 354 of the year, the usual VLC cone is replaced by another cone /* After day 354 of the year, the usual VLC cone is replaced by another cone
......
...@@ -491,7 +491,7 @@ void _drawFrameInRect(NSRect frameRect) ...@@ -491,7 +491,7 @@ void _drawFrameInRect(NSRect frameRect)
CGFloat f_deltaY = [o_event deltaY]; CGFloat f_deltaY = [o_event deltaY];
CGFloat f_deltaX = [o_event deltaX]; CGFloat f_deltaX = [o_event deltaX];
if (!OSX_SNOW_LEOPARD && [o_event isDirectionInvertedFromDevice]) if ([o_event isDirectionInvertedFromDevice])
f_deltaX = -f_deltaX; // optimisation, actually double invertion of f_deltaY here f_deltaX = -f_deltaX; // optimisation, actually double invertion of f_deltaY here
else else
f_deltaY = -f_deltaY; f_deltaY = -f_deltaY;
...@@ -595,7 +595,7 @@ void _drawFrameInRect(NSRect frameRect) ...@@ -595,7 +595,7 @@ void _drawFrameInRect(NSRect frameRect)
CGFloat f_deltaY = [o_event deltaY]; CGFloat f_deltaY = [o_event deltaY];
CGFloat f_deltaX = [o_event deltaX]; CGFloat f_deltaX = [o_event deltaX];
if (!OSX_SNOW_LEOPARD && [o_event isDirectionInvertedFromDevice]) if ([o_event isDirectionInvertedFromDevice])
f_deltaX = -f_deltaX; // optimisation, actually double invertion of f_deltaY here f_deltaX = -f_deltaX; // optimisation, actually double invertion of f_deltaY here
else else
f_deltaY = -f_deltaY; f_deltaY = -f_deltaY;
......
...@@ -119,8 +119,7 @@ struct display_info_t ...@@ -119,8 +119,7 @@ struct display_info_t
- (void)awakeFromNib - (void)awakeFromNib
{ {
if (!OSX_SNOW_LEOPARD) [o_panel setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[o_panel setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[o_panel setTitle: _NS("Open Source")]; [o_panel setTitle: _NS("Open Source")];
[o_mrl_lbl setStringValue: _NS("Media Resource Locator (MRL)")]; [o_mrl_lbl setStringValue: _NS("Media Resource Locator (MRL)")];
......
...@@ -57,8 +57,7 @@ ...@@ -57,8 +57,7 @@
- (void)awakeFromNib - (void)awakeFromNib
{ {
[_infoPanel setExcludedFromWindowsMenu: YES]; [_infoPanel setExcludedFromWindowsMenu: YES];
if (!OSX_SNOW_LEOPARD) [_infoPanel setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[_infoPanel setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[_infoPanel setTitle: _NS("Media Information")]; [_infoPanel setTitle: _NS("Media Information")];
......
...@@ -183,8 +183,7 @@ ...@@ -183,8 +183,7 @@
{ {
p_intf = VLCIntf; p_intf = VLCIntf;
if (!OSX_SNOW_LEOPARD) [o_prefs_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[o_prefs_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[o_prefs_window setHidesOnDeactivate:YES]; [o_prefs_window setHidesOnDeactivate:YES];
[self initStrings]; [self initStrings];
......
...@@ -246,8 +246,7 @@ static NSString* VLCHotkeysSettingToolbarIdentifier = @"Hotkeys Settings Item Id ...@@ -246,8 +246,7 @@ static NSString* VLCHotkeysSettingToolbarIdentifier = @"Hotkeys Settings Item Id
[o_sprefs_toolbar setDelegate: self]; [o_sprefs_toolbar setDelegate: self];
[o_sprefs_win setToolbar: o_sprefs_toolbar]; [o_sprefs_win setToolbar: o_sprefs_toolbar];
if (!OSX_SNOW_LEOPARD) [o_sprefs_win setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[o_sprefs_win setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[o_sprefs_win setHidesOnDeactivate:YES]; [o_sprefs_win setHidesOnDeactivate:YES];
[o_hotkeys_listbox setTarget:self]; [o_hotkeys_listbox setTarget:self];
...@@ -582,14 +581,9 @@ static inline char * __config_GetLabel(vlc_object_t *p_this, const char *psz_nam ...@@ -582,14 +581,9 @@ static inline char * __config_GetLabel(vlc_object_t *p_this, const char *psz_nam
[self setupButton: o_intf_fspanel_ckb forBoolValue: "macosx-fspanel"]; [self setupButton: o_intf_fspanel_ckb forBoolValue: "macosx-fspanel"];
[self setupButton: o_intf_nativefullscreen_ckb forBoolValue: "macosx-nativefullscreenmode"]; [self setupButton: o_intf_nativefullscreen_ckb forBoolValue: "macosx-nativefullscreenmode"];
BOOL b_correct_sdk = NO;
#ifdef MAC_OS_X_VERSION_10_7 [o_intf_nativefullscreen_ckb setState: NSOffState];
b_correct_sdk = YES; [o_intf_nativefullscreen_ckb setEnabled: NO];
#endif
if (!(b_correct_sdk && !OSX_SNOW_LEOPARD)) {
[o_intf_nativefullscreen_ckb setState: NSOffState];
[o_intf_nativefullscreen_ckb setEnabled: NO];
}
[self setupButton: o_intf_embedded_ckb forBoolValue: "embedded-video"]; [self setupButton: o_intf_embedded_ckb forBoolValue: "embedded-video"];
......
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