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')
|
log.info(u'Plugin manager loaded')
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def get_instance():
|
||||||
|
return PluginManager.instance
|
||||||
|
|
||||||
def __init__(self, plugin_dir):
|
def __init__(self, plugin_dir):
|
||||||
"""
|
"""
|
||||||
The constructor for the plugin manager. Passes the controllers on to
|
The constructor for the plugin manager. Passes the controllers on to
|
||||||
|
@ -51,6 +55,7 @@ class PluginManager(object):
|
||||||
The directory to search for plugins.
|
The directory to search for plugins.
|
||||||
"""
|
"""
|
||||||
log.info(u'Plugin manager Initialising')
|
log.info(u'Plugin manager Initialising')
|
||||||
|
PluginManager.instance = self
|
||||||
if not plugin_dir in sys.path:
|
if not plugin_dir in sys.path:
|
||||||
log.debug(u'Inserting %s into sys.path', plugin_dir)
|
log.debug(u'Inserting %s into sys.path', plugin_dir)
|
||||||
sys.path.insert(0, plugin_dir)
|
sys.path.insert(0, plugin_dir)
|
||||||
|
|
|
@ -35,7 +35,7 @@ from PyQt4 import QtCore, QtGui, QtWebKit
|
||||||
from PyQt4.phonon import Phonon
|
from PyQt4.phonon import Phonon
|
||||||
|
|
||||||
from openlp.core.lib import Receiver, build_html, ServiceItem, image_to_byte, \
|
from openlp.core.lib import Receiver, build_html, ServiceItem, image_to_byte, \
|
||||||
translate
|
translate, PluginManager
|
||||||
|
|
||||||
from openlp.core.ui import HideMode, ScreenList
|
from openlp.core.ui import HideMode, ScreenList
|
||||||
|
|
||||||
|
@ -56,6 +56,7 @@ class MainDisplay(QtGui.QGraphicsView):
|
||||||
self.isLive = live
|
self.isLive = live
|
||||||
self.imageManager = imageManager
|
self.imageManager = imageManager
|
||||||
self.screens = ScreenList.get_instance()
|
self.screens = ScreenList.get_instance()
|
||||||
|
self.plugins = PluginManager.get_instance().plugins
|
||||||
self.alertTab = None
|
self.alertTab = None
|
||||||
self.hideMode = None
|
self.hideMode = None
|
||||||
self.videoHide = False
|
self.videoHide = False
|
||||||
|
|
Loading…
Reference in New Issue