Commit 6331c9e6 authored by Petri Hintukainen's avatar Petri Hintukainen Committed by Jean-Baptiste Kempf

qt: show menu button only if there is menu title

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 541ea9c2
......@@ -455,10 +455,27 @@ void InputManager::UpdateNavigation()
if( val.i_int > 0 )
{
bool b_menu = false;
if( val.i_int > 1 )
{
input_title_t **pp_title = NULL;
int i_title = 0;
if( input_Control( p_input, INPUT_GET_FULL_TITLE_INFO, &pp_title, &i_title ) == VLC_SUCCESS )
{
for( int i = 0; i < i_title; i++ )
{
if( pp_title[i]->i_flags & INPUT_TITLE_MENU )
b_menu = true;
vlc_input_title_Delete(pp_title[i]);
}
free( pp_title );
}
}
/* p_input != NULL since val.i_int != 0 */
var_Change( p_input, "chapter", VLC_VAR_CHOICESCOUNT, &val2, NULL );
emit titleChanged( val.i_int > 1 );
emit titleChanged( b_menu );
emit chapterChanged( val2.i_int > 1 );
}
else
......
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