From 848b16f03e7eaf8f4da962c49824a1e8a1ba262f Mon Sep 17 00:00:00 2001 From: Martin Kleusberg Date: Wed, 11 Feb 2015 18:53:21 +0100 Subject: [PATCH] Set menu roles manually where possible Qt tries to determine the role of a menu item based on its text. If the text is "Preferences" it guesses that that menu item opens the preferences dialog. On MacOS X this means the menu item is moved from the View menu to the application menu. However, for translations this doesn't seem to work, so this commit sets the menu roles manually. At least that's the idea - no idea if it works. See issue #200. --- src/MainWindow.ui | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/MainWindow.ui b/src/MainWindow.ui index aeb13102..ccc4ab02 100644 --- a/src/MainWindow.ui +++ b/src/MainWindow.ui @@ -310,8 +310,8 @@ 0 0 - 311 - 531 + 294 + 444 @@ -796,7 +796,7 @@ 0 0 1000 - 25 + 19 @@ -1252,6 +1252,9 @@ Ctrl+Q + + QAction::QuitRole + @@ -1374,6 +1377,9 @@ Open the preferences window. + + QAction::PreferencesRole + @@ -1402,6 +1408,9 @@ &About... + + QAction::AboutRole +