Commit af6a6b2b authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4: add the browsed folder to the device combo

parent b0be5abe
......@@ -334,6 +334,7 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
ui.browseDiscButton->setToolTip( qtr( I_DEVICE_TOOLTIP ));
ui.deviceCombo->setToolTip( qtr(I_DEVICE_TOOLTIP) );
ui.deviceCombo->setInsertPolicy( QComboBox::InsertAtTop );
#ifdef WIN32 /* Disc drives probing for Windows */
wchar_t szDrives[512];
......@@ -545,8 +546,12 @@ void DiscOpenPanel::browseDevice()
{
QString dir = QFileDialog::getExistingDirectory( this,
qtr( I_DEVICE_TOOLTIP ) );
if (!dir.isEmpty())
ui.deviceCombo->setEditText( toNativeSepNoSlash( dir ) );
if( !dir.isEmpty() )
{
ui.deviceCombo->addItem( toNativeSepNoSlash( dir ) );
ui.deviceCombo->setCurrentIndex( ui.deviceCombo->findText( toNativeSepNoSlash( dir ) ) );
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