Commit b258b9cf authored by Adrian Yanes's avatar Adrian Yanes Committed by Jean-Baptiste Kempf

qt4: use current file's path as suggested destination path

closes #8981
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 6ee77139
...@@ -80,8 +80,10 @@ void SoutInputBox::setMRL( const QString& mrl ) ...@@ -80,8 +80,10 @@ void SoutInputBox::setMRL( const QString& mrl )
#define CS( x ) connect( x, SIGNAL(valueChanged(int)), this, SIGNAL(mrlUpdated()) ); #define CS( x ) connect( x, SIGNAL(valueChanged(int)), this, SIGNAL(mrlUpdated()) );
/* FileDest Box */ /* 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; QPushButton *fileSelectButton;
QGridLayout *layout = new QGridLayout( this ); QGridLayout *layout = new QGridLayout( this );
...@@ -133,7 +135,7 @@ QString FileDestBox::getMRL( const QString& mux ) ...@@ -133,7 +135,7 @@ QString FileDestBox::getMRL( const QString& mux )
void FileDestBox::fileBrowse() void FileDestBox::fileBrowse()
{ {
QString fileName = QFileDialog::getSaveFileName( this, qtr( "Save file..." ), 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 ) ); fileEdit->setText( toNativeSeparators( fileName ) );
emit mrlUpdated(); emit mrlUpdated();
} }
......
...@@ -60,10 +60,11 @@ class FileDestBox: public VirtualDestBox ...@@ -60,10 +60,11 @@ class FileDestBox: public VirtualDestBox
{ {
Q_OBJECT Q_OBJECT
public: public:
FileDestBox( QWidget *_parent = NULL ); FileDestBox( QWidget *_parent = NULL, intf_thread_t * = NULL );
virtual QString getMRL( const QString& ); virtual QString getMRL( const QString& );
private: private:
QLineEdit *fileEdit; QLineEdit *fileEdit;
intf_thread_t *p_intf;
private slots: private slots:
void fileBrowse(); void fileBrowse();
}; };
......
...@@ -128,7 +128,7 @@ void ConvertDialog::fileBrowse() ...@@ -128,7 +128,7 @@ void ConvertDialog::fileBrowse()
QString fileExtension = ( ! profile->isEnabled() ) ? ".*" : "." + profile->getMux(); QString fileExtension = ( ! profile->isEnabled() ) ? ".*" : "." + profile->getMux();
QString fileName = QFileDialog::getSaveFileName( this, qtr( "Save file..." ), QString fileName = QFileDialog::getSaveFileName( this, qtr( "Save file..." ),
"", p_intf->p_sys->filepath,
QString( qtr( "Containers (*" ) + fileExtension + ")" ) ); QString( qtr( "Containers (*" ) + fileExtension + ")" ) );
fileLine->setText( toNativeSeparators( fileName ) ); fileLine->setText( toNativeSeparators( fileName ) );
setDestinationFileExtension(); setDestinationFileExtension();
......
...@@ -114,7 +114,7 @@ void SoutDialog::addDest( ) ...@@ -114,7 +114,7 @@ void SoutDialog::addDest( )
switch( ui.destBox->currentIndex() ) switch( ui.destBox->currentIndex() )
{ {
case 0: case 0:
db = new FileDestBox( this ); db = new FileDestBox( this, p_intf );
caption = qtr( "File" ); caption = qtr( "File" );
break; break;
case 1: case 1:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment