[vlc-commits] Qt: preselect DVD drive

Jean-Baptiste Kempf git at videolan.org
Mon Aug 27 20:01:18 CEST 2012


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Aug 27 20:00:54 2012 +0200| [fa41853f7a71dc6cbf92197c0c17e94341339547] | committer: Jean-Baptiste Kempf

Qt: preselect DVD drive

Close #6719

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fa41853f7a71dc6cbf92197c0c17e94341339547
---

 modules/gui/qt4/components/open_panels.cpp |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp
index 95b6fa4..92498e2 100644
--- a/modules/gui/qt4/components/open_panels.cpp
+++ b/modules/gui/qt4/components/open_panels.cpp
@@ -348,6 +348,9 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     };
     QComboBox *discCombo = ui.deviceCombo; /* avoid namespacing in macro */
     POPULATE_WITH_DEVS( ppsz_discdevices, discCombo );
+    int temp = ui.deviceCombo->findData( config_GetPsz( p_intf, "dvd" ), Qt::UserRole, Qt::MatchStartsWith );
+    if( temp != -1 )
+        ui.deviceCombo->setCurrentIndex( temp );
 #endif
 
     /* CONNECTs */



More information about the vlc-commits mailing list