From 1ff196994120734a58b815fe4ce77d91dae575b2 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Sat, 1 Nov 2014 23:13:56 +0100 Subject: [PATCH] Mac: Fix Preferences... action in application menu Make sure the Configuration Information action won't be detected as "Preferences..." action. Also use native shortcut for fullscreen (Ctrl+Meta+F) Closes #1332 --- src/lib/app/mainmenu.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/app/mainmenu.cpp b/src/lib/app/mainmenu.cpp index a9ab6d91e..c4b603019 100644 --- a/src/lib/app/mainmenu.cpp +++ b/src/lib/app/mainmenu.cpp @@ -629,12 +629,15 @@ void MainMenu::init() m_actions[QSL("Other/RestoreClosedTab")] = action; #ifdef Q_OS_MAC - m_actions[QSL("View/FullScreen")]->setShortcut(QKeySequence(QSL("F11"))); + m_actions[QSL("View/FullScreen")]->setShortcut(QKeySequence::FullScreen); // Add standard actions to File Menu (as it won't be ever cleared) and Mac menubar should move them to "Application" menu m_menuFile->addAction(m_actions[QSL("Standard/About")]); m_menuFile->addAction(m_actions[QSL("Standard/Preferences")]); + // Prevent ConfigInfo action to be detected as "Preferences..." action in Mac menubar + m_actions[QSL("Help/ConfigInfo")]->setMenuRole(QAction::NoRole); + // Create Dock menu QMenu* dockMenu = new QMenu(0); dockMenu->addAction(m_actions[QSL("File/NewTab")]);