[vlc-commits] Qt: show extension short description in menu

Jean-Baptiste Kempf git at videolan.org
Mon Sep 30 00:12:41 CEST 2013


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Sep 29 23:55:07 2013 +0200| [9ff5775d4c1b2485a769a3c3ead00e9335a28ec9] | committer: Jean-Baptiste Kempf

Qt: show extension short description in menu

Else fallback to title

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

 modules/gui/qt4/extensions_manager.cpp |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt4/extensions_manager.cpp b/modules/gui/qt4/extensions_manager.cpp
index a77bdcb..0c4cada 100644
--- a/modules/gui/qt4/extensions_manager.cpp
+++ b/modules/gui/qt4/extensions_manager.cpp
@@ -153,7 +153,9 @@ void ExtensionsManager::menu( QMenu *current )
 
         if( b_Active && extension_HasMenu( p_extensions_manager, p_ext ) )
         {
-            QMenu *submenu = new QMenu( qfu( p_ext->psz_title ), current );
+            QMenu *submenu = new QMenu(
+                    qfu( p_ext->psz_shortdescription ? p_ext->psz_shortdescription: p_ext->psz_title ),
+                    current );
             char **ppsz_titles = NULL;
             uint16_t *pi_ids = NULL;
             size_t i_num = 0;
@@ -198,7 +200,8 @@ void ExtensionsManager::menu( QMenu *current )
         }
         else
         {
-            action = current->addAction( qfu( p_ext->psz_title ) );
+            action = current->addAction(
+                    qfu( p_ext->psz_shortdescription ? p_ext->psz_shortdescription: p_ext->psz_title ) );
             menuMapper->setMapping( action, MENU_MAP( 0, i_ext ) );
             CONNECT( action, triggered(), menuMapper, map() );
 



More information about the vlc-commits mailing list