summaryrefslogtreecommitdiffstats
path: root/examples/signal.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/signal.py')
-rw-r--r--examples/signal.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/examples/signal.py b/examples/signal.py
index 3d72e75..3ac4235 100644
--- a/examples/signal.py
+++ b/examples/signal.py
@@ -1,3 +1,4 @@
+import pygtk; pygtk.require("2.0")
import gobject
class C(gobject.GObject):
@@ -9,15 +10,12 @@ class C(gobject.GObject):
self.__gobject_init__() # default constructor using our new GType
def do_my_signal(self, arg):
print "C: class closure for `my_signal' called with argument", arg
-gobject.type_register(C)
class D(C):
def do_my_signal(self, arg):
print "D: class closure for `my_signal' called. Chaining up to C"
C.do_my_signal(self, arg)
-gobject.type_register(D)
-
def my_signal_handler(object, arg, *extra):
print "handler for `my_signal' called with argument", arg, \
"and extra args", extra