]> git.sesse.net Git - vlc/commitdiff
qt4: use current file's path as suggested destination path
authorAdrian Yanes <ayanes@gnu.org>
Mon, 5 Aug 2013 21:30:26 +0000 (14:30 -0700)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 6 Aug 2013 08:21:48 +0000 (10:21 +0200)
closes #8981

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/gui/qt4/components/sout/sout_widgets.cpp
modules/gui/qt4/components/sout/sout_widgets.hpp
modules/gui/qt4/dialogs/convert.cpp
modules/gui/qt4/dialogs/sout.cpp

index 8b0fc1281e7f557201deaa4136e2687a279ddc70..3b396b32c9c30469bb3e7310cbc42d1b2b74c8ec 100644 (file)
@@ -80,8 +80,10 @@ void SoutInputBox::setMRL( const QString& mrl )
 #define CS( x ) connect( x, SIGNAL(valueChanged(int)), this, SIGNAL(mrlUpdated()) );
 
 /* FileDest Box */
-FileDestBox::FileDestBox( QWidget *_parent ) : VirtualDestBox( _parent )
+FileDestBox::FileDestBox( QWidget *_parent, intf_thread_t * _p_intf ) : VirtualDestBox( _parent )
 {
+    p_intf = _p_intf;
+
     QPushButton *fileSelectButton;
     QGridLayout *layout = new QGridLayout( this );
 
@@ -133,7 +135,7 @@ QString FileDestBox::getMRL( const QString& mux )
 void FileDestBox::fileBrowse()
 {
     QString fileName = QFileDialog::getSaveFileName( this, qtr( "Save file..." ),
-            "", qtr( "Containers (*.ps *.ts *.mpg *.ogg *.asf *.mp4 *.mov *.wav *.raw *.flv *.webm)" ) );
+            p_intf->p_sys->filepath, qtr( "Containers (*.ps *.ts *.mpg *.ogg *.asf *.mp4 *.mov *.wav *.raw *.flv *.webm)" ) );
     fileEdit->setText( toNativeSeparators( fileName ) );
     emit mrlUpdated();
 }
index 983170e00afc10624354116990a01ee82754e79b..78ce46783412e0f54e7d4d7ec5b2ab242144c3d7 100644 (file)
@@ -60,10 +60,11 @@ class FileDestBox: public VirtualDestBox
 {
     Q_OBJECT
     public:
-        FileDestBox( QWidget *_parent = NULL );
+        FileDestBox( QWidget *_parent = NULL, intf_thread_t * = NULL );
         virtual QString getMRL( const QString& );
     private:
         QLineEdit *fileEdit;
+        intf_thread_t *p_intf;
     private slots:
         void fileBrowse();
 };
index a61d032e74cdbc2b9758f2fa54d846db5af80bf4..6a8c8ac1c596c1a1e1fb6a5b21d065a442e28848 100644 (file)
@@ -128,7 +128,7 @@ void ConvertDialog::fileBrowse()
     QString fileExtension = ( ! profile->isEnabled() ) ? ".*" : "." + profile->getMux();
 
     QString fileName = QFileDialog::getSaveFileName( this, qtr( "Save file..." ),
-        "",
+        p_intf->p_sys->filepath,
         QString( qtr( "Containers (*" ) + fileExtension + ")" ) );
     fileLine->setText( toNativeSeparators( fileName ) );
     setDestinationFileExtension();
index eb6fab5d6e2feed9cb594b98f981e0e76fa9c495..f2d6a93ca545eddb4656bd60ff07f8881a94d05a 100644 (file)
@@ -114,7 +114,7 @@ void SoutDialog::addDest( )
     switch( ui.destBox->currentIndex() )
     {
         case 0:
-            db = new FileDestBox( this );
+            db = new FileDestBox( this, p_intf );
             caption = qtr( "File" );
             break;
         case 1: