openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #19432
[Merge] lp:~googol/openlp/plugin-manager-constructor into lp:openlp
Andreas Preikschat has proposed merging lp:~googol/openlp/plugin-manager-constructor into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~googol/openlp/plugin-manager-constructor/+merge/148937
Hello,
- Cleaned up the PluginManager constructor
--
https://code.launchpad.net/~googol/openlp/plugin-manager-constructor/+merge/148937
Your team OpenLP Core is requested to review the proposed merge of lp:~googol/openlp/plugin-manager-constructor into lp:openlp.
=== modified file 'openlp/core/lib/pluginmanager.py'
--- openlp/core/lib/pluginmanager.py 2013-02-11 21:16:30 +0000
+++ openlp/core/lib/pluginmanager.py 2013-02-17 13:01:27 +0000
@@ -35,6 +35,7 @@
import imp
from openlp.core.lib import Plugin, PluginStatus, Registry
+from openlp.core.utils import AppLocation
log = logging.getLogger(__name__)
@@ -46,17 +47,14 @@
"""
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')
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py 2013-02-16 12:11:51 +0000
+++ openlp/core/ui/mainwindow.py 2013-02-17 13:01:27 +0000
@@ -487,7 +487,7 @@
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)
Follow ups