Merge branch 'fix-alerts' into 'master'

Fix alerts

Closes #1669

See merge request openlp/openlp!678
This commit is contained in:
Tomas Groth 2023-10-21 18:43:31 +00:00
commit d0aebd6429
2 changed files with 3 additions and 2 deletions

View File

@ -547,7 +547,7 @@ class DisplayWindow(QtWidgets.QWidget, RegistryProperties, LogMixin):
""" """
Set an alert Set an alert
""" """
self.run_javascript('Display.alert("{text}", {settings});'.format(text=text, settings=settings)) self._run_javascript('Display.alert("{text}", {settings});'.format(text=text, settings=settings))
@QtCore.pyqtSlot(result='QPixmap') @QtCore.pyqtSlot(result='QPixmap')
def _grab_screenshot_safe_signal(self): def _grab_screenshot_safe_signal(self):

View File

@ -22,6 +22,7 @@
The :mod:`~openlp.plugins.alerts.lib.alertsmanager` module contains the part of the plugin which manages storing and The :mod:`~openlp.plugins.alerts.lib.alertsmanager` module contains the part of the plugin which manages storing and
displaying of alerts. displaying of alerts.
""" """
import json
from PyQt5 import QtCore, QtGui from PyQt5 import QtCore, QtGui
@ -76,7 +77,7 @@ class AlertsManager(QtCore.QObject, RegistryBase, LogMixin, RegistryProperties):
'repeat': self.settings.value('alerts/repeat'), 'repeat': self.settings.value('alerts/repeat'),
'scroll': self.settings.value('alerts/scroll') 'scroll': self.settings.value('alerts/scroll')
} }
self.live_controller.display.alert(text, alert_settings) self.live_controller.display.alert(text, json.dumps(alert_settings))
def _hex_to_rgb(self, rgb_values): def _hex_to_rgb(self, rgb_values):
""" """