[vlc-devel] commit: Qt: remove code duplication. (Jean-Baptiste Kempf )

git version control git at videolan.org
Sat Feb 7 20:59:32 CET 2009


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Feb  7 20:57:30 2009 +0100| [3439c052ecb9de8319e6ff0d3036fadc37d81b72] | committer: Jean-Baptiste Kempf 

Qt: remove code duplication.

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

 modules/gui/qt4/components/controller_widget.cpp |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/modules/gui/qt4/components/controller_widget.cpp b/modules/gui/qt4/components/controller_widget.cpp
index 7aa960c..8cad93a 100644
--- a/modules/gui/qt4/components/controller_widget.cpp
+++ b/modules/gui/qt4/components/controller_widget.cpp
@@ -55,20 +55,18 @@ SoundWidget::SoundWidget( QWidget *_parent, intf_thread_t * _p_intf,
     /* We might need a subLayout too */
     QVBoxLayout *subLayout;
 
+    volMuteLabel->installEventFilter( this );
+
     /* Normal View, click on icon mutes */
     if( !b_special )
     {
-        volMuteLabel->installEventFilter( this );
-        volumeMenu = NULL;
-        subLayout = NULL;
+        volumeMenu = NULL; subLayout = NULL;
     }
     else
     {
         /* Special view, click on button shows the slider */
         b_shiny = false;
 
-        volMuteLabel->installEventFilter( this );
-
         QFrame *volumeControlWidget = new QFrame;
         subLayout = new QVBoxLayout( volumeControlWidget );
         subLayout->setLayoutMargins( 4, 4, 4, 4, 4 );
@@ -77,7 +75,6 @@ SoundWidget::SoundWidget( QWidget *_parent, intf_thread_t * _p_intf,
         QWidgetAction *widgetAction = new QWidgetAction( volumeControlWidget );
         widgetAction->setDefaultWidget( volumeControlWidget );
         volumeMenu->addAction( widgetAction );
-
     }
 
     /* And add the label */




More information about the vlc-devel mailing list