From 8100a666229c2e1ec06c541cd867231005db520e Mon Sep 17 00:00:00 2001 From: "Brian T. Meyer briantmeyer@cox.net" Date: Fri, 3 Aug 2012 21:34:13 -0700 Subject: [PATCH] Contains fix to allow QT to move place About, Exit and Preference Menu Items into the Application menu per Apple UI guidelines. --- openlp/core/ui/mainwindow.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index b6c9ee8d5..8090575ab 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -210,6 +210,8 @@ class Ui_MainWindow(object): icon=u':/system/system_exit.png', shortcuts=[QtGui.QKeySequence(u'Alt+F4')], category=UiStrings().File, triggers=mainWindow.close) + # Give QT Extra Hint that this is the Exit Menu Item + self.fileExitItem.setMenuRole( QtGui.QAction.QuitRole ) action_list.add_category(unicode(UiStrings().Import), CategoryOrder.standardMenu) self.importThemeItem = create_action(mainWindow, @@ -304,6 +306,8 @@ class Ui_MainWindow(object): self.settingsConfigureItem = create_action(mainWindow, u'settingsConfigureItem', icon=u':/system/system_settings.png', category=UiStrings().Settings) + # Give QT Extra Hint that this is the Preferences Menu Item + self.settingsConfigureItem.setMenuRole( QtGui.QAction.PreferencesRole ) self.settingsImportItem = create_action(mainWindow, u'settingsImportItem', category=UiStrings().Settings) self.settingsExportItem = create_action(mainWindow, @@ -314,6 +318,8 @@ class Ui_MainWindow(object): icon=u':/system/system_about.png', shortcuts=[QtGui.QKeySequence(u'Ctrl+F1')], category=UiStrings().Help, triggers=self.onAboutItemClicked) + # Give QT Extra Hint that this is an About Menu Item + self.aboutItem.setMenuRole( QtGui.QAction.AboutRole ) if os.name == u'nt': self.localHelpFile = os.path.join( AppLocation.get_directory(AppLocation.AppDir), 'OpenLP.chm')