[vlc-commits] Qt: fix semantics and behaviour for chapters buttons

Jean-Baptiste Kempf git at videolan.org
Fri Apr 6 13:29:52 CEST 2012


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Apr  6 13:29:13 2012 +0200| [2059bea41c0ea723466ccbb3e9d9550b26e2e2ee] | committer: Jean-Baptiste Kempf

Qt: fix semantics and behaviour for chapters buttons

No sense to display chapter buttons with 1title&1chapter

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

 modules/gui/qt4/components/controller.cpp |    6 +++---
 modules/gui/qt4/input_manager.cpp         |    7 ++++---
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/modules/gui/qt4/components/controller.cpp b/modules/gui/qt4/components/controller.cpp
index 6622cea..b47d1e2 100644
--- a/modules/gui/qt4/components/controller.cpp
+++ b/modules/gui/qt4/components/controller.cpp
@@ -348,7 +348,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
     case INPUT_SLIDER: {
         SeekSlider *slider = new SeekSlider( Qt::Horizontal, NULL, !b_shiny );
         SeekPoints *chapters = new SeekPoints( this, p_intf );
-        CONNECT( THEMIM->getIM(), titleChanged( bool ), chapters, update() );
+        CONNECT( THEMIM->getIM(), chapterChanged( bool ), chapters, update() );
         slider->setChapters( chapters );
 
         /* Update the position when the IM has changed */
@@ -545,9 +545,9 @@ QFrame *AbstractController::discFrame()
 
     /* Change the navigation button display when the IM
        navigation changes */
-    CONNECT( THEMIM->getIM(), titleChanged( bool ),
-            discFrame, setVisible( bool ) );
     CONNECT( THEMIM->getIM(), chapterChanged( bool ),
+            discFrame, setVisible( bool ) );
+    CONNECT( THEMIM->getIM(), titleChanged( bool ),
             menuButton, setVisible( bool ) );
     /* Changes the IM navigation when triggered on the nav buttons */
     CONNECT( prevSectionButton, clicked(), THEMIM->getIM(),
diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
index e3b6be6..8d62aea 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -423,13 +423,14 @@ void InputManager::UpdateNavigation()
 
     if( val.i_int > 0 )
     {
-        emit titleChanged( true );
         /* p_input != NULL since val.i_int != 0 */
         var_Change( p_input, "chapter", VLC_VAR_CHOICESCOUNT, &val2, NULL );
-        emit chapterChanged( (val2.i_int > 1) || ( val2.i_int > 0 && val.i_int > 1 ) );
+
+        emit titleChanged( val.i_int > 1 );
+        emit chapterChanged( val2.i_int > 1 );
     }
     else
-        emit titleChanged( false );
+        emit chapterChanged( false );
 }
 
 void InputManager::UpdateStatus()



More information about the vlc-commits mailing list