forked from openlp/openlp
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. bzr-revno: 1909
This commit is contained in:
commit
391e1bc205
@ -217,6 +217,9 @@ class EventReceiver(QtCore.QObject):
|
|||||||
Ask the plugin to process an individual service item after it has been
|
Ask the plugin to process an individual service item after it has been
|
||||||
loaded.
|
loaded.
|
||||||
|
|
||||||
|
``{plugin}_config_updated``
|
||||||
|
The config has changed so tell the plugin about it.
|
||||||
|
|
||||||
``alerts_text``
|
``alerts_text``
|
||||||
Displays an alert message.
|
Displays an alert message.
|
||||||
|
|
||||||
|
@ -173,6 +173,9 @@ class Plugin(QtCore.QObject):
|
|||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'%s_add_service_item' % self.name),
|
QtCore.SIGNAL(u'%s_add_service_item' % self.name),
|
||||||
self.processAddServiceEvent)
|
self.processAddServiceEvent)
|
||||||
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
|
QtCore.SIGNAL(u'%s_config_updated' % self.name),
|
||||||
|
self.configUpdated)
|
||||||
|
|
||||||
def checkPreConditions(self):
|
def checkPreConditions(self):
|
||||||
"""
|
"""
|
||||||
@ -395,3 +398,9 @@ class Plugin(QtCore.QObject):
|
|||||||
Add html code to htmlbuilder.
|
Add html code to htmlbuilder.
|
||||||
"""
|
"""
|
||||||
return u''
|
return u''
|
||||||
|
|
||||||
|
def configUpdated(self):
|
||||||
|
"""
|
||||||
|
The plugin's config has changed
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
@ -4,12 +4,12 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
# Copyright (c) 2008-2012 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
|
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||||
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
|
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||||
# Jeffrey Smith, Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode #
|
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||||
# Woldsund #
|
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# 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 #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* OpenLP - Open Source Lyrics Projection *
|
* OpenLP - Open Source Lyrics Projection *
|
||||||
* ------------------------------------------------------------------------- *
|
* ------------------------------------------------------------------------- *
|
||||||
* Copyright (c) 2008-2010 Raoul Snyman *
|
* Copyright (c) 2008-2012 Raoul Snyman *
|
||||||
* Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael *
|
* Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan *
|
||||||
* Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, *
|
* Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, *
|
||||||
* Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, *
|
* Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias *
|
||||||
* Jeffrey Smith, Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode *
|
* Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, *
|
||||||
* Woldsund *
|
* Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund *
|
||||||
* ------------------------------------------------------------------------- *
|
* ------------------------------------------------------------------------- *
|
||||||
* This program is free software; you can redistribute it and/or modify it *
|
* 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 *
|
* under the terms of the GNU General Public License as published by the *
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* OpenLP - Open Source Lyrics Projection *
|
* OpenLP - Open Source Lyrics Projection *
|
||||||
* ------------------------------------------------------------------------- *
|
* ------------------------------------------------------------------------- *
|
||||||
* Copyright (c) 2008-2010 Raoul Snyman *
|
* Copyright (c) 2008-2012 Raoul Snyman *
|
||||||
* Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael *
|
* Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan *
|
||||||
* Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, *
|
* Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, *
|
||||||
* Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, *
|
* Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias *
|
||||||
* Jeffrey Smith, Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode *
|
* Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, *
|
||||||
* Woldsund *
|
* Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund *
|
||||||
* ------------------------------------------------------------------------- *
|
* ------------------------------------------------------------------------- *
|
||||||
* This program is free software; you can redistribute it and/or modify it *
|
* 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 *
|
* under the terms of the GNU General Public License as published by the *
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* OpenLP - Open Source Lyrics Projection *
|
* OpenLP - Open Source Lyrics Projection *
|
||||||
* ------------------------------------------------------------------------- *
|
* ------------------------------------------------------------------------- *
|
||||||
* Copyright (c) 2008-2010 Raoul Snyman *
|
* Copyright (c) 2008-2012 Raoul Snyman *
|
||||||
* Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael *
|
* Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan *
|
||||||
* Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, *
|
* Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, *
|
||||||
* Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, *
|
* Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias *
|
||||||
* Jeffrey Smith, Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode *
|
* Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, *
|
||||||
* Woldsund *
|
* Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund *
|
||||||
* ------------------------------------------------------------------------- *
|
* ------------------------------------------------------------------------- *
|
||||||
* This program is free software; you can redistribute it and/or modify it *
|
* 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 *
|
* under the terms of the GNU General Public License as published by the *
|
||||||
@ -46,7 +46,7 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#clock {
|
#clock {
|
||||||
font-size: 40pt;
|
font-size: 30pt;
|
||||||
color: yellow;
|
color: yellow;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
@ -4,12 +4,12 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
# OpenLP - Open Source Lyrics Projection #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
# Copyright (c) 2008-2012 Raoul Snyman #
|
||||||
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
|
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
|
||||||
# Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, #
|
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
||||||
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
|
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
||||||
# Jeffrey Smith, Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode #
|
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||||
# Woldsund #
|
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
# 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 #
|
# under the terms of the GNU General Public License as published by the Free #
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* OpenLP - Open Source Lyrics Projection *
|
* OpenLP - Open Source Lyrics Projection *
|
||||||
* ------------------------------------------------------------------------- *
|
* ------------------------------------------------------------------------- *
|
||||||
* Copyright (c) 2008-2010 Raoul Snyman *
|
* Copyright (c) 2008-2012 Raoul Snyman *
|
||||||
* Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael *
|
* Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan *
|
||||||
* Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, Armin Köhler, *
|
* Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, *
|
||||||
* Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, *
|
* Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias *
|
||||||
* Jeffrey Smith, Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode *
|
* Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, *
|
||||||
* Woldsund *
|
* Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund *
|
||||||
* ------------------------------------------------------------------------- *
|
* ------------------------------------------------------------------------- *
|
||||||
* This program is free software; you can redistribute it and/or modify it *
|
* 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 *
|
* under the terms of the GNU General Public License as published by the *
|
||||||
|
@ -427,7 +427,9 @@ class HttpConnection(object):
|
|||||||
Send an alert.
|
Send an alert.
|
||||||
"""
|
"""
|
||||||
text = json.loads(self.url_params[u'data'][0])[u'request'][u'text']
|
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}}),
|
return HttpResponse(json.dumps({u'results': {u'success': True}}),
|
||||||
{u'Content-Type': u'application/json'})
|
{u'Content-Type': u'application/json'})
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
from PyQt4 import QtCore, QtGui, QtNetwork
|
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'
|
ZERO_URL = u'0.0.0.0'
|
||||||
|
|
||||||
@ -160,12 +160,20 @@ class RemoteTab(SettingsTab):
|
|||||||
self.setUrls()
|
self.setUrls()
|
||||||
|
|
||||||
def save(self):
|
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.QSettings().setValue(self.settingsSection + u'/port',
|
||||||
QtCore.QVariant(self.portSpinBox.value()))
|
QtCore.QVariant(self.portSpinBox.value()))
|
||||||
QtCore.QSettings().setValue(self.settingsSection + u'/ip address',
|
QtCore.QSettings().setValue(self.settingsSection + u'/ip address',
|
||||||
QtCore.QVariant(self.addressEdit.text()))
|
QtCore.QVariant(self.addressEdit.text()))
|
||||||
QtCore.QSettings().setValue(self.settingsSection + u'/twelve hour',
|
QtCore.QSettings().setValue(self.settingsSection + u'/twelve hour',
|
||||||
QtCore.QVariant(self.twelveHour))
|
QtCore.QVariant(self.twelveHour))
|
||||||
|
if changed:
|
||||||
|
Receiver.send_message(u'remotes_config_updated')
|
||||||
|
|
||||||
def onTwelveHourCheckBoxChanged(self, check_state):
|
def onTwelveHourCheckBoxChanged(self, check_state):
|
||||||
self.twelveHour = False
|
self.twelveHour = False
|
||||||
|
@ -86,3 +86,11 @@ class RemotesPlugin(Plugin):
|
|||||||
self.textStrings[StringContent.VisibleName] = {
|
self.textStrings[StringContent.VisibleName] = {
|
||||||
u'title': translate('RemotePlugin', 'Remote', 'container title')
|
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()
|
||||||
|
Loading…
Reference in New Issue
Block a user