]> git.sesse.net Git - vlc/commitdiff
Qt4 - Try to fix the detection of video tracks and show of related buttons, fix a...
authorJean-Baptiste Kempf <jb@videolan.org>
Mon, 28 Jan 2008 04:16:17 +0000 (04:16 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 28 Jan 2008 04:16:17 +0000 (04:16 +0000)
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/interface_widgets.hpp
modules/gui/qt4/input_manager.cpp

index 885f6762ebe4e05be05df4074760575c9829eaa8..ee0838b4f5d28bd9f71060d2759cb43735ef12f0 100644 (file)
@@ -590,6 +590,10 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
     /* Volume control connection */
     CONNECT( volumeSlider, valueChanged( int ), this, updateVolume( int ) );
     CONNECT( THEMIM, volumeChanged( void ), this, updateVolume( void ) );
+
+    CONNECT( THEMIM->getIM(), statusChanged( int ), this, updateInput() );
+
+    updateInput();
 }
 
 ControlsWidget::~ControlsWidget()
@@ -678,11 +682,13 @@ void ControlsWidget::updateVolume()
         volumeSlider->setValue( i_volume );
         b_my_volume = false;
     }
+}
 
+void ControlsWidget::updateInput()
+{
     /* Activate the interface buttons according to the presence of the input */
     enableInput( THEMIM->getIM()->hasInput() );
-    //enableVideo( THEMIM->getIM()->hasVideo() );
-    enableVideo( true );
+    enableVideo( THEMIM->getIM()->hasVideo() );
 }
 
 void ControlsWidget::setStatus( int status )
index 59275c66bf2d481f0301fcc06d56f24a35b1e2db..9ef01c11ac7d7c81cf2862eb6a794cd0b5d2ee2b 100644 (file)
@@ -182,6 +182,7 @@ private slots:
     void next();
     void updateVolume( int );
     void updateVolume( void );
+    void updateInput();
     void fullscreen();
     void extSettings();
     void faster();
index de9cf9bee18334ed79b7b5f25f1c92bce34edb3c..6752dd2fa9b7d64d5c6514d7806696c41d57c51c 100644 (file)
@@ -475,6 +475,7 @@ void MainInputManager::customEvent( QEvent *event )
         {
             im->delInput();
             emit inputChanged( NULL );
+            p_input = NULL;
         }
 
         if( !p_input )