Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tutorius/creator.py
diff options
context:
space:
mode:
authorSimon Poirier <simpoir@gmail.com>2009-12-06 22:56:25 (GMT)
committer Simon Poirier <simpoir@gmail.com>2009-12-06 23:05:41 (GMT)
commit7008603df84f0ba868c14151939eae986cd1def0 (patch)
tree8e2102e3942d6e03e3046cbdc0ad6be2531fa491 /tutorius/creator.py
parentcd743b7800481d6607222d1d21ab50afb58747ee (diff)
inspect widgets through probe
Diffstat (limited to 'tutorius/creator.py')
-rw-r--r--tutorius/creator.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/tutorius/creator.py b/tutorius/creator.py
index 9413186..f7f9752 100644
--- a/tutorius/creator.py
+++ b/tutorius/creator.py
@@ -264,6 +264,16 @@ class Creator(Object):
action_type = self._propedit.actions_list[path][ToolBox.ICON_NAME]
LOGGER.debug("Creator :: Adding an action = %s"%(action_type))
action = addon.create(action_type)
+
+ # force mandatory props
+ meta = addon.get_addon_meta(action_type)
+ for propname in meta['mandatory_props']:
+ prop = getattr(type(action), propname)
+ prop.widget_class.run_dialog(self._overview.win,
+ action,
+ propname,
+ probe_mgr=self._probe_mgr)
+
return_cb = partial(self._action_installed_cb, action)
self._probe_mgr.install(action,
action_installed_cb=return_cb,
@@ -327,6 +337,7 @@ class Creator(Object):
self._probe_mgr.update(address,
action,
is_editing=True)
+ self._propedit.action = action
def _action_refresh_cb(self, widget, evt, action):
"""
@@ -558,7 +569,8 @@ class ToolBox(object):
#Value field
prop = getattr(type(action), propname)
propedit = prop.widget_class(self.__parent, action, propname,
- self._refresh_action_cb)
+ self._refresh_action_cb,
+ probe_mgr=default_creator()._probe_mgr)
self._propedits.append(propedit)
row.pack_end(propedit.widget)