[vlc-devel] [PATCH] qt: show menu button only if there is menu title
Petri Hintukainen
phintuka at gmail.com
Wed May 11 12:38:23 CEST 2016
---
modules/gui/qt/input_manager.cpp | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/modules/gui/qt/input_manager.cpp b/modules/gui/qt/input_manager.cpp
index f6f6460..b771002 100644
--- a/modules/gui/qt/input_manager.cpp
+++ b/modules/gui/qt/input_manager.cpp
@@ -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
--
2.7.4
More information about the vlc-devel
mailing list