Review: Needs Fixing

Looks good but the js stuff goes over my head!

One issue in alertsmanager and half done clean up.

Diff comments:

> 
> === modified file 'openlp/plugins/alerts/lib/alertsmanager.py'
> --- openlp/plugins/alerts/lib/alertsmanager.py        2019-04-13 13:00:22 
> +0000
> +++ openlp/plugins/alerts/lib/alertsmanager.py        2019-09-12 22:55:07 
> +0000
> @@ -83,8 +85,26 @@
>                                     not Settings().value('core/display on 
> monitor')):
>              return
>          text = self.alert_list.pop(0)
> -        alert_tab = self.parent().settings_tab
> -        self.live_controller.displays[0].alert(text, alert_tab.location)
> +
> +        # Get the rgb color format of the font & background hex colors from 
> settings
> +        rgb_font_color = 
> self.hex_to_rgb(QtGui.QColor(Settings().value('alerts/font color')))
> +        rgb_background_color = 
> self.hex_to_rgb(QtGui.QColor(Settings().value('alerts/background color')))
> +
> +        # Put alert settings together in dict that will be passed to Display 
> in Javascript
> +        alert_settings = {
> +            'backgroundColor': rgb_background_color,
> +            'location': Settings().value('alerts/location'),
> +            'fontFace': Settings().value('alerts/font face'),
> +            'fontSize': Settings().value('alerts/font size'),
> +            'fontColor': rgb_font_color,
> +            'timeout': Settings().value('alerts/timeout'),
> +            'repeat': Settings().value('alerts/repeat'),
> +            'scroll': Settings().value('alerts/scroll')
> +        }
> +        self.live_controller.displays[0].alert(text, 
> json.dumps(alert_settings))
> +        # Check to see if we have a timer running.
> +        # if self.timer_id == 0:
> +        #    self.timer_id = self.startTimer(int(alert_tab.timeout) * 1000)

Do we need this?  What is controlling the timing as we have a confusion here.
If the display is managing the timing then remove all the timer code please

>  
>      def timerEvent(self, event):
>          """


-- 
https://code.launchpad.net/~raoul-snyman/openlp/animated-alerts/+merge/372736
Your team OpenLP Core is subscribed to branch lp:openlp.

_______________________________________________
Mailing list: https://launchpad.net/~openlp-core
Post to     : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp

Reply via email to