openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #14700
[Merge] lp:~trb143/openlp/bug-943843 into lp:openlp
Tim Bentley has proposed merging lp:~trb143/openlp/bug-943843 into lp:openlp.
Requested reviews:
Jonathan Corwin (j-corwin)
Related bugs:
Bug #923498 in OpenLP: "Stage view clock height"
https://bugs.launchpad.net/openlp/+bug/923498
Bug #943943 in OpenLP: "Changing IP Adress in Remote Setup only valid after restart"
https://bugs.launchpad.net/openlp/+bug/943943
For more details, see:
https://code.launchpad.net/~trb143/openlp/bug-943843/+merge/98089
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.
--
https://code.launchpad.net/~trb143/openlp/bug-943843/+merge/98089
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/lib/eventreceiver.py'
--- openlp/core/lib/eventreceiver.py 2012-01-28 08:07:54 +0000
+++ openlp/core/lib/eventreceiver.py 2012-03-18 08:20:24 +0000
@@ -217,6 +217,9 @@
Ask the plugin to process an individual service item after it has been
loaded.
+ ``{plugin}_config_updated``
+ The config has changed so tell the plugin about it.
+
``alerts_text``
Displays an alert message.
=== modified file 'openlp/core/lib/plugin.py'
--- openlp/core/lib/plugin.py 2011-12-27 10:33:55 +0000
+++ openlp/core/lib/plugin.py 2012-03-18 08:20:24 +0000
@@ -173,6 +173,9 @@
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'%s_add_service_item' % self.name),
self.processAddServiceEvent)
+ QtCore.QObject.connect(Receiver.get_receiver(),
+ QtCore.SIGNAL(u'%s_config_updated' % self.name),
+ self.configUpdated)
def checkPreConditions(self):
"""
@@ -395,3 +398,9 @@
Add html code to htmlbuilder.
"""
return u''
+
+ def configUpdated(self):
+ """
+ The plugin's config has changed
+ """
+ pass
=== modified file 'openlp/plugins/remotes/html/index.html'
--- openlp/plugins/remotes/html/index.html 2012-03-03 05:13:48 +0000
+++ openlp/plugins/remotes/html/index.html 2012-03-18 08:20:24 +0000
@@ -4,12 +4,12 @@
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
-# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Jeffrey Smith, Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode #
-# Woldsund #
+# Copyright (c) 2008-2012 Raoul Snyman #
+# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
+# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it #
# under the terms of the GNU General Public License as published by the Free #
=== modified file 'openlp/plugins/remotes/html/openlp.css'
--- openlp/plugins/remotes/html/openlp.css 2011-05-24 20:47:05 +0000
+++ openlp/plugins/remotes/html/openlp.css 2012-03-18 08:20:24 +0000
@@ -1,12 +1,12 @@
/*****************************************************************************
* OpenLP - Open Source Lyrics Projection *
* ------------------------------------------------------------------------- *
- * Copyright (c) 2008-2010 Raoul Snyman *
- * Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael *
- * Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, *
- * Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, *
- * Jeffrey Smith, Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode *
- * Woldsund *
+ * Copyright (c) 2008-2012 Raoul Snyman *
+ * Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan *
+ * Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, *
+ * Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias *
+ * Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, *
+ * Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund *
* ------------------------------------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
=== modified file 'openlp/plugins/remotes/html/openlp.js'
--- openlp/plugins/remotes/html/openlp.js 2011-12-23 16:03:37 +0000
+++ openlp/plugins/remotes/html/openlp.js 2012-03-18 08:20:24 +0000
@@ -1,12 +1,12 @@
/*****************************************************************************
* OpenLP - Open Source Lyrics Projection *
* ------------------------------------------------------------------------- *
- * Copyright (c) 2008-2010 Raoul Snyman *
- * Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael *
- * Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, *
- * Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, *
- * Jeffrey Smith, Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode *
- * Woldsund *
+ * Copyright (c) 2008-2012 Raoul Snyman *
+ * Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan *
+ * Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, *
+ * Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias *
+ * Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, *
+ * Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund *
* ------------------------------------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
=== modified file 'openlp/plugins/remotes/html/stage.css'
--- openlp/plugins/remotes/html/stage.css 2011-05-24 20:47:05 +0000
+++ openlp/plugins/remotes/html/stage.css 2012-03-18 08:20:24 +0000
@@ -1,12 +1,12 @@
/*****************************************************************************
* OpenLP - Open Source Lyrics Projection *
* ------------------------------------------------------------------------- *
- * Copyright (c) 2008-2010 Raoul Snyman *
- * Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael *
- * Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin K�r, *
- * Andreas Preikschat, Mattias P�ru, Christian Richter, Philip Ridout, *
- * Jeffrey Smith, Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode *
- * Woldsund *
+ * Copyright (c) 2008-2012 Raoul Snyman *
+ * Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan *
+ * Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, *
+ * Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias *
+ * Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, *
+ * Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund *
* ------------------------------------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
@@ -46,7 +46,7 @@
}
#clock {
- font-size: 40pt;
+ font-size: 30pt;
color: yellow;
text-align: right;
}
=== modified file 'openlp/plugins/remotes/html/stage.html'
--- openlp/plugins/remotes/html/stage.html 2011-05-31 11:25:35 +0000
+++ openlp/plugins/remotes/html/stage.html 2012-03-18 08:20:24 +0000
@@ -4,12 +4,12 @@
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
-# Copyright (c) 2008-2011 Raoul Snyman #
-# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
-# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
-# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
-# Jeffrey Smith, Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode #
-# Woldsund #
+# Copyright (c) 2008-2012 Raoul Snyman #
+# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
+# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
+# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
+# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
+# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
# --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it #
# under the terms of the GNU General Public License as published by the Free #
=== modified file 'openlp/plugins/remotes/html/stage.js'
--- openlp/plugins/remotes/html/stage.js 2011-11-27 19:39:39 +0000
+++ openlp/plugins/remotes/html/stage.js 2012-03-18 08:20:24 +0000
@@ -1,12 +1,12 @@
/*****************************************************************************
* OpenLP - Open Source Lyrics Projection *
* ------------------------------------------------------------------------- *
- * Copyright (c) 2008-2010 Raoul Snyman *
- * Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael *
- * Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin K�r, *
- * Andreas Preikschat, Mattias P�ru, Christian Richter, Philip Ridout, *
- * Jeffrey Smith, Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode *
- * Woldsund *
+ * Copyright (c) 2008-2012 Raoul Snyman *
+ * Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan *
+ * Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, *
+ * Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias *
+ * Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, *
+ * Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund *
* ------------------------------------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
=== modified file 'openlp/plugins/remotes/lib/httpserver.py'
--- openlp/plugins/remotes/lib/httpserver.py 2012-03-15 06:15:21 +0000
+++ openlp/plugins/remotes/lib/httpserver.py 2012-03-18 08:20:24 +0000
@@ -427,7 +427,9 @@
Send an alert.
"""
text = json.loads(self.url_params[u'data'][0])[u'request'][u'text']
- Receiver.send_message(u'alerts_text', [text])
+ plugin = self.parent.plugin.pluginManager.get_plugin_by_name("alerts")
+ if plugin.status == PluginStatus.Active:
+ Receiver.send_message(u'alerts_text', [text])
return HttpResponse(json.dumps({u'results': {u'success': True}}),
{u'Content-Type': u'application/json'})
=== modified file 'openlp/plugins/remotes/lib/remotetab.py'
--- openlp/plugins/remotes/lib/remotetab.py 2012-01-30 17:44:37 +0000
+++ openlp/plugins/remotes/lib/remotetab.py 2012-03-18 08:20:24 +0000
@@ -27,7 +27,7 @@
from PyQt4 import QtCore, QtGui, QtNetwork
-from openlp.core.lib import SettingsTab, translate
+from openlp.core.lib import SettingsTab, translate, Receiver
ZERO_URL = u'0.0.0.0'
@@ -160,12 +160,20 @@
self.setUrls()
def save(self):
+ changed = False
+ if QtCore.QSettings().value(self.settingsSection + u'/ip address',
+ QtCore.QVariant(ZERO_URL).toString() != self.addressEdit.text() or
+ QtCore.QSettings().value(self.settingsSection + u'/port',
+ QtCore.QVariant(4316).toInt()[0]) != self.portSpinBox.value()):
+ changed = True
QtCore.QSettings().setValue(self.settingsSection + u'/port',
QtCore.QVariant(self.portSpinBox.value()))
QtCore.QSettings().setValue(self.settingsSection + u'/ip address',
QtCore.QVariant(self.addressEdit.text()))
QtCore.QSettings().setValue(self.settingsSection + u'/twelve hour',
QtCore.QVariant(self.twelveHour))
+ if changed:
+ Receiver.send_message(u'remotes_config_updated')
def onTwelveHourCheckBoxChanged(self, check_state):
self.twelveHour = False
=== modified file 'openlp/plugins/remotes/remoteplugin.py'
--- openlp/plugins/remotes/remoteplugin.py 2011-12-27 10:33:55 +0000
+++ openlp/plugins/remotes/remoteplugin.py 2012-03-18 08:20:24 +0000
@@ -86,3 +86,11 @@
self.textStrings[StringContent.VisibleName] = {
u'title': translate('RemotePlugin', 'Remote', 'container title')
}
+
+ def configUpdated(self):
+ """
+ Called when Config is changed to restart the server on new address or
+ port
+ """
+ self.finalise()
+ self.initialise()
Follow ups