]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/open.cpp
Qt4 - make the Browse Device button to actually do something. Fix Trax#49. This has...
[vlc] / modules / gui / qt4 / components / open.cpp
index b05453c394015f4798a90f62cd2abc90c5b907ce..fdf3909cb2525eb24d84e0879b89a2426dbcef2b 100644 (file)
@@ -247,10 +247,11 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
 #endif /* Disc Probing under Windows */
 
     /* CONNECTs */
-    BUTTONACT( ui.dvdRadioButton, updateButtons());
-    BUTTONACT( ui.vcdRadioButton, updateButtons());
-    BUTTONACT( ui.audioCDRadioButton, updateButtons());
-    BUTTONACT( ui.dvdsimple,  updateButtons());
+    BUTTONACT( ui.dvdRadioButton, updateButtons() );
+    BUTTONACT( ui.vcdRadioButton, updateButtons() );
+    BUTTONACT( ui.audioCDRadioButton, updateButtons() );
+    BUTTONACT( ui.dvdsimple, updateButtons() );
+    BUTTONACT( ui.browseDiscButton, browseDevice() );
 
     CONNECT( ui.deviceCombo, editTextChanged( QString ), this, updateMRL());
     CONNECT( ui.titleSpin, valueChanged( int ), this, updateMRL());
@@ -348,6 +349,15 @@ void DiscOpenPanel::updateMRL()
     emit mrlUpdated( mrl );
 }
 
+void DiscOpenPanel::browseDevice()
+{
+    QString dir = QFileDialog::getExistingDirectory( 0, 
+            qtr("Open a device or a VIDEO_TS directory") );
+    if (!dir.isEmpty()) {
+        ui.deviceCombo->setEditText( dir );
+    }
+    updateMRL();
+}
 
 /**************************************************************************
  * Open Network streams and URL pages                                     *