Fixes and cleanups

This commit is contained in:
Jon Tibble 2010-07-26 21:31:05 +01:00
parent bfb47e2d76
commit 16924808bd
2 changed files with 8 additions and 14 deletions

View File

@ -92,12 +92,12 @@ class DisplayManager(QtGui.QWidget):
self.videoDisplay.mediaHide(message) self.videoDisplay.mediaHide(message)
self.mainDisplay.hideDisplay(message) self.mainDisplay.hideDisplay(message)
def showDisplay(self, message): def showDisplay(self):
""" """
Hide the output displays Hide the output displays
""" """
self.videoDisplay.mediaShow(message) self.videoDisplay.mediaShow()
self.mainDisplay.showDisplay(message) self.mainDisplay.showDisplay()
def addAlert(self, alertMessage, location): def addAlert(self, alertMessage, location):
""" """
@ -623,7 +623,7 @@ class VideoDisplay(Phonon.VideoWidget):
self.hidden = True self.hidden = True
self.setVisible(False) self.setVisible(False)
def mediaShow(self, message=''): def mediaShow(self):
""" """
Show the video display if it was already hidden Show the video display if it was already hidden
""" """

View File

@ -64,7 +64,7 @@ def parse_reference(reference):
to_verse = match.group(5) to_verse = match.group(5)
if int(match.group(2)) == int(match.group(4)): if int(match.group(2)) == int(match.group(4)):
reference_list.append( reference_list.append(
(match.group(1), int(match.group(2)), from_verse, to_verse) (book, int(match.group(2)), from_verse, to_verse)
) )
else: else:
if int(match.group(2)) > int(match.group(4)): if int(match.group(2)) > int(match.group(4)):
@ -75,17 +75,11 @@ def parse_reference(reference):
to_chapter = int(match.group(4)) to_chapter = int(match.group(4))
for chapter in xrange(from_chapter, to_chapter + 1): for chapter in xrange(from_chapter, to_chapter + 1):
if chapter == from_chapter: if chapter == from_chapter:
reference_list.append( reference_list.append((book, chapter, from_verse, -1))
(match.group(1), chapter, from_verse, -1)
)
elif chapter == to_chapter: elif chapter == to_chapter:
reference_list.append( reference_list.append((book, chapter, 1, to_verse))
(match.group(1), chapter, 1, to_verse)
)
else: else:
reference_list.append( reference_list.append((book, chapter, 1, -1))
(match.group(1), chapter, 1, -1)
)
else: else:
match = only_verses.match(reference) match = only_verses.match(reference)
if match: if match: