]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/dialogs/open.cpp
Fix MRL generation for open dialog in order to stream. (#1575)
[vlc] / modules / gui / qt4 / dialogs / open.cpp
index 02826db4b382d4cd67a680ce6f5fe7f443625fa6..143e9df7a5a6b0f8d4305e2ce92663e67952591d 100644 (file)
@@ -148,6 +148,7 @@ OpenDialog::OpenDialog( QWidget *parent,
     CONNECT( ui.cacheSpinBox, valueChanged( int ), this, updateMRL() );
     CONNECT( ui.startTimeSpinBox, valueChanged( int ), this, updateMRL() );
     BUTTONACT( ui.advancedCheckBox, toggleAdvancedPanel() );
+    BUTTONACT( ui.slaveBrowseButton, browseInputSlave() );
 
     /* Buttons action */
     BUTTONACT( playButton, selectSlots() );
@@ -336,7 +337,7 @@ void OpenDialog::stream( bool b_transcode_only )
 {
     mrl = ui.advancedLineInput->text();
     toggleVisible();
-    THEDP->streamingDialog( this, mrl, b_transcode_only );
+    THEDP->streamingDialog( this, SeparateEntries( mrl )[0], b_transcode_only );
 }
 
 /* Update the MRL */
@@ -419,3 +420,11 @@ QStringList OpenDialog::SeparateEntries( QString entries )
 
     return entries_array;
 }
+
+void OpenDialog::browseInputSlave()
+{
+    OpenDialog *od = new OpenDialog( this, p_intf, true, SELECT );
+    od->exec();
+    ui.slaveText->setText( od->getMRL() );
+    delete od;
+}