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

Qt: disc open: support different values for disclabel/discpath

(cherry picked from commit 77360d6596ada918183311bd3292618cd799dc7f)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 1316f3b4
......@@ -304,7 +304,9 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
while( *drive )
{
if( GetDriveTypeA(drive) == DRIVE_CDROM )
{
ui.deviceCombo->addItem( drive );
}
/* go to next drive */
while( *(drive++) );
......@@ -414,17 +416,23 @@ void DiscOpenPanel::updateButtons()
/* Update the current MRL */
void DiscOpenPanel::updateMRL()
{
QString mrl = "";
QString mrl;
QString discPath;
QStringList fileList;
if( ui.deviceCombo->itemData( ui.deviceCombo->currentIndex() ) != QVariant::Invalid )
discPath = ui.deviceCombo->itemData( ui.deviceCombo->currentIndex() ).toString();
else
discPath = ui.deviceCombo->currentText();
/* CDDAX and VCDX not implemented. TODO ? No. */
/* DVD */
if( ui.dvdRadioButton->isChecked() ) {
if( !ui.dvdsimple->isChecked() )
mrl = "dvd://";
mrl = "dvd://" + discPath;
else
mrl = "dvdsimple://";
mrl += ui.deviceCombo->currentText();
mrl = "dvdsimple://" + discPath;
if( !ui.dvdsimple->isChecked() )
emit methodChanged( "dvdnav-caching" );
else
......@@ -439,7 +447,7 @@ void DiscOpenPanel::updateMRL()
/* VCD */
} else if ( ui.vcdRadioButton->isChecked() ) {
mrl = "vcd://" + ui.deviceCombo->currentText();
mrl = "vcd://" + discPath;
emit methodChanged( "vcd-caching" );
if( ui.titleSpin->value() > 0 ) {
......@@ -448,7 +456,7 @@ void DiscOpenPanel::updateMRL()
/* CDDA */
} else {
mrl = "cdda://" + ui.deviceCombo->currentText();
mrl = "cdda://" + discPath;
emit methodChanged( "cdda-caching" );
}
......
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