forked from openlp/openlp
cleaned pluginmanager constructor
This commit is contained in:
parent
45ea9c5c42
commit
480b666918
@ -35,6 +35,7 @@ import logging
|
|||||||
import imp
|
import imp
|
||||||
|
|
||||||
from openlp.core.lib import Plugin, PluginStatus, Registry
|
from openlp.core.lib import Plugin, PluginStatus, Registry
|
||||||
|
from openlp.core.utils import AppLocation
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -46,17 +47,14 @@ class PluginManager(object):
|
|||||||
"""
|
"""
|
||||||
log.info(u'Plugin manager loaded')
|
log.info(u'Plugin manager loaded')
|
||||||
|
|
||||||
def __init__(self, plugin_dir):
|
def __init__(self):
|
||||||
"""
|
"""
|
||||||
The constructor for the plugin manager. Passes the controllers on to
|
The constructor for the plugin manager. Passes the controllers on to
|
||||||
the plugins for them to interact with via their ServiceItems.
|
the plugins for them to interact with via their ServiceItems.
|
||||||
|
|
||||||
``plugin_dir``
|
|
||||||
The directory to search for plugins.
|
|
||||||
"""
|
"""
|
||||||
log.info(u'Plugin manager Initialising')
|
log.info(u'Plugin manager Initialising')
|
||||||
Registry().register(u'plugin_manager', self)
|
Registry().register(u'plugin_manager', self)
|
||||||
self.base_path = os.path.abspath(plugin_dir)
|
self.base_path = os.path.abspath(AppLocation.get_directory(AppLocation.PluginsDir))
|
||||||
log.debug(u'Base path %s ', self.base_path)
|
log.debug(u'Base path %s ', self.base_path)
|
||||||
self.plugins = []
|
self.plugins = []
|
||||||
log.info(u'Plugin manager Initialised')
|
log.info(u'Plugin manager Initialised')
|
||||||
|
@ -487,7 +487,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
self.timer_id = 0
|
self.timer_id = 0
|
||||||
self.timer_version_id = 0
|
self.timer_version_id = 0
|
||||||
# Set up the path with plugins
|
# Set up the path with plugins
|
||||||
self.plugin_manager = PluginManager(AppLocation.get_directory(AppLocation.PluginsDir))
|
self.plugin_manager = PluginManager()
|
||||||
self.imageManager = ImageManager()
|
self.imageManager = ImageManager()
|
||||||
# Set up the interface
|
# Set up the interface
|
||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
|
Loading…
Reference in New Issue
Block a user