← Back to team overview

openlp-core team mailing list archive

[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)

For more details, see:
https://code.launchpad.net/~meths/openlp/trivialfixes/+merge/51061

Cleanups and fixes
-- 
https://code.launchpad.net/~meths/openlp/trivialfixes/+merge/51061
Your team OpenLP Core is requested to review the proposed merge of lp:~meths/openlp/trivialfixes into lp:openlp.
=== modified file 'openlp/core/ui/displaytagdialog.py'
--- openlp/core/ui/displaytagdialog.py	2011-02-21 20:06:55 +0000
+++ openlp/core/ui/displaytagdialog.py	2011-02-24 02:46:57 +0000
@@ -26,7 +26,7 @@
 
 from PyQt4 import QtCore, QtGui
 
-from openlp.core.lib import translate, build_icon
+from openlp.core.lib import translate
 from openlp.core.lib.ui import UiStrings, create_accept_reject_button_box
 
 class Ui_DisplayTagDialog(object):
@@ -134,7 +134,8 @@
         self.tagLabel.setText(translate('OpenLP.DisplayTagDialog', 'Tag'))
         self.startTagLabel.setText(
             translate('OpenLP.DisplayTagDialog', 'Start tag'))
-        self.endTagLabel.setText(translate('OpenLP.DisplayTagDialog', 'End tag'))
+        self.endTagLabel.setText(
+            translate('OpenLP.DisplayTagDialog', 'End tag'))
         self.deletePushButton.setText(UiStrings.Delete)
         self.defaultPushButton.setText(
             translate('OpenLP.DisplayTagDialog', 'Default'))

=== modified file 'openlp/core/ui/displaytagform.py'
--- openlp/core/ui/displaytagform.py	2011-02-21 20:06:55 +0000
+++ openlp/core/ui/displaytagform.py	2011-02-24 02:46:57 +0000
@@ -34,7 +34,7 @@
 from PyQt4 import QtCore, QtGui
 
 from openlp.core.lib import translate, DisplayTags
-from openlp.core.lib.ui import UiStrings, critical_error_message_box
+from openlp.core.lib.ui import critical_error_message_box
 from openlp.core.ui.displaytagdialog import Ui_DisplayTagDialog
 
 class DisplayTagForm(QtGui.QDialog, Ui_DisplayTagDialog):

=== modified file 'openlp/core/ui/printservicedialog.py'
--- openlp/core/ui/printservicedialog.py	2011-02-20 07:37:44 +0000
+++ openlp/core/ui/printservicedialog.py	2011-02-24 02:46:57 +0000
@@ -29,7 +29,7 @@
 from openlp.core.lib import build_icon, translate, SpellTextEdit
 from openlp.core.lib.ui import UiStrings
 
-class ZoomSize():
+class ZoomSize(object):
     """
     Type enumeration for Combo Box sizes
     """
@@ -45,6 +45,7 @@
         translate('OpenLP.PrintServiceDialog', 'Fit Width'),
         u'100%', u'75%', u'50%', u'25%']
 
+
 class Ui_PrintServiceDialog(object):
     def setupUi(self, printServiceDialog):
         printServiceDialog.setObjectName(u'printServiceDialog')

=== modified file 'openlp/core/ui/printserviceform.py'
--- openlp/core/ui/printserviceform.py	2011-02-20 07:37:44 +0000
+++ openlp/core/ui/printserviceform.py	2011-02-24 02:46:57 +0000
@@ -174,7 +174,7 @@
             self.previewWidget.zoomIn(0.25)
         settings = QtCore.QSettings()
         settings.beginGroup(u'advanced')
-        settings.setValue(u'display size',QtCore.QVariant(display))
+        settings.setValue(u'display size', QtCore.QVariant(display))
         settings.endGroup()
 
     def copyText(self):

=== modified file 'openlp/plugins/bibles/lib/manager.py'
--- openlp/plugins/bibles/lib/manager.py	2011-01-26 02:43:16 +0000
+++ openlp/plugins/bibles/lib/manager.py	2011-02-24 02:46:57 +0000
@@ -40,9 +40,9 @@
 # Imports that might fail.
 try:
     from openlp1 import OpenLP1Bible
-    has_openlp1 = True
+    HAS_OPENLP1 = True
 except ImportError:
