This commit is contained in:
Tim Bentley 2011-10-11 19:10:53 +01:00
parent 3cfdd3de45
commit 9176911810
2 changed files with 7 additions and 1 deletions

View File

@ -42,6 +42,10 @@ class PluginManager(object):
"""
log.info(u'Plugin manager loaded')
@staticmethod
def get_instance():
return PluginManager.instance
def __init__(self, plugin_dir):
"""
The constructor for the plugin manager. Passes the controllers on to
@ -51,6 +55,7 @@ class PluginManager(object):
The directory to search for plugins.
"""
log.info(u'Plugin manager Initialising')
PluginManager.instance = self
if not plugin_dir in sys.path:
log.debug(u'Inserting %s into sys.path', plugin_dir)
sys.path.insert(0, plugin_dir)

View File

@ -35,7 +35,7 @@ from PyQt4 import QtCore, QtGui, QtWebKit
from PyQt4.phonon import Phonon
from openlp.core.lib import Receiver, build_html, ServiceItem, image_to_byte, \
translate
translate, PluginManager
from openlp.core.ui import HideMode, ScreenList
@ -56,6 +56,7 @@ class MainDisplay(QtGui.QGraphicsView):
self.isLive = live
self.imageManager = imageManager
self.screens = ScreenList.get_instance()
self.plugins = PluginManager.get_instance().plugins
self.alertTab = None
self.hideMode = None
self.videoHide = False