Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tutorius/properties.py
diff options
context:
space:
mode:
Diffstat (limited to 'tutorius/properties.py')
-rw-r--r--tutorius/properties.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/tutorius/properties.py b/tutorius/properties.py
index cbb2ae3..a675ba9 100644
--- a/tutorius/properties.py
+++ b/tutorius/properties.py
@@ -19,12 +19,12 @@ TutoriusProperties have the same behaviour as python properties (assuming you
also use the TPropContainer), with the added benefit of having builtin dialog
prompts and constraint validation.
"""
+from copy import copy
-from sugar.tutorius.constraints import Constraint, \
+from .constraints import Constraint, \
UpperLimitConstraint, LowerLimitConstraint, \
MaxSizeConstraint, MinSizeConstraint, \
ColorConstraint, FileConstraint, BooleanConstraint, EnumConstraint
-from copy import copy
class TPropContainer(object):
"""
@@ -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.)
@@ -331,6 +333,16 @@ class TAddonProperty(TutoriusProperty):
return super(TAddonProperty, self).validate(value)
raise ValueError("Expected TPropContainer instance as TaddonProperty value")
+class TEventType(TutoriusProperty):
+ """
+ Represents an GUI signal for a widget.
+ """
+ def __init__(self, value):
+ super(TEventType, self).__init__()
+ self.type = "gtk-signal"
+
+ self.default = self.validate(value)
+
class TAddonListProperty(TutoriusProperty):
"""
Reprensents an embedded tutorius Addon List Component.