]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/intf.m
* controls.m: call openFileGeneric via VLCMain and not directly from VLCOpen
[vlc] / modules / gui / macosx / intf.m
index 5132481cb2a72ceacf0aa6fc0a3bc843f0c19cef..6d76c752aff76e42f6108acd70ff7362d5fb03b2 100644 (file)
@@ -37,6 +37,7 @@
 #include "playlist.h"
 #include "controls.h"
 #include "about.h"
+#include "open.h"
 
 /*****************************************************************************
  * Local prototypes.
@@ -293,6 +294,7 @@ static VLCMain *_o_sharedMainInstance = nil;
     
     o_about = [[VLAboutBox alloc] init];
     o_prefs = [[VLCPrefs alloc] init];
+    o_open = [[VLCOpen alloc] init];
     
     return _o_sharedMainInstance;
 }
@@ -1283,6 +1285,54 @@ static VLCMain *_o_sharedMainInstance = nil;
     [self application: nil openFile: [sender title]];
 }
 
+- (IBAction)intfOpenFile:(id)sender
+{
+    if (!nib_open_loaded)
+    {
+        nib_open_loaded = [NSBundle loadNibNamed:@"Open" owner:self];
+        [o_open awakeFromNib];
+        [o_open openFile];
+    } else {
+        [o_open openFile];
+    }
+}
+
+- (IBAction)intfOpenFileGeneric:(id)sender
+{
+    if (!nib_open_loaded)
+    {
+        nib_open_loaded = [NSBundle loadNibNamed:@"Open" owner:self];
+        [o_open awakeFromNib];
+        [o_open openFileGeneric];
+    } else {
+        [o_open openFileGeneric];
+    }
+}
+
+- (IBAction)intfOpenDisc:(id)sender
+{
+    if (!nib_open_loaded)
+    {
+        nib_open_loaded = [NSBundle loadNibNamed:@"Open" owner:self];
+        [o_open awakeFromNib];
+        [o_open openDisc];
+    } else {
+        [o_open openDisc];
+    }
+}
+
+- (IBAction)intfOpenNet:(id)sender
+{
+    if (!nib_open_loaded)
+    {
+        nib_open_loaded = [NSBundle loadNibNamed:@"Open" owner:self];
+        [o_open awakeFromNib];
+        [o_open openNet];
+    } else {
+        [o_open openNet];
+    }
+}
+
 - (IBAction)viewAbout:(id)sender
 {
     [o_about showPanel];