Commit c17e2e7f authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: fix semantics and behaviour for chapters buttons

No sense to display chapter buttons with 1title&1chapter
(cherry picked from commit 2059bea41c0ea723466ccbb3e9d9550b26e2e2ee)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 16fceef9
...@@ -348,7 +348,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options ) ...@@ -348,7 +348,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
case INPUT_SLIDER: { case INPUT_SLIDER: {
SeekSlider *slider = new SeekSlider( Qt::Horizontal, NULL, !b_shiny ); SeekSlider *slider = new SeekSlider( Qt::Horizontal, NULL, !b_shiny );
SeekPoints *chapters = new SeekPoints( this, p_intf ); SeekPoints *chapters = new SeekPoints( this, p_intf );
CONNECT( THEMIM->getIM(), titleChanged( bool ), chapters, update() ); CONNECT( THEMIM->getIM(), chapterChanged( bool ), chapters, update() );
slider->setChapters( chapters ); slider->setChapters( chapters );
/* Update the position when the IM has changed */ /* Update the position when the IM has changed */
...@@ -545,9 +545,9 @@ QFrame *AbstractController::discFrame() ...@@ -545,9 +545,9 @@ QFrame *AbstractController::discFrame()
/* Change the navigation button display when the IM /* Change the navigation button display when the IM
navigation changes */ navigation changes */
CONNECT( THEMIM->getIM(), titleChanged( bool ),
discFrame, setVisible( bool ) );
CONNECT( THEMIM->getIM(), chapterChanged( bool ), CONNECT( THEMIM->getIM(), chapterChanged( bool ),
discFrame, setVisible( bool ) );
CONNECT( THEMIM->getIM(), titleChanged( bool ),
menuButton, setVisible( bool ) ); menuButton, setVisible( bool ) );
/* Changes the IM navigation when triggered on the nav buttons */ /* Changes the IM navigation when triggered on the nav buttons */
CONNECT( prevSectionButton, clicked(), THEMIM->getIM(), CONNECT( prevSectionButton, clicked(), THEMIM->getIM(),
......
...@@ -426,15 +426,14 @@ void InputManager::UpdateNavigation() ...@@ -426,15 +426,14 @@ void InputManager::UpdateNavigation()
if( val.i_int > 0 ) if( val.i_int > 0 )
{ {
emit titleChanged( true );
msg_Dbg( p_intf, "Title %"PRId64, val.i_int );
/* p_input != NULL since val.i_int != 0 */ /* p_input != NULL since val.i_int != 0 */
var_Change( p_input, "chapter", VLC_VAR_CHOICESCOUNT, &val2, NULL ); var_Change( p_input, "chapter", VLC_VAR_CHOICESCOUNT, &val2, NULL );
emit chapterChanged( (val2.i_int > 1) || ( val2.i_int > 0 && val.i_int > 1 ) );
msg_Dbg( p_intf, "Chapter: %"PRId64, val2.i_int ); emit titleChanged( val.i_int > 1 );
emit chapterChanged( val2.i_int > 1 );
} }
else else
emit titleChanged( false ); emit chapterChanged( false );
} }
void InputManager::UpdateStatus() void InputManager::UpdateStatus()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment