On Thu, 2004-08-26 at 14:09, Danny Milosavljevic wrote:
> Hi,
> 
> Am Donnerstag, den 26.08.2004, 14:47 +0300 schrieb Nikos Kouremenos:
> > toggle.set_active( False )
> > toggle.stop_emission('toggled') # doesn't work
> 
> - Connect the signal only after you called set_active
> - Set a flag that you check in your callbacks

If you are connecting the signal manually, that is, outside of glade,
such that you have a handle to the signal handler as returned by the
toggle.connect() call, you can:

toggle.signal_handler_block(mytogglebuttonhandler)
toggle.set_active(False)
toggle.signal_handler_unblock(mytogglebuttonhander)

I have used this technique most often when two widgets are
interdependent and I need to programmatically set them up. I had the
same problems, in those cases, with respect to my inability to get
widget.emit_stop_by_name() to work like I thought it should.

I'm using PyGtk 0.6.9 so I apologize if the API has changed in GTK 2.x

> 
> What are you trying to do, that you need to break signaling
> semantics ? :)
> 
> cheers,
>    Danny
> 
> 
> ______________________________________________________________________
> _______________________________________________
> pygtk mailing list   [EMAIL PROTECTED]
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
-- 
Steve McClure                                           Racemi
email: [EMAIL PROTECTED]                                75 5th St NE
voice: 404-892-5850                                     Suite 214
fax: 404-892-7215                                       Atlanta, GA 30308
                                                        http://www.racemi.com

_______________________________________________
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