[pygtk] gtk.Window: __gsignals__ ?
Danny Milosavljevic
danny.milo at gmx.net
Mon Jul 26 02:47:51 WST 2004
Hi,
Can you do me a favour and try if the following works:
--------------------------------<cut>--------------------------------
#!/usr/bin/env python
import pygtk
pygtk.require("2.0")
import gtk
import gobject
class MyWindow(gtk.Window):
def __init__(self):
self.__gsignals__ = {}
self.__gsignals__["stuff-happened"] =
(gobject.SIGNAL_RUN_LAST,
gobject.TYPE_NONE,
(gobject.TYPE_NONE)
)
gtk.Window.__init__(self)
w = MyWindow()
w.connect("destroy", lambda x: gtk.main_quit())
w.connect("stuff-happened", lambda x: gtk.main_quit())
gtk.main()
--------------------------------<cut>--------------------------------
I do it the exact same way in spawner.py with the exception that Spawner
is a class derived from GObject and this is a class derived from
gtk.Window. Wonder if this is the cause...
Thanks in advance.
cheers,
Danny
-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname : nicht verfügbar
Dateityp : application/pgp-signature
Dateigröße : 189 bytes
Beschreibung: Dies ist ein digital signierter Nachrichtenteil
URL : http://www.daa.com.au/pipermail/pygtk/attachments/20040725/3d254224/attachment.bin
More information about the pygtk
mailing list