]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/open.m
Quick patch to make pda.c inteface compile again. It disables the management of the...
[vlc] / modules / gui / macosx / open.m
index af42eb9be18ba7e65663af2489239b9163753230..df1c64c4d85247a2cd764df2e923c44627536e6c 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * open.m: MacOS X module for vlc
  *****************************************************************************
- * Copyright (C) 2002-2003 VideoLAN
+ * Copyright (C) 2002-2005 VideoLAN
  * $Id$
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net> 
@@ -129,6 +129,24 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
  *****************************************************************************/
 @implementation VLCOpen
 
+static VLCOpen *_o_sharedMainInstance = nil;
+
++ (VLCOpen *)sharedInstance
+{
+    return _o_sharedMainInstance ? _o_sharedMainInstance : [[self alloc] init];
+}
+
+- (id)init
+{
+    if( _o_sharedMainInstance) {
+        [self dealloc];
+    } else {
+        _o_sharedMainInstance = [super init];
+    }
+    
+    return _o_sharedMainInstance;
+}
+
 - (void)awakeFromNib
 {
     intf_thread_t * p_intf = VLCIntf;
@@ -358,19 +376,19 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
     }  
 }
 
-- (IBAction)openFileGeneric:(id)sender
+- (void)openFileGeneric
 {
     [self openFilePathChanged: nil];
     [self openTarget: 0];
 }
 
-- (IBAction)openDisc:(id)sender
+- (void)openDisc
 {
     [self openDiscTypeChanged: nil];
     [self openTarget: 1];
 }
 
-- (IBAction)openNet:(id)sender
+- (void)openNet
 {
     [self openNetModeChanged: nil];
     [self openTarget: 2];
@@ -704,7 +722,7 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
     [o_mrl setStringValue: o_mrl_string];
 }
 
-- (IBAction)openFile:(id)sender
+- (void)openFile
 {
     NSOpenPanel *o_open_panel = [NSOpenPanel openPanel];
     int i;