[9491] in The GTK GIMP ToolKit mailing list archive
[gtk-list] Re: How can I syncronize two entries?
daemon@ATHENA.MIT.EDU (Michael Krause)
Thu Oct 22 07:39:22 1998
Date: Thu, 22 Oct 1998 13:29:09 +0200 (METDST)
From: Michael Krause <m.krause@tu-harburg.de>
To: gtk-list@redhat.com
In-Reply-To: <Pine.GSO.3.95.981022045915.19186A-100000@harper.uchicago.edu>
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com
On Thu, 22 Oct 1998, Havoc Pennington wrote:
> > how can I syncronize two entries? When I call gtk-entry-set-text for
> > entry2 in the the callback for the "changed" signal of entry1 a
> > "changed" signal for entry2 is emitted. This emittes again the
> > "changed" signal for entry1. This goes for a while and in the end
> > crashes Gtk. Does a gtk-entry-set-text exist, that does not emmit a
> > "changed" signal. Or is it possible to stop the emmision of "changed"
> > signals for a widget temporary?
> >
>
> I usually end up with a flag like "changing_stuff" and my normal "changed"
> callbacks return immediately if true. Ugly but it works.
In most cases you get away by testing if a value really changed in your
signal handler. In some occasions, though (wenn a test would be expensive
or impossible because you don't keep "local" copies of the value in your
program), I use gtk_signal_handler_block_by_func().
--
michael krause [aka raw style / lego] - www.tu-harburg.de/~semk2104/
--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null