forked from openlp/openlp
Cleanups and bible parsing fix
bzr-revno: 1234
This commit is contained in:
commit
91a46cf8d3
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user