[vlc-commits] Qt: disc open: support different values for disclabel/discpath
Jean-Baptiste Kempf
git at videolan.org
Wed Mar 16 23:02:47 CET 2011
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Mar 16 22:16:40 2011 +0100| [77360d6596ada918183311bd3292618cd799dc7f] | committer: Jean-Baptiste Kempf
Qt: disc open: support different values for disclabel/discpath
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=77360d6596ada918183311bd3292618cd799dc7f
---
modules/gui/qt4/components/open_panels.cpp | 20 ++++++++++++++------
1 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp
index 22fd50f..78ef67c 100644
--- a/modules/gui/qt4/components/open_panels.cpp
+++ b/modules/gui/qt4/components/open_panels.cpp
@@ -355,7 +355,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++) );
@@ -475,17 +477,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://" LOCALHOST;
+ mrl = "dvd://" LOCALHOST + discPath;
else
- mrl = "dvdsimple://" LOCALHOST;
- mrl += ui.deviceCombo->currentText();
+ mrl = "dvdsimple://" LOCALHOST + discPath;
+
if( !ui.dvdsimple->isChecked() )
emit methodChanged( "dvdnav-caching" );
else
@@ -500,7 +508,7 @@ void DiscOpenPanel::updateMRL()
/* VCD */
} else if ( ui.vcdRadioButton->isChecked() ) {
- mrl = "vcd://" LOCALHOST + ui.deviceCombo->currentText();
+ mrl = "vcd://" LOCALHOST + discPath;
emit methodChanged( "vcd-caching" );
if( ui.titleSpin->value() > 0 ) {
@@ -509,7 +517,7 @@ void DiscOpenPanel::updateMRL()
/* CDDA */
} else {
- mrl = "cdda://" LOCALHOST + ui.deviceCombo->currentText();
+ mrl = "cdda://" LOCALHOST + discPath;
emit methodChanged( "cdda-caching" );
}
More information about the vlc-commits
mailing list