mirror of https://gitlab.com/openlp/openlp.git
reverted alert change
This commit is contained in:
parent
a1a79c98d1
commit
004472baa8
|
@ -191,17 +191,14 @@ class MainDisplay(QtGui.QGraphicsView):
|
||||||
|
|
||||||
def alert(self, text):
|
def alert(self, text):
|
||||||
"""
|
"""
|
||||||
Add the alert text. If the alert was not displayed, because the screen
|
Display an alert.
|
||||||
is not visible ``False`` is returned, otherwise ``True``.
|
|
||||||
|
|
||||||
``slide``
|
``text``
|
||||||
The slide text to be displayed.
|
The text to be displayed.
|
||||||
"""
|
"""
|
||||||
log.debug(u'alert to display')
|
log.debug(u'alert to display')
|
||||||
if not self.isVisible():
|
if self.height() != self.screen[u'size'].height() or not \
|
||||||
return False
|
self.isVisible() or self.videoWidget.isVisible():
|
||||||
if self.height() != self.screen[u'size'].height() or \
|
|
||||||
self.videoWidget.isVisible():
|
|
||||||
shrink = True
|
shrink = True
|
||||||
js = u'show_alert("%s", "%s")' % (
|
js = u'show_alert("%s", "%s")' % (
|
||||||
text.replace(u'\\', u'\\\\').replace(u'\"', u'\\\"'),
|
text.replace(u'\\', u'\\\\').replace(u'\"', u'\\\"'),
|
||||||
|
@ -229,7 +226,6 @@ class MainDisplay(QtGui.QGraphicsView):
|
||||||
else:
|
else:
|
||||||
shrinkItem.setVisible(False)
|
shrinkItem.setVisible(False)
|
||||||
self.setGeometry(self.screen[u'size'])
|
self.setGeometry(self.screen[u'size'])
|
||||||
return True
|
|
||||||
|
|
||||||
def directImage(self, name, path, background):
|
def directImage(self, name, path, background):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -85,8 +85,7 @@ class AlertsManager(QtCore.QObject):
|
||||||
return
|
return
|
||||||
text = self.alertList.pop(0)
|
text = self.alertList.pop(0)
|
||||||
alertTab = self.parent().settings_tab
|
alertTab = self.parent().settings_tab
|
||||||
if not self.parent().liveController.display.alert(text):
|
self.parent().liveController.display.alert(text)
|
||||||
self.alertList.insert(0, text)
|
|
||||||
# Check to see if we have a timer running.
|
# Check to see if we have a timer running.
|
||||||
if self.timer_id == 0:
|
if self.timer_id == 0:
|
||||||
self.timer_id = self.startTimer(int(alertTab.timeout) * 1000)
|
self.timer_id = self.startTimer(int(alertTab.timeout) * 1000)
|
||||||
|
|
Loading…
Reference in New Issue