forked from openlp/openlp
fixed missing items
This commit is contained in:
parent
0f44fb3dd5
commit
20d687524a
@ -284,7 +284,7 @@ def create_action(parent, name, **kwargs):
|
||||
action.setSeparator(True)
|
||||
if u'data' in kwargs:
|
||||
action.setData(kwargs.pop(u'data'))
|
||||
if kwargs.pop(u'can_shortcuts'):
|
||||
if kwargs.pop(u'can_shortcuts', False):
|
||||
action_list = ActionList.get_instance()
|
||||
action_list.add_action(action, kwargs.pop(u'category', None))
|
||||
if u'context' in kwargs:
|
||||
|
@ -205,10 +205,12 @@ class Ui_MainWindow(object):
|
||||
# Give QT Extra Hint that this is the Exit Menu Item
|
||||
self.fileExitItem.setMenuRole(QtGui.QAction.QuitRole)
|
||||
action_list.add_category(UiStrings().Import, CategoryOrder.standard_menu)
|
||||
self.importThemeItem = create_action(main_window, u'importThemeItem', category=UiStrings().Import)
|
||||
self.importThemeItem = create_action(
|
||||
main_window, u'importThemeItem', category=UiStrings().Import, can_shortcuts=True)
|
||||
self.importLanguageItem = create_action(main_window, u'importLanguageItem')
|
||||
action_list.add_category(UiStrings().Export, CategoryOrder.standard_menu)
|
||||
self.exportThemeItem = create_action(main_window, u'exportThemeItem', category=UiStrings().Export)
|
||||
self.exportThemeItem = create_action(
|
||||
main_window, u'exportThemeItem', category=UiStrings().Export, can_shortcuts=True)
|
||||
self.exportLanguageItem = create_action(main_window, u'exportLanguageItem')
|
||||
action_list.add_category(UiStrings().View, CategoryOrder.standard_menu)
|
||||
self.viewMediaManagerItem = create_action(main_window,
|
||||
@ -237,12 +239,13 @@ class Ui_MainWindow(object):
|
||||
can_shortcuts=True, checked=panelLocked,
|
||||
category=UiStrings().View,
|
||||
triggers=self.setLockPanel)
|
||||
action_list.add_category(UiStrings().ViewMode,
|
||||
CategoryOrder.standard_menu)
|
||||
self.modeDefaultItem = create_action(main_window, u'modeDefaultItem', checked=False,
|
||||
category=UiStrings().ViewMode)
|
||||
self.modeSetupItem = create_action(main_window, u'modeSetupItem', checked=False, category=UiStrings().ViewMode)
|
||||
self.modeLiveItem = create_action(main_window, u'modeLiveItem', checked=True, category=UiStrings().ViewMode)
|
||||
action_list.add_category(UiStrings().ViewMode, CategoryOrder.standard_menu)
|
||||
self.modeDefaultItem = create_action(
|
||||
main_window, u'modeDefaultItem', checked=False, category=UiStrings().ViewMode, can_shortcuts=True)
|
||||
self.modeSetupItem = create_action(
|
||||
main_window, u'modeSetupItem', checked=False, category=UiStrings().ViewMode, can_shortcuts=True)
|
||||
self.modeLiveItem = create_action(
|
||||
main_window, u'modeLiveItem', checked=True, category=UiStrings().ViewMode, can_shortcuts=True)
|
||||
self.modeGroup = QtGui.QActionGroup(main_window)
|
||||
self.modeGroup.addAction(self.modeDefaultItem)
|
||||
self.modeGroup.addAction(self.modeSetupItem)
|
||||
@ -250,26 +253,22 @@ class Ui_MainWindow(object):
|
||||
self.modeDefaultItem.setChecked(True)
|
||||
action_list.add_category(UiStrings().Tools, CategoryOrder.standard_menu)
|
||||
self.toolsAddToolItem = create_action(main_window,
|
||||
u'toolsAddToolItem', icon=u':/tools/tools_add.png',
|
||||
category=UiStrings().Tools)
|
||||
u'toolsAddToolItem', icon=u':/tools/tools_add.png', category=UiStrings().Tools, can_shortcuts=True)
|
||||
self.toolsOpenDataFolder = create_action(main_window,
|
||||
u'toolsOpenDataFolder', icon=u':/general/general_open.png',
|
||||
category=UiStrings().Tools)
|
||||
u'toolsOpenDataFolder', icon=u':/general/general_open.png', category=UiStrings().Tools, can_shortcuts=True)
|
||||
self.toolsFirstTimeWizard = create_action(main_window,
|
||||
u'toolsFirstTimeWizard', icon=u':/general/general_revert.png',
|
||||
category=UiStrings().Tools)
|
||||
category=UiStrings().Tools, can_shortcuts=True)
|
||||
self.updateThemeImages = create_action(main_window,
|
||||
u'updateThemeImages', category=UiStrings().Tools)
|
||||
action_list.add_category(UiStrings().Settings,
|
||||
CategoryOrder.standard_menu)
|
||||
u'updateThemeImages', category=UiStrings().Tools, can_shortcuts=True)
|
||||
action_list.add_category(UiStrings().Settings, CategoryOrder.standard_menu)
|
||||
self.settingsPluginListItem = create_action(main_window,
|
||||
u'settingsPluginListItem',
|
||||
icon=u':/system/settings_plugin_list.png',
|
||||
can_shortcuts=True,
|
||||
category=UiStrings().Settings, triggers=self.onPluginItemClicked)
|
||||
# i18n Language Items
|
||||
self.autoLanguageItem = create_action(main_window, u'autoLanguageItem',
|
||||
checked=LanguageManager.auto_language)
|
||||
self.autoLanguageItem = create_action(main_window, u'autoLanguageItem', checked=LanguageManager.auto_language)
|
||||
self.languageGroup = QtGui.QActionGroup(main_window)
|
||||
self.languageGroup.setExclusive(True)
|
||||
self.languageGroup.setObjectName(u'languageGroup')
|
||||
@ -280,20 +279,21 @@ class Ui_MainWindow(object):
|
||||
languageItem = create_action(main_window, key, checked=qmList[key] == savedLanguage)
|
||||
add_actions(self.languageGroup, [languageItem])
|
||||
self.settingsShortcutsItem = create_action(main_window, u'settingsShortcutsItem',
|
||||
icon=u':/system/system_configure_shortcuts.png', category=UiStrings().Settings)
|
||||
icon=u':/system/system_configure_shortcuts.png', category=UiStrings().Settings, can_shortcuts=True)
|
||||
# Formatting Tags were also known as display tags.
|
||||
self.formattingTagItem = create_action(main_window, u'displayTagItem',
|
||||
icon=u':/system/tag_editor.png', category=UiStrings().Settings)
|
||||
icon=u':/system/tag_editor.png', category=UiStrings().Settings, can_shortcuts=True)
|
||||
self.settingsConfigureItem = create_action(main_window, u'settingsConfigureItem',
|
||||
icon=u':/system/system_settings.png', can_shortcuts=True, category=UiStrings().Settings)
|
||||
# Give QT Extra Hint that this is the Preferences Menu Item
|
||||
self.settingsConfigureItem.setMenuRole(QtGui.QAction.PreferencesRole)
|
||||
self.settingsImportItem = create_action(main_window, u'settingsImportItem', category=UiStrings().Settings)
|
||||
self.settingsExportItem = create_action(main_window, u'settingsExportItem', category=UiStrings().Settings)
|
||||
self.settingsImportItem = create_action(
|
||||
main_window, u'settingsImportItem', category=UiStrings().Settings, can_shortcuts=True)
|
||||
self.settingsExportItem = create_action(
|
||||
main_window, u'settingsExportItem', category=UiStrings().Settings, can_shortcuts=True)
|
||||
action_list.add_category(UiStrings().Help, CategoryOrder.standard_menu)
|
||||
self.aboutItem = create_action(main_window, u'aboutItem', icon=u':/system/system_about.png',
|
||||
can_shortcuts=True,
|
||||
category=UiStrings().Help, triggers=self.onAboutItemClicked)
|
||||
can_shortcuts=True, 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':
|
||||
@ -307,7 +307,7 @@ class Ui_MainWindow(object):
|
||||
icon=u':/system/system_online_help.png',
|
||||
can_shortcuts=True,
|
||||
category=UiStrings().Help, triggers=self.onOnlineHelpClicked)
|
||||
self.webSiteItem = create_action(main_window, u'webSiteItem', category=UiStrings().Help)
|
||||
self.webSiteItem = create_action(main_window, u'webSiteItem', can_shortcuts=True, category=UiStrings().Help)
|
||||
add_actions(self.fileImportMenu, (self.settingsImportItem, None, self.importThemeItem, self.importLanguageItem))
|
||||
add_actions(self.fileExportMenu, (self.settingsExportItem, None, self.exportThemeItem, self.exportLanguageItem))
|
||||
add_actions(self.fileMenu, (self.fileNewItem, self.fileOpenItem,
|
||||
|
Loading…
Reference in New Issue
Block a user