diff --git a/openlp/core/ui/alertform.py b/openlp/core/ui/alertform.py index fd4380700..96dc88dc5 100644 --- a/openlp/core/ui/alertform.py +++ b/openlp/core/ui/alertform.py @@ -99,4 +99,4 @@ class AlertForm(QtGui.QDialog): self.CancelButton.setText(self.trUtf8('Cancel')) def onDisplayClicked(self): - self.parent.mainDisplay.displayAlert(self.AlertEntryEditItem.text()) + self.parent.mainDisplay.displayAlert(unicode(self.AlertEntryEditItem.text())) diff --git a/openlp/core/ui/maindisplay.py b/openlp/core/ui/maindisplay.py index 7a621a8ae..f63dd373d 100644 --- a/openlp/core/ui/maindisplay.py +++ b/openlp/core/ui/maindisplay.py @@ -214,6 +214,7 @@ class MainDisplay(DisplayWidget): self.setVisible(True) self.showFullScreen() self.frame = frame + print type(self.frame) def blankDisplay(self, blanked=True): if blanked: @@ -234,8 +235,12 @@ class MainDisplay(DisplayWidget): ``text`` display text """ + log.debug(u'display alert called %s' % text) alertTab = self.parent.settingsForm.AlertsTab - alertframe = QtGui.QPixmap.fromImage(self.frame) + if isinstance(self.frame, QtGui.QImage): + alertframe = QtGui.QPixmap.fromImage(self.frame) + else: + alertframe = QtGui.QPixmap.fromImage(self.frame[u'main']) painter = QtGui.QPainter(alertframe) top = alertframe.rect().height() * 0.9 painter.fillRect( @@ -261,7 +266,10 @@ class MainDisplay(DisplayWidget): def timerEvent(self, event): if event.timerId() == self.timer_id: - self.display.setPixmap(QtGui.QPixmap.fromImage(self.frame)) + if isinstance(self.frame, QtGui.QImage): + self.display.setPixmap(QtGui.QPixmap.fromImage(self.frame)) + else: + self.display.setPixmap(QtGui.QPixmap.fromImage(self.frame[u'main'])) self.killTimer(self.timer_id) self.timer_id = 0