1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-10-04 17:41:42 +02:00

Made the toggle menubar key shortcut work when the menubar is hidden.

This commit is contained in:
Teo Mrnjavac
2012-08-04 18:58:45 +02:00
parent c1408213df
commit 4c136fc4fc
2 changed files with 8 additions and 0 deletions

View File

@@ -276,6 +276,11 @@ TomahawkWindow::setupToolBar()
compactMenuButton->setMenu( m_compactMainMenu );
compactMenuButton->setToolButtonStyle( Qt::ToolButtonIconOnly );
m_compactMenuAction = toolbar->addWidget( compactMenuButton );
//HACK: adding the toggle action to the window, otherwise the shortcut keys
// won't be picked up when the menu is hidden.
// This must be done for all menu bar actions that have shortcut keys :(
// Does not apply to Mac which always shows the menu bar.
addAction( ActionCollection::instance()->getAction( "toggleMenuBar" ) );
#endif
}