Commit 1477998d authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: moved compatiblity fixes to a designated header

parent be5f55e5
...@@ -473,6 +473,7 @@ ...@@ -473,6 +473,7 @@
CC9B43AE13B29C79000205AE /* bottom-background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "bottom-background.png"; path = "Resources/mainwindow/bottom-background.png"; sourceTree = "<group>"; }; CC9B43AE13B29C79000205AE /* bottom-background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "bottom-background.png"; path = "Resources/mainwindow/bottom-background.png"; sourceTree = "<group>"; };
CC9B43B013B29FCF000205AE /* bottom-background_dark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "bottom-background_dark.png"; path = "Resources/mainwindow_dark/bottom-background_dark.png"; sourceTree = "<group>"; }; CC9B43B013B29FCF000205AE /* bottom-background_dark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "bottom-background_dark.png"; path = "Resources/mainwindow_dark/bottom-background_dark.png"; sourceTree = "<group>"; };
CC9E3E7913D1CFCF00429A71 /* qtcapture.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = qtcapture.m; path = ../../../modules/access/qtcapture.m; sourceTree = "<group>"; }; CC9E3E7913D1CFCF00429A71 /* qtcapture.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = qtcapture.m; path = ../../../modules/access/qtcapture.m; sourceTree = "<group>"; };
CCB0BB3013FAC9F40095BD0A /* CompatibilityFixes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CompatibilityFixes.h; path = ../../../modules/gui/macosx/CompatibilityFixes.h; sourceTree = "<group>"; };
CCB24D5D0D54BBAE004D780C /* simple_prefs.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; name = simple_prefs.m; path = ../../../modules/gui/macosx/simple_prefs.m; sourceTree = SOURCE_ROOT; }; CCB24D5D0D54BBAE004D780C /* simple_prefs.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; name = simple_prefs.m; path = ../../../modules/gui/macosx/simple_prefs.m; sourceTree = SOURCE_ROOT; };
CCB24D5E0D54BBAE004D780C /* simple_prefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = simple_prefs.h; path = ../../../modules/gui/macosx/simple_prefs.h; sourceTree = SOURCE_ROOT; }; CCB24D5E0D54BBAE004D780C /* simple_prefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = simple_prefs.h; path = ../../../modules/gui/macosx/simple_prefs.h; sourceTree = SOURCE_ROOT; };
CCBE999E0F922C51000705F8 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; }; CCBE999E0F922C51000705F8 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; };
...@@ -581,6 +582,7 @@ ...@@ -581,6 +582,7 @@
08FB77AFFE84173DC02AAC07 /* Classes */ = { 08FB77AFFE84173DC02AAC07 /* Classes */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
CCB0BB3013FAC9F40095BD0A /* CompatibilityFixes.h */,
8ED6C27E03E2EB1C0059A3A7 /* macosx.m */, 8ED6C27E03E2EB1C0059A3A7 /* macosx.m */,
8ED6C27C03E2EB1C0059A3A7 /* intf.h */, 8ED6C27C03E2EB1C0059A3A7 /* intf.h */,
8ED6C27D03E2EB1C0059A3A7 /* intf.m */, 8ED6C27D03E2EB1C0059A3A7 /* intf.m */,
......
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
/* this was added by the VideoLAN team to ensure Leopard-compatibility and is VLC-only */ /* this was added by the VideoLAN team to ensure Leopard-compatibility and is VLC-only */
#import "intf.h" #import "intf.h"
#import "CompatibilityFixes.h"
const char* AppleRemoteDeviceName = "AppleIRController"; const char* AppleRemoteDeviceName = "AppleIRController";
const int REMOTE_SWITCH_COOKIE=19; const int REMOTE_SWITCH_COOKIE=19;
...@@ -99,7 +100,7 @@ static AppleRemote *_o_sharedInstance = nil; ...@@ -99,7 +100,7 @@ static AppleRemote *_o_sharedInstance = nil;
[cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonPlay_Sleep] forKey:@"35_31_18_35_31_18_"]; [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonPlay_Sleep] forKey:@"35_31_18_35_31_18_"];
[cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteControl_Switched] forKey:@"19_"]; [cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteControl_Switched] forKey:@"19_"];
} }
else if( NSAppKitVersionNumber >= 1115.2 ) else if( OSX_LION )
{ {
/* omg, keys from the future */ /* omg, keys from the future */
msg_Dbg( VLCIntf, "using future AR cookies" ); msg_Dbg( VLCIntf, "using future AR cookies" );
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#import "intf.h" #import "intf.h"
#import "AudioEffects.h" #import "AudioEffects.h"
#import "../../audio_filter/equalizer_presets.h" #import "../../audio_filter/equalizer_presets.h"
#import "CompatibilityFixes.h"
#import <vlc_common.h> #import <vlc_common.h>
#import <vlc_aout_intf.h> #import <vlc_aout_intf.h>
...@@ -102,7 +103,7 @@ static VLCAudioEffects *_o_sharedInstance = nil; ...@@ -102,7 +103,7 @@ static VLCAudioEffects *_o_sharedInstance = nil;
[[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 (NSAppKitVersionNumber >= 1115.2) if (OSX_LION)
[o_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary]; [o_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[self setupEqualizer]; [self setupEqualizer];
......
/*****************************************************************************
* sdkfixes.h: MacOS X interface module
*****************************************************************************
* Copyright (C) 2011 VideoLAN
* $Id$
*
* Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import <Cocoa/Cocoa.h>
#pragma mark -
#pragma OS detection code
#define OSX_LEOPARD (NSAppKitVersionNumber < 1038 && NSAppKitVersionNumber >= 949)
#define OSX_SNOW_LEOPARD (NSAppKitVersionNumber < 1115 && NSAppKitVersionNumber >= 1038)
#define OSX_LION NSAppKitVersionNumber >= 1115.2
#pragma mark -
#pragma Fixes for OS X Leopard (10.5)
#ifndef MAC_OS_X_VERSION_10_6
@protocol NSAnimationDelegate <NSObject> @end
@protocol NSWindowDelegate <NSObject> @end
@protocol NSComboBoxDataSource <NSObject> @end
@protocol NSTextFieldDelegate <NSObject> @end
@protocol NSTableViewDataSource <NSObject> @end
@protocol NSOutlineViewDelegate <NSObject> @end
@protocol NSOutlineViewDataSource <NSObject> @end
@protocol NSToolbarDelegate <NSObject> @end
enum {
NSApplicationPresentationDefault = 0,
NSApplicationPresentationAutoHideDock = (1 << 0),
NSApplicationPresentationHideDock = (1 << 1),
NSApplicationPresentationAutoHideMenuBar = (1 << 2),
NSApplicationPresentationHideMenuBar = (1 << 3),
NSApplicationPresentationDisableAppleMenu = (1 << 4),
NSApplicationPresentationDisableProcessSwitching = (1 << 5),
NSApplicationPresentationDisableForceQuit = (1 << 6),
NSApplicationPresentationDisableSessionTermination = (1 << 7),
NSApplicationPresentationDisableHideApplication = (1 << 8),
NSApplicationPresentationDisableMenuBarTransparency = (1 << 9)
};
#endif
#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)
};
#endif
...@@ -30,10 +30,6 @@ ...@@ -30,10 +30,6 @@
#import "misc.h" #import "misc.h"
#import "fspanel.h" #import "fspanel.h"
#ifndef MAC_OS_X_VERSION_10_6
@protocol NSAnimationDelegate <NSObject> @end
#endif
@interface VLCMainWindow : NSWindow <PXSourceListDataSource, PXSourceListDelegate, NSWindowDelegate, NSAnimationDelegate> { @interface VLCMainWindow : NSWindow <PXSourceListDataSource, PXSourceListDelegate, NSWindowDelegate, NSAnimationDelegate> {
IBOutlet id o_play_btn; IBOutlet id o_play_btn;
IBOutlet id o_bwd_btn; IBOutlet id o_bwd_btn;
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#import "CompatibilityFixes.h"
#import "MainWindow.h" #import "MainWindow.h"
#import "intf.h" #import "intf.h"
#import "CoreInteraction.h" #import "CoreInteraction.h"
...@@ -218,7 +219,7 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -218,7 +219,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
o_temp_view = [[NSView alloc] init]; o_temp_view = [[NSView alloc] init];
[o_temp_view setAutoresizingMask:NSViewHeightSizable | NSViewWidthSizable]; [o_temp_view setAutoresizingMask:NSViewHeightSizable | NSViewWidthSizable];
[o_dropzone_view setFrame: [o_playlist_table frame]]; [o_dropzone_view setFrame: [o_playlist_table frame]];
if (NSAppKitVersionNumber >= 1115.2) if (OSX_LION)
[self setCollectionBehavior: NSWindowCollectionBehaviorFullScreenPrimary]; [self setCollectionBehavior: NSWindowCollectionBehaviorFullScreenPrimary];
/* create the sidebar */ /* create the sidebar */
...@@ -856,7 +857,7 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -856,7 +857,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (void)resizeWindow - (void)resizeWindow
{ {
if ( !b_fullscreen && !(NSAppKitVersionNumber >= 1115.2 && [NSApp currentSystemPresentationOptions] == NSApplicationPresentationFullScreen) ) if ( !b_fullscreen && !(OSX_LION && [NSApp currentSystemPresentationOptions] == NSApplicationPresentationFullScreen) )
{ {
NSPoint topleftbase; NSPoint topleftbase;
NSPoint topleftscreen; NSPoint topleftscreen;
...@@ -975,7 +976,7 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -975,7 +976,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
if ([screen isMainScreen]) if ([screen isMainScreen])
{ {
if (NSAppKitVersionNumber < 1038) // Leopard if (OSX_LEOPARD)
SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar); SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
else else
[NSApp setPresentationOptions:(NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar)]; [NSApp setPresentationOptions:(NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar)];
...@@ -1034,7 +1035,7 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -1034,7 +1035,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
if ([screen isMainScreen]) if ([screen isMainScreen])
{ {
if (NSAppKitVersionNumber < 1038) // Leopard if (OSX_LEOPARD)
SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar); SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
else else
[NSApp setPresentationOptions:(NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar)]; [NSApp setPresentationOptions:(NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar)];
...@@ -1143,7 +1144,7 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -1143,7 +1144,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
} }
[o_fspanel setNonActive: nil]; [o_fspanel setNonActive: nil];
if (NSAppKitVersionNumber < 1038) // Leopard if (OSX_LEOPARD)
SetSystemUIMode( kUIModeNormal, kUIOptionAutoShowMenuBar); SetSystemUIMode( kUIModeNormal, kUIOptionAutoShowMenuBar);
else else
[NSApp setPresentationOptions:(NSApplicationPresentationDefault)]; [NSApp setPresentationOptions:(NSApplicationPresentationDefault)];
...@@ -1169,7 +1170,7 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -1169,7 +1170,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[[o_video_view window] orderFront: self]; [[o_video_view window] orderFront: self];
[o_fspanel setNonActive: nil]; [o_fspanel setNonActive: nil];
if (NSAppKitVersionNumber < 1038) // Leopard if (OSX_LEOPARD)
SetSystemUIMode( kUIModeNormal, kUIOptionAutoShowMenuBar); SetSystemUIMode( kUIModeNormal, kUIOptionAutoShowMenuBar);
else else
[NSApp setPresentationOptions:(NSApplicationPresentationDefault)]; [NSApp setPresentationOptions:(NSApplicationPresentationDefault)];
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
LIBTOOL=@LIBTOOL@ --tag=CC LIBTOOL=@LIBTOOL@ --tag=CC
SOURCES_macosx = \ SOURCES_macosx = \
CompatibilityFixes.h \
AppleRemote.h \ AppleRemote.h \
AppleRemote.m \ AppleRemote.m \
SPInvocationGrabbing.h \ SPInvocationGrabbing.h \
......
...@@ -11,11 +11,6 @@ ...@@ -11,11 +11,6 @@
#import "PXSourceListDelegate.h" #import "PXSourceListDelegate.h"
#import "PXSourceListDataSource.h" #import "PXSourceListDataSource.h"
#ifndef MAC_OS_X_VERSION_10_6
@protocol NSOutlineViewDelegate <NSObject> @end
@protocol NSOutlineViewDataSource <NSObject> @end
#endif
@interface PXSourceList: NSOutlineView <NSOutlineViewDelegate, NSOutlineViewDataSource> @interface PXSourceList: NSOutlineView <NSOutlineViewDelegate, NSOutlineViewDataSource>
{ {
id <PXSourceListDelegate> _secondaryDelegate; //Used to store the publicly visible delegate id <PXSourceListDelegate> _secondaryDelegate; //Used to store the publicly visible delegate
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#import "CompatibilityFixes.h"
#import "intf.h" #import "intf.h"
#import <vlc_common.h> #import <vlc_common.h>
#import "TrackSynchronization.h" #import "TrackSynchronization.h"
...@@ -61,7 +62,7 @@ static VLCTrackSynchronization *_o_sharedInstance = nil; ...@@ -61,7 +62,7 @@ static VLCTrackSynchronization *_o_sharedInstance = nil;
[o_sv_speed_lbl setStringValue: _NS("Speed of the subtitles:")]; [o_sv_speed_lbl setStringValue: _NS("Speed of the subtitles:")];
[[o_sv_speed_value_fld formatter] setFormat:[NSString stringWithFormat:@"#,##0.000 %@", _NS("fps")]]; [[o_sv_speed_value_fld formatter] setFormat:[NSString stringWithFormat:@"#,##0.000 %@", _NS("fps")]];
if (NSAppKitVersionNumber >= 1115.2) if (OSX_LION)
[o_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary]; [o_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[self resetValues:self]; [self resetValues:self];
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#import "CompatibilityFixes.h"
#import "intf.h" #import "intf.h"
#import <vlc_common.h> #import <vlc_common.h>
#import "VideoEffects.h" #import "VideoEffects.h"
...@@ -60,7 +61,7 @@ static VLCVideoEffects *_o_sharedInstance = nil; ...@@ -60,7 +61,7 @@ static VLCVideoEffects *_o_sharedInstance = nil;
{ {
[o_window setTitle: _NS("Video Effects")]; [o_window setTitle: _NS("Video Effects")];
[o_window setExcludedFromWindowsMenu:YES]; [o_window setExcludedFromWindowsMenu:YES];
if (NSAppKitVersionNumber >= 1115.2) if (OSX_LION)
[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")];
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#import "about.h" #import "about.h"
#import <vlc_intf_strings.h> #import <vlc_intf_strings.h>
#import <vlc_about.h> #import <vlc_about.h>
#import "CompatibilityFixes.h"
#ifdef __x86_64__ #ifdef __x86_64__
#define PLATFORM "Intel 64bit" #define PLATFORM "Intel 64bit"
...@@ -69,7 +70,7 @@ static VLAboutBox *_o_sharedInstance = nil; ...@@ -69,7 +70,7 @@ static VLAboutBox *_o_sharedInstance = nil;
- (void)awakeFromNib - (void)awakeFromNib
{ {
if (NSAppKitVersionNumber >= 1115.2) if (OSX_LION)
[o_about_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary]; [o_about_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
} }
......
...@@ -37,13 +37,7 @@ ...@@ -37,13 +37,7 @@
#import "bookmarks.h" #import "bookmarks.h"
#import "wizard.h" #import "wizard.h"
#import <vlc_interface.h> #import <vlc_interface.h>
#import "CompatibilityFixes.h"
/*****************************************************************************
* VLCExtended implementation
*
* implements the GUI functions for the window, the data source and the
* delegate for o_tbl_dataTable
*****************************************************************************/
@implementation VLCBookmarks @implementation VLCBookmarks
...@@ -71,7 +65,7 @@ static VLCBookmarks *_o_sharedInstance = nil; ...@@ -71,7 +65,7 @@ static VLCBookmarks *_o_sharedInstance = nil;
- (void)awakeFromNib - (void)awakeFromNib
{ {
if (NSAppKitVersionNumber >= 1115.2) if (OSX_LION)
[o_bookmarks_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary]; [o_bookmarks_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[self initStrings]; [self initStrings];
......
...@@ -27,10 +27,6 @@ ...@@ -27,10 +27,6 @@
#import "misc.h" #import "misc.h"
#ifndef MAC_OS_X_VERSION_10_6
@protocol NSAnimationDelegate <NSObject> @end
#endif
@interface VLCEmbeddedWindow : NSWindow <NSWindowDelegate, NSAnimationDelegate> @interface VLCEmbeddedWindow : NSWindow <NSWindowDelegate, NSAnimationDelegate>
{ {
IBOutlet id o_btn_backward; IBOutlet id o_btn_backward;
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#import "MainWindow.h" #import "MainWindow.h"
#import "misc.h" #import "misc.h"
#import "fspanel.h" #import "fspanel.h"
#import "CompatibilityFixes.h"
@interface VLCFSPanel () @interface VLCFSPanel ()
- (void)hideMouse; - (void)hideMouse;
...@@ -49,7 +50,7 @@ ...@@ -49,7 +50,7 @@
[win setOpaque:NO]; [win setOpaque:NO];
[win setHasShadow: NO]; [win setHasShadow: NO];
[win setBackgroundColor:[NSColor clearColor]]; [win setBackgroundColor:[NSColor clearColor]];
if (NSAppKitVersionNumber >= 1115.2) if (OSX_LION)
[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 */
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include <vlc_vout_window.h> #include <vlc_vout_window.h>
#include <unistd.h> /* execl() */ #include <unistd.h> /* execl() */
#import "CompatibilityFixes.h"
#import "intf.h" #import "intf.h"
#import "MainMenu.h" #import "MainMenu.h"
#import "vout.h" #import "vout.h"
...@@ -1233,7 +1234,7 @@ unsigned int CocoaKeyToVLC( unichar i_key ) ...@@ -1233,7 +1234,7 @@ unsigned int CocoaKeyToVLC( unichar i_key )
playlist_t * p_playlist = pl_Get( VLCIntf ); playlist_t * p_playlist = pl_Get( VLCIntf );
BOOL b_fullscreen = var_GetBool( p_playlist, "fullscreen" ); BOOL b_fullscreen = var_GetBool( p_playlist, "fullscreen" );
if (NSAppKitVersionNumber >= 1115.2) if (OSX_LION)
{ {
[o_mainwindow toggleFullScreen: self]; [o_mainwindow toggleFullScreen: self];
if(b_fullscreen) if(b_fullscreen)
......
...@@ -25,13 +25,6 @@ ...@@ -25,13 +25,6 @@
#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>
#import <ApplicationServices/ApplicationServices.h> #import <ApplicationServices/ApplicationServices.h>
#ifndef MAC_OS_X_VERSION_10_6
@protocol NSWindowDelegate <NSObject> @end
NSUInteger NSApplicationPresentationAutoHideDock;
NSUInteger NSApplicationPresentationAutoHideMenuBar;
NSUInteger NSApplicationPresentationDefault;
#endif
/***************************************************************************** /*****************************************************************************
* NSAnimation (VLCAddition) * NSAnimation (VLCAddition)
*****************************************************************************/ *****************************************************************************/
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>
#import <Carbon/Carbon.h> #import <Carbon/Carbon.h>
#import "CompatibilityFixes.h"
#import "intf.h" /* VLCApplication */ #import "intf.h" /* VLCApplication */
#import "MainWindow.h" #import "MainWindow.h"
#import "misc.h" #import "misc.h"
...@@ -147,7 +148,7 @@ static NSMutableArray *blackoutWindows = NULL; ...@@ -147,7 +148,7 @@ static NSMutableArray *blackoutWindows = NULL;
{ {
if ([screen isMainScreen]) if ([screen isMainScreen])
{ {
if (NSAppKitVersionNumber < 1038) // Leopard if (OSX_LEOPARD)
SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar); SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
else else
[NSApp setPresentationOptions:(NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar)]; [NSApp setPresentationOptions:(NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar)];
...@@ -166,7 +167,7 @@ static NSMutableArray *blackoutWindows = NULL; ...@@ -166,7 +167,7 @@ static NSMutableArray *blackoutWindows = NULL;
[blackoutWindow closeAndAnimate: YES]; [blackoutWindow closeAndAnimate: YES];
} }
if (NSAppKitVersionNumber < 1038) // Leopard if (OSX_LEOPARD)
SetSystemUIMode( kUIModeNormal, kUIOptionAutoShowMenuBar); SetSystemUIMode( kUIModeNormal, kUIOptionAutoShowMenuBar);
else else
[NSApp setPresentationOptions:(NSApplicationPresentationDefault)]; [NSApp setPresentationOptions:(NSApplicationPresentationDefault)];
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>
#import <QTKit/QTKit.h> #import <QTKit/QTKit.h>
#import "CompatibilityFixes.h"
#import "intf.h" #import "intf.h"
#import "playlist.h" #import "playlist.h"
#import "open.h" #import "open.h"
...@@ -104,7 +105,7 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -104,7 +105,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
- (void)awakeFromNib - (void)awakeFromNib
{ {
if (NSAppKitVersionNumber >= 1115.2) if (OSX_LION)
[o_panel setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary]; [o_panel setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[o_panel setTitle: _NS("Open Source")]; [o_panel setTitle: _NS("Open Source")];
......
...@@ -26,10 +26,11 @@ ...@@ -26,10 +26,11 @@
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
#include "intf.h" #import "CompatibilityFixes.h"
#include "playlistinfo.h" #import "intf.h"
#include "playlist.h" #import "playlistinfo.h"
#include <vlc_url.h> #import "playlist.h"
#import <vlc_url.h>
/***************************************************************************** /*****************************************************************************
* VLCPlaylistInfo Implementation * VLCPlaylistInfo Implementation
...@@ -69,7 +70,7 @@ static VLCInfo *_o_sharedInstance = nil; ...@@ -69,7 +70,7 @@ static VLCInfo *_o_sharedInstance = nil;
{ {
[o_info_window setExcludedFromWindowsMenu: YES]; [o_info_window setExcludedFromWindowsMenu: YES];
[o_info_window setFloatingPanel: NO]; [o_info_window setFloatingPanel: NO];
if (NSAppKitVersionNumber >= 1115.2) if (OSX_LION)
[o_info_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary]; [o_info_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[o_info_window setTitle: _NS("Media Information")]; [o_info_window setTitle: _NS("Media Information")];
......
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
#include <vlc_common.h> #include <vlc_common.h>
#include <vlc_config_cat.h> #include <vlc_config_cat.h>
#import "CompatibilityFixes.h"
#import "intf.h" #import "intf.h"
#import "prefs.h" #import "prefs.h"
#import "simple_prefs.h" #import "simple_prefs.h"
...@@ -175,7 +176,7 @@ static VLCPrefs *_o_sharedMainInstance = nil; ...@@ -175,7 +176,7 @@ static VLCPrefs *_o_sharedMainInstance = nil;
{ {
p_intf = VLCIntf; p_intf = VLCIntf;
if (NSAppKitVersionNumber >= 1115.2) if (OSX_LION)
[o_prefs_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary]; [o_prefs_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[self initStrings]; [self initStrings];
......
...@@ -26,12 +26,6 @@ ...@@ -26,12 +26,6 @@
#define LEFTMARGIN 18 #define LEFTMARGIN 18
#define RIGHTMARGIN 18 #define RIGHTMARGIN 18
#ifndef MAC_OS_X_VERSION_10_6
@protocol NSComboBoxDataSource <NSObject> @end
@protocol NSTextFieldDelegate <NSObject> @end
@protocol NSTableViewDataSource <NSObject> @end
#endif
static NSMenu *o_keys_menu = nil; static NSMenu *o_keys_menu = nil;
@interface VLCConfigControl : NSView @interface VLCConfigControl : NSView
......
...@@ -25,10 +25,6 @@ ...@@ -25,10 +25,6 @@
#import "intf.h" #import "intf.h"
#import <vlc_common.h> #import <vlc_common.h>
#ifndef MAC_OS_X_VERSION_10_6
@protocol NSToolbarDelegate <NSObject> @end
#endif
@interface VLCSimplePrefs : NSObject <NSToolbarDelegate> @interface VLCSimplePrefs : NSObject <NSToolbarDelegate>
{ {
IBOutlet id o_audio_dolby_pop; IBOutlet id o_audio_dolby_pop;
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#import "CompatibilityFixes.h"
#import "simple_prefs.h" #import "simple_prefs.h"
#import "prefs.h" #import "prefs.h"
#import <vlc_keys.h> #import <vlc_keys.h>
...@@ -104,7 +105,7 @@ static VLCSimplePrefs *_o_sharedInstance = nil; ...@@ -104,7 +105,7 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
[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 (NSAppKitVersionNumber >= 1115.2) if (OSX_LION)
[o_sprefs_win setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary]; [o_sprefs_win setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
/* setup useful stuff */ /* setup useful stuff */
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
/***************************************************************************** /*****************************************************************************
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
#import "CompatibilityFixes.h"
#import "wizard.h" #import "wizard.h"
#import "intf.h" #import "intf.h"
#import "playlist.h" #import "playlist.h"
...@@ -71,7 +72,7 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -71,7 +72,7 @@ static VLCWizard *_o_sharedInstance = nil;
- (void)awakeFromNib - (void)awakeFromNib
{ {
if (NSAppKitVersionNumber >= 1115.2) if (OSX_LION)
[o_wizard_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary]; [o_wizard_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
/* some minor cleanup */ /* 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