openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #04816
[Merge] lp:~googol-hush/openlp/trivial into lp:openlp
Andreas Preikschat has proposed merging lp:~googol-hush/openlp/trivial into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
white spaces have been removed
--
https://code.launchpad.net/~googol-hush/openlp/trivial/+merge/43517
Your team OpenLP Core is requested to review the proposed merge of lp:~googol-hush/openlp/trivial into lp:openlp.
=== modified file 'openlp/core/lib/mailto/__init__.py'
--- openlp/core/lib/mailto/__init__.py 2010-12-11 23:25:49 +0000
+++ openlp/core/lib/mailto/__init__.py 2010-12-13 14:28:06 +0000
@@ -300,13 +300,13 @@
``cc``
specify a recipient to be copied on the e-mail
- ``bcc``
+ ``bcc``
specify a recipient to be blindly copied on the e-mail
- ``subject``
+ ``subject``
specify a subject for the e-mail
- ``body``
+ ``body``
specify a body for the e-mail. Since the user will be able to make
changes before actually sending the e-mail, this can be used to provide
the user with a template for the e-mail text may contain linebreaks
=== modified file 'openlp/core/ui/exceptionform.py'
--- openlp/core/ui/exceptionform.py 2010-12-11 15:39:12 +0000
+++ openlp/core/ui/exceptionform.py 2010-12-13 14:28:06 +0000
@@ -70,7 +70,7 @@
def _createReport(self):
openlp_version = self.parent().applicationVersion[u'full']
- traceback = unicode(self.exceptionTextEdit.toPlainText())
+ traceback = unicode(self.exceptionTextEdit.toPlainText())
system = unicode(translate('OpenLP.ExceptionForm',
'Platform: %s\n')) % platform.platform()
libraries = u'Python: %s\n' % platform.python_version() + \
@@ -89,7 +89,7 @@
elif os.environ.get(u'GNOME_DESKTOP_SESSION_ID'):
system = system + u'Desktop: GNOME\n'
return (openlp_version, traceback, system, libraries)
-
+
def onSaveReportButtonPressed(self):
"""
Saving exception log and system informations to a file.
=== modified file 'openlp/plugins/bibles/lib/mediaitem.py'
--- openlp/plugins/bibles/lib/mediaitem.py 2010-12-03 19:53:56 +0000
+++ openlp/plugins/bibles/lib/mediaitem.py 2010-12-13 14:28:06 +0000
@@ -875,7 +875,7 @@
old_second_bible = self._decodeQtObject(old_bitem, 'second_bible')
if old_bible != bible or old_second_bible != second_bible or \
old_book != book:
- # The bible, second bible or book has changed.
+ # The bible, second bible or book has changed.
return True
elif old_verse + 1 != verse and old_chapter == chapter:
# We are still in the same chapter, but a verse has been skipped.
=== modified file 'openlp/plugins/images/imageplugin.py'
--- openlp/plugins/images/imageplugin.py 2010-10-05 16:09:48 +0000
+++ openlp/plugins/images/imageplugin.py 2010-12-13 14:28:06 +0000
@@ -75,42 +75,42 @@
## Load Button ##
self.textStrings[StringContent.Load] = {
u'title': translate('ImagePlugin', 'Load'),
- u'tooltip': translate('ImagePlugin',
+ u'tooltip': translate('ImagePlugin',
'Load a new Image')
}
## New Button ##
self.textStrings[StringContent.New] = {
u'title': translate('ImagePlugin', 'Add'),
- u'tooltip': translate('ImagePlugin',
+ u'tooltip': translate('ImagePlugin',
'Add a new Image')
}
## Edit Button ##
self.textStrings[StringContent.Edit] = {
u'title': translate('ImagePlugin', 'Edit'),
- u'tooltip': translate('ImagePlugin',
+ u'tooltip': translate('ImagePlugin',
'Edit the selected Image')
}
## Delete Button ##
self.textStrings[StringContent.Delete] = {
u'title': translate('ImagePlugin', 'Delete'),
- u'tooltip': translate('ImagePlugin',
+ u'tooltip': translate('ImagePlugin',
'Delete the selected Image')
}
## Preview ##
self.textStrings[StringContent.Preview] = {
u'title': translate('ImagePlugin', 'Preview'),
- u'tooltip': translate('ImagePlugin',
+ u'tooltip': translate('ImagePlugin',
'Preview the selected Image')
}
## Live Button ##
self.textStrings[StringContent.Live] = {
u'title': translate('ImagePlugin', 'Live'),
- u'tooltip': translate('ImagePlugin',
+ u'tooltip': translate('ImagePlugin',
'Send the selected Image live')
}
## Add to service Button ##
self.textStrings[StringContent.Service] = {
u'title': translate('ImagePlugin', 'Service'),
- u'tooltip': translate('ImagePlugin',
+ u'tooltip': translate('ImagePlugin',
'Add the selected Image to the service')
}
\ No newline at end of file
=== modified file 'openlp/plugins/presentations/lib/impresscontroller.py'
--- openlp/plugins/presentations/lib/impresscontroller.py 2010-10-15 09:00:08 +0000
+++ openlp/plugins/presentations/lib/impresscontroller.py 2010-12-13 14:28:06 +0000
@@ -48,7 +48,7 @@
uno_available = True
except ImportError:
uno_available = False
-
+
from PyQt4 import QtCore
from presentationcontroller import PresentationController, PresentationDocument
@@ -210,12 +210,12 @@
class ImpressDocument(PresentationDocument):
"""
Class which holds information and controls a single presentation
- """
-
+ """
+
def __init__(self, controller, presentation):
"""
- Constructor, store information about the file and initialise
- """
+ Constructor, store information about the file and initialise
+ """
log.debug(u'Init Presentation OpenOffice')
PresentationDocument.__init__(self, controller, presentation)
self.document = None
@@ -287,7 +287,7 @@
page = pages.getByIndex(idx)
doc.getCurrentController().setCurrentPage(page)
urlpath = u'%s/%s.png' % (thumbdirurl, unicode(idx + 1))
- path = os.path.join(self.get_temp_folder(),
+ path = os.path.join(self.get_temp_folder(),
unicode(idx + 1) + u'.png')
try:
doc.storeToURL(urlpath, props)
=== modified file 'openlp/plugins/presentations/lib/messagelistener.py'
--- openlp/plugins/presentations/lib/messagelistener.py 2010-09-14 18:18:47 +0000
+++ openlp/plugins/presentations/lib/messagelistener.py 2010-12-13 14:28:06 +0000
@@ -51,7 +51,7 @@
def add_handler(self, controller, file, is_blank):
"""
- Add a handler, which is an instance of a presentation and
+ Add a handler, which is an instance of a presentation and
slidecontroller combination. If the slidecontroller has a display
then load the presentation.
"""
@@ -362,7 +362,7 @@
def timeout(self):
"""
- The presentation may be timed or might be controlled by the
+ The presentation may be timed or might be controlled by the
application directly, rather than through OpenLP. Poll occassionally
to check which slide is currently displayed so the slidecontroller
view can be updated
=== modified file 'openlp/plugins/presentations/lib/pptviewcontroller.py'
--- openlp/plugins/presentations/lib/pptviewcontroller.py 2010-09-14 18:18:47 +0000
+++ openlp/plugins/presentations/lib/pptviewcontroller.py 2010-12-13 14:28:06 +0000
@@ -108,7 +108,7 @@
"""
def __init__(self, controller, presentation):
"""
- Constructor, store information about the file and initialise
+ Constructor, store information about the file and initialise
"""
log.debug(u'Init Presentation PowerPoint')
PresentationDocument.__init__(self, controller, presentation)
=== modified file 'openlp/plugins/presentations/lib/presentationtab.py'
--- openlp/plugins/presentations/lib/presentationtab.py 2010-09-16 21:10:36 +0000
+++ openlp/plugins/presentations/lib/presentationtab.py 2010-12-13 14:28:06 +0000
@@ -133,7 +133,7 @@
self.settingsSection + u'/' + controller.name,
QtCore.QVariant(QtCore.Qt.Checked)).toInt()[0])
self.OverrideAppCheckBox.setChecked(QtCore.QSettings().value(
- self.settingsSection + u'/override app',
+ self.settingsSection + u'/override app',
QtCore.QVariant(QtCore.Qt.Unchecked)).toInt()[0])
def save(self):
=== modified file 'openlp/plugins/presentations/presentationplugin.py'
--- openlp/plugins/presentations/presentationplugin.py 2010-11-03 18:03:28 +0000
+++ openlp/plugins/presentations/presentationplugin.py 2010-12-13 14:28:06 +0000
@@ -163,30 +163,30 @@
## Load Button ##
self.textStrings[StringContent.Load] = {
u'title': translate('PresentationPlugin', 'Load'),
- u'tooltip': translate('PresentationPlugin',
+ u'tooltip': translate('PresentationPlugin',
'Load a new Presentation')
}
## Delete Button ##
self.textStrings[StringContent.Delete] = {
u'title': translate('PresentationPlugin', 'Delete'),
- u'tooltip': translate('PresentationPlugin',
+ u'tooltip': translate('PresentationPlugin',
'Delete the selected Presentation')
}
## Preview ##
self.textStrings[StringContent.Preview] = {
u'title': translate('PresentationPlugin', 'Preview'),
- u'tooltip': translate('PresentationPlugin',
+ u'tooltip': translate('PresentationPlugin',
'Preview the selected Presentation')
}
## Live Button ##
self.textStrings[StringContent.Live] = {
u'title': translate('PresentationPlugin', 'Live'),
- u'tooltip': translate('PresentationPlugin',
+ u'tooltip': translate('PresentationPlugin',
'Send the selected Presentation live')
}
## Add to service Button ##
self.textStrings[StringContent.Service] = {
u'title': translate('PresentationPlugin', 'Service'),
- u'tooltip': translate('PresentationPlugin',
+ u'tooltip': translate('PresentationPlugin',
'Add the selected Presentation to the service')
}
=== modified file 'openlp/plugins/remotes/remoteplugin.py'
--- openlp/plugins/remotes/remoteplugin.py 2010-10-05 16:09:48 +0000
+++ openlp/plugins/remotes/remoteplugin.py 2010-12-13 14:28:06 +0000
@@ -77,7 +77,7 @@
'a running version of OpenLP on a different computer via a web '
'browser or through the remote API.')
return about_text
-
+
def setPluginTextStrings(self):
"""
Called to define all translatable texts of the plugin
=== modified file 'openlp/plugins/songs/forms/songmaintenanceform.py'
--- openlp/plugins/songs/forms/songmaintenanceform.py 2010-11-09 17:10:37 +0000
+++ openlp/plugins/songs/forms/songmaintenanceform.py 2010-12-13 14:28:06 +0000
@@ -411,7 +411,7 @@
"""
existing_author = self.manager.get_object_filtered(Author,
and_(Author.first_name == old_author.first_name,
- Author.last_name == old_author.last_name,
+ Author.last_name == old_author.last_name,
Author.display_name == old_author.display_name))
songs = self.manager.get_all_objects(Song,
Song.authors.contains(old_author))
=== modified file 'openlp/plugins/songs/lib/ewimport.py'
--- openlp/plugins/songs/lib/ewimport.py 2010-10-21 15:31:22 +0000
+++ openlp/plugins/songs/lib/ewimport.py 2010-12-13 14:28:06 +0000
@@ -41,7 +41,7 @@
control_word = []
for c in blob:
if control:
- # for delimiters, set control to False
+ # for delimiters, set control to False
if c == '{':
if len(control_word) > 0:
depth += 1
=== modified file 'openlp/plugins/songs/lib/oooimport.py'
--- openlp/plugins/songs/lib/oooimport.py 2010-09-19 08:47:00 +0000
+++ openlp/plugins/songs/lib/oooimport.py 2010-12-13 14:28:06 +0000
@@ -46,7 +46,7 @@
class OooImport(SongImport):
"""
- Import songs from Impress/Powerpoint docs using Impress
+ Import songs from Impress/Powerpoint docs using Impress
"""
def __init__(self, master_manager, **kwargs):
"""
@@ -122,7 +122,7 @@
manager = ctx.ServiceManager
self.desktop = manager.createInstanceWithContext(
"com.sun.star.frame.Desktop", ctx)
-
+
def start_ooo_process(self):
try:
if os.name == u'nt':
@@ -168,11 +168,11 @@
u'Processing file ' + filepath, 0)
except:
pass
- return
+ return
def close_ooo_file(self):
"""
- Close file.
+ Close file.
"""
self.document.close(True)
self.document = None
@@ -187,7 +187,7 @@
def process_pres(self):
"""
Process the file
- """
+ """
doc = self.document
slides = doc.getDrawPages()
text = u''
@@ -195,7 +195,7 @@
if self.abort:
self.import_wizard.incrementProgressBar(u'Import cancelled', 0)
return
- slide = slides.getByIndex(slide_no)
+ slide = slides.getByIndex(slide_no)
slidetext = u''
for idx in range(slide.getCount()):
shape = slide.getByIndex(idx)
@@ -209,12 +209,12 @@
songs = SongImport.process_songs_text(self.manager, text)
for song in songs:
song.finish()
- return
+ return
def process_doc(self):
"""
Process the doc file, a paragraph at a time
- """
+ """
text = u''
paragraphs = self.document.getText().createEnumeration()
while paragraphs.hasMoreElements():
=== modified file 'openlp/plugins/songs/lib/opensongimport.py'
--- openlp/plugins/songs/lib/opensongimport.py 2010-11-03 18:03:28 +0000
+++ openlp/plugins/songs/lib/opensongimport.py 2010-12-13 14:28:06 +0000
@@ -249,7 +249,7 @@
words = thisline[1:].strip()
if words is None:
words = thisline
- if not versenum:
+ if not versenum:
versenum = u'1'
if versenum is not None:
versetag = u'%s%s' % (versetype, versenum)
@@ -298,7 +298,7 @@
for tag in order:
if tag[0].isdigit():
# Assume it's a verse if it has no prefix
- tag = u'V' + tag
+ tag = u'V' + tag
elif not re.search('\d+', tag):
# Assume it's no.1 if there's no digits
tag = tag + u'1'
=== modified file 'openlp/plugins/songs/lib/sofimport.py'
--- openlp/plugins/songs/lib/sofimport.py 2010-09-14 18:18:47 +0000
+++ openlp/plugins/songs/lib/sofimport.py 2010-12-13 14:28:06 +0000
@@ -56,13 +56,13 @@
"""
Import songs provided on disks with the Songs of Fellowship music books
VOLS1_2.RTF, sof3words.rtf and sof4words.rtf
-
+
Use OpenOffice.org Writer for processing the rtf file
- The three books are not only inconsistant with each other, they are
+ The three books are not only inconsistant with each other, they are
inconsistant in themselves too with their formatting. Not only this, but
the 1+2 book does not space out verses correctly. This script attempts
- to sort it out, but doesn't get it 100% right. But better than having to
+ to sort it out, but doesn't get it 100% right. But better than having to
type them all out!
It attempts to detect italiced verses, and treats these as choruses in
@@ -96,7 +96,7 @@
def process_sof_file(self):
"""
Process the RTF file, a paragraph at a time
- """
+ """
self.blanklines = 0
self.new_song()
paragraphs = self.document.getText().createEnumeration()
@@ -113,11 +113,11 @@
def process_paragraph(self, paragraph):
"""
- Process a paragraph.
+ Process a paragraph.
In the first book, a paragraph is a single line. In the latter ones
they may contain multiple lines.
Each paragraph contains textportions. Each textportion has it's own
- styling, e.g. italics, bold etc.
+ styling, e.g. italics, bold etc.
Also check for page breaks, which indicates a new song in books 1+2.
In later books, there may not be line breaks, so check for 3 or more
newlines
@@ -136,7 +136,7 @@
self.new_song()
text = u''
self.process_paragraph_text(text)
-
+
def process_paragraph_text(self, text):
"""
Split the paragraph text into multiple lines and process
@@ -147,12 +147,12 @@
self.new_song()
def process_paragraph_line(self, text):
- """
+ """
Process a single line. Throw away that text which isn't relevant, i.e.
stuff that appears at the end of the song.
Anything that is OK, append to the current verse
"""
- text = text.strip()
+ text = text.strip()
if text == u'':
self.blanklines += 1
if self.blanklines > 1:
@@ -164,7 +164,7 @@
if self.skip_to_close_bracket:
if text.endswith(u')'):
self.skip_to_close_bracket = False
- return
+ return
if text.startswith(u'CCL Licence'):
self.italics = False
return
@@ -264,7 +264,7 @@
"""
Add the author. OpenLP stores them individually so split by 'and', '&'
and comma.
- However need to check for "Mr and Mrs Smith" and turn it to
+ However need to check for "Mr and Mrs Smith" and turn it to
"Mr Smith" and "Mrs Smith".
"""
text = text.replace(u' and ', u' & ')
@@ -276,7 +276,7 @@
we're beyond the second line of first verse, then this indicates
a change of verse. Italics are a chorus
"""
- if self.italics != self.is_chorus and ((len(self.song.verses) > 0) or
+ if self.italics != self.is_chorus and ((len(self.song.verses) > 0) or
(self.currentverse.count(u'\n') > 1)):
self.finish_verse()
if self.italics:
@@ -307,7 +307,7 @@
ln = 0
if line:
verse = line + u'\n'
- else:
+ else:
verse = u''
else:
verse += line + u'\n'
@@ -320,34 +320,34 @@
def uncap_text(self, text):
- """
+ """
Words in the title are in all capitals, so we lowercase them.
- However some of these words, e.g. referring to God need a leading
+ However some of these words, e.g. referring to God need a leading
capital letter.
-
- There is a complicated word "One", which is sometimes lower and
+
+ There is a complicated word "One", which is sometimes lower and
sometimes upper depending on context. Never mind, keep it lower.
"""
textarr = re.split(u'(\W+)', text)
textarr[0] = textarr[0].capitalize()
for i in range(1, len(textarr)):
# Do not translate these. Fixed strings in SOF song file
- if textarr[i] in (u'JESUS', u'CHRIST', u'KING', u'ALMIGHTY',
- u'REDEEMER', u'SHEPHERD', u'SON', u'GOD', u'LORD', u'FATHER',
- u'HOLY', u'SPIRIT', u'LAMB', u'YOU', u'YOUR', u'I', u'I\'VE',
- u'I\'M', u'I\'LL', u'SAVIOUR', u'O', u'YOU\'RE', u'HE', u'HIS',
- u'HIM', u'ZION', u'EMMANUEL', u'MAJESTY', u'JESUS\'', u'JIREH',
- u'JUDAH', u'LION', u'LORD\'S', u'ABRAHAM', u'GOD\'S',
+ if textarr[i] in (u'JESUS', u'CHRIST', u'KING', u'ALMIGHTY',
+ u'REDEEMER', u'SHEPHERD', u'SON', u'GOD', u'LORD', u'FATHER',
+ u'HOLY', u'SPIRIT', u'LAMB', u'YOU', u'YOUR', u'I', u'I\'VE',
+ u'I\'M', u'I\'LL', u'SAVIOUR', u'O', u'YOU\'RE', u'HE', u'HIS',
+ u'HIM', u'ZION', u'EMMANUEL', u'MAJESTY', u'JESUS\'', u'JIREH',
+ u'JUDAH', u'LION', u'LORD\'S', u'ABRAHAM', u'GOD\'S',
u'FATHER\'S', u'ELIJAH'):
textarr[i] = textarr[i].capitalize()
else:
textarr[i] = textarr[i].lower()
text = u''.join(textarr)
return text
-
+
def verse_splits(self, song_number):
"""
- Because someone at Kingsway forgot to check the 1+2 RTF file,
+ Because someone at Kingsway forgot to check the 1+2 RTF file,
some verses were not formatted correctly.
"""
if song_number == 11:
=== modified file 'openlp/plugins/songs/lib/songbeamerimport.py'
--- openlp/plugins/songs/lib/songbeamerimport.py 2010-12-11 09:40:52 +0000
+++ openlp/plugins/songs/lib/songbeamerimport.py 2010-12-13 14:28:06 +0000
@@ -24,7 +24,7 @@
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
"""
-The :mod:`songbeamerimport` module provides the functionality for importing
+The :mod:`songbeamerimport` module provides the functionality for importing
SongBeamer songs into the OpenLP database.
"""
import logging
@@ -90,7 +90,7 @@
len(self.import_source))
for file in self.import_source:
# TODO: check that it is a valid SongBeamer file
- self.current_verse = u''
+ self.current_verse = u''
self.current_verse_type = u'V'
read_verses = False
self.file_name = os.path.split(file)[1]
@@ -115,7 +115,7 @@
self.replace_html_tags()
self.add_verse(self.current_verse,
self.current_verse_type)
- self.current_verse = u''
+ self.current_verse = u''
self.current_verse_type = u'V'
read_verses = True
verse_start = True
=== modified file 'scripts/openlp-remoteclient.py' (properties changed: +x to -x)
--- scripts/openlp-remoteclient.py 2010-07-27 09:32:52 +0000
+++ scripts/openlp-remoteclient.py 2010-12-13 14:28:06 +0000
@@ -47,7 +47,7 @@
help="Recipient address ",
default="localhost")
parser.add_option("-e", "--event",
- help="Action to be performed",
+ help="Action to be performed",
default="alerts_text")
parser.add_option("-m", "--message",
help="Message to be passed for the action",
Follow ups