Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tutorius
diff options
context:
space:
mode:
Diffstat (limited to 'tutorius')
-rw-r--r--tutorius/creator.py12
-rw-r--r--tutorius/properties.py2
2 files changed, 14 insertions, 0 deletions
diff --git a/tutorius/creator.py b/tutorius/creator.py
index 0e2e836..c477056 100644
--- a/tutorius/creator.py
+++ b/tutorius/creator.py
@@ -444,6 +444,9 @@ class ToolBox(object):
if isinstance(prop, properties.TStringProperty):
propwdg = row.get_children()[1]
propwdg.get_buffer().set_text(propval)
+ elif isinstance(prop, properties.TUAMProperty):
+ propwdg = row.get_children()[1]
+ propwdg.set_label(propval)
elif isinstance(prop, properties.TIntProperty):
propwdg = row.get_children()[1]
propwdg.set_value(propval)
@@ -477,6 +480,10 @@ class ToolBox(object):
propwdg.get_buffer().set_text(propval)
propwdg.connect_after("focus-out-event", \
self._str_prop_changed, action, propname)
+ elif isinstance(prop, properties.TUAMProperty):
+ propwdg = gtk.Button(propval)
+ propwdg.connect_after("clicked", \
+ self._uam_prop_changed, action, propname)
elif isinstance(prop, properties.TIntProperty):
adjustment = gtk.Adjustment(value=propval,
lower=prop.lower_limit.limit,
@@ -515,6 +522,11 @@ class ToolBox(object):
except ValueError:
widget.set_text(str(getattr(action, propname)[idx]))
self.__parent._creator._action_refresh_cb(None, None, action)
+ def _uam_prop_changed(self, widget, action, propname):
+ selector = WidgetSelector(self.__parent)
+ selection = selector.select()
+ setattr(action, propname, selection)
+ self.__parent._creator._action_refresh_cb(None, None, action)
def _str_prop_changed(self, widget, evt, action, propname):
buf = widget.get_buffer()
setattr(action, propname, buf.get_text(buf.get_start_iter(), buf.get_end_iter()))
diff --git a/tutorius/properties.py b/tutorius/properties.py
index b7d0301..a675ba9 100644
--- a/tutorius/properties.py
+++ b/tutorius/properties.py
@@ -310,6 +310,8 @@ class TUAMProperty(TutoriusProperty):
self.type = "uam"
+ self.default = self.validate(value)
+
class TAddonProperty(TutoriusProperty):
"""
Reprensents an embedded tutorius Addon Component (action, trigger, etc.)