On Tue, Sep 09, 2003 at 01:42:03PM -0700, Colin Fox wrote:
>     def run_button_toggled(self, widget, event=None):
>       print "Toggle called with %s" % (type(widget))
>       x = widget.get_property('active') 
>       self.world.set_running( x )
>       print "Calling set_active..."
>       self.widget['togglebutton'].set_active(x)
>       self.widget['run1'].set_active(x)
>       print "Done."

Ewww, tabs :-)

> ----------------------
> 
> And get this, when I hit CTRL-R, or press the button:
> 
> ----------------------
> Toggle called with <type 'gtk.CheckMenuItem'>
> Calling set_active...
> Toggle called with <type 'gtk.ToggleButton'>
> Calling set_active...
> Done.
> Done.

No, set_active() only emits a toggled signal when the state of the
button is changed. That's why set_active() isn't followed by another
"Toggle called..." message.

Take care,
--
Christian Reis, Senior Engineer, Async Open Source, Brazil.
http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to