-    has_openlp1 = False
+    HAS_OPENLP1 = False
 
 log = logging.getLogger(__name__)
 
@@ -367,6 +367,6 @@
         for bible in self.db_cache:
             self.db_cache[bible].finalise()
 
-BibleFormat.set_availability(BibleFormat.OpenLP1, has_openlp1)
+BibleFormat.set_availability(BibleFormat.OpenLP1, HAS_OPENLP1)
 
 __all__ = [u'BibleFormat']

=== modified file 'openlp/plugins/songs/lib/foilpresenterimport.py'
--- openlp/plugins/songs/lib/foilpresenterimport.py	2011-02-23 19:48:37 +0000
+++ openlp/plugins/songs/lib/foilpresenterimport.py	2011-02-24 02:46:57 +0000
@@ -93,7 +93,6 @@
 
 from lxml import etree, objectify
 
-from openlp.core.lib import translate
 from openlp.core.ui.wizard import WizardStrings
 from openlp.plugins.songs.lib import VerseType
 from openlp.plugins.songs.lib.songimport import SongImport
@@ -107,12 +106,12 @@
     """
     This provides the Foilpresenter import.
     """
-    def __init__(self, master_manager, **kwargs):
+    def __init__(self, manager, **kwargs):
         """
         Initialise the import.
         """
         log.debug(u'initialise FoilPresenterImport')
-        SongImport.__init__(self, master_manager, **kwargs)
+        SongImport.__init__(self, manager, **kwargs)
         self.FoilPresenter = FoilPresenter(self.manager)
 
     def do_import(self):
@@ -340,7 +339,7 @@
                     elif (len(author) > 2):
                         authors.append(author)
         if not authors:
-            authors.append(SongStrings.AuthorUnknownUnT)
+            authors.append(SongStrings.AuthorUnknown)
         for display_name in authors:
             author = self.manager.get_object_filtered(Author,
                 Author.display_name == display_name)
@@ -349,7 +348,7 @@
                 author = Author.populate(display_name=display_name,
                     last_name = display_name.split(u' ')[-1],
                     first_name = u' '.join(display_name.split(u' ')[:-1]))
-            self.manager.save_object(author)
+                self.manager.save_object(author)
             song.authors.append(author)
 
     def _process_cclinumber(self, foilpresenterfolie, song):
@@ -411,7 +410,6 @@
         search_text = u''
         temp_verse_order = {}
         temp_verse_order_backup = []
