From 480b666918a56781e1f722af7d399c2dac0ebca8 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Sun, 17 Feb 2013 13:57:52 +0100 Subject: [PATCH] cleaned pluginmanager constructor --- openlp/core/lib/pluginmanager.py | 8 +++----- openlp/core/ui/mainwindow.py | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/openlp/core/lib/pluginmanager.py b/openlp/core/lib/pluginmanager.py index 06f0e36eb..43410b4a7 100644 --- a/openlp/core/lib/pluginmanager.py +++ b/openlp/core/lib/pluginmanager.py @@ -35,6 +35,7 @@ import logging import imp from openlp.core.lib import Plugin, PluginStatus, Registry +from openlp.core.utils import AppLocation log = logging.getLogger(__name__) @@ -46,17 +47,14 @@ class PluginManager(object): """ 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 plugins for them to interact with via their ServiceItems. - - ``plugin_dir`` - The directory to search for plugins. """ log.info(u'Plugin manager Initialising') 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) self.plugins = [] log.info(u'Plugin manager Initialised') diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index 695c4073a..a4ff5823b 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -487,7 +487,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow): self.timer_id = 0 self.timer_version_id = 0 # Set up the path with plugins - self.plugin_manager = PluginManager(AppLocation.get_directory(AppLocation.PluginsDir)) + self.plugin_manager = PluginManager() self.imageManager = ImageManager() # Set up the interface self.setupUi(self)