vlc | branch: master | David Fuhrmann <[email protected]> | Mon Jun 
18 10:22:03 2012 +0200| [5c5bd8171966dc9a5222e994d098d4dc389cdd3c] | committer: 
David Fuhrmann

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

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5c5bd8171966dc9a5222e994d098d4dc389cdd3c
---

 modules/gui/macosx/CompatibilityFixes.h |    1 +
 modules/gui/macosx/intf.h               |    3 +--
 modules/gui/macosx/intf.m               |    6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/gui/macosx/CompatibilityFixes.h 
b/modules/gui/macosx/CompatibilityFixes.h
index cc0d504..b4d85d9 100644
--- a/modules/gui/macosx/CompatibilityFixes.h
+++ b/modules/gui/macosx/CompatibilityFixes.h
@@ -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
diff --git a/modules/gui/macosx/intf.h b/modules/gui/macosx/intf.h
index 9bf57ce..61e0cae 100644
--- a/modules/gui/macosx/intf.h
+++ b/modules/gui/macosx/intf.h
@@ -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;
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index a9f2e05..c0572f3 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -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 */

_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to