Commit 9ff5775d authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: show extension short description in menu

Else fallback to title
parent 5f588537
...@@ -153,7 +153,9 @@ void ExtensionsManager::menu( QMenu *current ) ...@@ -153,7 +153,9 @@ void ExtensionsManager::menu( QMenu *current )
if( b_Active && extension_HasMenu( p_extensions_manager, p_ext ) ) 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; char **ppsz_titles = NULL;
uint16_t *pi_ids = NULL; uint16_t *pi_ids = NULL;
size_t i_num = 0; size_t i_num = 0;
...@@ -198,7 +200,8 @@ void ExtensionsManager::menu( QMenu *current ) ...@@ -198,7 +200,8 @@ void ExtensionsManager::menu( QMenu *current )
} }
else 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 ) ); menuMapper->setMapping( action, MENU_MAP( 0, i_ext ) );
CONNECT( action, triggered(), menuMapper, map() ); CONNECT( action, triggered(), menuMapper, map() );
......
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