Re: suspending signal events



On Thu, 5 May 2005 10:39:35 -0600, John Taber <jtaber johntaber net> wrote:

Actually nothing inappropriate or wrong is happening - I simply have signals
connected to the comboboxes so that when the combobox changes,  data gets
changed, etc. I just don't want these signals firing when the combobox is being repopulated with clear and append. So I'm just wondering what to use like deactivate/activate or signal freeze/unfreeze, set_sensitive, whatever.

you can keep the connection as explained here

http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/apbs03.html

and then block the connection before clearing/repopolating and unblock after. see: http://libsigc.sourceforge.net/libsigc2/docs/reference/html/classsigc_1_1slot__base.html#a10

I never actually tried this but i think it should work.

--
Marco



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