Cleanups and bible parsing fix

bzr-revno: 1234
This commit is contained in:
Jon Tibble 2011-01-21 18:15:54 +00:00
commit 91a46cf8d3
3 changed files with 4 additions and 6 deletions

View File

@ -109,7 +109,7 @@ def parse_reference(reference):
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 @@ def parse_reference(reference):
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:

View File

@ -784,7 +784,6 @@ class SongImportForm(OpenLPWizard):
filenames=self.getListOfFiles(self.songBeamerFileListWidget)
)
if importer.do_import():
# reload songs
self.progressLabel.setText(
translate('SongsPlugin.SongImportForm', 'Finished import.'))
else:

View File

@ -157,7 +157,6 @@ class SongMediaItem(MediaManagerItem):
(5, u':/slides/slide_theme.png',
translate('SongsPlugin.MediaItem', 'Themes'))
])
self.configUpdated()
def onSearchTextButtonClick(self):
@ -269,8 +268,8 @@ class SongMediaItem(MediaManagerItem):
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')