summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorTimo Vanwynsberghe <timovwb@gmail.com>2011-07-06 01:50:31 +0200
committerSebastian Pölsterl <sebp@k-d-w.org>2011-08-18 11:57:06 +0200
commit493b4a21dd162d78cf572b548b58ba6a9ff22971 (patch)
tree2e76d41a91be6629d610348153e80f952c8fd381 /examples
parent0332010e704e253380e993874eab9dd122e59a7e (diff)
downloadpygobject-493b4a21dd162d78cf572b548b58ba6a9ff22971.tar.gz
Updated signal example to use GObject introspection
https://bugzilla.gnome.org/show_bug.cgi?id=654162
Diffstat (limited to 'examples')
-rw-r--r--examples/signal.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/examples/signal.py b/examples/signal.py
index 26ddae93..d06fb02d 100644
--- a/examples/signal.py
+++ b/examples/signal.py
@@ -1,10 +1,9 @@
-import pygtk; pygtk.require("2.0")
-import gobject
+from gi.repository import GObject
-class C(gobject.GObject):
+class C(GObject.GObject):
__gsignals__ = {
- 'my_signal': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
- (gobject.TYPE_INT,))
+ 'my_signal': (GObject.SIGNAL_RUN_FIRST, GObject.TYPE_NONE,
+ (GObject.TYPE_INT,))
}
def __init__(self):
self.__gobject_init__() # default constructor using our new GType