Author: dmeyer
Date: Sat Feb 10 20:18:33 2007
New Revision: 9196
Modified:
trunk/ui/src/plugin.py
Log:
update the register code, every plugin is now registered by its name
Modified: trunk/ui/src/plugin.py
==============================================================================
--- trunk/ui/src/plugin.py (original)
+++ trunk/ui/src/plugin.py Sat Feb 10 20:18:33 2007
@@ -54,14 +54,21 @@
def __init__(self, name=''):
self._plugin_type = None
self._plugin_level = 10
- self._plugin_name = name
self._plugin_special = False
def plugin_activate(self, level):
pass
-
+
+ def plugin_register(self, name):
+ """
+ Register plugin with the given name. In most cases this is not needed
+ because the plugin will always be registered by its own name.
+ """
+ _loader.register(self, name)
+
+
class PluginLoader(object):
"""
Class for handling the different plugins.
@@ -286,8 +293,7 @@
self.types[key] = []
self.types[key].append(p)
- if p._plugin_name:
- self.names[p._plugin_name] = p
+ self.names[name] = p
p.plugin_activate(level)
self.loaded_plugins.append(p)
@@ -306,4 +312,3 @@
init = _loader.init
get = _loader.get
getbyname = _loader.getbyname
-register = _loader.register
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog