[vlc-commits] qt: show menu button only if there is menu title
Petri Hintukainen
git at videolan.org
Wed May 11 13:29:08 CEST 2016
vlc | branch: master | Petri Hintukainen <phintuka at gmail.com> | Wed May 11 13:38:23 2016 +0300| [6331c9e6d44ca9225b499eb248d1816221a9b781] | committer: Jean-Baptiste Kempf
qt: show menu button only if there is menu title
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6331c9e6d44ca9225b499eb248d1816221a9b781
---
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
More information about the vlc-commits
mailing list