forked from openlp/openlp
Try 1
This commit is contained in:
parent
3cfdd3de45
commit
9176911810
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user