Fix showing screen after black and cleanups

bzr-revno: 972
This commit is contained in:
Jon Tibble 2010-07-27 07:58:35 +01:00
commit 5ae5a5d63f
2 changed files with 8 additions and 14 deletions

View File

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

View File

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