[vlc-commits] Qt: simplify call for the main menu

Petri Hintukainen git at videolan.org
Fri May 13 10:59:22 CEST 2016


vlc | branch: master | Petri Hintukainen <phintuka at gmail.com> | Fri May 13 10:54:39 2016 +0200| [a7440f78d4974c4233974d78fff3a0e5d317f84b] | committer: Jean-Baptiste Kempf

Qt: simplify call for the main menu

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a7440f78d4974c4233974d78fff3a0e5d317f84b
---

 modules/gui/qt/input_manager.cpp |   16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/modules/gui/qt/input_manager.cpp b/modules/gui/qt/input_manager.cpp
index b771002..3b8df79 100644
--- a/modules/gui/qt/input_manager.cpp
+++ b/modules/gui/qt/input_manager.cpp
@@ -827,21 +827,7 @@ void InputManager::sectionMenu()
 {
     if( hasInput() )
     {
-        vlc_value_t val, text;
-
-        if( var_Change( p_input, "title  0", VLC_VAR_GETCHOICES, &val, &text ) < 0 )
-            return;
-
-        /* XXX is it "Root" or "Title" we want here ?" (set 0 by default) */
-        int root = 0;
-        for( int i = 0; i < val.p_list->i_count; i++ )
-        {
-            if( !strcmp( text.p_list->p_values[i].psz_string, "Title" ) )
-                root = i;
-        }
-        var_FreeList( &val, &text );
-
-        var_SetInteger( p_input, "title  0", root );
+        var_TriggerCallback( p_input, "menu-title" );
     }
 }
 



More information about the vlc-commits mailing list