summaryrefslogtreecommitdiff
path: root/portato/plugin.py
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-07-05 03:39:34 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-07-05 03:39:34 +0200
commit15f98dc02d9914164494a860a95bd83b7e8958ef (patch)
tree77fac842f9729c993f3960d2e85126d3d18fdf5e /portato/plugin.py
parent794bca2b17086ff4fa89bda6c0915815571d2aa9 (diff)
downloadportato-15f98dc02d9914164494a860a95bd83b7e8958ef.tar.gz
portato-15f98dc02d9914164494a860a95bd83b7e8958ef.tar.bz2
portato-15f98dc02d9914164494a860a95bd83b7e8958ef.zip
Port DependencyDetail
Diffstat (limited to 'portato/plugin.py')
-rw-r--r--portato/plugin.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/portato/plugin.py b/portato/plugin.py
index 716a9b2..0da14f1 100644
--- a/portato/plugin.py
+++ b/portato/plugin.py
@@ -306,7 +306,9 @@ class WidgetPlugin (Plugin):
Plugin.__init__(self, *args, **kwargs)
self.__widgets = [] #: List of `Widget`
- def _widget_init (self):
+ def _widget_init (self, window):
+ self.window = window
+
if self.status == self.STAT_ENABLED and not self._unresolved_deps:
self.widget_init()
@@ -440,10 +442,10 @@ class PluginQueue (object):
self._organize()
- def load_widgets(self):
+ def load_widgets(self, window):
for p in self.plugins:
if isinstance(p, WidgetPlugin):
- p._widget_init()
+ p._widget_init(window)
for w in p.widgets:
WidgetSlot.slots[w.slot].add_widget(w)
info(_("Widgets of plugin '%s' loaded."), p.name)
@@ -637,12 +639,12 @@ def load_plugins():
__plugins.load()
-def load_plugin_widgets():
+def load_plugin_widgets(window):
"""
Loads the widgets of the plugins.
"""
if __plugins is not None:
- __plugins.load_widgets()
+ __plugins.load_widgets(window)
def get_plugin_queue():
"""