Author: dmeyer
Date: Sun Mar 18 19:50:09 2007
New Revision: 9356
Modified:
trunk/core/src/plugin.py
trunk/ui/bin/freevo
Log:
fix bad imports in changed plugin location
Modified: trunk/core/src/plugin.py
==============================================================================
--- trunk/core/src/plugin.py (original)
+++ trunk/core/src/plugin.py Sun Mar 18 19:50:09 2007
@@ -143,7 +143,7 @@
self.plugins.remove(p)
- def init(self, callback = None):
+ def init(self, module, callback = None):
"""
Load and init all the plugins. The function takes the path were the
plugins are searched in. Optional is a callback, called after a
@@ -151,8 +151,8 @@
prefix are loaded.
"""
self.__initialized = True
- self.path = os.path.dirname(__file__)
-
+ self.path = os.path.dirname(module.__file__)
+ self.import_path = module.__name__
for name, type, level, args, number in self.plugins:
kaa.notifier.step(False, True)
if callback:
@@ -259,6 +259,8 @@
try:
if not isinstance(name, Plugin):
+ object = '%s.%s' % (self.import_path, object)
+ module = '%s.%s' % (self.import_path, module)
log.debug('loading %s as plugin %s' % (module, object))
exec('import %s' % module)
Modified: trunk/ui/bin/freevo
==============================================================================
--- trunk/ui/bin/freevo (original)
+++ trunk/ui/bin/freevo Sun Mar 18 19:50:09 2007
@@ -157,7 +157,8 @@
os.execvp('xinit', [ 'xinit', sys.argv[0], '-force-fs', '--',
':'+str(server_num) ])
# freevo imports
-from freevo.ui import plugin, util, beacon
+from freevo import plugin
+from freevo.ui import util, beacon
from freevo.ui.gui import theme, widgets, animation, displays, areas
# load the fxditem to make sure it's the first in the
@@ -257,7 +258,7 @@
splash = Splashscreen(_('Starting Freevo, please wait ...'), num)
# load plugins
- plugin.init(splash.progress)
+ plugin.init(freevo.ui, splash.progress)
# fade out the splash screen
splash.hide()
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog