Changes to properly place actions into the Mac OS X application menu. 5_1_x

Sat, 10 Dec 2011 15:45:14 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 10 Dec 2011 15:45:14 +0100
branch
5_1_x
changeset 1487
000d35ce20b6
parent 1485
b0d0ddac7012
child 1489
e647aa92e0ea

Changes to properly place actions into the Mac OS X application menu.
(transplanted from 1ca38aa46ae79a8dbc60e6a3a26ddcbe991c5018)

Plugins/PluginAbout.py file | annotate | diff | comparison | revisions
UI/UserInterface.py file | annotate | diff | comparison | revisions
--- a/Plugins/PluginAbout.py	Sat Dec 10 13:59:28 2011 +0100
+++ b/Plugins/PluginAbout.py	Sat Dec 10 15:45:14 2011 +0100
@@ -8,6 +8,7 @@
 """
 
 from PyQt4.QtCore import QObject
+from PyQt4.QtGui import QAction
 
 from UI.Info import *
 import UI.PixmapCache
@@ -83,6 +84,7 @@
             """<p>Display some information about this software.</p>"""
                              ).format(Program))
         self.aboutAct.triggered[()].connect(self.__about)
+        self.aboutAct.setMenuRole(QAction.AboutRole)
         acts.append(self.aboutAct)
         
         self.aboutQtAct = E5Action(self.trUtf8('About Qt'),
@@ -95,6 +97,7 @@
             """<p>Display some information about the Qt toolkit.</p>"""
         ))
         self.aboutQtAct.triggered[()].connect(self.__aboutQt)
+        self.aboutQtAct.setMenuRole(QAction.AboutQtRole)
         acts.append(self.aboutQtAct)
         
         self.__ui.addE5Actions(acts, 'ui')
--- a/UI/UserInterface.py	Sat Dec 10 13:59:28 2011 +0100
+++ b/UI/UserInterface.py	Sat Dec 10 15:45:14 2011 +0100
@@ -1306,6 +1306,7 @@
             """ preferences will be written to disc.</p>"""
         ))
         self.exitAct.triggered[()].connect(self.__quit)
+        self.exitAct.setMenuRole(QAction.QuitRole)
         self.actions.append(self.exitAct)
 
         self.viewProfileActGrp = createActionGroup(self, "viewprofiles", True)
@@ -1923,6 +1924,7 @@
             """ with your prefered values.</p>"""
         ))
         self.prefAct.triggered[()].connect(self.showPreferences)
+        self.prefAct.setMenuRole(QAction.PreferencesRole)
         self.actions.append(self.prefAct)
 
         self.prefExportAct = E5Action(self.trUtf8('Export Preferences'),

eric ide

mercurial