]> git.sesse.net Git - vlc/commitdiff
Qt4 - Fix art display in the bgWidget, fix one volume bug, fix fullscreen button
authorJean-Baptiste Kempf <jb@videolan.org>
Mon, 25 Feb 2008 09:35:14 +0000 (09:35 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 25 Feb 2008 09:35:14 +0000 (09:35 +0000)
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/interface_widgets.hpp

index ed780dc20b777da8d54595ee3578db6433023515..4b1988839a89406f88aca64ff7995f4b56addadd 100644 (file)
@@ -178,7 +178,7 @@ BackgroundWidget::BackgroundWidget( intf_thread_t *_p_i )
     backgroundLayout->setColumnStretch( 0, 1 );
     backgroundLayout->setColumnStretch( 2, 1 );
 
-    CONNECT( THEMIM->getIM(), artChanged( QString ), this, update( QString ) );
+    CONNECT( THEMIM->getIM(), artChanged( QString ), this, updateArt( QString ) );
 }
 
 BackgroundWidget::~BackgroundWidget()
@@ -193,9 +193,9 @@ void BackgroundWidget::resizeEvent( QResizeEvent * event )
         label->show();
 }
 
-void BackgroundWidget::update( QString url )
+void BackgroundWidget::updateArt( QString url )
 {
-    if( url.isNull() )
+    if( url.isEmpty() )
     {
         if( QDate::currentDate().dayOfYear() >= 354 )
             label->setPixmap( QPixmap( ":/vlc128-christmas.png" ) );
@@ -616,11 +616,13 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
     volumeSlider->setValue( ( config_GetInt( p_intf, "volume" ) ) *
                               VOLUME_MAX / (AOUT_VOLUME_MAX/2) );
 
+    /* Force the update at build time in order to have a muted icon if needed */
+    updateVolume( volumeSlider->value() );
+
     /* Volume control connection */
     CONNECT( volumeSlider, valueChanged( int ), this, updateVolume( int ) );
     CONNECT( THEMIM, volumeChanged( void ), this, updateVolume( void ) );
 
-
     updateInput();
 }
 
@@ -716,7 +718,7 @@ void ControlsWidget::updateInput()
 {
     /* Activate the interface buttons according to the presence of the input */
     enableInput( THEMIM->getIM()->hasInput() );
-    enableVideo( THEMIM->getIM()->hasVideo() );
+    enableVideo( THEMIM->getIM()->hasVideo() && THEMIM->getIM()->hasInput() );
 }
 
 void ControlsWidget::setStatus( int status )
index f2fea47aedab9bba7547c21d2f3ec474230087d1..f81197bd18efb5a828190d5867e59e2b21a0bf4c 100644 (file)
@@ -95,7 +95,7 @@ private:
     virtual void resizeEvent( QResizeEvent * event );
 public slots:
     void toggle(){ TOGGLEV( this ); }
-    void update( QString );
+    void updateArt( QString );
 };
 
 class VisualSelector : public QFrame