]> git.sesse.net Git - vlc/commitdiff
* ./plugins/macosx/intf_controller.[mh]: you can now drag & drop files onto
authorJon Lech Johansen <jlj@videolan.org>
Mon, 20 May 2002 05:20:12 +0000 (05:20 +0000)
committerJon Lech Johansen <jlj@videolan.org>
Mon, 20 May 2002 05:20:12 +0000 (05:20 +0000)
    the vlc dock icon. CFBundleDocumentTypes in Info.plist doesn't seem to have
    any effect, so you'll have to hold down command-option when dropping until
    this is resolved.

plugins/macosx/intf_controller.h
plugins/macosx/intf_controller.m

index aace6149d0c678370ac33b84ed567f1cbab663c7..e40e18c619a25eba635faa816106261e74509b4d 100644 (file)
@@ -2,7 +2,7 @@
  * intf_controller.h: MacOS X plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: intf_controller.h,v 1.7 2002/05/18 13:33:44 massiot Exp $
+ * $Id: intf_controller.h,v 1.8 2002/05/20 05:20:12 jlj Exp $
  *
  * Authors: Florian G. Pflug <fgp@phlo.org>
  *
 
 /* Initialization & Event-Management */
 - (void)awakeFromNib;
-- (void)applicationDidFinishLaunching:(NSNotification *)o_notification;
 - (void)manage;
 - (void)terminate;
 
+/* NSApplication messages */
+- (void)applicationWillFinishLaunching:(NSNotification *)o_notification;
+- (BOOL)application:(NSApplication *)o_app openFile:(NSString *)o_filename;
+
 /* Functions atteched to user interface */
 - (IBAction)pause:(id)sender;
 - (IBAction)play:(id)sender;
index 8457303c0406e3eac622c14fe61144e8bd8c3249..076e052515c37c4353cdb8d6bdc87b540e5fb788 100644 (file)
@@ -2,7 +2,7 @@
  * intf_controller.c: MacOS X plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: intf_controller.m,v 1.3 2002/05/19 23:51:37 massiot Exp $
+ * $Id: intf_controller.m,v 1.4 2002/05/20 05:20:12 jlj Exp $
  *
  * Authors: Florian G. Pflug <fgp@phlo.org>
  *          Jon Lech Johansen <jon-vl@nanocrew.net>
     [o_window setTitle: pTitle];
 }
 
-- (void)applicationDidFinishLaunching:(NSNotification *)o_notification
-{
-    o_intf = [[Intf_VLCWrapper instance] retain];
-    o_vout = [[Vout_VLCWrapper instance] retain];
-
-    f_slider = f_slider_old = 0.0;
-    o_slider_lock = [[NSLock alloc] init];
-
-    [NSThread detachNewThreadSelector: @selector(manage)
-        toTarget: self withObject: nil];
-}
-
 - (void)manage
 {
     NSDate *sleepDate;
     [NSApp postEvent: pEvent atStart: YES];
 }
 
+/* NSApplication messages */
+
+- (void)applicationWillFinishLaunching:(NSNotification *)o_notification
+{
+    o_intf = [[Intf_VLCWrapper instance] retain];
+    o_vout = [[Vout_VLCWrapper instance] retain];
+
+    f_slider = f_slider_old = 0.0;
+    o_slider_lock = [[NSLock alloc] init];
+
+    [NSThread detachNewThreadSelector: @selector(manage)
+        toTarget: self withObject: nil];
+}
+
+- (BOOL)application:(NSApplication *)o_app openFile:(NSString *)o_filename
+{
+    NSArray *o_array;
+
+    o_array = [NSArray arrayWithObject: o_filename];
+    [o_intf openFiles: o_array];
+
+    return( TRUE );
+}
+
 /* Functions attached to user interface */
  
 - (IBAction)pause:(id)sender