forked from openlp/openlp
Stop blank alerts being displayed
This commit is contained in:
parent
f1e04b6d62
commit
ba57e335c0
@ -57,8 +57,6 @@ class AlertsManager(QtCore.QObject):
|
|||||||
"""
|
"""
|
||||||
if message:
|
if message:
|
||||||
self.displayAlert(message[0])
|
self.displayAlert(message[0])
|
||||||
else:
|
|
||||||
self.displayAlert(u'')
|
|
||||||
|
|
||||||
def displayAlert(self, text=u''):
|
def displayAlert(self, text=u''):
|
||||||
"""
|
"""
|
||||||
@ -68,14 +66,15 @@ class AlertsManager(QtCore.QObject):
|
|||||||
display text
|
display text
|
||||||
"""
|
"""
|
||||||
log.debug(u'display alert called %s' % text)
|
log.debug(u'display alert called %s' % text)
|
||||||
self.alertList.append(text)
|
if text:
|
||||||
if self.timer_id != 0:
|
self.alertList.append(text)
|
||||||
Receiver.send_message(u'mainwindow_status_text',
|
if self.timer_id != 0:
|
||||||
translate('AlertsPlugin.AlertsManager',
|
Receiver.send_message(u'mainwindow_status_text',
|
||||||
'Alert message created and displayed.'))
|
translate('AlertsPlugin.AlertsManager',
|
||||||
return
|
'Alert message created and displayed.'))
|
||||||
Receiver.send_message(u'mainwindow_status_text', u'')
|
return
|
||||||
self.generateAlert()
|
Receiver.send_message(u'mainwindow_status_text', u'')
|
||||||
|
self.generateAlert()
|
||||||
|
|
||||||
def generateAlert(self):
|
def generateAlert(self):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user