diff --git a/openlp/core/lib/eventreceiver.py b/openlp/core/lib/eventreceiver.py index f3b43d2b7..e72314652 100644 --- a/openlp/core/lib/eventreceiver.py +++ b/openlp/core/lib/eventreceiver.py @@ -104,6 +104,9 @@ class EventReceiver(QtCore.QObject): ``remote_edit_clear`` Informs all components that remote edit has been aborted. + ``presentation types`` + Informs all components of the presentation types supported. + """ global log log = logging.getLogger(u'EventReceiver') @@ -161,4 +164,4 @@ class Receiver(): """ Get the global ``eventreceiver`` instance. """ - return Receiver.eventreceiver \ No newline at end of file + return Receiver.eventreceiver diff --git a/openlp/core/ui/servicemanager.py b/openlp/core/ui/servicemanager.py index 44170e616..6bb09a92e 100644 --- a/openlp/core/ui/servicemanager.py +++ b/openlp/core/ui/servicemanager.py @@ -225,12 +225,17 @@ class ServiceManager(QtGui.QWidget): QtCore.SIGNAL(u'update_themes'), self.updateThemeList) QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'remote_edit_clear'), self.onRemoteEditClear) + QtCore.QObject.connect(Receiver.get_receiver(), + QtCore.SIGNAL(u'presentation types'), self.onPresentationTypes) # Last little bits of setting up self.config = PluginConfig(u'ServiceManager') self.servicePath = self.config.get_data_path() self.service_theme = unicode( self.config.get_config(u'service theme', u'')) + def onPresentationTypes(self, presentation_types): + self.presentation_types = presentation_types + def onMoveSelectionUp(self): """ Moves the selection up the window @@ -617,7 +622,7 @@ class ServiceManager(QtGui.QWidget): else: pos = parentitem.data(0, QtCore.Qt.UserRole).toInt()[0] count = item.data(0, QtCore.Qt.UserRole).toInt()[0] - #adjuest for zero based arrays + #adjust for zero based arrays pos = pos - 1 return pos, count diff --git a/openlp/plugins/presentations/presentationplugin.py b/openlp/plugins/presentations/presentationplugin.py index a380e9bb0..502557508 100644 --- a/openlp/plugins/presentations/presentationplugin.py +++ b/openlp/plugins/presentations/presentationplugin.py @@ -26,7 +26,7 @@ import os import logging -from openlp.core.lib import Plugin, build_icon +from openlp.core.lib import Plugin, build_icon, Receiver from openlp.plugins.presentations.lib import * class PresentationPlugin(Plugin): @@ -51,6 +51,12 @@ class PresentationPlugin(Plugin): log.info(u'Presentations Initialising') Plugin.initialise(self) self.insert_toolbox_item() + presentation_types = [] + for controller in self.controllers: + if self.controllers[controller].enabled: + presentation_types.append({u'%s' % controller : self.controllers[controller].supports}) + Receiver.send_message( + u'presentation types', presentation_types) def finalise(self): log.info(u'Plugin Finalise') @@ -106,4 +112,4 @@ class PresentationPlugin(Plugin): 'the ability to show presentations using a number of different ' 'programs. The choice of available presentation programs is ' 'available to the user in a drop down box.') - return about_text \ No newline at end of file + return about_text