]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/open_panels.cpp
Add "" around subtitles name. Fix #1528
[vlc] / modules / gui / qt4 / components / open_panels.cpp
index 181ec1c8a2d273f4db247e3031b7cb06ab665abc..3393c20a844949bcc4fd567ab37f6afb6f15ca81 100644 (file)
@@ -1,4 +1,4 @@
-/*****************************************************************************
+Au/*****************************************************************************
  * open.cpp : Panels for the open dialogs
  ****************************************************************************
  * Copyright (C) 2006-2007 the VideoLAN team
@@ -104,7 +104,7 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     listLabel[2]->setText( qtr( "Filter:" ) );
 
     dialogBox->layout()->setMargin( 0 );
-    dialogBox->layout()->setSizeConstraint( QLayout::SetMinimumSize );
+    dialogBox->layout()->setSizeConstraint( QLayout::SetNoConstraint );
 
     /** END of QFileDialog tweaking **/
 
@@ -161,7 +161,7 @@ void FileOpenPanel::updateMRL()
     }
 
     if( ui.subCheckBox->isChecked() ) {
-        mrl.append( " :sub-file=" + ui.subInput->text() );
+        mrl.append( " :sub-file=\"" + ui.subInput->text() + "\"" );
         int align = ui.alignSubComboBox->itemData(
                     ui.alignSubComboBox->currentIndex() ).toInt();
         mrl.append( " :subsdec-align=" + QString().setNum( align ) );
@@ -248,6 +248,7 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     BUTTONACT( ui.audioCDRadioButton, updateButtons() );
     BUTTONACT( ui.dvdsimple, updateButtons() );
     BUTTONACT( ui.browseDiscButton, browseDevice() );
+    BUTTONACT( ui.ejectButton, eject() );
 
     CONNECT( ui.deviceCombo, editTextChanged( QString ), this, updateMRL());
     CONNECT( ui.titleSpin, valueChanged( int ), this, updateMRL());
@@ -390,6 +391,11 @@ void DiscOpenPanel::browseDevice()
     updateMRL();
 }
 
+void DiscOpenPanel::eject()
+{
+    intf_Eject( p_intf, qtu( ui.deviceCombo->currentText() ) );
+}
+
 void DiscOpenPanel::accept()
 {}
 
@@ -934,8 +940,8 @@ void CaptureOpenPanel::updateMRL()
         break;
     case DSHOW_DEVICE:
         mrl = "dshow://";
-        mrl += " :dshow-vdev=" + QString("%1").arg( vdevDshowW->getValue() );
-        mrl += " :dshow-adev=" + QString("%1").arg( adevDshowW->getValue() );
+        mrl+= " :dshow-vdev=" + QString("\"%1\"").arg( vdevDshowW->getValue() );
+        mrl+= " :dshow-adev=" + QString("\"%1\"").arg( adevDshowW->getValue() );
         if( dshowVSizeLine->isModified() )
             mrl += " :dshow-size=" + dshowVSizeLine->text();
         break;