Add service count for remotes

This commit is contained in:
Tim Bentley 2012-04-10 20:38:25 +01:00
parent 9267af01eb
commit 04b4a34c68
2 changed files with 5 additions and 0 deletions

View File

@ -105,6 +105,7 @@ class ServiceManager(QtGui.QWidget):
self.suffixes = [] self.suffixes = []
self.dropPosition = 0 self.dropPosition = 0
self.expandTabs = False self.expandTabs = False
self.serviceId = 0
# is a new service and has not been saved # is a new service and has not been saved
self._modified = False self._modified = False
self._fileName = u'' self._fileName = u''
@ -331,6 +332,8 @@ class ServiceManager(QtGui.QWidget):
Setter for property "modified". Sets whether or not the current service Setter for property "modified". Sets whether or not the current service
has been modified. has been modified.
""" """
if modified:
self.serviceId += 1
self._modified = modified self._modified = modified
serviceFile = self.shortFileName() or translate( serviceFile = self.shortFileName() or translate(
'OpenLP.ServiceManager', 'Untitled Service') 'OpenLP.ServiceManager', 'Untitled Service')
@ -439,6 +442,7 @@ class ServiceManager(QtGui.QWidget):
self.serviceManagerList.clear() self.serviceManagerList.clear()
self.serviceItems = [] self.serviceItems = []
self.setFileName(u'') self.setFileName(u'')
self.serviceId += 1
self.setModified(False) self.setModified(False)
QtCore.QSettings(). \ QtCore.QSettings(). \
setValue(u'servicemanager/last file',QtCore.QVariant(u'')) setValue(u'servicemanager/last file',QtCore.QVariant(u''))

View File

@ -396,6 +396,7 @@ class HttpConnection(object):
Poll OpenLP to determine the current slide number and item name. Poll OpenLP to determine the current slide number and item name.
""" """
result = { result = {
u'service': self.parent.plugin.serviceManager.serviceId or 0,
u'slide': self.parent.current_slide or 0, u'slide': self.parent.current_slide or 0,
u'item': self.parent.current_item._uuid \ u'item': self.parent.current_item._uuid \
if self.parent.current_item else u'', if self.parent.current_item else u'',