[pygobject] Updated signal example to use GObject introspection
- From: Sebastian Polsterl <sebp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] Updated signal example to use GObject introspection
- Date: Thu, 18 Aug 2011 09:58:39 +0000 (UTC)
commit 493b4a21dd162d78cf572b548b58ba6a9ff22971
Author: Timo Vanwynsberghe <timovwb gmail com>
Date: Wed Jul 6 01:50:31 2011 +0200
Updated signal example to use GObject introspection
https://bugzilla.gnome.org/show_bug.cgi?id=654162
examples/signal.py | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/examples/signal.py b/examples/signal.py
index 26ddae9..d06fb02 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]