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

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

parent 21614a27
......@@ -35,6 +35,7 @@
#ifndef MAC_OS_X_VERSION_10_6
@protocol NSAnimationDelegate <NSObject> @end
@protocol NSApplicationDelegate <NSObject> @end
@protocol NSWindowDelegate <NSObject> @end
@protocol NSComboBoxDataSource <NSObject> @end
@protocol NSTextFieldDelegate <NSObject> @end
......
......@@ -86,7 +86,7 @@ struct intf_sys_t
@class VLCEmbeddedWindow;
@class VLCControls;
@class VLCPlaylist;
@interface VLCMain : NSObject <NSWindowDelegate>
@interface VLCMain : NSObject <NSWindowDelegate, NSApplicationDelegate>
{
intf_thread_t *p_intf; /* The main intf object */
input_thread_t *p_current_input;
......@@ -196,7 +196,6 @@ struct intf_sys_t
- (void)showFullscreenController;
- (void)updateDelays;
- (void)initStrings;
- (BOOL)application:(NSApplication *)o_app openFiles:(NSString *)o_filename;
- (IBAction)crashReporterAction:(id)sender;
- (IBAction)openCrashLog:(id)sender;
......
......@@ -906,7 +906,7 @@ static VLCMain *_o_sharedMainInstance = nil;
#pragma mark -
#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" );
char *psz_uri = make_URI([[o_names objectAtIndex:0] UTF8String], "file" );
......@@ -923,7 +923,7 @@ static VLCMain *_o_sharedMainInstance = nil;
if( !b_returned )
{
free( psz_uri );
return YES;
return;
}
}
}
......@@ -947,7 +947,7 @@ static VLCMain *_o_sharedMainInstance = nil;
else
[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 */
......
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