-        temp_verse_sort = []
         temp_sortnr_backup = 1
         temp_sortnr_liste = []
         versenumber = {u'V': 1,  u'C': 1, u'B': 1, u'E': 1, u'O': 1, u'I': 1, 
@@ -454,7 +452,7 @@
             else:
                 verse_type = u'O'
             verse_number = re.compile(u'[a-zA-Z.+-_ ]*').sub(u'', verse_name)
-            verse_part = re.compile(u'[0-9]*').sub(u'', verse_name[1:])
+            #verse_part = re.compile(u'[0-9]*').sub(u'', verse_name[1:])
             # Foilpresenter allows e. g. "C", but we need "C1".
             if not verse_number:
                 verse_number = unicode(versenumber[verse_type])

=== modified file 'openlp/plugins/songs/lib/oooimport.py'
--- openlp/plugins/songs/lib/oooimport.py	2011-02-18 17:45:14 +0000
+++ openlp/plugins/songs/lib/oooimport.py	2011-02-24 02:46:57 +0000
@@ -50,12 +50,12 @@
     """
     Import songs from Impress/Powerpoint docs using Impress
     """
-    def __init__(self, master_manager, **kwargs):
+    def __init__(self, manager, **kwargs):
         """
         Initialise the class. Requires a songmanager class which is passed
         to SongImport for writing song to disk
         """
-        SongImport.__init__(self, master_manager, **kwargs)
+        SongImport.__init__(self, manager, **kwargs)
         self.document = None
         self.process_started = False
 

=== modified file 'openlp/plugins/songs/lib/openlyricsimport.py'
--- openlp/plugins/songs/lib/openlyricsimport.py	2011-02-18 17:34:43 +0000
+++ openlp/plugins/songs/lib/openlyricsimport.py	2011-02-24 02:46:57 +0000
@@ -43,12 +43,12 @@
     """
     This provides the Openlyrics import.
     """
-    def __init__(self, master_manager, **kwargs):
+    def __init__(self, manager, **kwargs):
         """
-        Initialise the import.
+        Initialise the Open Lyrics importer.
         """
         log.debug(u'initialise OpenLyricsImport')
-        SongImport.__init__(self, master_manager, **kwargs)
+        SongImport.__init__(self, manager, **kwargs)
         self.openLyrics = OpenLyrics(self.manager)
 
     def do_import(self):

=== modified file 'openlp/plugins/songs/lib/sofimport.py'
--- openlp/plugins/songs/lib/sofimport.py	2011-01-26 19:35:29 +0000
+++ openlp/plugins/songs/lib/sofimport.py	2011-02-24 02:46:57 +0000
@@ -66,12 +66,12 @@
     It attempts to detect italiced verses, and treats these as choruses in
     the verse ordering. Again not perfect, but a start.
     """
-    def __init__(self, master_manager, **kwargs):
+    def __init__(self, manager, **kwargs):
         """
         Initialise the class. Requires a songmanager class which is passed
         to SongImport for writing song to disk
         """
-        OooImport.__init__(self, master_manager, **kwargs)
+        OooImport.__init__(self, manager, **kwargs)
 
     def process_ooo_document(self):
         """

=== modified file 'openlp/plugins/songs/lib/songbeamerimport.py'
--- openlp/plugins/songs/lib/songbeamerimport.py	2011-02-20 17:34:57 +0000
+++ openlp/plugins/songs/lib/songbeamerimport.py	2011-02-24 02:46:57 +0000
@@ -67,14 +67,11 @@
     Song Beamer file format is text based
     in the beginning are one or more control tags written
     """
-    def __init__(self, master_manager, **kwargs):
-        """
-        Initialise the import.
-
-        ``master_manager``
-            The song manager for the running OpenLP installation.
-        """
-        SongImport.__init__(self, master_manager, **kwargs)
+    def __init__(self, manager, **kwargs):
+        """
+        Initialise the Song Beamer importer.
+        """
+        SongImport.__init__(self, manager, **kwargs)
 
     def do_import(self):
         """

=== modified file 'openlp/plugins/songs/lib/songshowplusimport.py'
--- openlp/plugins/songs/lib/songshowplusimport.py	2011-02-18 17:34:43 +0000
+++ openlp/plugins/songs/lib/songshowplusimport.py	2011-02-24 02:46:57 +0000
@@ -86,14 +86,11 @@
     otherList = {}
     otherCount = 0
 
-    def __init__(self, master_manager, **kwargs):
-        """
-        Initialise the import.
-
-        ``master_manager``
-            The song manager for the running OpenLP installation.
-        """
-        SongImport.__init__(self, master_manager, **kwargs)
+    def __init__(self, manager, **kwargs):
+        """
+        Initialise the SongShow Plus importer.
+        """
+        SongImport.__init__(self, manager, **kwargs)
 
     def do_import(self):
         """

=== modified file 'openlp/plugins/songs/lib/wowimport.py'
--- openlp/plugins/songs/lib/wowimport.py	2011-02-18 17:34:43 +0000
+++ openlp/plugins/songs/lib/wowimport.py	2011-02-24 02:46:57 +0000
@@ -92,14 +92,11 @@
     * .wow-song
     """
 
-    def __init__(self, master_manager, **kwargs):
-        """
-        Initialise the import.
-
-        ``master_manager``
-            The song manager for the running OpenLP installation.
-        """
-        SongImport.__init__(self, master_manager, **kwargs)
+    def __init__(self, manager, **kwargs):
+        """
+        Initialise the Words of Worship importer.
+        """
+        SongImport.__init__(self, manager, **kwargs)
 
     def do_import(self):
         """

=== modified file 'openlp/plugins/songs/lib/xml.py'
--- openlp/plugins/songs/lib/xml.py	2011-02-23 20:22:29 +0000
+++ openlp/plugins/songs/lib/xml.py	2011-02-24 02:46:57 +0000
@@ -68,7 +68,6 @@
 
 from openlp.plugins.songs.lib import add_author_unknown, VerseType
 from openlp.plugins.songs.lib.db import Author, Book, Song, Topic
-from openlp.plugins.songs.lib.ui import SongStrings
 
 log = logging.getLogger(__name__)
 


Follow ups