summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorTimo Vanwynsberghe <timovwb@gmail.com>2011-07-06 01:54:50 +0200
committerSebastian Pölsterl <sebp@k-d-w.org>2011-08-18 11:56:49 +0200
commit0332010e704e253380e993874eab9dd122e59a7e (patch)
treec0d9b0547dbdd12ba993ea613205058d02c76210 /examples
parentc39f4555ebd703651eca6f978ed9870655b737f0 (diff)
downloadpygobject-0332010e704e253380e993874eab9dd122e59a7e.tar.gz
Updated properties example to use GObject introspection
https://bugzilla.gnome.org/show_bug.cgi?id=654162
Diffstat (limited to 'examples')
-rw-r--r--examples/properties.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/properties.py b/examples/properties.py
index cc059206..f71ea83e 100644
--- a/examples/properties.py
+++ b/examples/properties.py
@@ -1,18 +1,18 @@
-import gobject
+from gi.repository import GObject
-class MyObject(gobject.GObject):
+class MyObject(GObject.GObject):
- foo = gobject.property(type=str, default='bar')
- boolprop = gobject.property(type=bool, default=False)
+ foo = GObject.property(type=str, default='bar')
+ boolprop = GObject.property(type=bool, default=False)
def __init__(self):
- gobject.GObject.__init__(self)
+ GObject.GObject.__init__(self)
- @gobject.property
+ @GObject.property
def readonly(self):
return 'readonly'
-gobject.type_register(MyObject)
+GObject.type_register(MyObject)
print "MyObject properties: ", list(MyObject.props)