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

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

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 10 Dec 2011 15:45:14 +0100
changeset 1486
1ca38aa46ae7
parent 1482
10c46dea5fcf
child 1488
de290ce82a75

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

Plugins/PluginAbout.py file | annotate | diff | comparison | revisions
UI/UserInterface.py file | annotate | diff | comparison | revisions
--- a/Plugins/PluginAbout.py	Sat Dec 10 14:00:25 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
 
 import UI.Info
 import UI.PixmapCache
@@ -84,6 +85,7 @@
             """<p>Display some information about this software.</p>"""
                              ).format(UI.Info.Program))
         self.aboutAct.triggered[()].connect(self.__about)
+        self.aboutAct.setMenuRole(QAction.AboutRole)
         acts.append(self.aboutAct)
         
         self.aboutQtAct = E5Action(self.trUtf8('About Qt'),
@@ -96,6 +98,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 14:00:25 2011 +0100
+++ b/UI/UserInterface.py	Sat Dec 10 15:45:14 2011 +0100
@@ -1321,6 +1321,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.newWindowAct = E5Action(self.trUtf8('New Window'),
@@ -1958,6 +1959,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