From dac7641538885c5a73c34118a6f3e14dcedb9fae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org> Date: Wed, 3 Aug 2011 02:08:58 +0200 Subject: [PATCH] macosx: fixed compilation when using the 10.5 SDK --- modules/gui/macosx/MainWindow.h | 8 +++----- modules/gui/macosx/MainWindow.m | 1 - modules/gui/macosx/SideBarItem.h | 4 ++-- modules/gui/macosx/SideBarItem.m | 14 +++++++------- modules/gui/macosx/intf.h | 4 +--- modules/gui/macosx/intf.m | 2 +- modules/gui/macosx/playlist.h | 5 ++--- modules/gui/macosx/prefs_widgets.h | 1 + 8 files changed, 17 insertions(+), 22 deletions(-) diff --git a/modules/gui/macosx/MainWindow.h b/modules/gui/macosx/MainWindow.h index ce6719d5c555..ca4bed6406b1 100644 --- a/modules/gui/macosx/MainWindow.h +++ b/modules/gui/macosx/MainWindow.h @@ -27,10 +27,7 @@ #import <Cocoa/Cocoa.h> #import "PXSourceList.h" #import <vlc_input.h> - -#ifndef MAC_OS_X_VERSION_10_6 -@protocol NSWindowDelegate <NSObject> @end -#endif +#import "misc.h" @interface VLCMainWindow : NSWindow <PXSourceListDataSource, PXSourceListDelegate, NSWindowDelegate> { IBOutlet id o_play_btn; @@ -126,4 +123,5 @@ NSImage * o_time_sld_gradient_right_img; } - (void)loadImagesInDarkStyle:(BOOL)b_value; -@end \ No newline at end of file +@end + diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m index 282afb0216da..94bac4c18900 100644 --- a/modules/gui/macosx/MainWindow.m +++ b/modules/gui/macosx/MainWindow.m @@ -29,7 +29,6 @@ #import "CoreInteraction.h" #import "AudioEffects.h" #import "MainMenu.h" -#import "misc.h" #import "controls.h" // TODO: remove me #import "SideBarItem.h" #import <vlc_playlist.h> diff --git a/modules/gui/macosx/SideBarItem.h b/modules/gui/macosx/SideBarItem.h index 97dee486d611..91d7b782e469 100644 --- a/modules/gui/macosx/SideBarItem.h +++ b/modules/gui/macosx/SideBarItem.h @@ -11,7 +11,7 @@ #import <Cocoa/Cocoa.h> /*An example of a class that could be used to represent a Source List Item - + Provides a title, an identifier, and an icon to be shown, as well as a badge value and a property to determine whether the current item has a badge or not (`badgeValue` is set to -1 if no badge is shown) @@ -32,7 +32,7 @@ NSString *identifier; NSImage *icon; NSInteger badgeValue; - + NSArray *children; } diff --git a/modules/gui/macosx/SideBarItem.m b/modules/gui/macosx/SideBarItem.m index faa71e306bab..b646d84efbaa 100644 --- a/modules/gui/macosx/SideBarItem.m +++ b/modules/gui/macosx/SideBarItem.m @@ -30,15 +30,15 @@ { badgeValue = -1; //We don't want a badge value by default } - + return self; } + (id)itemWithTitle:(NSString*)aTitle identifier:(NSString*)anIdentifier -{ +{ SideBarItem *item = [SideBarItem itemWithTitle:aTitle identifier:anIdentifier icon:nil]; - + return item; } @@ -46,11 +46,11 @@ + (id)itemWithTitle:(NSString*)aTitle identifier:(NSString*)anIdentifier icon:(NSImage*)anIcon { SideBarItem *item = [[[SideBarItem alloc] init] autorelease]; - + [item setTitle:aTitle]; [item setIdentifier:anIdentifier]; [item setIcon:anIcon]; - + return item; } @@ -60,7 +60,7 @@ [identifier release]; [icon release]; [children release]; - + [super dealloc]; } @@ -70,7 +70,7 @@ identifier = nil; icon = nil; children = nil; - + [super finalize]; } diff --git a/modules/gui/macosx/intf.h b/modules/gui/macosx/intf.h index 2755a0c62003..efe83b1bc8ca 100644 --- a/modules/gui/macosx/intf.h +++ b/modules/gui/macosx/intf.h @@ -37,6 +37,7 @@ #include <Cocoa/Cocoa.h> #import "SPMediaKeyTap.h" /* for the media key support */ +#import "misc.h" /***************************************************************************** * Local prototypes. @@ -78,9 +79,6 @@ struct intf_sys_t /***************************************************************************** * VLCMain interface *****************************************************************************/ -#ifndef MAC_OS_X_VERSION_10_6 -@protocol NSWindowDelegate <NSObject> @end -#endif @class AppleRemote; @class VLCInformation; @class VLCEmbeddedWindow; diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m index b5baa0bb7db0..03b7cac05d1b 100644 --- a/modules/gui/macosx/intf.m +++ b/modules/gui/macosx/intf.m @@ -290,7 +290,7 @@ static int InputEvent( vlc_object_t *p_this, const char *psz_var, case INPUT_EVENT_DEAD: [[VLCMain sharedInstance] updateName]; - [[VLCMain sharedInstance] updateTimeSlider]; + [[VLCMain sharedInstance] updatePlaybackPosition]; break; case INPUT_EVENT_ABORT: diff --git a/modules/gui/macosx/playlist.h b/modules/gui/macosx/playlist.h index b356ddaab4e5..d70db58c1bee 100644 --- a/modules/gui/macosx/playlist.h +++ b/modules/gui/macosx/playlist.h @@ -22,6 +22,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ +#import "PXSourceList.h" + /***************************************************************************** * VLCPlaylistView interface *****************************************************************************/ @@ -34,9 +36,6 @@ /***************************************************************************** * VLCPlaylistCommon interface *****************************************************************************/ -#ifndef MAC_OS_X_VERSION_10_6 -@protocol NSOutlineViewDataSource <NSObject> @end -#endif @interface VLCPlaylistCommon : NSObject <NSOutlineViewDataSource, NSOutlineViewDelegate> { IBOutlet id o_tc_name; diff --git a/modules/gui/macosx/prefs_widgets.h b/modules/gui/macosx/prefs_widgets.h index 0dc983c33d3f..6d3db0cb7599 100644 --- a/modules/gui/macosx/prefs_widgets.h +++ b/modules/gui/macosx/prefs_widgets.h @@ -29,6 +29,7 @@ #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; -- GitLab