Update of /cvsroot/freevo/freevo/src
In directory sc8-pr-cvs1:/tmp/cvs-serv13703
Modified Files:
plugin.py
Log Message:
support a list of named plugins
Index: plugin.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/plugin.py,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** plugin.py 21 Nov 2003 11:43:00 -0000 1.49
--- plugin.py 21 Nov 2003 17:55:47 -0000 1.50
***************
*** 10,13 ****
--- 10,16 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.50 2003/11/21 17:55:47 dischi
+ # support a list of named plugins
+ #
# Revision 1.49 2003/11/21 11:43:00 dischi
# don't try to 'load' plugins that are already a python object
***************
*** 188,193 ****
AUDIOCD_PLAYER = 'AUDIOCD_PLAYER'
VIDEO_PLAYER = 'VIDEO_PLAYER'
- DVD_PLAYER = 'DVD_PLAYER'
- VCD_PLAYER = 'VCD_PLAYER'
TV = 'TV'
RADIO_PLAYER = 'RADIO_PLAYER'
--- 191,194 ----
***************
*** 344,348 ****
! def getbyname(name):
"""
get a plugin by it's name
--- 345,349 ----
! def getbyname(name, multiple_choises=0):
"""
get a plugin by it's name
***************
*** 351,363 ****
if __named_plugins__.has_key(name):
return __named_plugins__[name]
return None
! def register(plugin, name):
"""
register an object as a named plugin
"""
global __named_plugins__
! __named_plugins__[name] = plugin
--- 352,371 ----
if __named_plugins__.has_key(name):
return __named_plugins__[name]
+ if multiple_choises:
+ return []
return None
! def register(plugin, name, multiple_choises=0):
"""
register an object as a named plugin
"""
global __named_plugins__
! if multiple_choises:
! if not __named_plugins__.has_key(name):
! __named_plugins__[name] = []
! __named_plugins__[name].append(plugin)
! else:
! __named_plugins__[name] = plugin
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog