Commit 15f4f967 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4: add the browsed folder to the device combo

(cherry picked from commit af6a6b2b5b918b55e93083889f72cf970770e82d)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent b0c5a17d
...@@ -296,6 +296,7 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -296,6 +296,7 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
ui.browseDiscButton->setToolTip( qtr( I_DEVICE_TOOLTIP )); ui.browseDiscButton->setToolTip( qtr( I_DEVICE_TOOLTIP ));
ui.deviceCombo->setToolTip( qtr(I_DEVICE_TOOLTIP) ); ui.deviceCombo->setToolTip( qtr(I_DEVICE_TOOLTIP) );
ui.deviceCombo->setInsertPolicy( QComboBox::InsertAtTop );
#ifdef WIN32 /* Disc drives probing for Windows */ #ifdef WIN32 /* Disc drives probing for Windows */
wchar_t szDrives[512]; wchar_t szDrives[512];
...@@ -496,8 +497,12 @@ void DiscOpenPanel::browseDevice() ...@@ -496,8 +497,12 @@ void DiscOpenPanel::browseDevice()
{ {
QString dir = QFileDialog::getExistingDirectory( this, QString dir = QFileDialog::getExistingDirectory( this,
qtr( I_DEVICE_TOOLTIP ) ); qtr( I_DEVICE_TOOLTIP ) );
if (!dir.isEmpty()) if( !dir.isEmpty() )
ui.deviceCombo->setEditText( toNativeSepNoSlash( dir ) ); {
ui.deviceCombo->addItem( toNativeSepNoSlash( dir ) );
ui.deviceCombo->setCurrentIndex( ui.deviceCombo->findText( toNativeSepNoSlash( dir ) ) );
updateMRL();
}
updateMRL(); updateMRL();
} }
......
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