[vlc-commits] Qt4: add Linux discs choices once, not once per focus

Rémi Denis-Courmont git at videolan.org
Wed Feb 8 19:43:32 CET 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Feb  8 20:42:34 2012 +0200| [500c1902bb2e2885e7aaca1f45a59ec26fb389e4] | committer: Rémi Denis-Courmont

Qt4: add Linux discs choices once, not once per focus

Pointed-out-by: Rafaël Carré <funman at videolan.org>

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

 modules/gui/qt4/components/open_panels.cpp |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp
index b79d621..b6a7e3b 100644
--- a/modules/gui/qt4/components/open_panels.cpp
+++ b/modules/gui/qt4/components/open_panels.cpp
@@ -338,6 +338,18 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     ui.deviceCombo->setToolTip( qtr(I_DEVICE_TOOLTIP) );
     ui.deviceCombo->setInsertPolicy( QComboBox::InsertAtTop );
 
+#ifndef WIN32
+    char const * const ppsz_discdevices[] = {
+        "sr*",
+        "sg*",
+        "scd*",
+        "dvd*",
+        "cd*"
+    };
+    QComboBox *discCombo = ui.deviceCombo; /* avoid namespacing in macro */
+    POPULATE_WITH_DEVS( ppsz_discdevices, discCombo );
+#endif
+
     /* CONNECTs */
     BUTTONACT( ui.dvdRadioButton,     updateButtons() );
     BUTTONACT( ui.bdRadioButton,      updateButtons() );
@@ -388,19 +400,7 @@ void DiscOpenPanel::onFocus()
         }
         SetErrorMode(oldMode);
     }
-#else /* Linux */
-    char const * const ppsz_discdevices[] = {
-        "sr*",
-        "sg*",
-        "scd*",
-        "dvd*",
-        "cd*"
-    };
-    QComboBox *discCombo = ui.deviceCombo; /* avoid namespacing in macro */
-    POPULATE_WITH_DEVS( ppsz_discdevices, discCombo );
 #endif
-
-
 }
 
 DiscOpenPanel::~DiscOpenPanel()



More information about the vlc-commits mailing list