forked from openlp/openlp
set the 'Add Tool...' menu item invisible
bzr-revno: 1352
This commit is contained in:
commit
b567b379fa
@ -206,7 +206,7 @@ class Ui_MainWindow(object):
|
|||||||
mainWindow.actionList.add_action(self.ModeDefaultItem, u'View Mode')
|
mainWindow.actionList.add_action(self.ModeDefaultItem, u'View Mode')
|
||||||
self.ModeSetupItem = checkable_action(mainWindow, u'ModeLiveItem')
|
self.ModeSetupItem = checkable_action(mainWindow, u'ModeLiveItem')
|
||||||
mainWindow.actionList.add_action(self.ModeSetupItem, u'View Mode')
|
mainWindow.actionList.add_action(self.ModeSetupItem, u'View Mode')
|
||||||
self.ModeLiveItem = checkable_action(mainWindow, u'ModeLiveItem')
|
self.ModeLiveItem = checkable_action(mainWindow, u'ModeLiveItem', True)
|
||||||
mainWindow.actionList.add_action(self.ModeLiveItem, u'View Mode')
|
mainWindow.actionList.add_action(self.ModeLiveItem, u'View Mode')
|
||||||
self.ModeGroup = QtGui.QActionGroup(mainWindow)
|
self.ModeGroup = QtGui.QActionGroup(mainWindow)
|
||||||
self.ModeGroup.addAction(self.ModeDefaultItem)
|
self.ModeGroup.addAction(self.ModeDefaultItem)
|
||||||
@ -215,6 +215,8 @@ class Ui_MainWindow(object):
|
|||||||
self.ModeDefaultItem.setChecked(True)
|
self.ModeDefaultItem.setChecked(True)
|
||||||
self.ToolsAddToolItem = icon_action(mainWindow, u'ToolsAddToolItem',
|
self.ToolsAddToolItem = icon_action(mainWindow, u'ToolsAddToolItem',
|
||||||
u':/tools/tools_add.png')
|
u':/tools/tools_add.png')
|
||||||
|
# Hide the entry, as it does not have any functionality yet.
|
||||||
|
self.ToolsAddToolItem.setVisible(False)
|
||||||
mainWindow.actionList.add_action(self.ToolsAddToolItem, u'Tools')
|
mainWindow.actionList.add_action(self.ToolsAddToolItem, u'Tools')
|
||||||
self.ToolsOpenDataFolder = icon_action(mainWindow,
|
self.ToolsOpenDataFolder = icon_action(mainWindow,
|
||||||
u'ToolsOpenDataFolder', u':/general/general_open.png')
|
u'ToolsOpenDataFolder', u':/general/general_open.png')
|
||||||
@ -225,19 +227,17 @@ class Ui_MainWindow(object):
|
|||||||
u'Settings')
|
u'Settings')
|
||||||
# i18n Language Items
|
# i18n Language Items
|
||||||
self.AutoLanguageItem = checkable_action(mainWindow,
|
self.AutoLanguageItem = checkable_action(mainWindow,
|
||||||
u'AutoLanguageItem')
|
u'AutoLanguageItem', LanguageManager.auto_language)
|
||||||
mainWindow.actionList.add_action(self.AutoLanguageItem, u'Settings')
|
mainWindow.actionList.add_action(self.AutoLanguageItem, u'Settings')
|
||||||
self.LanguageGroup = QtGui.QActionGroup(mainWindow)
|
self.LanguageGroup = QtGui.QActionGroup(mainWindow)
|
||||||
self.LanguageGroup.setExclusive(True)
|
self.LanguageGroup.setExclusive(True)
|
||||||
self.LanguageGroup.setObjectName(u'LanguageGroup')
|
self.LanguageGroup.setObjectName(u'LanguageGroup')
|
||||||
self.AutoLanguageItem.setChecked(LanguageManager.auto_language)
|
|
||||||
self.LanguageGroup.setDisabled(LanguageManager.auto_language)
|
self.LanguageGroup.setDisabled(LanguageManager.auto_language)
|
||||||
qmList = LanguageManager.get_qm_list()
|
qmList = LanguageManager.get_qm_list()
|
||||||
savedLanguage = LanguageManager.get_language()
|
savedLanguage = LanguageManager.get_language()
|
||||||
for key in sorted(qmList.keys()):
|
for key in sorted(qmList.keys()):
|
||||||
languageItem = checkable_action(mainWindow, key)
|
languageItem = checkable_action(
|
||||||
if qmList[key] == savedLanguage:
|
mainWindow, key, qmList[key] == savedLanguage)
|
||||||
languageItem.setChecked(True)
|
|
||||||
add_actions(self.LanguageGroup, [languageItem])
|
add_actions(self.LanguageGroup, [languageItem])
|
||||||
self.SettingsShortcutsItem = icon_action(mainWindow,
|
self.SettingsShortcutsItem = icon_action(mainWindow,
|
||||||
u'SettingsShortcutsItem',
|
u'SettingsShortcutsItem',
|
||||||
|
Loading…
Reference in New Issue
Block a user