summaryrefslogtreecommitdiffstats
path: root/tests/testmodule.py
diff options
context:
space:
mode:
authorJohan Dahlin <johan@src.gnome.org>2006-01-09 12:26:46 +0000
committerJohan Dahlin <johan@src.gnome.org>2006-01-09 12:26:46 +0000
commit551a38178f7e66f215980fb01200472c8e6d3cd4 (patch)
treefbbfd2556f77dc9f64c5c92af76a7dc35930f859 /tests/testmodule.py
parent0b07af909c44f27368a13ecfa94bfda5762e58fb (diff)
downloadpygobject-551a38178f7e66f215980fb01200472c8e6d3cd4.tar.gz
pygobject-551a38178f7e66f215980fb01200472c8e6d3cd4.tar.xz
pygobject-551a38178f7e66f215980fb01200472c8e6d3cd4.zip
Split out PyGObject from PyGTK.
Diffstat (limited to 'tests/testmodule.py')
-rw-r--r--tests/testmodule.py22
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]