From 7008603df84f0ba868c14151939eae986cd1def0 Mon Sep 17 00:00:00 2001 From: Simon Poirier Date: Sun, 06 Dec 2009 22:56:25 +0000 Subject: inspect widgets through probe --- (limited to 'tutorius/creator.py') 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) -- cgit v0.9.1