forked from openlp/openlp
Remove unnecessary platform specific code, remove orphaned and unused registry execute, and fix two functions to register to the registry instead of executing.
This commit is contained in:
parent
5bc5678078
commit
6ca37531a0
@ -322,14 +322,8 @@ class Ui_MainWindow(object):
|
||||
# i18n add Language Actions
|
||||
add_actions(self.settings_language_menu, (self.auto_language_item, None))
|
||||
add_actions(self.settings_language_menu, self.language_group.actions())
|
||||
# Order things differently in OS X so that Preferences menu item in the
|
||||
# app menu is correct (this gets picked up automatically by Qt).
|
||||
if sys.platform == 'darwin':
|
||||
add_actions(self.settings_menu, (self.settings_plugin_list_item, self.settings_language_menu.menuAction(),
|
||||
None, self.settings_configure_item, self.settings_shortcuts_item, self.formatting_tag_item))
|
||||
else:
|
||||
add_actions(self.settings_menu, (self.settings_plugin_list_item, self.settings_language_menu.menuAction(),
|
||||
None, self.formatting_tag_item, self.settings_shortcuts_item, self.settings_configure_item))
|
||||
add_actions(self.settings_menu, (self.settings_plugin_list_item, self.settings_language_menu.menuAction(),
|
||||
None, self.formatting_tag_item, self.settings_shortcuts_item, self.settings_configure_item))
|
||||
add_actions(self.tools_menu, (self.tools_add_tool_item, None))
|
||||
add_actions(self.tools_menu, (self.tools_open_data_folder, None))
|
||||
add_actions(self.tools_menu, (self.tools_first_time_wizard, None))
|
||||
@ -393,8 +387,10 @@ class Ui_MainWindow(object):
|
||||
self.import_language_item.setText(translate('OpenLP.MainWindow', '&Language'))
|
||||
self.export_theme_item.setText(translate('OpenLP.MainWindow', '&Theme'))
|
||||
self.export_language_item.setText(translate('OpenLP.MainWindow', '&Language'))
|
||||
self.settings_shortcuts_item.setText(translate('OpenLP.MainWindow', 'Configure &Shortcuts...'))
|
||||
self.formatting_tag_item.setText(translate('OpenLP.MainWindow', 'Configure &Formatting Tags...'))
|
||||
# Do not use config, options, setup, settings or preferences in menu item name unless it is OpenLP's preferences.
|
||||
# Qt automatically detects the Preferences entry for the Mac OS X menu based on the name of the menu item.
|
||||
self.settings_shortcuts_item.setText(translate('OpenLP.MainWindow', '&Shortcuts...'))
|
||||
self.formatting_tag_item.setText(translate('OpenLP.MainWindow', '&Formatting Tags...'))
|
||||
self.settings_configure_item.setText(translate('OpenLP.MainWindow', '&Configure OpenLP...'))
|
||||
self.settings_export_item.setStatusTip(translate('OpenLP.MainWindow',
|
||||
'Export OpenLP settings to a specified *.config file'))
|
||||
|
@ -1039,7 +1039,6 @@ class SlideController(DisplayController, RegistryProperties):
|
||||
"""
|
||||
self.preview_widget.change_slide(row)
|
||||
self.update_preview()
|
||||
Registry().execute('slidecontroller_%s_changed' % self.type_prefix, row)
|
||||
|
||||
def update_preview(self):
|
||||
"""
|
||||
|
@ -78,7 +78,7 @@ class BibleUpgradeForm(OpenLPWizard):
|
||||
Set up the UI for the bible wizard.
|
||||
"""
|
||||
super(BibleUpgradeForm, self).setupUi(image)
|
||||
Registry().execute('openlp_stop_wizard', self.stop_import)
|
||||
Registry().register_function('openlp_stop_wizard', self.stop_import)
|
||||
|
||||
def stop_import(self):
|
||||
"""
|
||||
|
@ -154,7 +154,7 @@ class BibleDB(QtCore.QObject, Manager, RegistryProperties):
|
||||
if 'path' in kwargs:
|
||||
self.path = kwargs['path']
|
||||
self.wizard = None
|
||||
Registry().execute('openlp_stop_wizard', self.stop_import)
|
||||
Registry().register_function('openlp_stop_wizard', self.stop_import)
|
||||
|
||||
def stop_import(self):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user