Commit 5c5bd817 authored by David Fuhrmann's avatar David Fuhrmann

macosx: add NSApplicationDelegate for VLCMain class and correct one method declaration

parent 21614a27
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#ifndef MAC_OS_X_VERSION_10_6 #ifndef MAC_OS_X_VERSION_10_6
@protocol NSAnimationDelegate <NSObject> @end @protocol NSAnimationDelegate <NSObject> @end
@protocol NSApplicationDelegate <NSObject> @end
@protocol NSWindowDelegate <NSObject> @end @protocol NSWindowDelegate <NSObject> @end
@protocol NSComboBoxDataSource <NSObject> @end @protocol NSComboBoxDataSource <NSObject> @end
@protocol NSTextFieldDelegate <NSObject> @end @protocol NSTextFieldDelegate <NSObject> @end
......
...@@ -86,7 +86,7 @@ struct intf_sys_t ...@@ -86,7 +86,7 @@ struct intf_sys_t
@class VLCEmbeddedWindow; @class VLCEmbeddedWindow;
@class VLCControls; @class VLCControls;
@class VLCPlaylist; @class VLCPlaylist;
@interface VLCMain : NSObject <NSWindowDelegate> @interface VLCMain : NSObject <NSWindowDelegate, NSApplicationDelegate>
{ {
intf_thread_t *p_intf; /* The main intf object */ intf_thread_t *p_intf; /* The main intf object */
input_thread_t *p_current_input; input_thread_t *p_current_input;
...@@ -196,7 +196,6 @@ struct intf_sys_t ...@@ -196,7 +196,6 @@ struct intf_sys_t
- (void)showFullscreenController; - (void)showFullscreenController;
- (void)updateDelays; - (void)updateDelays;
- (void)initStrings; - (void)initStrings;
- (BOOL)application:(NSApplication *)o_app openFiles:(NSString *)o_filename;
- (IBAction)crashReporterAction:(id)sender; - (IBAction)crashReporterAction:(id)sender;
- (IBAction)openCrashLog:(id)sender; - (IBAction)openCrashLog:(id)sender;
......
...@@ -906,7 +906,7 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -906,7 +906,7 @@ static VLCMain *_o_sharedMainInstance = nil;
#pragma mark - #pragma mark -
#pragma mark File opening over dock icon #pragma mark File opening over dock icon
- (BOOL)application:(NSApplication *)o_app openFiles:(NSArray *)o_names - (void)application:(NSApplication *)o_app openFiles:(NSArray *)o_names
{ {
BOOL b_autoplay = config_GetInt( VLCIntf, "macosx-autoplay" ); BOOL b_autoplay = config_GetInt( VLCIntf, "macosx-autoplay" );
char *psz_uri = make_URI([[o_names objectAtIndex:0] UTF8String], "file" ); char *psz_uri = make_URI([[o_names objectAtIndex:0] UTF8String], "file" );
...@@ -923,7 +923,7 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -923,7 +923,7 @@ static VLCMain *_o_sharedMainInstance = nil;
if( !b_returned ) if( !b_returned )
{ {
free( psz_uri ); free( psz_uri );
return YES; return;
} }
} }
} }
...@@ -947,7 +947,7 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -947,7 +947,7 @@ static VLCMain *_o_sharedMainInstance = nil;
else else
[o_playlist appendArray: o_result atPos: -1 enqueue: YES]; [o_playlist appendArray: o_result atPos: -1 enqueue: YES];
return( TRUE ); return;
} }
/* When user click in the Dock icon our double click in the finder */ /* When user click in the Dock icon our double click in the finder */
......
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