Contains fix to allow QT to move place About, Exit and Preference Menu

Items into the Application menu per Apple UI guidelines.
This commit is contained in:
Brian T. Meyer briantmeyer@cox.net 2012-08-03 21:34:13 -07:00
parent e31c64ef7c
commit 8100a66622

View File

@ -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')