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: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 6ee77139
......@@ -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();
}
......
......@@ -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();
};
......
......@@ -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();
......
......@@ -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:
......
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