[orca/orca-gnome3: 66/87] Refactoring some method names Added required methods
- From: Alejandro Leiva <aleiva src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/orca-gnome3: 66/87] Refactoring some method names Added required methods
- Date: Fri, 1 Apr 2011 11:18:21 +0000 (UTC)
commit 0e466f81319b5426448b7bc6f085945c18b3980a
Author: Javier Hernández Antúnez <jhernandez emergya es>
Date: Thu Mar 24 12:28:46 2011 +0100
Refactoring some method names
Added required methods
src/orca/pluglib/plugin_manager.py | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)
---
diff --git a/src/orca/pluglib/plugin_manager.py b/src/orca/pluglib/plugin_manager.py
index 2c42836..17a6c92 100644
--- a/src/orca/pluglib/plugin_manager.py
+++ b/src/orca/pluglib/plugin_manager.py
@@ -199,7 +199,7 @@ class ModulePluginManager(IPluginManager):
self.plugins = load_plugins
- def enable_plugin(self, plugin_name):
+ def enablePlugin(self, plugin_name):
# nacho's
# # first, make the plugin active in appropiated backend
@@ -224,14 +224,15 @@ class ModulePluginManager(IPluginManager):
plugin_object = plugin_class()
plugin_object.enable()
+ # nacho's
# this code is not checked actually, but I know
# what to do with it
- if isinstance(plugin_object, IConfigurable):
- plugin_object.load()
+ #if isinstance(plugin_object, IConfigurable):
+ # plugin_object.load()
self.plugins[plugin_name]['object'] = plugin_object
- def disable_plugin(self, plugin_name):
+ def disablePlugin(self, plugin_name):
# nacho's
# if self.is_plugin_enabled(plugin_name):
plugin_object = self.plugins[plugin_name]['object']
@@ -322,9 +323,16 @@ class ModulePluginManager(IPluginManager):
#
# print "Adding plugin: " + str(plugin_data)
#
-# def getPluginByName(self, plugin_name):
-# return self.sm.getPluginByName(plugin_name)
-#
+
+ def isEnabled(self, plugin_name):
+ if self.getPluginObject(plugin_name) == None:
+ return False
+ else:
+ return True
+
+ def getPluginObject(self, plugin_name):
+ return self.plugins[plugin_name]['object']
+
def getPlugins(self):
self.scanPluginsDir()
plugins = self.plugins
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]