Merge lp:~trb143/openlp/bug-943843 into lp:openlp

Proposed by Tim Bentley
Status: Merged
Merged at revision: 1909
Proposed branch: lp:~trb143/openlp/bug-943843
Merge into: lp:openlp
Diff against target: 249 lines (+69/-39)
11 files modified
openlp/core/lib/eventreceiver.py (+3/-0)
openlp/core/lib/plugin.py (+9/-0)
openlp/plugins/remotes/html/index.html (+6/-6)
openlp/plugins/remotes/html/openlp.css (+6/-6)
openlp/plugins/remotes/html/openlp.js (+6/-6)
openlp/plugins/remotes/html/stage.css (+7/-7)
openlp/plugins/remotes/html/stage.html (+6/-6)
openlp/plugins/remotes/html/stage.js (+6/-6)
openlp/plugins/remotes/lib/httpserver.py (+3/-1)
openlp/plugins/remotes/lib/remotetab.py (+9/-1)
openlp/plugins/remotes/remoteplugin.py (+8/-0)
To merge this branch: bzr merge lp:~trb143/openlp/bug-943843
Reviewer Review Type Date Requested Status
Jonathan Corwin (community) Approve
Review via email: mp+98089@code.launchpad.net

This proposal supersedes a proposal from 2012-03-17.

Description of the change

A number of fixes .
 = Correct copyright headers
 = Allow remotes to change IP and Port without restarting
 = Make the clock smaller in stage view.
 = Stop Alerts posting if the plugin is disabled.

To post a comment you must log in.
Revision history for this message
Jonathan Corwin (j-corwin) wrote : Posted in a previous version of this proposal

In places you've removed Armin Köhler and Mattias Põldaru (line 172/173) and replaced with Armin Köhler and Mattias Põldaru. Could the ö and õ be used throughout?

242: Why another blank line?

review: Approve
Revision history for this message
Jonathan Corwin (j-corwin) wrote : Posted in a previous version of this proposal

Oops, meant Needs Fixing

review: Needs Fixing
Revision history for this message
Tim Bentley (trb143) wrote : Posted in a previous version of this proposal

Well that is interesting as they are correct in my editors so cannot fix.

