forked from openlp/openlp
- Removed Local & Online help buttons, created "User manual" button.
This commit is contained in:
parent
f590294b4a
commit
851a35a822
@ -309,21 +309,13 @@ class Ui_MainWindow(object):
|
|||||||
self.about_item.setMenuRole(QtWidgets.QAction.AboutRole)
|
self.about_item.setMenuRole(QtWidgets.QAction.AboutRole)
|
||||||
if is_win():
|
if is_win():
|
||||||
self.local_help_file = os.path.join(AppLocation.get_directory(AppLocation.AppDir), 'OpenLP.chm')
|
self.local_help_file = os.path.join(AppLocation.get_directory(AppLocation.AppDir), 'OpenLP.chm')
|
||||||
self.offline_help_item = create_action(main_window, 'offlineHelpItem',
|
|
||||||
icon=':/system/system_help_contents.png',
|
|
||||||
can_shortcuts=True,
|
|
||||||
category=UiStrings().Help, triggers=self.on_help_button_clicked)
|
|
||||||
elif is_macosx():
|
elif is_macosx():
|
||||||
self.local_help_file = os.path.join(AppLocation.get_directory(AppLocation.AppDir),
|
self.local_help_file = os.path.join(AppLocation.get_directory(AppLocation.AppDir),
|
||||||
'..', 'Resources', 'OpenLP.help')
|
'..', 'Resources', 'OpenLP.help')
|
||||||
self.offline_help_item = create_action(main_window, 'offlineHelpItem',
|
self.on_help_item = create_action(main_window, 'onlineHelpItem',
|
||||||
icon=':/system/system_help_contents.png',
|
icon=':/system/system_help_contents.png',
|
||||||
can_shortcuts=True,
|
can_shortcuts=True,
|
||||||
category=UiStrings().Help, triggers=self.on_help_button_clicked)
|
category=UiStrings().Help, triggers=self.on_help_clicked)
|
||||||
self.on_line_help_item = create_action(main_window, 'onlineHelpItem',
|
|
||||||
icon=':/system/system_online_help.png',
|
|
||||||
can_shortcuts=True,
|
|
||||||
category=UiStrings().Help, triggers=self.on_help_button_clicked)
|
|
||||||
self.web_site_item = create_action(main_window, 'webSiteItem', can_shortcuts=True, category=UiStrings().Help)
|
self.web_site_item = create_action(main_window, 'webSiteItem', can_shortcuts=True, category=UiStrings().Help)
|
||||||
# Shortcuts not connected to buttons or menu entries.
|
# Shortcuts not connected to buttons or menu entries.
|
||||||
self.search_shortcut_action = create_action(main_window,
|
self.search_shortcut_action = create_action(main_window,
|
||||||
@ -362,11 +354,7 @@ class Ui_MainWindow(object):
|
|||||||
add_actions(self.tools_menu, (self.tools_open_data_folder, None))
|
add_actions(self.tools_menu, (self.tools_open_data_folder, None))
|
||||||
add_actions(self.tools_menu, (self.tools_first_time_wizard, None))
|
add_actions(self.tools_menu, (self.tools_first_time_wizard, None))
|
||||||
add_actions(self.tools_menu, [self.update_theme_images])
|
add_actions(self.tools_menu, [self.update_theme_images])
|
||||||
if (is_win() or is_macosx()) and (hasattr(sys, 'frozen') and sys.frozen == 1):
|
add_actions(self.help_menu, (self.on_help_item, None, self.web_site_item, self.about_item))
|
||||||
add_actions(self.help_menu, (self.offline_help_item, self.on_line_help_item, None, self.web_site_item,
|
|
||||||
self.about_item))
|
|
||||||
else:
|
|
||||||
add_actions(self.help_menu, (self.on_line_help_item, None, self.web_site_item, self.about_item))
|
|
||||||
add_actions(self.menu_bar, (self.file_menu.menuAction(), self.view_menu.menuAction(),
|
add_actions(self.menu_bar, (self.file_menu.menuAction(), self.view_menu.menuAction(),
|
||||||
self.tools_menu.menuAction(), self.settings_menu.menuAction(), self.help_menu.menuAction()))
|
self.tools_menu.menuAction(), self.settings_menu.menuAction(), self.help_menu.menuAction()))
|
||||||
add_actions(self, [self.search_shortcut_action])
|
add_actions(self, [self.search_shortcut_action])
|
||||||
@ -462,9 +450,7 @@ class Ui_MainWindow(object):
|
|||||||
'from here.'))
|
'from here.'))
|
||||||
self.about_item.setText(translate('OpenLP.MainWindow', '&About'))
|
self.about_item.setText(translate('OpenLP.MainWindow', '&About'))
|
||||||
self.about_item.setStatusTip(translate('OpenLP.MainWindow', 'More information about OpenLP.'))
|
self.about_item.setStatusTip(translate('OpenLP.MainWindow', 'More information about OpenLP.'))
|
||||||
if is_win() or is_macosx():
|
self.on_help_item.setText(translate('OpenLP.MainWindow', '&User Manual'))
|
||||||
self.offline_help_item.setText(translate('OpenLP.MainWindow', '&User Guide'))
|
|
||||||
self.on_line_help_item.setText(translate('OpenLP.MainWindow', '&Online Help'))
|
|
||||||
self.search_shortcut_action.setText(UiStrings().Search)
|
self.search_shortcut_action.setText(UiStrings().Search)
|
||||||
self.search_shortcut_action.setToolTip(
|
self.search_shortcut_action.setToolTip(
|
||||||
translate('OpenLP.MainWindow', 'Jump to the search box of the current active plugin.'))
|
translate('OpenLP.MainWindow', 'Jump to the search box of the current active plugin.'))
|
||||||
@ -778,7 +764,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow, RegistryProperties):
|
|||||||
import webbrowser
|
import webbrowser
|
||||||
webbrowser.open_new('http://openlp.org/')
|
webbrowser.open_new('http://openlp.org/')
|
||||||
|
|
||||||
def on_help_button_clicked(self):
|
def on_help_clicked(self):
|
||||||
"""
|
"""
|
||||||
If is_macosx or is_win, open the local OpenLP help file.
|
If is_macosx or is_win, open the local OpenLP help file.
|
||||||
Use the Online manual in other cases. (Linux)
|
Use the Online manual in other cases. (Linux)
|
||||||
|
Loading…
Reference in New Issue
Block a user