]> git.sesse.net Git - vlc/commitdiff
Try to allocate the DShow device list and the buttons ONLY when switching to it and...
authorJean-Baptiste Kempf <jb@videolan.org>
Thu, 7 Aug 2008 19:36:19 +0000 (12:36 -0700)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 7 Aug 2008 19:36:19 +0000 (12:36 -0700)
modules/gui/qt4/components/open_panels.cpp
modules/gui/qt4/components/open_panels.hpp

index 2f880851ddf823998869f368f49d4f82e540c24b..07717601960f124111f74f39f4b9cc6f9c7fed75 100644 (file)
@@ -584,19 +584,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     if( module_Exists( p_intf, "dshow" ) ){
     addModuleAndLayouts( DSHOW_DEVICE, dshow, "DirectShow" );
 
-    /* dshow Main */
-    int line = 0;
-    module_config_t *p_config =
-        config_FindConfig( VLC_OBJECT(p_intf), "dshow-vdev" );
-    vdevDshowW = new StringListConfigControl(
-        VLC_OBJECT(p_intf), p_config, this, false, dshowDevLayout, line );
-    line++;
-
-    p_config = config_FindConfig( VLC_OBJECT(p_intf), "dshow-adev" );
-    adevDshowW = new StringListConfigControl(
-        VLC_OBJECT(p_intf), p_config, this, false, dshowDevLayout, line );
-    line++;
-
+    devLayout = dshowDevLayout;
     /* dshow Properties */
     QLabel *dshowVSizeLabel = new QLabel( qtr( "Video size" ) );
     dshowPropLayout->addWidget( dshowVSizeLabel, 0, 0 );
@@ -1074,6 +1062,20 @@ void CaptureOpenPanel::updateButtons()
             bdaBandLabel->show();
         }
         break;
+    case DSHOW_DEVICE:
+        /* dshow Main */
+        int line = 0;
+        module_config_t *p_config =
+            config_FindConfig( VLC_OBJECT(p_intf), "dshow-vdev" );
+        vdevDshowW = new StringListConfigControl(
+                VLC_OBJECT(p_intf), p_config, this, false, devLayout, line );
+        line++;
+
+        p_config = config_FindConfig( VLC_OBJECT(p_intf), "dshow-adev" );
+        adevDshowW = new StringListConfigControl(
+                VLC_OBJECT(p_intf), p_config, this, false, devLayout, line );
+        line++;
+        break;
 #else
     case DVB_DEVICE:
         if( dvbs->isChecked() ) dvbFreq->setSuffix(" kHz");
index e2de731df174e39a114afbb996f9e62fd608fec6..f63a42afe0a51e247b48f88cd9860afd89180b1b 100644 (file)
@@ -187,6 +187,7 @@ private:
     QComboBox *bdaBandBox;
     StringListConfigControl *vdevDshowW, *adevDshowW;
     QLineEdit *dshowVSizeLine;
+    QGridLayout * devLayout;
 #else
     QRadioButton *dvbs, *dvbt, *dvbc;
     QSpinBox  *v4lFreq, *pvrFreq, *pvrBitr;