]> git.sesse.net Git - vlc/commitdiff
Qt4: add Linux discs choices once, not once per focus
authorRémi Denis-Courmont <remi@remlab.net>
Wed, 8 Feb 2012 18:42:34 +0000 (20:42 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Wed, 8 Feb 2012 18:43:30 +0000 (20:43 +0200)
Pointed-out-by: Rafaël Carré <funman@videolan.org>
modules/gui/qt4/components/open_panels.cpp

index b79d6213feff129e164558df367b5d89fde3d2d1..b6a7e3b94ae3d8e35b78ebd87d49e942fa63bf43 100644 (file)
@@ -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()