openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #01711
[Merge] lp:~meths/openlp/trivialfixes into lp:openlp
Jon Tibble has proposed merging lp:~meths/openlp/trivialfixes into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Should be the last fairly huge coding standards push - includes remaining fixes to the translate() merge.
--
https://code.launchpad.net/~meths/openlp/trivialfixes/+merge/27064
Your team OpenLP Core is requested to review the proposed merge of lp:~meths/openlp/trivialfixes into lp:openlp.
=== modified file 'openlp/core/ui/amendthemedialog.py'
--- openlp/core/ui/amendthemedialog.py 2010-06-06 22:30:11 +0000
+++ openlp/core/ui/amendthemedialog.py 2010-06-08 16:02:22 +0000
@@ -671,8 +671,8 @@
self.ThemePreviewLayout.addItem(spacerItem8)
self.AmendThemeLayout.addWidget(self.PreviewGroupBox)
self.ThemeButtonBox = QtGui.QDialogButtonBox(AmendThemeDialog)
- self.ThemeButtonBox.setStandardButtons(
- QtGui.QDialogButtonBox.Cancel | QtGui.QDialogButtonBox.Ok)
+ self.ThemeButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel |
+ QtGui.QDialogButtonBox.Ok)
self.ThemeButtonBox.setObjectName(u'ThemeButtonBox')
self.AmendThemeLayout.addWidget(self.ThemeButtonBox)
@@ -813,12 +813,9 @@
translate(u'AmendThemeForm', u'Width:'))
self.FontMainHeightLabel.setText(
translate(u'AmendThemeForm', u'Height:'))
- self.FontMainXSpinBox.setSuffix(
- translate(u'AmendThemeForm', u'px'))
- self.FontMainYSpinBox.setSuffix(
- translate(u'AmendThemeForm', u'px'))
- self.FontMainWidthSpinBox.setSuffix(
- translate(u'AmendThemeForm', u'px'))
+ self.FontMainXSpinBox.setSuffix(translate(u'AmendThemeForm', u'px'))
+ self.FontMainYSpinBox.setSuffix(translate(u'AmendThemeForm', u'px'))
+ self.FontMainWidthSpinBox.setSuffix(translate(u'AmendThemeForm', u'px'))
self.FontMainHeightSpinBox.setSuffix(
translate(u'AmendThemeForm', u'px'))
self.ThemeTabWidget.setTabText(
@@ -830,7 +827,8 @@
self.FontFooterColorLabel.setText(
translate(u'AmendThemeForm', u'Font Color:'))
self.FontFooterSizeLabel.setText(translate(u'AmendThemeForm', u'Size:'))
- self.FontFooterSizeSpinBox.setSuffix(translate(u'AmendThemeForm', u'pt'))
+ self.FontFooterSizeSpinBox.setSuffix(
+ translate(u'AmendThemeForm', u'pt'))
self.FontFooterWeightComboBox.setItemText(0,
translate(u'AmendThemeForm', u'Normal'))
self.FontFooterWeightComboBox.setItemText(1,
@@ -863,16 +861,16 @@
translate(u'AmendThemeForm', u'px'))
self.ThemeTabWidget.setTabText(
self.ThemeTabWidget.indexOf(self.FontFooterTab),
- translate('AmendThemeForm', 'Font Footer'))
- self.OutlineGroupBox.setTitle(translate('AmendThemeForm', 'Outline'))
+ translate(u'AmendThemeForm', u'Font Footer'))
+ self.OutlineGroupBox.setTitle(translate(u'AmendThemeForm', u'Outline'))
self.OutlineSpinBoxLabel.setText(
- translate('AmendThemeForm', 'Outline Size:'))
- self.OutlineSpinBox.setSuffix(translate('AmendThemeForm', 'px'))
+ translate(u'AmendThemeForm', u'Outline Size:'))
+ self.OutlineSpinBox.setSuffix(translate(u'AmendThemeForm', u'px'))
self.OutlineColorLabel.setText(
translate(u'AmendThemeForm', u'Outline Color:'))
self.OutlineEnabledLabel.setText(
- translate('AmendThemeForm', 'Show Outline:'))
- self.ShadowGroupBox.setTitle(translate('AmendThemeForm', 'Shadow'))
+ translate(u'AmendThemeForm', u'Show Outline:'))
+ self.ShadowGroupBox.setTitle(translate(u'AmendThemeForm', u'Shadow'))
self.ShadowSpinBoxLabel.setText(
translate(u'AmendThemeForm', u'Shadow Size:'))
self.ShadowSpinBox.setSuffix(translate(u'AmendThemeForm', u'px'))
@@ -906,3 +904,4 @@
self.ThemeTabWidget.indexOf(self.OtherOptionsTab),
translate(u'AmendThemeForm', u'Other Options'))
self.PreviewGroupBox.setTitle(translate(u'AmendThemeForm', u'Preview'))
+
=== modified file 'openlp/core/ui/amendthemeform.py'
--- openlp/core/ui/amendthemeform.py 2010-06-06 22:30:11 +0000
+++ openlp/core/ui/amendthemeform.py 2010-06-08 16:02:22 +0000
@@ -215,6 +215,7 @@
self.ImageLineEdit.setText(filename)
self.theme.background_filename = filename
self.previewTheme()
+
#
#Main Font Tab
#
@@ -306,6 +307,7 @@
if self.theme.font_main_height != self.FontMainHeightSpinBox.value():
self.theme.font_main_height = self.FontMainHeightSpinBox.value()
self.previewTheme()
+
#
#Footer Font Tab
#
@@ -384,6 +386,7 @@
self.theme.font_footer_height = \
self.FontFooterHeightSpinBox.value()
self.previewTheme()
+
#
#Background Tab
#
@@ -446,6 +449,7 @@
self.Color2PushButton.setStyleSheet(
u'background-color: %s' % unicode(self.theme.background_endColor))
self.previewTheme()
+
#
#Other Tab
#
@@ -506,6 +510,7 @@
self.theme.display_verticalAlign = currentIndex
self.stateChanging(self.theme)
self.previewTheme()
+
#
#Local Methods
#
@@ -629,7 +634,8 @@
if theme.background_type == u'solid':
self.Color1PushButton.setStyleSheet(
u'background-color: %s' % unicode(theme.background_color))
- self.Color1Label.setText(translate(u'AmendThemeForm', u'Background Color:'))
+ self.Color1Label.setText(
+ translate(u'AmendThemeForm', u'Background Color:'))
self.Color1Label.setVisible(True)
self.Color1PushButton.setVisible(True)
self.Color2Label.setVisible(False)
@@ -644,8 +650,10 @@
% unicode(theme.background_startColor))
self.Color2PushButton.setStyleSheet(u'background-color: %s' \
% unicode(theme.background_endColor))
- self.Color1Label.setText(translate(u'AmendThemeForm', u'First Color:'))
- self.Color2Label.setText(translate(u'AmendThemeForm', u'Second Color:'))
+ self.Color1Label.setText(
+ translate(u'AmendThemeForm', u'First Color:'))
+ self.Color2Label.setText(
+ translate(u'AmendThemeForm', u'Second Color:'))
self.Color1Label.setVisible(True)
self.Color1PushButton.setVisible(True)
self.Color2Label.setVisible(True)
@@ -713,7 +721,8 @@
log.debug(u'Page Length area height %s, metrics %s, lines %s' %
(self.FontMainHeightSpinBox.value(), metrics.height(),
page_length))
- page_length_text = unicode(translate(u'AmendThemeForm', u'Slide Height is %s rows'))
+ page_length_text = unicode(
+ translate(u'AmendThemeForm', u'Slide Height is %s rows'))
self.FontMainLinesPageLabel.setText(page_length_text % page_length)
frame = self.thememanager.generateImage(self.theme)
self.ThemePreview.setPixmap(QtGui.QPixmap.fromImage(frame))
@@ -728,8 +737,9 @@
self.theme.font_main_italics)# italic
mainFont.setPixelSize(self.theme.font_main_proportion)
metrics = QtGui.QFontMetrics(mainFont)
- #Validate that the screen width is big enough to display the text
+ # Validate that the screen width is big enough to display the text
if self.theme.font_main_width < metrics.maxWidth() * 2 + 64:
self.theme.font_main_width = metrics.maxWidth() * 2 + 64
self.FontMainWidthSpinBox.setValue(self.theme.font_main_width)
return metrics
+
=== modified file 'openlp/core/ui/displaytab.py'
--- openlp/core/ui/displaytab.py 2010-06-06 09:52:11 +0000
+++ openlp/core/ui/displaytab.py 2010-06-08 16:02:22 +0000
@@ -155,12 +155,12 @@
self.OverrideCheckBox.setObjectName(u'OverrideCheckBox')
QtCore.QMetaObject.connectSlotsByName(self)
QtCore.QObject.connect(self.OverrideCheckBox,
- QtCore.SIGNAL(u'stateChanged(int)'),
- self.onOverrideCheckBoxChanged)
+ QtCore.SIGNAL(u'stateChanged(int)'), self.onOverrideCheckBoxChanged)
def retranslateUi(self):
self.setWindowTitle(translate(u'DisplayTab', u'Amend Display Settings'))
- self.CurrentGroupBox.setTitle(translate(u'DisplayTab', u'Default Settings'))
+ self.CurrentGroupBox.setTitle(
+ translate(u'DisplayTab', u'Default Settings'))
self.XLabel.setText(translate(u'DisplayTab', u'X'))
self.Xpos.setText(u'0')
self.YLabel.setText(translate(u'DisplayTab', u'Y'))
@@ -169,12 +169,14 @@
self.Height.setText(u'0')
self.WidthLabel.setText(translate(u'DisplayTab', u'Width'))
self.Width.setText(u'0')
- self.CurrentGroupBox_2.setTitle(translate(u'DisplayTab', u'Amend Settings'))
+ self.CurrentGroupBox_2.setTitle(
+ translate(u'DisplayTab', u'Amend Settings'))
self.XAmendLabel.setText(translate(u'DisplayTab', u'X'))
self.YAmendLabel.setText(translate(u'DisplayTab', u'Y'))
self.HeightAmendLabel.setText(translate(u'DisplayTab', u'Height'))
self.WidthAmendLabel.setText(translate(u'DisplayTab', u'Width'))
- self.OverrideCheckBox.setText(translate(u'DisplayTab', u'Override Output Display'))
+ self.OverrideCheckBox.setText(
+ translate(u'DisplayTab', u'Override Output Display'))
def load(self):
settings = QtCore.QSettings()
@@ -209,16 +211,11 @@
def save(self):
settings = QtCore.QSettings()
settings.beginGroup(self.settingsSection)
- settings.setValue('x position',
- QtCore.QVariant(self.XposEdit.text()))
- settings.setValue('y position',
- QtCore.QVariant(self.YposEdit.text()))
- settings.setValue('height',
- QtCore.QVariant(self.HeightEdit.text()))
- settings.setValue('width',
- QtCore.QVariant(self.WidthEdit.text()))
- settings.setValue('amend display',
- QtCore.QVariant(self.amend_display))
+ settings.setValue('x position', QtCore.QVariant(self.XposEdit.text()))
+ settings.setValue('y position', QtCore.QVariant(self.YposEdit.text()))
+ settings.setValue('height', QtCore.QVariant(self.HeightEdit.text()))
+ settings.setValue('width', QtCore.QVariant(self.WidthEdit.text()))
+ settings.setValue('amend display', QtCore.QVariant(self.amend_display))
self.postSetUp()
def postSetUp(self):
=== modified file 'openlp/core/ui/serviceitemeditform.py'
--- openlp/core/ui/serviceitemeditform.py 2010-03-27 10:12:11 +0000
+++ openlp/core/ui/serviceitemeditform.py 2010-06-08 16:02:22 +0000
@@ -38,21 +38,16 @@
self.setupUi(self)
self.itemList = []
# enable drop
- QtCore.QObject.connect(self.upButton,
- QtCore.SIGNAL(u'clicked()'),
- self.onItemUp)
- QtCore.QObject.connect(self.downButton,
- QtCore.SIGNAL(u'clicked()'),
- self.onItemDown)
- QtCore.QObject.connect(self.deleteButton,
- QtCore.SIGNAL(u'clicked()'),
- self.onItemDelete)
- QtCore.QObject.connect(self.buttonBox,
- QtCore.SIGNAL(u'accepted()'),
- self.accept)
- QtCore.QObject.connect(self.buttonBox,
- QtCore.SIGNAL(u'rejected()'),
- self.reject)
+ QtCore.QObject.connect(self.upButton, QtCore.SIGNAL(u'clicked()'),
+ self.onItemUp)
+ QtCore.QObject.connect(self.downButton, QtCore.SIGNAL(u'clicked()'),
+ self.onItemDown)
+ QtCore.QObject.connect(self.deleteButton, QtCore.SIGNAL(u'clicked()'),
+ self.onItemDelete)
+ QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(u'accepted()'),
+ self.accept)
+ QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(u'rejected()'),
+ self.reject)
def setServiceItem(self, item):
self.item = item
@@ -68,8 +63,8 @@
self.item._raw_frames = []
if self.item.is_image():
for item in self.itemList:
- self.item.add_from_image(item[u'path'],
- item[u'title'], item[u'image'])
+ self.item.add_from_image(item[u'path'], item[u'title'],
+ item[u'image'])
self.item.render()
return self.item
=== modified file 'openlp/core/ui/servicenoteform.py'
--- openlp/core/ui/servicenoteform.py 2010-03-30 07:05:24 +0000
+++ openlp/core/ui/servicenoteform.py 2010-06-08 16:02:22 +0000
@@ -24,6 +24,7 @@
###############################################################################
from PyQt4 import QtCore, QtGui
+
from servicenotedialog import Ui_ServiceNoteEdit
class ServiceNoteForm(QtGui.QDialog, Ui_ServiceNoteEdit):
@@ -36,9 +37,7 @@
"""
QtGui.QDialog.__init__(self, parent)
self.setupUi(self)
- QtCore.QObject.connect(self.buttonBox,
- QtCore.SIGNAL(u'accepted()'),
- self.accept)
- QtCore.QObject.connect(self.buttonBox,
- QtCore.SIGNAL(u'rejected()'),
- self.reject)
+ QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(u'accepted()'),
+ self.accept)
+ QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(u'rejected()'),
+ self.reject)
=== modified file 'openlp/core/ui/thememanager.py'
--- openlp/core/ui/thememanager.py 2010-06-07 21:36:22 +0000
+++ openlp/core/ui/thememanager.py 2010-06-08 16:02:22 +0000
@@ -35,7 +35,7 @@
from openlp.core.theme import Theme
from openlp.core.lib import OpenLPToolbar, contextMenuAction, \
ThemeXML, str_to_bool, get_text_file_string, build_icon, Receiver, \
- contextMenuSeparator, SettingsManager, translate
+ contextMenuSeparator, SettingsManager, translate
from openlp.core.utils import AppLocation
log = logging.getLogger(__name__)
@@ -99,7 +99,7 @@
contextMenuAction(self.ThemeListWidget,
u':/general/general_export.png',
translate(u'ThemeManager', u'Export theme'),
- self.onExportTheme))
+ self.onExportTheme))
self.ThemeListWidget.addAction(
contextMenuSeparator(self.ThemeListWidget))
#Signals
@@ -199,7 +199,7 @@
return
if unicode(self.parent.ServiceManagerContents.ThemeComboBox.currentText()) == theme:
QtGui.QMessageBox.critical(
- self, translate('ThemeManager','Error'),
+ self, translate(u'ThemeManager',u'Error'),
translate(u'ThemeManager',
u'Theme %s is use by Service Manager' % theme),
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
=== modified file 'openlp/core/utils/languagemanager.py'
--- openlp/core/utils/languagemanager.py 2010-06-06 11:05:35 +0000
+++ openlp/core/utils/languagemanager.py 2010-06-08 16:02:22 +0000
@@ -34,7 +34,7 @@
class LanguageManager(object):
"""
- Helper for Language selection
+ Helper for Language selection
"""
__qmList__ = None
AutoLanguage = False
@@ -55,8 +55,8 @@
trans_dir = QtCore.QDir(os.path.join(trans_dir, u'resources', u'i18n'))
fileNames = trans_dir.entryList(QtCore.QStringList("*.qm"),
QtCore.QDir.Files, QtCore.QDir.Name)
- for i in fileNames:
- fileNames.replaceInStrings(i, trans_dir.filePath(i))
+ for name in fileNames:
+ fileNames.replaceInStrings(name, trans_dir.filePath(name))
return fileNames
@staticmethod
@@ -101,11 +101,12 @@
regEx = QtCore.QRegExp("^.*openlp_(.*).qm")
if regEx.exactMatch(qmf):
langName = regEx.cap(1)
- LanguageManager.__qmList__[u'%#2i %s' % (i+1,
- LanguageManager.language_name(qmf))] = langName
+ LanguageManager.__qmList__[u'%#2i %s' % (i+1,
+ LanguageManager.language_name(qmf))] = langName
@staticmethod
def get_qm_list():
if LanguageManager.__qmList__ == None:
LanguageManager.init_qm_list()
return LanguageManager.__qmList__
+
=== modified file 'openlp/plugins/alerts/alertsplugin.py'
--- openlp/plugins/alerts/alertsplugin.py 2010-06-07 21:36:22 +0000
+++ openlp/plugins/alerts/alertsplugin.py 2010-06-08 16:02:22 +0000
@@ -27,7 +27,7 @@
from PyQt4 import QtCore, QtGui
-from openlp.core.lib import Plugin, build_icon, PluginStatus, translate
+from openlp.core.lib import Plugin, build_icon, PluginStatus, translate
from openlp.plugins.alerts.lib import AlertsManager, AlertsTab, DBManager
from openlp.plugins.alerts.forms import AlertForm
=== modified file 'openlp/plugins/alerts/forms/alertform.py'
--- openlp/plugins/alerts/forms/alertform.py 2010-06-06 11:34:35 +0000
+++ openlp/plugins/alerts/forms/alertform.py 2010-06-08 16:02:22 +0000
@@ -43,38 +43,29 @@
self.item_id = None
QtGui.QDialog.__init__(self, None)
self.setupUi(self)
- QtCore.QObject.connect(self.DisplayButton,
- QtCore.SIGNAL(u'clicked()'),
- self.onDisplayClicked)
+ QtCore.QObject.connect(self.DisplayButton, QtCore.SIGNAL(u'clicked()'),
+ self.onDisplayClicked)
QtCore.QObject.connect(self.DisplayCloseButton,
- QtCore.SIGNAL(u'clicked()'),
- self.onDisplayCloseClicked)
+ QtCore.SIGNAL(u'clicked()'), self.onDisplayCloseClicked)
QtCore.QObject.connect(self.AlertTextEdit,
- QtCore.SIGNAL(u'textChanged(const QString&)'),
- self.onTextChanged)
- QtCore.QObject.connect(self.NewButton,
- QtCore.SIGNAL(u'clicked()'),
- self.onNewClick)
- QtCore.QObject.connect(self.DeleteButton,
- QtCore.SIGNAL(u'clicked()'),
- self.onDeleteClick)
- QtCore.QObject.connect(self.SaveButton,
- QtCore.SIGNAL(u'clicked()'),
- self.onSaveClick)
- QtCore.QObject.connect(self.AlertListWidget,
- QtCore.SIGNAL(u'doubleClicked(QModelIndex)'),
- self.onDoubleClick)
- QtCore.QObject.connect(self.AlertListWidget,
- QtCore.SIGNAL(u'clicked(QModelIndex)'),
- self.onSingleClick)
+ QtCore.SIGNAL(u'textChanged(const QString&)'), self.onTextChanged)
+ QtCore.QObject.connect(self.NewButton, QtCore.SIGNAL(u'clicked()'),
+ self.onNewClick)
+ QtCore.QObject.connect(self.DeleteButton, QtCore.SIGNAL(u'clicked()'),
+ self.onDeleteClick)
+ QtCore.QObject.connect(self.SaveButton, QtCore.SIGNAL(u'clicked()'),
+ self.onSaveClick)
+ QtCore.QObject.connect(self.AlertListWidget,
+ QtCore.SIGNAL(u'doubleClicked(QModelIndex)'), self.onDoubleClick)
+ QtCore.QObject.connect(self.AlertListWidget,
+ QtCore.SIGNAL(u'clicked(QModelIndex)'), self.onSingleClick)
def loadList(self):
self.AlertListWidget.clear()
alerts = self.manager.get_all_alerts()
for alert in alerts:
item_name = QtGui.QListWidgetItem(alert.text)
- item_name.setData(
- QtCore.Qt.UserRole, QtCore.QVariant(alert.id))
+ item_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(alert.id))
self.AlertListWidget.addItem(item_name)
self.SaveButton.setEnabled(False)
self.DeleteButton.setEnabled(False)
@@ -157,3 +148,4 @@
self.parent.alertsmanager.displayAlert(text)
return True
return False
+
=== modified file 'openlp/plugins/bibles/forms/importwizardform.py'
--- openlp/plugins/bibles/forms/importwizardform.py 2010-06-07 21:36:22 +0000
+++ openlp/plugins/bibles/forms/importwizardform.py 2010-06-08 16:02:22 +0000
@@ -31,7 +31,7 @@
from PyQt4 import QtCore, QtGui
from bibleimportwizard import Ui_BibleImportWizard
-from openlp.core.lib import Receiver, SettingsManager, translate
+from openlp.core.lib import Receiver, SettingsManager, translate
from openlp.core.utils import AppLocation, variant_to_unicode
from openlp.plugins.bibles.lib.manager import BibleFormat
=== modified file 'openlp/plugins/bibles/lib/biblestab.py'
--- openlp/plugins/bibles/lib/biblestab.py 2010-06-06 11:49:39 +0000
+++ openlp/plugins/bibles/lib/biblestab.py 2010-06-08 16:02:22 +0000
@@ -27,7 +27,7 @@
from PyQt4 import QtCore, QtGui
-from openlp.core.lib import Receiver, SettingsTab, translate
+from openlp.core.lib import Receiver, SettingsTab, translate
log = logging.getLogger(__name__)
=== modified file 'openlp/plugins/bibles/lib/mediaitem.py'
--- openlp/plugins/bibles/lib/mediaitem.py 2010-06-07 21:36:22 +0000
+++ openlp/plugins/bibles/lib/mediaitem.py 2010-06-08 16:02:22 +0000
@@ -29,7 +29,7 @@
from PyQt4 import QtCore, QtGui
from openlp.core.lib import MediaManagerItem, Receiver, BaseListWithDnD, \
- ItemCapabilities, translate
+ ItemCapabilities, translate
from openlp.plugins.bibles.forms import ImportWizardForm
log = logging.getLogger(__name__)
@@ -521,10 +521,10 @@
if self.parent.settings_tab.display_style == 1:
verse_text = self.formatVerse(old_chapter, chapter, verse,
u'(u', u')')
- elif self.parent.settings_tab.display_style == 2:
+ elif self.parent.settings_tab.display_style == 2:
verse_text = self.formatVerse(old_chapter, chapter, verse,
u'{', u'}')
- elif self.parent.settings_tab.display_style == 3:
+ elif self.parent.settings_tab.display_style == 3:
verse_text = self.formatVerse(old_chapter, chapter, verse,
u'[', u']')
else:
@@ -558,10 +558,9 @@
service_item.title = u'%s %s' % (book, verse_text)
elif service_item.title.find(
translate(u'BiblesPlugin.MediaItem', u'etc')) == -1:
- service_item.title = u'%s, %s' \
- % (service_item.title,
+ service_item.title = u'%s, %s' % (service_item.title,
translate(u'BiblesPlugin.MediaItem', u'etc'))
- if len(self.parent.settings_tab.bible_theme) == 0:
+ if len(self.parent.settings_tab.bible_theme) == 0:
service_item.theme = None
else:
service_item.theme = self.parent.settings_tab.bible_theme
@@ -658,3 +657,4 @@
def searchByReference(self, bible, search):
log.debug(u'searchByReference %s, %s', bible, search)
self.search_results = self.parent.manager.get_verses(bible, search)
+
=== modified file 'openlp/plugins/bibles/lib/opensong.py'
--- openlp/plugins/bibles/lib/opensong.py 2010-06-06 22:30:11 +0000
+++ openlp/plugins/bibles/lib/opensong.py 2010-06-08 16:02:22 +0000
@@ -28,7 +28,7 @@
from lxml import objectify
from PyQt4 import QtCore
-from openlp.core.lib import Receiver, translate
+from openlp.core.lib import Receiver, translate
from db import BibleDB
log = logging.getLogger(__name__)
@@ -95,7 +95,7 @@
Receiver.send_message(u'openlp_process_events')
self.wizard.incrementProgressBar(
QtCore.QString('%s %s %s' % (
- translate(u'BiblesPlugin.Opensong', u'Importing'),\
+ translate(u'BiblesPlugin.Opensong', u'Importing'), \
db_book.name, chapter.attrib[u'n'])))
self.commit()
except IOError:
=== modified file 'openlp/plugins/custom/customplugin.py'
--- openlp/plugins/custom/customplugin.py 2010-06-06 13:26:42 +0000
+++ openlp/plugins/custom/customplugin.py 2010-06-08 16:02:22 +0000
@@ -26,7 +26,7 @@
import logging
from forms import EditCustomForm
-from openlp.core.lib import Plugin, build_icon, PluginStatus, translate
+from openlp.core.lib import Plugin, build_icon, PluginStatus, translate
from openlp.plugins.custom.lib import CustomManager, CustomMediaItem, CustomTab
log = logging.getLogger(__name__)
=== modified file 'openlp/plugins/custom/forms/editcustomdialog.py'
--- openlp/plugins/custom/forms/editcustomdialog.py 2010-06-06 13:26:42 +0000
+++ openlp/plugins/custom/forms/editcustomdialog.py 2010-06-08 16:02:22 +0000
@@ -24,6 +24,7 @@
###############################################################################
from PyQt4 import QtCore, QtGui
+
from openlp.core.lib import translate
class Ui_customEditDialog(object):
@@ -106,8 +107,8 @@
self.SplitButton = QtGui.QPushButton(self.ButtonWidge)
self.SplitButton.setObjectName(u'SplitButton')
self.verticalLayout_2.addWidget(self.SplitButton)
- spacerItem1 = QtGui.QSpacerItem(20, 40,
- QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+ spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
+ QtGui.QSizePolicy.Expanding)
self.verticalLayout_2.addItem(spacerItem1)
self.EditLayout_3.addWidget(self.ButtonWidge)
self.gridLayout.addWidget(self.EditWidget, 2, 0, 1, 1)
@@ -130,7 +131,8 @@
self.horizontalLayout_2.addWidget(self.CreditEdit)
self.gridLayout.addLayout(self.horizontalLayout_2, 4, 0, 1, 1)
self.buttonBox = QtGui.QDialogButtonBox(customEditDialog)
- self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Save)
+ self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel |
+ QtGui.QDialogButtonBox.Save)
self.buttonBox.setObjectName(u'buttonBox')
self.gridLayout.addWidget(self.buttonBox, 5, 0, 1, 1)
@@ -153,20 +155,17 @@
customEditDialog.setTabOrder(self.DownButton, self.ThemeComboBox)
def retranslateUi(self, customEditDialog):
- customEditDialog.setWindowTitle(translate(u'CustomPlugin.EditCustomForm',
- u'Edit Custom Slides'))
- self.UpButton.setToolTip(
- translate(u'CustomPlugin.EditCustomForm'
- u'CustomPlugin.EditCustomForm',
- u'Move slide Up 1'))
+ customEditDialog.setWindowTitle(
+ translate(u'CustomPlugin.EditCustomForm', u'Edit Custom Slides'))
+ self.UpButton.setToolTip(translate(u'CustomPlugin.EditCustomForm'
+ u'CustomPlugin.EditCustomForm', u'Move slide Up 1'))
self.DownButton.setToolTip(
translate(u'CustomPlugin.EditCustomForm', u'Move slide down 1'))
self.TitleLabel.setText(
translate(u'CustomPlugin.EditCustomForm', u'Title:'))
self.AddButton.setText(
translate(u'CustomPlugin.EditCustomForm', u'Add New'))
- self.AddButton.setToolTip(
- translate(u'CustomPlugin.EditCustomForm',
+ self.AddButton.setToolTip(translate(u'CustomPlugin.EditCustomForm',
u'Add new slide at bottom'))
self.EditButton.setText(
translate(u'CustomPlugin.EditCustomForm', u'Edit'))
@@ -196,3 +195,4 @@
translate(u'CustomPlugin.EditCustomForm', u'Theme:'))
self.CreditLabel.setText(
translate(u'CustomPlugin.EditCustomForm', u'Credits:'))
+
=== modified file 'openlp/plugins/custom/forms/editcustomform.py'
--- openlp/plugins/custom/forms/editcustomform.py 2010-06-06 13:26:42 +0000
+++ openlp/plugins/custom/forms/editcustomform.py 2010-06-08 16:02:22 +0000
@@ -28,7 +28,7 @@
from PyQt4 import QtCore, QtGui
from editcustomdialog import Ui_customEditDialog
-from openlp.core.lib import SongXMLBuilder, SongXMLParser, Receiver, translate
+from openlp.core.lib import SongXMLBuilder, SongXMLParser, Receiver, translate
from openlp.plugins.custom.lib.models import CustomSlide
log = logging.getLogger(__name__)
@@ -163,8 +163,10 @@
count += 1
self.customSlide.title = unicode(self.TitleEdit.displayText(), u'utf-8')
self.customSlide.text = unicode(sxml.extract_xml(), u'utf-8')
- self.customSlide.credits = unicode(self.CreditEdit.displayText(), u'utf-8')
- self.customSlide.theme_name = unicode(self.ThemeComboBox.currentText(), u'utf-8')
+ self.customSlide.credits = unicode(self.CreditEdit.displayText(),
+ u'utf-8')
+ self.customSlide.theme_name = unicode(self.ThemeComboBox.currentText(),
+ u'utf-8')
self.custommanager.save_slide(self.customSlide)
return True
@@ -230,7 +232,8 @@
def onSaveButtonPressed(self):
if self.editAll:
self.VerseListView.clear()
- for row in unicode(self.VerseTextEdit.toPlainText()).split(u'\n[---]\n'):
+ for row in unicode(self.VerseTextEdit.toPlainText()).split(
+ u'\n[---]\n'):
self.VerseListView.addItem(row)
else:
self.VerseListView.currentItem().setText(
=== modified file 'openlp/plugins/custom/lib/customtab.py'
--- openlp/plugins/custom/lib/customtab.py 2010-06-06 13:26:42 +0000
+++ openlp/plugins/custom/lib/customtab.py 2010-06-08 16:02:22 +0000
@@ -25,7 +25,7 @@
from PyQt4 import QtCore, QtGui
-from openlp.core.lib import SettingsTab, translate
+from openlp.core.lib import SettingsTab, translate
class CustomTab(SettingsTab):
"""
=== modified file 'openlp/plugins/custom/lib/mediaitem.py'
--- openlp/plugins/custom/lib/mediaitem.py 2010-06-06 13:26:42 +0000
+++ openlp/plugins/custom/lib/mediaitem.py 2010-06-08 16:02:22 +0000
@@ -28,7 +28,7 @@
from PyQt4 import QtCore, QtGui
from openlp.core.lib import MediaManagerItem, SongXMLParser, BaseListWithDnD, \
- Receiver, ItemCapabilities, translate
+ Receiver, ItemCapabilities, translate
log = logging.getLogger(__name__)
@@ -70,7 +70,6 @@
def requiredIcons(self):
MediaManagerItem.requiredIcons(self)
- self.hasFileIcon = False
def initialise(self):
self.loadCustomListView(self.parent.custommanager.get_all_slides())
=== modified file 'openlp/plugins/images/imageplugin.py'
--- openlp/plugins/images/imageplugin.py 2010-06-06 13:26:42 +0000
+++ openlp/plugins/images/imageplugin.py 2010-06-08 16:02:22 +0000
@@ -25,7 +25,7 @@
import logging
-from openlp.core.lib import Plugin, build_icon, PluginStatus, translate
+from openlp.core.lib import Plugin, build_icon, PluginStatus, translate
from openlp.plugins.images.lib import ImageMediaItem, ImageTab
log = logging.getLogger(__name__)
=== modified file 'openlp/plugins/images/lib/imagetab.py'
--- openlp/plugins/images/lib/imagetab.py 2010-06-06 13:26:42 +0000
+++ openlp/plugins/images/lib/imagetab.py 2010-06-08 16:02:22 +0000
@@ -25,7 +25,7 @@
from PyQt4 import QtCore, QtGui
-from openlp.core.lib import SettingsTab, Receiver, translate
+from openlp.core.lib import SettingsTab, Receiver, translate
class ImageTab(SettingsTab):
"""
=== modified file 'openlp/plugins/images/lib/mediaitem.py'
--- openlp/plugins/images/lib/mediaitem.py 2010-06-07 21:36:22 +0000
+++ openlp/plugins/images/lib/mediaitem.py 2010-06-08 16:02:22 +0000
@@ -29,7 +29,7 @@
from PyQt4 import QtCore, QtGui
from openlp.core.lib import MediaManagerItem, BaseListWithDnD, build_icon, \
- contextMenuAction, ItemCapabilities, SettingsManager, translate
+ contextMenuAction, ItemCapabilities, SettingsManager, translate
from openlp.core.utils import AppLocation
log = logging.getLogger(__name__)
@@ -169,7 +169,8 @@
if not self.ListView.selectedIndexes():
QtGui.QMessageBox.information(self,
translate(u'ImagePlugin.MediaItem', u'No item selected'),
- translate(u'ImagePlugin.MediaItem', u'You must select one item'))
+ translate(u'ImagePlugin.MediaItem',
+ u'You must select one item'))
items = self.ListView.selectedIndexes()
for item in items:
bitem = self.ListView.item(item.row())
=== modified file 'openlp/plugins/media/lib/mediaitem.py'
--- openlp/plugins/media/lib/mediaitem.py 2010-06-06 22:30:11 +0000
+++ openlp/plugins/media/lib/mediaitem.py 2010-06-08 16:02:22 +0000
@@ -29,7 +29,7 @@
from PyQt4 import QtCore, QtGui
from openlp.core.lib import MediaManagerItem, BaseListWithDnD, build_icon, \
- ItemCapabilities, SettingsManager, contextMenuAction, Receiver, translate
+ ItemCapabilities, SettingsManager, contextMenuAction, Receiver, translate
log = logging.getLogger(__name__)
@@ -77,8 +77,7 @@
MediaManagerItem.addListViewToToolBar(self)
self.ListView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
self.ListView.addAction(
- contextMenuAction(
- self.ListView, u':/slides/slide_blank.png',
+ contextMenuAction(self.ListView, u':/slides/slide_blank.png',
translate(u'MediaPlugin.MediaItem', u'Replace Live Background'),
self.onReplaceClick))
@@ -107,8 +106,7 @@
self.background = True
if not self.ListView.selectedIndexes():
QtGui.QMessageBox.information(self,
- translate(u'MediaPlugin.MediaItem',
- u'No item selected'),
+ translate(u'MediaPlugin.MediaItem', u'No item selected'),
translate(u'MediaPlugin.MediaItem',
u'You must select one item'))
items = self.ListView.selectedIndexes()
@@ -135,8 +133,8 @@
self.ListView.setSelectionMode(
QtGui.QAbstractItemView.ExtendedSelection)
self.ListView.setIconSize(QtCore.QSize(88, 50))
- self.loadList(SettingsManager.load_list(
- self.settingsSection, self.settingsSection))
+ self.loadList(SettingsManager.load_list(self.settingsSection,
+ self.settingsSection))
def onDeleteClick(self):
item = self.ListView.currentItem()
@@ -154,3 +152,4 @@
item_name.setIcon(build_icon(img))
item_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(file))
self.ListView.addItem(item_name)
+
=== modified file 'openlp/plugins/media/mediaplugin.py'
--- openlp/plugins/media/mediaplugin.py 2010-06-06 13:30:57 +0000
+++ openlp/plugins/media/mediaplugin.py 2010-06-08 16:02:22 +0000
@@ -25,9 +25,10 @@
import logging
+from PyQt4.phonon import Phonon
+
from openlp.core.lib import Plugin, build_icon, PluginStatus, translate
from openlp.plugins.media.lib import MediaMediaItem
-from PyQt4.phonon import Phonon
log = logging.getLogger(__name__)
@@ -46,13 +47,17 @@
for mimetype in Phonon.BackendCapabilities.availableMimeTypes():
mimetype = unicode(mimetype)
type = mimetype.split(u'audio/x-')
- self.audio_list, mimetype = self._add_to_list(self.audio_list, type, mimetype)
+ self.audio_list, mimetype = self._add_to_list(self.audio_list,
+ type, mimetype)
type = mimetype.split(u'audio/')
- self.audio_list, mimetype = self._add_to_list(self.audio_list, type, mimetype)
+ self.audio_list, mimetype = self._add_to_list(self.audio_list,
+ type, mimetype)
type = mimetype.split(u'video/x-')
- self.video_list, mimetype = self._add_to_list(self.video_list, type, mimetype)
+ self.video_list, mimetype = self._add_to_list(self.video_list,
+ type, mimetype)
type = mimetype.split(u'video/')
- self.video_list, mimetype = self._add_to_list(self.video_list, type, mimetype)
+ self.video_list, mimetype = self._add_to_list(self.video_list,
+ type, mimetype)
def _add_to_list(self, list, value, type):
if len(value) == 2:
@@ -80,3 +85,4 @@
u'<b>Media Plugin</b><br>This plugin '
u'allows the playing of audio and video media')
return about_text
+
=== modified file 'openlp/plugins/presentations/lib/impresscontroller.py'
--- openlp/plugins/presentations/lib/impresscontroller.py 2010-06-01 00:05:05 +0000
+++ openlp/plugins/presentations/lib/impresscontroller.py 2010-06-08 16:02:22 +0000
@@ -106,20 +106,23 @@
loop = 0
log.debug(u'get UNO Desktop Openoffice - getComponentContext')
context = uno.getComponentContext()
- log.debug(u'get UNO Desktop Openoffice - createInstaneWithContext - UnoUrlResolver')
+ log.debug(u'get UNO Desktop Openoffice - createInstaneWithContext - '
+ u'UnoUrlResolver')
resolver = context.ServiceManager.createInstanceWithContext(
u'com.sun.star.bridge.UnoUrlResolver', context)
while ctx is None and loop < 3:
try:
log.debug(u'get UNO Desktop Openoffice - resolve')
- ctx = resolver.resolve(u'uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext')
+ ctx = resolver.resolve(u'uno:socket,host=localhost,port=2002;'
+ u'urp;StarOffice.ComponentContext')
except:
log.exception(u'Unable to find running instance ')
self.start_process()
loop += 1
try:
self.manager = ctx.ServiceManager
- log.debug(u'get UNO Desktop Openoffice - createInstanceWithContext - Desktop')
+ log.debug(u'get UNO Desktop Openoffice - createInstanceWithContext'
+ u' - Desktop')
desktop = self.manager.createInstanceWithContext(
"com.sun.star.frame.Desktop", ctx )
return desktop
@@ -201,7 +204,8 @@
if desktop is None:
self.controller.start_process()
desktop = self.controller.get_com_desktop()
- url = u'file:///' + self.filepath.replace(u'\\', u'/').replace(u':', u'|').replace(u' ', u'%20')
+ url = u'file:///' + self.filepath.replace(u'\\', u'/').replace(
+ u':', u'|').replace(u' ', u'%20')
else:
desktop = self.controller.get_uno_desktop()
url = uno.systemPathToFileUrl(self.filepath)
@@ -219,7 +223,8 @@
log.exception(u'Failed to load presentation')
return
self.presentation = self.document.getPresentation()
- self.presentation.Display = self.controller.plugin.render_manager.screens.current_display + 1
+ self.presentation.Display = \
+ self.controller.plugin.render_manager.screens.current_display + 1
self.control = None
self.create_thumbnails()
@@ -332,12 +337,14 @@
log.debug(u'start presentation OpenOffice')
if self.control is None or not self.control.isRunning():
self.presentation.start()
- # start() returns before the getCurrentComponent is ready. Try for 5 seconds
+ # start() returns before the getCurrentComponent is ready.
+ # Try for 5 seconds
i = 1
while self.desktop.getCurrentComponent() is None and i < 50:
time.sleep(0.1)
i = i + 1
- self.control = self.desktop.getCurrentComponent().Presentation.getController()
+ self.control = \
+ self.desktop.getCurrentComponent().Presentation.getController()
else:
self.control.activate()
self.goto_slide(1)
@@ -383,7 +390,7 @@
Returns the text on the slide
``slide_no``
- The slide the text is required for, starting at 1
+ The slide the text is required for, starting at 1
"""
doc = self.document
pages = doc.getDrawPages()
@@ -412,3 +419,4 @@
if shape.supportsService("com.sun.star.drawing.Text"):
text += shape.getString() + '\n'
return text
+
=== modified file 'openlp/plugins/presentations/lib/powerpointcontroller.py'
--- openlp/plugins/presentations/lib/powerpointcontroller.py 2010-06-01 00:05:05 +0000
+++ openlp/plugins/presentations/lib/powerpointcontroller.py 2010-06-08 16:02:22 +0000
@@ -122,7 +122,8 @@
if not self.controller.process.Visible:
self.controller.start_process()
#try:
- self.controller.process.Presentations.Open(self.filepath, False, False, True)
+ self.controller.process.Presentations.Open(self.filepath, False, False,
+ True)
#except:
# return
self.presentation = self.controller.process.Presentations(
@@ -140,8 +141,8 @@
"""
if self.check_thumbnails():
return
- self.presentation.Export(os.path.join(self.thumbnailpath, '')
- , 'png', 640, 480)
+ self.presentation.Export(os.path.join(self.thumbnailpath, ''), 'png',
+ 640, 480)
def close_presentation(self):
"""
@@ -225,7 +226,8 @@
dpi = win32ui.GetActiveWindow().GetDC().GetDeviceCaps(88)
except:
try:
- dpi = win32ui.GetForegroundWindow().GetDC().GetDeviceCaps(88)
+ dpi = \
+ win32ui.GetForegroundWindow().GetDC().GetDeviceCaps(88)
except:
dpi = 96
self.presentation.SlideShowSettings.Run()
@@ -286,7 +288,7 @@
Returns the text on the slide
``slide_no``
- The slide the text is required for, starting at 1
+ The slide the text is required for, starting at 1
"""
text = ''
shapes = self.presentation.Slides(slide_no).Shapes
=== modified file 'openlp/plugins/presentations/lib/pptviewcontroller.py'
--- openlp/plugins/presentations/lib/pptviewcontroller.py 2010-06-01 00:05:05 +0000
+++ openlp/plugins/presentations/lib/pptviewcontroller.py 2010-06-08 16:02:22 +0000
@@ -125,7 +125,8 @@
filepath = str(self.filepath.replace(u'/', u'\\'))
try:
self.pptid = self.controller.process.OpenPPT(filepath, None, rect,
- str(os.path.join(self.thumbnailpath, self.controller.thumbnailprefix)))
+ str(os.path.join(self.thumbnailpath,
+ self.controller.thumbnailprefix)))
self.stop_presentation()
except:
log.exception(u'Failed to load presentation')
@@ -233,3 +234,4 @@
return path
else:
return None
+
=== modified file 'openlp/plugins/presentations/lib/presentationcontroller.py'
--- openlp/plugins/presentations/lib/presentationcontroller.py 2010-05-29 19:50:50 +0000
+++ openlp/plugins/presentations/lib/presentationcontroller.py 2010-06-08 16:02:22 +0000
@@ -381,7 +381,7 @@
Returns the text on the slide
``slide_no``
- The slide the text is required for, starting at 1
+ The slide the text is required for, starting at 1
"""
return ''
=== modified file 'openlp/plugins/songs/forms/__init__.py'
--- openlp/plugins/songs/forms/__init__.py 2010-06-06 17:03:48 +0000
+++ openlp/plugins/songs/forms/__init__.py 2010-06-08 16:02:22 +0000
@@ -37,36 +37,42 @@
@staticmethod
def to_string(verse_type):
if verse_type == VerseType.Verse:
- return translate('VerseType', 'Verse')
+ return translate(u'VerseType', u'Verse')
elif verse_type == VerseType.Chorus:
- return translate('VerseType', 'Chorus')
+ return translate(u'VerseType', u'Chorus')
elif verse_type == VerseType.Bridge:
- return translate('VerseType', 'Bridge')
+ return translate(u'VerseType', u'Bridge')
elif verse_type == VerseType.PreChorus:
- return translate('VerseType', 'Pre-Chorus')
+ return translate(u'VerseType', u'Pre-Chorus')
elif verse_type == VerseType.Intro:
- return translate('VerseType', 'Intro')
+ return translate(u'VerseType', u'Intro')
elif verse_type == VerseType.Ending:
- return translate('VerseType', 'Ending')
+ return translate(u'VerseType', u'Ending')
elif verse_type == VerseType.Other:
- return translate('VerseType', 'Other')
+ return translate(u'VerseType', u'Other')
@staticmethod
def from_string(verse_type):
verse_type = verse_type.lower()
if verse_type == unicode(VerseType.to_string(VerseType.Verse)).lower():
return VerseType.Verse
- elif verse_type == unicode(VerseType.to_string(VerseType.Chorus)).lower():
+ elif verse_type == \
+ unicode(VerseType.to_string(VerseType.Chorus)).lower():
return VerseType.Chorus
- elif verse_type == unicode(VerseType.to_string(VerseType.Bridge)).lower():
+ elif verse_type == \
+ unicode(VerseType.to_string(VerseType.Bridge)).lower():
return VerseType.Bridge
- elif verse_type == unicode(VerseType.to_string(VerseType.PreChorus)).lower():
+ elif verse_type == \
+ unicode(VerseType.to_string(VerseType.PreChorus)).lower():
return VerseType.PreChorus
- elif verse_type == unicode(VerseType.to_string(VerseType.Intro)).lower():
+ elif verse_type == \
+ unicode(VerseType.to_string(VerseType.Intro)).lower():
return VerseType.Intro
- elif verse_type == unicode(VerseType.to_string(VerseType.Ending)).lower():
+ elif verse_type == \
+ unicode(VerseType.to_string(VerseType.Ending)).lower():
return VerseType.Ending
- elif verse_type == unicode(VerseType.to_string(VerseType.Other)).lower():
+ elif verse_type == \
+ unicode(VerseType.to_string(VerseType.Other)).lower():
return VerseType.Other
from authorsform import AuthorsForm
=== modified file 'openlp/plugins/songs/forms/editsongdialog.py'
--- openlp/plugins/songs/forms/editsongdialog.py 2010-06-07 21:36:22 +0000
+++ openlp/plugins/songs/forms/editsongdialog.py 2010-06-08 16:02:22 +0000
@@ -116,7 +116,8 @@
self.AuthorsTabLayout.setObjectName(u'AuthorsTabLayout')
self.AuthorsMaintenanceWidget = QtGui.QWidget(self.AuthorsTab)
self.AuthorsMaintenanceWidget.setObjectName(u'AuthorsMaintenanceWidget')
- self.AuthorsMaintenanceLayout = QtGui.QVBoxLayout(self.AuthorsMaintenanceWidget)
+ self.AuthorsMaintenanceLayout = QtGui.QVBoxLayout(
+ self.AuthorsMaintenanceWidget)
self.AuthorsMaintenanceLayout.setSpacing(8)
self.AuthorsMaintenanceLayout.setMargin(0)
self.AuthorsMaintenanceLayout.setObjectName(u'AuthorsMaintenanceLayout')
@@ -146,7 +147,8 @@
self.AuthorsSelectionComboItem.setSizeAdjustPolicy(
QtGui.QComboBox.AdjustToMinimumContentsLength)
self.AuthorsSelectionComboItem.setMinimumContentsLength(8)
- self.AuthorsSelectionComboItem.setObjectName(u'AuthorsSelectionComboItem')
+ self.AuthorsSelectionComboItem.setObjectName(
+ u'AuthorsSelectionComboItem')
self.AuthorAddLayout.addWidget(self.AuthorsSelectionComboItem)
self.AuthorAddButton = QtGui.QPushButton(self.AuthorAddWidget)
self.AuthorAddButton.setMaximumSize(QtCore.QSize(110, 16777215))
@@ -261,7 +263,8 @@
QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.SongbookCombo.sizePolicy().hasHeightForWidth())
+ sizePolicy.setHeightForWidth(
+ self.SongbookCombo.sizePolicy().hasHeightForWidth())
self.SongbookCombo.setEditable(True)
self.SongbookCombo.setSizePolicy(sizePolicy)
self.SongbookCombo.setObjectName(u'SongbookCombo')
@@ -277,7 +280,8 @@
self.ThemeTabLayout.setObjectName(u'ThemeTabLayout')
self.ThemeCopyCommentsWidget = QtGui.QWidget(self.ThemeTab)
self.ThemeCopyCommentsWidget.setObjectName(u'ThemeCopyCommentsWidget')
- self.ThemeCopyCommentsLayout = QtGui.QHBoxLayout(self.ThemeCopyCommentsWidget)
+ self.ThemeCopyCommentsLayout = QtGui.QHBoxLayout(
+ self.ThemeCopyCommentsWidget)
self.ThemeCopyCommentsLayout.setSpacing(8)
self.ThemeCopyCommentsLayout.setMargin(0)
self.ThemeCopyCommentsLayout.setObjectName(u'ThemeCopyCommentsLayout')
@@ -286,7 +290,8 @@
QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.TextWidget.sizePolicy().hasHeightForWidth())
+ sizePolicy.setHeightForWidth(
+ self.TextWidget.sizePolicy().hasHeightForWidth())
self.TextWidget.setSizePolicy(sizePolicy)
self.TextWidget.setObjectName(u'TextWidget')
self.DetailsLayout = QtGui.QVBoxLayout(self.TextWidget)
@@ -401,24 +406,34 @@
EditSongDialog.setTabOrder(self.AlternativeEdit, self.VerseListWidget)
EditSongDialog.setTabOrder(self.VerseListWidget, self.VerseAddButton)
EditSongDialog.setTabOrder(self.VerseAddButton, self.VerseEditButton)
- EditSongDialog.setTabOrder(self.VerseEditButton, self.VerseEditAllButton)
- EditSongDialog.setTabOrder(self.VerseEditAllButton, self.VerseDeleteButton)
+ EditSongDialog.setTabOrder(self.VerseEditButton,
+ self.VerseEditAllButton)
+ EditSongDialog.setTabOrder(self.VerseEditAllButton,
+ self.VerseDeleteButton)
EditSongDialog.setTabOrder(self.VerseDeleteButton, self.VerseOrderEdit)
- EditSongDialog.setTabOrder(self.VerseOrderEdit, self.AuthorsSelectionComboItem)
- EditSongDialog.setTabOrder(self.AuthorsSelectionComboItem, self.AuthorAddButton)
+ EditSongDialog.setTabOrder(self.VerseOrderEdit,
+ self.AuthorsSelectionComboItem)
+ EditSongDialog.setTabOrder(self.AuthorsSelectionComboItem,
+ self.AuthorAddButton)
EditSongDialog.setTabOrder(self.AuthorAddButton, self.AuthorsListView)
- EditSongDialog.setTabOrder(self.AuthorsListView, self.AuthorRemoveButton)
- EditSongDialog.setTabOrder(self.AuthorRemoveButton, self.MaintenanceButton)
+ EditSongDialog.setTabOrder(self.AuthorsListView,
+ self.AuthorRemoveButton)
+ EditSongDialog.setTabOrder(self.AuthorRemoveButton,
+ self.MaintenanceButton)
EditSongDialog.setTabOrder(self.MaintenanceButton, self.SongTopicCombo)
EditSongDialog.setTabOrder(self.SongTopicCombo, self.TopicAddButton)
EditSongDialog.setTabOrder(self.TopicAddButton, self.TopicsListView)
EditSongDialog.setTabOrder(self.TopicsListView, self.TopicRemoveButton)
EditSongDialog.setTabOrder(self.TopicRemoveButton, self.SongbookCombo)
- EditSongDialog.setTabOrder(self.SongbookCombo, self.ThemeSelectionComboItem)
- EditSongDialog.setTabOrder(self.ThemeSelectionComboItem, self.ThemeAddButton)
+ EditSongDialog.setTabOrder(self.SongbookCombo,
+ self.ThemeSelectionComboItem)
+ EditSongDialog.setTabOrder(self.ThemeSelectionComboItem,
+ self.ThemeAddButton)
EditSongDialog.setTabOrder(self.ThemeAddButton, self.CopyrightEditItem)
- EditSongDialog.setTabOrder(self.CopyrightEditItem, self.CopyrightInsertButton)
- EditSongDialog.setTabOrder(self.CopyrightInsertButton, self.CCLNumberEdit)
+ EditSongDialog.setTabOrder(self.CopyrightEditItem,
+ self.CopyrightInsertButton)
+ EditSongDialog.setTabOrder(self.CopyrightInsertButton,
+ self.CCLNumberEdit)
EditSongDialog.setTabOrder(self.CCLNumberEdit, self.CommentsEdit)
EditSongDialog.setTabOrder(self.CommentsEdit, self.ButtonBox)
@@ -450,8 +465,7 @@
translate(u'SongsPlugin.EditSongForm', u'&Add to Song'))
self.AuthorRemoveButton.setText(
translate(u'SongsPlugin.EditSongForm', u'&Remove'))
- self.MaintenanceButton.setText(
- translate(u'SongsPlugin.EditSongForm',
+ self.MaintenanceButton.setText(translate(u'SongsPlugin.EditSongForm',
u'&Manage Authors, Topics, Books'))
self.TopicGroupBox.setTitle(
translate(u'SongsPlugin.EditSongForm', u'Topic'))
=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py 2010-06-07 21:36:22 +0000
+++ openlp/plugins/songs/forms/editsongform.py 2010-06-08 16:02:22 +0000
@@ -437,12 +437,13 @@
if parts.endswith(u'\n'):
parts = parts.rstrip(u'\n')
item = QtGui.QTableWidgetItem(parts)
- item.setData(
- QtCore.Qt.UserRole, QtCore.QVariant(variant))
+ item.setData(QtCore.Qt.UserRole,
+ QtCore.QVariant(variant))
self.VerseListWidget.setRowCount(
self.VerseListWidget.rowCount() + 1)
self.VerseListWidget.setItem(
- int(self.VerseListWidget.rowCount() - 1), 0, item)
+ int(self.VerseListWidget.rowCount() - 1),
+ 0, item)
self.VerseListWidget.setColumnWidth(0, self.width)
self.VerseListWidget.resizeRowsToContents()
self.VerseListWidget.repaint()
@@ -483,10 +484,9 @@
else:
self.SongTabWidget.setCurrentIndex(0)
self.VerseOrderEdit.setFocus()
- return False, \
- translate(u'SongsPlugin.EditSongForm',
- u'Invalid verse entry, values must be I,B,T,P,E,O,V,C '
- u'followed by a number')
+ return False, translate(u'SongsPlugin.EditSongForm',
+ u'Invalid verse entry, values must be I,B,T,P,E,O,V,C '
+ u'followed by a number')
return True, u''
def onTitleEditItemLostFocus(self):
@@ -597,4 +597,3 @@
self.song.search_title = self.song.search_title.replace(u'}', u'')
self.song.search_title = self.song.search_title.replace(u'?', u'')
-
=== modified file 'openlp/plugins/songs/forms/editversedialog.py'
--- openlp/plugins/songs/forms/editversedialog.py 2010-06-06 22:30:11 +0000
+++ openlp/plugins/songs/forms/editversedialog.py 2010-06-08 16:02:22 +0000
@@ -73,22 +73,16 @@
self.EditVerseLayout.addLayout(self.VerseTypeLayout)
self.EditButtonBox = QtGui.QDialogButtonBox(EditVerseDialog)
self.EditButtonBox.setOrientation(QtCore.Qt.Horizontal)
- self.EditButtonBox.setStandardButtons(
- QtGui.QDialogButtonBox.Cancel | QtGui.QDialogButtonBox.Save)
+ self.EditButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel |
+ QtGui.QDialogButtonBox.Save)
self.EditButtonBox.setObjectName(u'EditButtonBox')
self.EditVerseLayout.addWidget(self.EditButtonBox)
self.retranslateUi(EditVerseDialog)
- QtCore.QObject.connect(
- self.EditButtonBox,
- QtCore.SIGNAL(u'accepted()'),
- EditVerseDialog.accept
- )
- QtCore.QObject.connect(
- self.EditButtonBox,
- QtCore.SIGNAL(u'rejected()'),
- EditVerseDialog.reject
- )
+ QtCore.QObject.connect(self.EditButtonBox, QtCore.SIGNAL(u'accepted()'),
+ EditVerseDialog.accept)
+ QtCore.QObject.connect(self.EditButtonBox, QtCore.SIGNAL(u'rejected()'),
+ EditVerseDialog.reject)
QtCore.QMetaObject.connectSlotsByName(EditVerseDialog)
def retranslateUi(self, EditVerseDialog):
@@ -96,14 +90,20 @@
translate(u'SongsPlugin.EditVerseForm', u'Edit Verse'))
self.VerseTypeLabel.setText(
translate(u'SongsPlugin.EditVerseForm', u'Verse Type:'))
- self.VerseTypeComboBox.setItemText(0, VerseType.to_string(VerseType.Verse))
- self.VerseTypeComboBox.setItemText(1, VerseType.to_string(VerseType.Chorus))
- self.VerseTypeComboBox.setItemText(2, VerseType.to_string(VerseType.Bridge))
- self.VerseTypeComboBox.setItemText(3, VerseType.to_string(VerseType.PreChorus))
- self.VerseTypeComboBox.setItemText(4, VerseType.to_string(VerseType.Intro))
- self.VerseTypeComboBox.setItemText(5, VerseType.to_string(VerseType.Ending))
- self.VerseTypeComboBox.setItemText(6, VerseType.to_string(VerseType.Other))
+ self.VerseTypeComboBox.setItemText(0,
+ VerseType.to_string(VerseType.Verse))
+ self.VerseTypeComboBox.setItemText(1,
+ VerseType.to_string(VerseType.Chorus))
+ self.VerseTypeComboBox.setItemText(2,
+ VerseType.to_string(VerseType.Bridge))
+ self.VerseTypeComboBox.setItemText(3,
+ VerseType.to_string(VerseType.PreChorus))
+ self.VerseTypeComboBox.setItemText(4,
+ VerseType.to_string(VerseType.Intro))
+ self.VerseTypeComboBox.setItemText(5,
+ VerseType.to_string(VerseType.Ending))
+ self.VerseTypeComboBox.setItemText(6,
+ VerseType.to_string(VerseType.Other))
self.InsertButton.setText(
translate(u'SongsPlugin.EditVerseForm', u'Insert'))
-
=== modified file 'openlp/plugins/songs/forms/editverseform.py'
--- openlp/plugins/songs/forms/editverseform.py 2010-06-06 19:56:41 +0000
+++ openlp/plugins/songs/forms/editverseform.py 2010-06-08 16:02:22 +0000
@@ -112,7 +112,8 @@
tag=u'%s:1' % VerseType.to_string(VerseType.Verse)):
if single:
verse_type, verse_number = tag.split(u':')
- self.VerseTypeComboBox.setCurrentIndex(VerseType.from_string(verse_type))
+ self.VerseTypeComboBox.setCurrentIndex(
+ VerseType.from_string(verse_type))
self.VerseNumberBox.setValue(int(verse_number))
self.InsertButton.setVisible(False)
else:
@@ -133,6 +134,7 @@
def getVerseAll(self):
text = self.VerseTextEdit.toPlainText()
if not text.startsWith(u'---['):
- text = u'---[%s:1]---\n%s' % (VerseType.to_string(VerseType.Verse), text)
+ text = u'---[%s:1]---\n%s' % (VerseType.to_string(VerseType.Verse),
+ text)
return text
=== modified file 'openlp/plugins/songs/forms/songmaintenancedialog.py'
--- openlp/plugins/songs/forms/songmaintenancedialog.py 2010-06-06 14:22:00 +0000
+++ openlp/plugins/songs/forms/songmaintenancedialog.py 2010-06-08 16:02:22 +0000
@@ -25,7 +25,7 @@
from PyQt4 import QtCore, QtGui
-from openlp.core.lib import build_icon, translate
+from openlp.core.lib import build_icon, translate
class Ui_SongMaintenanceDialog(object):
def setupUi(self, SongMaintenanceDialog):
@@ -192,9 +192,11 @@
self.TypeStackedWidget.addWidget(self.BooksPage)
self.ContentLayout.addWidget(self.TypeStackedWidget)
self.DialogLayout.addWidget(self.ContentWidget)
- self.MaintenanceButtonBox = QtGui.QDialogButtonBox(SongMaintenanceDialog)
+ self.MaintenanceButtonBox = QtGui.QDialogButtonBox(
+ SongMaintenanceDialog)
self.MaintenanceButtonBox.setOrientation(QtCore.Qt.Horizontal)
- self.MaintenanceButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Close)
+ self.MaintenanceButtonBox.setStandardButtons(
+ QtGui.QDialogButtonBox.Close)
self.MaintenanceButtonBox.setObjectName(u'MaintenanceButtonBox')
self.DialogLayout.addWidget(self.MaintenanceButtonBox)
=== modified file 'openlp/plugins/songs/forms/songmaintenanceform.py'
--- openlp/plugins/songs/forms/songmaintenanceform.py 2010-06-06 22:30:11 +0000
+++ openlp/plugins/songs/forms/songmaintenanceform.py 2010-06-08 16:02:22 +0000
@@ -238,7 +238,8 @@
translate(u'SongsPlugin.SongMaintenanceForm',
u'This author can\'t be deleted, they are currently '
u'assigned to at least one song.'),
- translate(u'SongsPlugin.SongMaintenanceForm', u'No author selected!'))
+ translate(u'SongsPlugin.SongMaintenanceForm',
+ u'No author selected!'))
def onTopicDeleteButtonClick(self):
"""
@@ -253,7 +254,8 @@
translate(u'SongsPlugin.SongMaintenanceForm',
u'This topic can\'t be deleted, it is currently '
u'assigned to at least one song.'),
- translate(u'SongsPlugin.SongMaintenanceForm', u'No topic selected!'))
+ translate(u'SongsPlugin.SongMaintenanceForm',
+ u'No topic selected!'))
def onBookDeleteButtonClick(self):
"""
=== modified file 'openlp/plugins/songs/lib/manager.py'
--- openlp/plugins/songs/lib/manager.py 2010-05-29 19:50:50 +0000
+++ openlp/plugins/songs/lib/manager.py 2010-06-08 16:02:22 +0000
@@ -96,8 +96,8 @@
settings = QtCore.QSettings()
settings.beginGroup(u'songs')
self.db_url = u''
- db_type = unicode(
- settings.value(u'songs/db type', QtCore.QVariant(u'sqlite')).toString())
+ db_type = unicode(settings.value(u'songs/db type',
+ QtCore.QVariant(u'sqlite')).toString())
if db_type == u'sqlite':
self.db_url = u'sqlite:///%s/songs.sqlite' % \
AppLocation.get_section_data_path(u'songs')
=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
--- openlp/plugins/songs/lib/mediaitem.py 2010-06-07 21:36:22 +0000
+++ openlp/plugins/songs/lib/mediaitem.py 2010-06-08 16:02:22 +0000
@@ -64,7 +64,6 @@
def requiredIcons(self):
MediaManagerItem.requiredIcons(self)
- self.hasFileIcon = False
def addEndHeaderBar(self):
self.addToolbarSeparator()
=== modified file 'openlp/plugins/songs/lib/oooimport.py'
--- openlp/plugins/songs/lib/oooimport.py 2010-05-29 19:50:50 +0000
+++ openlp/plugins/songs/lib/oooimport.py 2010-06-08 16:02:22 +0000
@@ -97,7 +97,7 @@
loop += 1
manager = ctx.ServiceManager
self.desktop = manager.createInstanceWithContext(
- "com.sun.star.frame.Desktop", ctx )
+ "com.sun.star.frame.Desktop", ctx)
def start_ooo_process(self):
try:
@@ -130,10 +130,9 @@
try:
self.document = self.desktop.loadComponentFromURL(url, u'_blank',
0, properties)
- if not self.document.supportsService(
- "com.sun.star.presentation.PresentationDocument") \
- and not self.document.supportsService(
- "com.sun.star.text.TextDocument"):
+ if not self.document.supportsService(
+ "com.sun.star.presentation.PresentationDocument") and not \
+ self.document.supportsService("com.sun.star.text.TextDocument"):
self.close_ooo_file()
except:
pass
=== modified file 'openlp/plugins/songs/lib/songstab.py'
--- openlp/plugins/songs/lib/songstab.py 2010-06-06 14:22:00 +0000
+++ openlp/plugins/songs/lib/songstab.py 2010-06-08 16:02:22 +0000
@@ -65,8 +65,8 @@
translate(u'SongsPlugin.SongsTab', u'Songs Mode'))
self.SearchAsTypeCheckBox.setText(
translate(u'SongsPlugin.SongsTab', u'Enable search as you type'))
- self.SongBarActiveCheckBox.setText(
- translate(u'SongsPlugin.SongsTab', u'Display Verses on Live Tool bar'))
+ self.SongBarActiveCheckBox.setText(translate(u'SongsPlugin.SongsTab',
+ u'Display Verses on Live Tool bar'))
def onSearchAsTypeCheckBoxChanged(self, check_state):
self.song_search = False
=== modified file 'openlp/plugins/songs/songsplugin.py'
--- openlp/plugins/songs/songsplugin.py 2010-06-06 14:22:00 +0000
+++ openlp/plugins/songs/songsplugin.py 2010-06-08 16:02:22 +0000
@@ -27,7 +27,8 @@
from PyQt4 import QtCore, QtGui
-from openlp.core.lib import Plugin, build_icon, PluginStatus, Receiver, translate
+from openlp.core.lib import Plugin, build_icon, PluginStatus, Receiver, \
+ translate
from openlp.plugins.songs.lib import SongManager, SongMediaItem, SongsTab, \
SofImport, OooImport
=== modified file 'openlp/plugins/songusage/forms/songusagedeleteform.py'
--- openlp/plugins/songusage/forms/songusagedeleteform.py 2010-06-06 14:22:00 +0000
+++ openlp/plugins/songusage/forms/songusagedeleteform.py 2010-06-08 16:02:22 +0000
@@ -54,3 +54,4 @@
deleteDate = self.DeleteCalendar.selectedDate().toPyDate()
self.songusagemanager.delete_to_date(deleteDate)
self.close()
+
=== modified file 'openlp/plugins/songusage/forms/songusagedetaildialog.py'
--- openlp/plugins/songusage/forms/songusagedetaildialog.py 2010-06-07 21:36:22 +0000
+++ openlp/plugins/songusage/forms/songusagedetaildialog.py 2010-06-08 16:02:22 +0000
@@ -70,20 +70,19 @@
self.verticalLayout_2.addWidget(self.FileGroupBox)
self.verticalLayout.addWidget(self.DateRangeGroupBox)
self.buttonBox = QtGui.QDialogButtonBox(SongUsageDetailDialog)
- self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
+ self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel |
+ QtGui.QDialogButtonBox.Ok)
self.buttonBox.setObjectName(u'buttonBox')
self.verticalLayout.addWidget(self.buttonBox)
self.retranslateUi(SongUsageDetailDialog)
- QtCore.QObject.connect(self.buttonBox,
- QtCore.SIGNAL(u'accepted()'),
- SongUsageDetailDialog.accept)
- QtCore.QObject.connect(self.buttonBox,
- QtCore.SIGNAL(u'rejected()'),
- SongUsageDetailDialog.close)
+ QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(u'accepted()'),
+ SongUsageDetailDialog.accept)
+ QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(u'rejected()'),
+ SongUsageDetailDialog.close)
QtCore.QObject.connect(self.SaveFilePushButton,
- QtCore.SIGNAL(u'pressed()'),
- SongUsageDetailDialog.defineOutputLocation)
+ QtCore.SIGNAL(u'pressed()'),
+ SongUsageDetailDialog.defineOutputLocation)
QtCore.QMetaObject.connectSlotsByName(SongUsageDetailDialog)
def retranslateUi(self, SongUsageDetailDialog):
Follow ups