forked from openlp/openlp
use help function
This commit is contained in:
parent
e7c44cf3b2
commit
6980299697
@ -688,7 +688,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
QtGui.QAction, serviceItem[u'service_item'].theme)
|
QtGui.QAction, serviceItem[u'service_item'].theme)
|
||||||
if themeAction is not None:
|
if themeAction is not None:
|
||||||
themeAction.setChecked(True)
|
themeAction.setChecked(True)
|
||||||
action = self.menu.exec_(self.serviceManagerList.mapToGlobal(point))
|
self.menu.exec_(self.serviceManagerList.mapToGlobal(point))
|
||||||
|
|
||||||
def onServiceItemNoteForm(self):
|
def onServiceItemNoteForm(self):
|
||||||
item = self.findServiceItem()[0]
|
item = self.findServiceItem()[0]
|
||||||
|
@ -39,7 +39,8 @@ from openlp.core.lib import OpenLPToolbar, get_text_file_string, build_icon, \
|
|||||||
check_directory_exists
|
check_directory_exists
|
||||||
from openlp.core.lib.theme import ThemeXML, BackgroundType, VerticalType, \
|
from openlp.core.lib.theme import ThemeXML, BackgroundType, VerticalType, \
|
||||||
BackgroundGradientType
|
BackgroundGradientType
|
||||||
from openlp.core.lib.ui import UiStrings, critical_error_message_box
|
from openlp.core.lib.ui import UiStrings, critical_error_message_box, \
|
||||||
|
context_menu_action, context_menu_separator
|
||||||
from openlp.core.theme import Theme
|
from openlp.core.theme import Theme
|
||||||
from openlp.core.ui import FileRenameForm, ThemeForm
|
from openlp.core.ui import FileRenameForm, ThemeForm
|
||||||
from openlp.core.utils import AppLocation, delete_file, file_is_unicode, \
|
from openlp.core.utils import AppLocation, delete_file, file_is_unicode, \
|
||||||
@ -104,25 +105,29 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
self.contextMenu)
|
self.contextMenu)
|
||||||
# build the context menu
|
# build the context menu
|
||||||
self.menu = QtGui.QMenu()
|
self.menu = QtGui.QMenu()
|
||||||
self.editAction = self.menu.addAction(
|
self.editAction = context_menu_action(
|
||||||
translate('OpenLP.ThemeManager', '&Edit Theme'))
|
self.menu, u':/themes/theme_edit.png',
|
||||||
self.editAction.setIcon(build_icon(u':/themes/theme_edit.png'))
|
translate('OpenLP.ThemeManager', '&Edit Theme'), self.onEditTheme)
|
||||||
self.copyAction = self.menu.addAction(
|
self.copyAction = context_menu_action(
|
||||||
translate('OpenLP.ThemeManager', '&Copy Theme'))
|
self.menu, u':/themes/theme_edit.png',
|
||||||
self.copyAction.setIcon(build_icon(u':/themes/theme_edit.png'))
|
translate('OpenLP.ThemeManager', '&Copy Theme'), self.onCopyTheme)
|
||||||
self.renameAction = self.menu.addAction(
|
self.renameAction = context_menu_action(
|
||||||
translate('OpenLP.ThemeManager', '&Rename Theme'))
|
self.menu, u':/themes/theme_edit.png',
|
||||||
self.renameAction.setIcon(build_icon(u':/themes/theme_edit.png'))
|
translate('OpenLP.ThemeManager', '&Rename Theme'),
|
||||||
self.deleteAction = self.menu.addAction(
|
self.onRenameTheme)
|
||||||
translate('OpenLP.ThemeManager', '&Delete Theme'))
|
self.deleteAction = context_menu_action(
|
||||||
self.deleteAction.setIcon(build_icon(u':/general/general_delete.png'))
|
self.menu, u':/general/general_delete.png',
|
||||||
self.separator = self.menu.addSeparator()
|
translate('OpenLP.ThemeManager', '&Delete Theme'),
|
||||||
self.globalAction = self.menu.addAction(
|
self.onDeleteTheme)
|
||||||
translate('OpenLP.ThemeManager', 'Set As &Global Default'))
|
context_menu_separator(self.menu)
|
||||||
self.globalAction.setIcon(build_icon(u':/general/general_export.png'))
|
self.globalAction = context_menu_action(
|
||||||
self.exportAction = self.menu.addAction(
|
self.menu, u':/general/general_export.png',
|
||||||
translate('OpenLP.ThemeManager', '&Export Theme'))
|
translate('OpenLP.ThemeManager', 'Set As &Global Default'),
|
||||||
self.exportAction.setIcon(build_icon(u':/general/general_export.png'))
|
self.changeGlobalFromScreen)
|
||||||
|
self.exportAction = context_menu_action(
|
||||||
|
self.menu, u':/general/general_export.png',
|
||||||
|
translate('OpenLP.ThemeManager', '&Export Theme'),
|
||||||
|
self.onExportTheme)
|
||||||
# Signals
|
# Signals
|
||||||
QtCore.QObject.connect(self.themeListWidget,
|
QtCore.QObject.connect(self.themeListWidget,
|
||||||
QtCore.SIGNAL(u'doubleClicked(QModelIndex)'),
|
QtCore.SIGNAL(u'doubleClicked(QModelIndex)'),
|
||||||
@ -198,19 +203,7 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
self.deleteAction.setVisible(True)
|
self.deleteAction.setVisible(True)
|
||||||
self.renameAction.setVisible(True)
|
self.renameAction.setVisible(True)
|
||||||
self.globalAction.setVisible(True)
|
self.globalAction.setVisible(True)
|
||||||
action = self.menu.exec_(self.themeListWidget.mapToGlobal(point))
|
self.menu.exec_(self.themeListWidget.mapToGlobal(point))
|
||||||
if action == self.editAction:
|
|
||||||
self.onEditTheme()
|
|
||||||
if action == self.copyAction:
|
|
||||||
self.onCopyTheme()
|
|
||||||
if action == self.renameAction:
|
|
||||||
self.onRenameTheme()
|
|
||||||
if action == self.deleteAction:
|
|
||||||
self.onDeleteTheme()
|
|
||||||
if action == self.globalAction:
|
|
||||||
self.changeGlobalFromScreen()
|
|
||||||
if action == self.exportAction:
|
|
||||||
self.onExportTheme()
|
|
||||||
|
|
||||||
def changeGlobalFromTab(self, themeName):
|
def changeGlobalFromTab(self, themeName):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user