forked from openlp/openlp
Long lines
This commit is contained in:
parent
ddc99e13e8
commit
947e4d4173
@ -156,9 +156,11 @@ class PluginManager(object):
|
||||
if plugin.settings_tab:
|
||||
log.debug(u'Inserting settings tab item from %s' %
|
||||
visible_title[u'title'])
|
||||
settingsform.addTab(visible_title[u'title'], plugin.settings_tab)
|
||||
settingsform.addTab(visible_title[u'title'],
|
||||
plugin.settings_tab)
|
||||
else:
|
||||
log.debug(u'No tab settings in %s' % visible_title[u'title'])
|
||||
log.debug(
|
||||
u'No tab settings in %s' % visible_title[u'title'])
|
||||
|
||||
def hook_import_menu(self, import_menu):
|
||||
"""
|
||||
|
@ -386,10 +386,11 @@ class ThemeXML(object):
|
||||
for e in element.attrib.iteritems():
|
||||
if master == u'font_' and e[0] == u'type':
|
||||
master += e[1] + u'_'
|
||||
elif master == u'display_' and (element.tag == u'shadow' \
|
||||
or element.tag == u'outline' ):
|
||||
elif master == u'display_' and (element.tag == u'shadow'
|
||||
or element.tag == u'outline'):
|
||||
self._create_attr(master, element.tag, element.text)
|
||||
self._create_attr(master, element.tag + u'_'+ e[0], e[1])
|
||||
self._create_attr(master, element.tag + u'_'+ e[0],
|
||||
e[1])
|
||||
else:
|
||||
field = master + e[0]
|
||||
self._create_attr(master, e[0], e[1])
|
||||
|
@ -83,7 +83,8 @@ class AdvancedTab(SettingsTab):
|
||||
self.uiLayout.addWidget(self.doubleClickLiveCheckBox)
|
||||
self.leftLayout.addWidget(self.uiGroupBox)
|
||||
self.expandServiceItemCheckBox = QtGui.QCheckBox(self.uiGroupBox)
|
||||
self.expandServiceItemCheckBox.setObjectName(u'expandServiceItemCheckBox')
|
||||
self.expandServiceItemCheckBox.setObjectName(
|
||||
u'expandServiceItemCheckBox')
|
||||
self.uiLayout.addWidget(self.expandServiceItemCheckBox)
|
||||
# self.sharedDirGroupBox = QtGui.QGroupBox(self.leftWidget)
|
||||
# self.sharedDirGroupBox.setObjectName(u'sharedDirGroupBox')
|
||||
|
@ -34,7 +34,8 @@ class Ui_FileRenameDialog(object):
|
||||
FileRenameDialog.resize(400, 87)
|
||||
self.buttonBox = QtGui.QDialogButtonBox(FileRenameDialog)
|
||||
self.buttonBox.setGeometry(QtCore.QRect(210, 50, 171, 25))
|
||||
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
|
||||
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel |
|
||||
QtGui.QDialogButtonBox.Ok)
|
||||
self.buttonBox.setObjectName("buttonBox")
|
||||
self.widget = QtGui.QWidget(FileRenameDialog)
|
||||
self.widget.setGeometry(QtCore.QRect(10, 10, 381, 35))
|
||||
|
@ -270,7 +270,8 @@ class Ui_MainWindow(object):
|
||||
self.SettingsPluginListItem.setIcon(
|
||||
build_icon(u':/system/settings_plugin_list.png'))
|
||||
self.SettingsPluginListItem.setObjectName(u'SettingsPluginListItem')
|
||||
MainWindow.actionList.add_action(self.SettingsPluginListItem, u'Settings')
|
||||
MainWindow.actionList.add_action(self.SettingsPluginListItem,
|
||||
u'Settings')
|
||||
#i18n Language Items
|
||||
self.AutoLanguageItem = QtGui.QAction(MainWindow)
|
||||
self.AutoLanguageItem.setObjectName(u'AutoLanguageItem')
|
||||
@ -296,7 +297,8 @@ class Ui_MainWindow(object):
|
||||
self.SettingsConfigureItem.setIcon(
|
||||
build_icon(u':/system/system_settings.png'))
|
||||
self.SettingsConfigureItem.setObjectName(u'SettingsConfigureItem')
|
||||
MainWindow.actionList.add_action(self.SettingsShortcutsItem, u'Settings')
|
||||
MainWindow.actionList.add_action(self.SettingsShortcutsItem,
|
||||
u'Settings')
|
||||
self.HelpDocumentationItem = QtGui.QAction(MainWindow)
|
||||
self.HelpDocumentationItem.setIcon(
|
||||
build_icon(u':/system/system_help_contents.png'))
|
||||
|
@ -107,7 +107,8 @@ class PluginForm(QtGui.QDialog, Ui_PluginViewDialog):
|
||||
if self.pluginListWidget.currentItem() is None:
|
||||
self._clearDetails()
|
||||
return
|
||||
plugin_name_plural = self.pluginListWidget.currentItem().text().split(u' ')[0]
|
||||
plugin_name_plural = \
|
||||
self.pluginListWidget.currentItem().text().split(u' ')[0]
|
||||
self.activePlugin = None
|
||||
for plugin in self.parent.plugin_manager.plugins:
|
||||
name_string = plugin.getString(StringContent.Name)
|
||||
|
@ -306,7 +306,7 @@ class ServiceManager(QtGui.QWidget):
|
||||
self.editAction.setVisible(False)
|
||||
self.maintainAction.setVisible(False)
|
||||
self.notesAction.setVisible(False)
|
||||
if serviceItem[u'service_item'].is_capable(ItemCapabilities.AllowsEdit) \
|
||||
if serviceItem[u'service_item'].is_capable(ItemCapabilities.AllowsEdit)\
|
||||
and hasattr(serviceItem[u'service_item'], u'editId'):
|
||||
self.editAction.setVisible(True)
|
||||
if serviceItem[u'service_item']\
|
||||
@ -441,7 +441,8 @@ class ServiceManager(QtGui.QWidget):
|
||||
if setSelected:
|
||||
setSelected = False
|
||||
serviceIterator.value().setSelected(True)
|
||||
elif serviceIterator.value() and serviceIterator.value().isSelected():
|
||||
elif serviceIterator.value() and \
|
||||
serviceIterator.value().isSelected():
|
||||
serviceIterator.value().setSelected(False)
|
||||
setSelected = True
|
||||
serviceIterator += 1
|
||||
@ -761,7 +762,8 @@ class ServiceManager(QtGui.QWidget):
|
||||
serviceitem.set_from_service(item, self.servicePath)
|
||||
self.validateItem(serviceitem)
|
||||
self.addServiceItem(serviceitem)
|
||||
if serviceitem.is_capable(ItemCapabilities.OnLoadUpdate):
|
||||
if serviceitem.is_capable(
|
||||
ItemCapabilities.OnLoadUpdate):
|
||||
Receiver.send_message(u'%s_service_load' %
|
||||
serviceitem.name.lower(), serviceitem)
|
||||
try:
|
||||
|
@ -794,7 +794,8 @@ class SlideController(QtGui.QWidget):
|
||||
self.selectedRow = 0
|
||||
if row > -1 and row < self.PreviewListWidget.rowCount():
|
||||
if self.serviceItem.is_command() and self.isLive:
|
||||
Receiver.send_message(u'%s_slide' % self.serviceItem.name.lower(),
|
||||
Receiver.send_message(
|
||||
u'%s_slide' % self.serviceItem.name.lower(),
|
||||
[self.serviceItem, self.isLive, row])
|
||||
self.updatePreview()
|
||||
else:
|
||||
|
@ -61,7 +61,8 @@ class PresentationPlugin(Plugin):
|
||||
Create the settings Tab
|
||||
"""
|
||||
visible_name = self.getString(StringContent.VisibleName)
|
||||
return PresentationTab(self.name, visible_name[u'title'], self.controllers)
|
||||
return PresentationTab(self.name, visible_name[u'title'],
|
||||
self.controllers)
|
||||
|
||||
def initialise(self):
|
||||
"""
|
||||
|
@ -74,7 +74,8 @@ class OpenLP1SongImport(SongImport):
|
||||
decoded = unicode(raw, codec)
|
||||
self.last_encoding = codec
|
||||
except UnicodeDecodeError:
|
||||
log.exception(u'Error in detecting openlp.org 1.x database encoding.')
|
||||
log.exception(
|
||||
u'Error in detecting openlp.org 1.x database encoding.')
|
||||
try:
|
||||
decoded = unicode(raw, self.last_encoding)
|
||||
except UnicodeDecodeError:
|
||||
@ -152,7 +153,8 @@ class OpenLP1SongImport(SongImport):
|
||||
break
|
||||
for track in tracks:
|
||||
if track[0] == track_id[0]:
|
||||
self.add_media_file(self.decode_string(track[1], guess))
|
||||
self.add_media_file(self.decode_string(track[1],
|
||||
guess))
|
||||
break
|
||||
if self.stop_import_flag:
|
||||
success = False
|
||||
|
@ -229,14 +229,16 @@ class OpenSongImport(SongImport):
|
||||
# drop the square brackets
|
||||
right_bracket = thisline.find(u']')
|
||||
content = thisline[1:right_bracket].upper()
|
||||
# have we got any digits? If so, versenumber is everything from the digits
|
||||
# have we got any digits?
|
||||
# If so, versenumber is everything from the digits
|
||||
# to the end (even if there are some alpha chars on the end)
|
||||
match = re.match(u'(.*)(\d+.*)', content)
|
||||
if match is not None:
|
||||
versetype = match.group(1)
|
||||
versenum = match.group(2)
|
||||
else:
|
||||
# otherwise we assume number 1 and take the whole prefix as versetype
|
||||
# otherwise we assume number 1 and take the whole prefix as
|
||||
# the versetype
|
||||
versetype = content
|
||||
versenum = u'1'
|
||||
continue
|
||||
@ -301,6 +303,7 @@ class OpenSongImport(SongImport):
|
||||
# Assume it's no.1 if there's no digits
|
||||
tag = tag + u'1'
|
||||
if not versetags.has_key(tag):
|
||||
log.info(u'Got order %s but not in versetags, dropping this item from presentation order', tag)
|
||||
log.info(u'Got order %s but not in versetags, dropping this'
|
||||
u'item from presentation order', tag)
|
||||
else:
|
||||
self.verse_order_list.append(tag)
|
||||
|
@ -296,7 +296,8 @@ class SongImport(QtCore.QObject):
|
||||
song.lyrics = unicode(sxml.extract_xml(), u'utf-8')
|
||||
for i, current_verse_tag in enumerate(self.verse_order_list):
|
||||
if verses_changed_to_other.has_key(current_verse_tag):
|
||||
self.verse_order_list[i] = verses_changed_to_other[current_verse_tag]
|
||||
self.verse_order_list[i] = \
|
||||
verses_changed_to_other[current_verse_tag]
|
||||
song.verse_order = u' '.join(self.verse_order_list)
|
||||
song.copyright = self.copyright
|
||||
song.comments = self.comments
|
||||
|
@ -56,8 +56,10 @@ class SongsTab(SettingsTab):
|
||||
self.SongUpdateOnEditCheckBox = QtGui.QCheckBox(self.SongsModeGroupBox)
|
||||
self.SongUpdateOnEditCheckBox.setObjectName(u'SongUpdateOnEditCheckBox')
|
||||
self.SongsModeLayout.addWidget(self.SongUpdateOnEditCheckBox)
|
||||
self.SongAddFromServiceCheckBox = QtGui.QCheckBox(self.SongsModeGroupBox)
|
||||
self.SongAddFromServiceCheckBox.setObjectName(u'SongAddFromServiceCheckBox')
|
||||
self.SongAddFromServiceCheckBox = QtGui.QCheckBox(
|
||||
self.SongsModeGroupBox)
|
||||
self.SongAddFromServiceCheckBox.setObjectName(
|
||||
u'SongAddFromServiceCheckBox')
|
||||
self.SongsModeLayout.addWidget(self.SongAddFromServiceCheckBox)
|
||||
self.SongsLayout.setWidget(
|
||||
0, QtGui.QFormLayout.LabelRole, self.SongsModeGroupBox)
|
||||
@ -83,7 +85,8 @@ class SongsTab(SettingsTab):
|
||||
'Display verses on live tool bar'))
|
||||
self.SongUpdateOnEditCheckBox.setText(
|
||||
translate('SongsPlugin.SongsTab', 'Update service from song edit'))
|
||||
self.SongAddFromServiceCheckBox.setText(translate('SongsPlugin.SongsTab',
|
||||
self.SongAddFromServiceCheckBox.setText(
|
||||
translate('SongsPlugin.SongsTab',
|
||||
'Add missing songs when opening service'))
|
||||
|
||||
def onSearchAsTypeCheckBoxChanged(self, check_state):
|
||||
@ -132,6 +135,8 @@ class SongsTab(SettingsTab):
|
||||
settings.beginGroup(self.settingsSection)
|
||||
settings.setValue(u'search as type', QtCore.QVariant(self.song_search))
|
||||
settings.setValue(u'display songbar', QtCore.QVariant(self.song_bar))
|
||||
settings.setValue(u'update service on edit', QtCore.QVariant(self.update_edit))
|
||||
settings.setValue(u'add song from service', QtCore.QVariant(self.update_load))
|
||||
settings.setValue(u'update service on edit',
|
||||
QtCore.QVariant(self.update_edit))
|
||||
settings.setValue(u'add song from service',
|
||||
QtCore.QVariant(self.update_load))
|
||||
settings.endGroup()
|
||||
|
Loading…
Reference in New Issue
Block a user