Fixed bug #800047 where the Preferences menu item in OS X was incorrect.

bzr-revno: 1649
This commit is contained in:
Raoul Snyman 2011-06-21 16:50:25 +02:00
commit a16427eaea

View File

@ -27,6 +27,7 @@
import logging import logging
import os import os
import sys
from tempfile import gettempdir from tempfile import gettempdir
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
@ -291,10 +292,18 @@ class Ui_MainWindow(object):
# i18n add Language Actions # i18n add Language Actions
add_actions(self.settingsLanguageMenu, (self.autoLanguageItem, None)) add_actions(self.settingsLanguageMenu, (self.autoLanguageItem, None))
add_actions(self.settingsLanguageMenu, self.languageGroup.actions()) add_actions(self.settingsLanguageMenu, self.languageGroup.actions())
add_actions(self.settingsMenu, (self.settingsPluginListItem, # Order things differently in OS X so that Preferences menu item in the
self.settingsLanguageMenu.menuAction(), None, # app menu is correct (this gets picked up automatically by Qt).
self.displayTagItem, self.settingsShortcutsItem, if sys.platform == u'darwin':
self.settingsConfigureItem)) add_actions(self.settingsMenu, (self.settingsPluginListItem,
self.settingsLanguageMenu.menuAction(), None,
self.settingsConfigureItem, self.settingsShortcutsItem,
self.displayTagItem))
else:
add_actions(self.settingsMenu, (self.settingsPluginListItem,
self.settingsLanguageMenu.menuAction(), None,
self.displayTagItem, self.settingsShortcutsItem,
self.settingsConfigureItem))
add_actions(self.toolsMenu, (self.toolsAddToolItem, None)) add_actions(self.toolsMenu, (self.toolsAddToolItem, None))
add_actions(self.toolsMenu, (self.toolsOpenDataFolder, None)) add_actions(self.toolsMenu, (self.toolsOpenDataFolder, None))
add_actions(self.toolsMenu, [self.updateThemeImages]) add_actions(self.toolsMenu, [self.updateThemeImages])