← 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/47053

Couple of cleanups.
Stop reloading songs when the wizard is cancelled (nothing has changed).

Off-by-one in bible reference parsing (part one of bug #705614)
-- 
https://code.launchpad.net/~meths/openlp/trivialfixes/+merge/47053
Your team OpenLP Core is requested to review the proposed merge of lp:~meths/openlp/trivialfixes into lp:openlp.
=== modified file 'openlp/plugins/bibles/lib/__init__.py'
--- openlp/plugins/bibles/lib/__init__.py	2010-12-28 11:18:56 +0000
+++ openlp/plugins/bibles/lib/__init__.py	2011-01-21 16:26:21 +0000
@@ -109,7 +109,7 @@
     regular expression looks like this:
 
     1. ``^\s*(?!\s)(?P<book>[\d]*[^\d]+)(?<!\s)\s*``
-        The ``book`` group starts with the first non-whitespace character.  There
+        The ``book`` group starts with the first non-whitespace character. There
         are optional leading digits followed by non-digits. The group ends
         before the whitspace in front of the next digit.
     2. ``(?P<ranges>(?:`` + range_string + ``(?:%(sep_l)s|(?=\s*$)))+)\s*$``
@@ -177,7 +177,7 @@
                     to_verse = -1
                 if to_chapter > from_chapter:
                     ref_list.append((book, from_chapter, from_verse, -1))
-                    for i in range(from_chapter + 1, to_chapter - 1):
+                    for i in range(from_chapter + 1, to_chapter):
                         ref_list.append((book, i, 1, -1))
                     ref_list.append((book, to_chapter, 1, to_verse))
                 elif to_verse >= from_verse or to_verse == -1:

=== modified file 'openlp/plugins/songs/forms/songimportform.py'
--- openlp/plugins/songs/forms/songimportform.py	2011-01-19 19:37:44 +0000
+++ openlp/plugins/songs/forms/songimportform.py	2011-01-21 16:26:21 +0000
@@ -784,7 +784,6 @@
                 filenames=self.getListOfFiles(self.songBeamerFileListWidget)
             )
         if importer.do_import():
-            # reload songs
             self.progressLabel.setText(
                 translate('SongsPlugin.SongImportForm', 'Finished import.'))
         else:

=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
--- openlp/plugins/songs/lib/mediaitem.py	2011-01-17 21:52:27 +0000
+++ openlp/plugins/songs/lib/mediaitem.py	2011-01-21 16:26:21 +0000
@@ -157,7 +157,6 @@
             (5, u':/slides/slide_theme.png',
                 translate('SongsPlugin.MediaItem', 'Themes'))
         ])
-
         self.configUpdated()
 
     def onSearchTextButtonClick(self):
@@ -269,8 +268,8 @@
     def onImportClick(self):
         if not hasattr(self, u'import_wizard'):
             self.import_wizard = SongImportForm(self, self.parent)
-        self.import_wizard.exec_()
-        Receiver.send_message(u'songs_load_list')
+        if self.import_wizard.exec_() == QtGui.QDialog.Accepted:
+            Receiver.send_message(u'songs_load_list')
 
     def onNewClick(self):
         log.debug(u'onNewClick')


Follow ups