diff options
Diffstat (limited to 'tests/testmodule.py')
-rw-r--r-- | tests/testmodule.py | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/tests/testmodule.py b/tests/testmodule.py index 8761ecf..2fda01f 100644 --- a/tests/testmodule.py +++ b/tests/testmodule.py @@ -1,9 +1,21 @@ import gobject -import gtk - -class PyLabel(gtk.Label): - __gtype_name__ = 'PyLabel' +class PyGObject(gobject.GObject): + __gtype_name__ = 'PyGObject' + __gproperties__ = { + 'label': (gobject.TYPE_STRING, + 'label property', + 'the label of the object', + 'default', gobject.PARAM_READWRITE), + } + def __init__(self): - gtk.Label.__init__(self, "hello") + self._props = {} + gobject.GObject.__init__(self) + self.set_property('label', 'hello') + def do_set_property(self, name, value): + self._props[name] = value + + def do_get_property(self, name): + return self._props[name] |