[vlc-commits] qt4: use current file's path as suggested destination path
Adrian Yanes
git at videolan.org
Tue Aug 6 10:31:01 CEST 2013
vlc | branch: master | Adrian Yanes <ayanes at gnu.org> | Mon Aug 5 14:30:26 2013 -0700| [b258b9cfbb137a68f745c86cbe51097d9a6c83a4] | committer: Jean-Baptiste Kempf
qt4: use current file's path as suggested destination path
closes #8981
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b258b9cfbb137a68f745c86cbe51097d9a6c83a4
---
modules/gui/qt4/components/sout/sout_widgets.cpp | 6 ++++--
modules/gui/qt4/components/sout/sout_widgets.hpp | 3 ++-
modules/gui/qt4/dialogs/convert.cpp | 2 +-
modules/gui/qt4/dialogs/sout.cpp | 2 +-
4 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/modules/gui/qt4/components/sout/sout_widgets.cpp b/modules/gui/qt4/components/sout/sout_widgets.cpp
index 8b0fc12..3b396b3 100644
--- a/modules/gui/qt4/components/sout/sout_widgets.cpp
+++ b/modules/gui/qt4/components/sout/sout_widgets.cpp
@@ -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();
}
diff --git a/modules/gui/qt4/components/sout/sout_widgets.hpp b/modules/gui/qt4/components/sout/sout_widgets.hpp
index 983170e..78ce467 100644
--- a/modules/gui/qt4/components/sout/sout_widgets.hpp
+++ b/modules/gui/qt4/components/sout/sout_widgets.hpp
@@ -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();
};
diff --git a/modules/gui/qt4/dialogs/convert.cpp b/modules/gui/qt4/dialogs/convert.cpp
index a61d032..6a8c8ac 100644
--- a/modules/gui/qt4/dialogs/convert.cpp
+++ b/modules/gui/qt4/dialogs/convert.cpp
@@ -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();
diff --git a/modules/gui/qt4/dialogs/sout.cpp b/modules/gui/qt4/dialogs/sout.cpp
index eb6fab5..f2d6a93 100644
--- a/modules/gui/qt4/dialogs/sout.cpp
+++ b/modules/gui/qt4/dialogs/sout.cpp
@@ -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:
More information about the vlc-commits
mailing list