diff options
author | erick <erick@sugar-dev-erick.(none)> | 2009-10-30 15:09:05 (GMT) |
---|---|---|
committer | erick <erick@sugar-dev-erick.(none)> | 2009-10-30 15:09:05 (GMT) |
commit | 37e2ab5dd552be9aec49ccf774c90da8b962ea9f (patch) | |
tree | 6d9d2530125c1ce594e4d1d0c5dcbcaed47f19d3 /tutorius/properties.py | |
parent | 580c2fd667bb803b96504eba3516d566f04e1688 (diff) | |
parent | d5c9eac8fbf938c1874672b78272ba1bee41e573 (diff) |
Merge branch 'master' of git://git.sugarlabs.org/tutorius/mainline into tutorialADT
Diffstat (limited to 'tutorius/properties.py')
-rw-r--r-- | tutorius/properties.py | 16 |
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. |