reverted alert change

This commit is contained in:
Andreas Preikschat 2011-10-16 16:53:39 +02:00
parent a1a79c98d1
commit 004472baa8
2 changed files with 6 additions and 11 deletions

View File

@ -191,17 +191,14 @@ class MainDisplay(QtGui.QGraphicsView):
def alert(self, text):
"""
Add the alert text. If the alert was not displayed, because the screen
is not visible ``False`` is returned, otherwise ``True``.
Display an alert.
``slide``
The slide text to be displayed.
``text``
The text to be displayed.
"""
log.debug(u'alert to display')
if not self.isVisible():
return False
if self.height() != self.screen[u'size'].height() or \
self.videoWidget.isVisible():
if self.height() != self.screen[u'size'].height() or not \
self.isVisible() or self.videoWidget.isVisible():
shrink = True
js = u'show_alert("%s", "%s")' % (
text.replace(u'\\', u'\\\\').replace(u'\"', u'\\\"'),
@ -229,7 +226,6 @@ class MainDisplay(QtGui.QGraphicsView):
else:
shrinkItem.setVisible(False)
self.setGeometry(self.screen[u'size'])
return True
def directImage(self, name, path, background):
"""

View File

@ -85,8 +85,7 @@ class AlertsManager(QtCore.QObject):
return
text = self.alertList.pop(0)
alertTab = self.parent().settings_tab
if not self.parent().liveController.display.alert(text):
self.alertList.insert(0, text)
self.parent().liveController.display.alert(text)
# Check to see if we have a timer running.
if self.timer_id == 0:
self.timer_id = self.startTimer(int(alertTab.timeout) * 1000)