On Wed, 2014-03-05 at 18:01 +1100, Chris Angelico wrote: > On Wed, Mar 5, 2014 at 5:43 PM, Chris Moller <mol...@mollerware.com> wrote: > > I'm writing an app, that among a lot of other stuff, has three mutually > > interacting spinbuttuns, i.e., if I increment spinbutton A, its callback > > then updates values in B and C. B and then would try to update A, and C, > > etc., resulting in a bottomless recursion. So, what I need to do is, while > > I'm in A's callback, block the B and C callbacks; while in in B, block A and > > C and so on. > > Are you simply setting the three to the same value? If so, just check > first to see if it's already that value, and if it is, don't set it. > That's a technique that's worked for me since my earliest GUI > programming days on VX-REXX... great system, that, pity it's bound to > the obscure and forgotten platform of OS/2! :)
In case this is of any help, the GtkAdjustment::value-changed signal does this check for this exact reason (to avoid some unneeded feedback when the value has not actually changed). Cheers, -Tristan > > ChrisA > _______________________________________________ > gtk-app-devel-list mailing list > gtk-app-devel-list@gnome.org > https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list