new pygtk release



I have released a new version of pygtk that works with the recently
released gtk+ 1.3.12.  This version has support for overriding signals
using Tim's new code.  It can be downloaded from:

ftp://ftp.gnome.org/pub/GNOME/earthquake/sources/pygtk/pygtk-1.99.6.tar.gz

This release requires Python 2.2 (the final release -- not a beta).  The
current method for overriding a signal is:
    import gobject, gtk

    class MyWidget(gtk.Widget):
        __gsignals__ = {
            'show': 'override'
        }
        def __init__(self):
            self.__gobject_init__()
        def do_show(self):
            print "Show called for MyWidget"
            self.chain()
    gobject.type_register(MyWidget)

    w = MyWidget()
    w.show()

This registers a new GType for the new widget, and overrides the show
signal.  When the show signal is emitted, the do_show() method is
called, which prints a message and chains up to the parent impl.

James.

--
Email: james daa com au
WWW:   http://www.daa.com.au/~james/






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]