← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~briantmeyer/openlp/bug-995427 into lp:openlp

 

Brian Meyer has proposed merging lp:~briantmeyer/openlp/bug-995427 into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~briantmeyer/openlp/bug-995427/+merge/118243

Addresses bug 995427 which results in About, Preferences and Quit menu items not moving to the right Application Menu when translated, by adding hints so QT knows how to handle them.
-- 
https://code.launchpad.net/~briantmeyer/openlp/bug-995427/+merge/118243
Your team OpenLP Core is requested to review the proposed merge of lp:~briantmeyer/openlp/bug-995427 into lp:openlp.
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py	2012-07-05 15:25:23 +0000
+++ openlp/core/ui/mainwindow.py	2012-08-04 13:07:23 +0000
@@ -210,6 +210,8 @@
             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 @@
         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 @@
             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')


Follow ups