Commit 2059bea4 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
parent de932664
...@@ -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(),
......
...@@ -423,13 +423,14 @@ void InputManager::UpdateNavigation() ...@@ -423,13 +423,14 @@ void InputManager::UpdateNavigation()
if( val.i_int > 0 ) if( val.i_int > 0 )
{ {
emit titleChanged( true );
/* 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 ) );
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