Revision history for this message
Jonathan Corwin (j-corwin) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openlp/core/lib/eventreceiver.py'
2--- openlp/core/lib/eventreceiver.py 2012-01-28 08:07:54 +0000
3+++ openlp/core/lib/eventreceiver.py 2012-03-18 08:20:24 +0000
4@@ -217,6 +217,9 @@
5 Ask the plugin to process an individual service item after it has been
6 loaded.
7
8+ ``{plugin}_config_updated``
9+ The config has changed so tell the plugin about it.
10+
11 ``alerts_text``
12 Displays an alert message.
13
14
15=== modified file 'openlp/core/lib/plugin.py'
16--- openlp/core/lib/plugin.py 2011-12-27 10:33:55 +0000
17+++ openlp/core/lib/plugin.py 2012-03-18 08:20:24 +0000
18@@ -173,6 +173,9 @@
19 QtCore.QObject.connect(Receiver.get_receiver(),
20 QtCore.SIGNAL(u'%s_add_service_item' % self.name),
21 self.processAddServiceEvent)
22+ QtCore.QObject.connect(Receiver.get_receiver(),
23+ QtCore.SIGNAL(u'%s_config_updated' % self.name),
24+ self.configUpdated)
25
26 def checkPreConditions(self):
27 """
28@@ -395,3 +398,9 @@
29 Add html code to htmlbuilder.
30 """
31 return u''
32+
33+ def configUpdated(self):
34+ """
35+ The plugin's config has changed
36+ """
37+ pass
38
39=== modified file 'openlp/plugins/remotes/html/index.html'
40--- openlp/plugins/remotes/html/index.html 2012-03-03 05:13:48 +0000
41+++ openlp/plugins/remotes/html/index.html 2012-03-18 08:20:24 +0000
42@@ -4,12 +4,12 @@
43 ###############################################################################
44 # OpenLP - Open Source Lyrics Projection #
45 # --------------------------------------------------------------------------- #
46-# Copyright (c) 2008-2011 Raoul Snyman #
47-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
48-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
49-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
50-# Jeffrey Smith, Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode #
51-# Woldsund #
52+# Copyright (c) 2008-2012 Raoul Snyman #
53+# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
54+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
55+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
56+# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
57+# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
58 # --------------------------------------------------------------------------- #
59 # This program is free software; you can redistribute it and/or modify it #
60 # under the terms of the GNU General Public License as published by the Free #
61
62=== modified file 'openlp/plugins/remotes/html/openlp.css'
63--- openlp/plugins/remotes/html/openlp.css 2011-05-24 20:47:05 +0000
64+++ openlp/plugins/remotes/html/openlp.css 2012-03-18 08:20:24 +0000
65@@ -1,12 +1,12 @@
66 /*****************************************************************************
67 * OpenLP - Open Source Lyrics Projection *
68 * ------------------------------------------------------------------------- *
69- * Copyright (c) 2008-2010 Raoul Snyman *
70- * Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael *
71- * Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, *
72- * Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, *
73- * Jeffrey Smith, Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode *
74- * Woldsund *
75+ * Copyright (c) 2008-2012 Raoul Snyman *
76+ * Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan *
77+ * Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, *
78+ * Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias *
79+ * Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, *
80+ * Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund *
81 * ------------------------------------------------------------------------- *
82 * This program is free software; you can redistribute it and/or modify it *
83 * under the terms of the GNU General Public License as published by the *
84
85=== modified file 'openlp/plugins/remotes/html/openlp.js'
86--- openlp/plugins/remotes/html/openlp.js 2011-12-23 16:03:37 +0000
87+++ openlp/plugins/remotes/html/openlp.js 2012-03-18 08:20:24 +0000
88@@ -1,12 +1,12 @@
89 /*****************************************************************************
90 * OpenLP - Open Source Lyrics Projection *
91 * ------------------------------------------------------------------------- *
92- * Copyright (c) 2008-2010 Raoul Snyman *
93- * Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael *
94- * Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, *
95- * Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, *
96- * Jeffrey Smith, Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode *
97- * Woldsund *
98+ * Copyright (c) 2008-2012 Raoul Snyman *
99+ * Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan *
100+ * Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, *
101+ * Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias *
102+ * Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, *
103+ * Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund *
104 * ------------------------------------------------------------------------- *
105 * This program is free software; you can redistribute it and/or modify it *
106 * under the terms of the GNU General Public License as published by the *
107
108=== modified file 'openlp/plugins/remotes/html/stage.css'
109--- openlp/plugins/remotes/html/stage.css 2011-05-24 20:47:05 +0000
110+++ openlp/plugins/remotes/html/stage.css 2012-03-18 08:20:24 +0000
111@@ -1,12 +1,12 @@
112 /*****************************************************************************
113 * OpenLP - Open Source Lyrics Projection *
114 * ------------------------------------------------------------------------- *
115- * Copyright (c) 2008-2010 Raoul Snyman *
116- * Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael *
117- * Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, *
118- * Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, *
119- * Jeffrey Smith, Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode *
120- * Woldsund *
121+ * Copyright (c) 2008-2012 Raoul Snyman *
122+ * Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan *
123+ * Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, *
124+ * Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias *
125+ * Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, *
126+ * Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund *
127 * ------------------------------------------------------------------------- *
128 * This program is free software; you can redistribute it and/or modify it *
129 * under the terms of the GNU General Public License as published by the *
130@@ -46,7 +46,7 @@
131 }
132
133 #clock {
134- font-size: 40pt;
135+ font-size: 30pt;
136 color: yellow;
137 text-align: right;
138 }
139
140=== modified file 'openlp/plugins/remotes/html/stage.html'
141--- openlp/plugins/remotes/html/stage.html 2011-05-31 11:25:35 +0000
142+++ openlp/plugins/remotes/html/stage.html 2012-03-18 08:20:24 +0000
143@@ -4,12 +4,12 @@
144 ###############################################################################
145 # OpenLP - Open Source Lyrics Projection #
146 # --------------------------------------------------------------------------- #
147-# Copyright (c) 2008-2011 Raoul Snyman #
148-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
149-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
150-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
151-# Jeffrey Smith, Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode #
152-# Woldsund #
153+# Copyright (c) 2008-2012 Raoul Snyman #
154+# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
155+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
156+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
157+# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
158+# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
159 # --------------------------------------------------------------------------- #
160 # This program is free software; you can redistribute it and/or modify it #
161 # under the terms of the GNU General Public License as published by the Free #
162
163=== modified file 'openlp/plugins/remotes/html/stage.js'
164--- openlp/plugins/remotes/html/stage.js 2011-11-27 19:39:39 +0000
165+++ openlp/plugins/remotes/html/stage.js 2012-03-18 08:20:24 +0000
166@@ -1,12 +1,12 @@
167 /*****************************************************************************
168 * OpenLP - Open Source Lyrics Projection *
169 * ------------------------------------------------------------------------- *
170- * Copyright (c) 2008-2010 Raoul Snyman *
171- * Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael *
172- * Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, *
173- * Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, *
174- * Jeffrey Smith, Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode *
175- * Woldsund *
176+ * Copyright (c) 2008-2012 Raoul Snyman *
177+ * Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan *
178+ * Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, *
179+ * Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias *
180+ * Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, *
181+ * Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund *
182 * ------------------------------------------------------------------------- *
183 * This program is free software; you can redistribute it and/or modify it *
184 * under the terms of the GNU General Public License as published by the *
185
186=== modified file 'openlp/plugins/remotes/lib/httpserver.py'
187--- openlp/plugins/remotes/lib/httpserver.py 2012-03-15 06:15:21 +0000
188+++ openlp/plugins/remotes/lib/httpserver.py 2012-03-18 08:20:24 +0000
189@@ -427,7 +427,9 @@
190 Send an alert.
191 """
192 text = json.loads(self.url_params[u'data'][0])[u'request'][u'text']
193- Receiver.send_message(u'alerts_text', [text])
194+ plugin = self.parent.plugin.pluginManager.get_plugin_by_name("alerts")
195+ if plugin.status == PluginStatus.Active:
196+ Receiver.send_message(u'alerts_text', [text])
197 return HttpResponse(json.dumps({u'results': {u'success': True}}),
198 {u'Content-Type': u'application/json'})
199
200
201=== modified file 'openlp/plugins/remotes/lib/remotetab.py'
202--- openlp/plugins/remotes/lib/remotetab.py 2012-01-30 17:44:37 +0000
203+++ openlp/plugins/remotes/lib/remotetab.py 2012-03-18 08:20:24 +0000
204@@ -27,7 +27,7 @@
205
206 from PyQt4 import QtCore, QtGui, QtNetwork
207
208-from openlp.core.lib import SettingsTab, translate
209+from openlp.core.lib import SettingsTab, translate, Receiver
210
211 ZERO_URL = u'0.0.0.0'
212
213@@ -160,12 +160,20 @@
214 self.setUrls()
215
216 def save(self):
217+ changed = False
218+ if QtCore.QSettings().value(self.settingsSection + u'/ip address',
219+ QtCore.QVariant(ZERO_URL).toString() != self.addressEdit.text() or
220+ QtCore.QSettings().value(self.settingsSection + u'/port',
221+ QtCore.QVariant(4316).toInt()[0]) != self.portSpinBox.value()):
222+ changed = True
223 QtCore.QSettings().setValue(self.settingsSection + u'/port',
224 QtCore.QVariant(self.portSpinBox.value()))
225 QtCore.QSettings().setValue(self.settingsSection + u'/ip address',
226 QtCore.QVariant(self.addressEdit.text()))
227 QtCore.QSettings().setValue(self.settingsSection + u'/twelve hour',
228 QtCore.QVariant(self.twelveHour))
229+ if changed:
230+ Receiver.send_message(u'remotes_config_updated')
231
232 def onTwelveHourCheckBoxChanged(self, check_state):
233 self.twelveHour = False
234
235=== modified file 'openlp/plugins/remotes/remoteplugin.py'
236--- openlp/plugins/remotes/remoteplugin.py 2011-12-27 10:33:55 +0000
237+++ openlp/plugins/remotes/remoteplugin.py 2012-03-18 08:20:24 +0000
238@@ -86,3 +86,11 @@
239 self.textStrings[StringContent.VisibleName] = {
240 u'title': translate('RemotePlugin', 'Remote', 'container title')
241 }
242+
243+ def configUpdated(self):
244+ """
245+ Called when Config is changed to restart the server on new address or
246+ port
247+ """
248+ self.finalise()
249+ self.initialise()