[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtkmm
Subject:    Re: [gtkmm] Blocking signals
From:       murrayc () t-online ! de (Murray Cumming)
Date:       2001-12-17 14:54:25
[Download RAW message or body]

On Mon, 2001-12-17 at 12:56, ben.tordoff@ukonline.co.uk wrote:
> Hi, hopefully this question is trivial to someone
> here:
> 
> Is there a way to block all callback signals for a
> widget and all its contents? I have a widget which
> contains many things, and when doing a 'load' or
> 'reset' operation I need to prevent the callbacks
> being executed for both the widget and its contents.
> 
> Obviously I could go through each child and either
> block or disconnect each signal, but that would be
> quite tiresome. Anyone know a smart way to do this?

I tend to think that you should change the behaviour of the signal
handler rather than stop the signal from being emmitted. Glom does this
by setting a bool when it knows that an action will result in a signal
that should be ignored. The signal handler then checks the bool before
doing anything.

In Glom, I use the InnerIgnore class to make this a bit easier:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/glom/glom/glom/Utility_Widgets/AddDel/AddDel.cc?rev=HEAD&only_with_tag=HEAD&content-type=text/vnd.viewcvs-markup


-- 
Murray Cumming
murrayc@usa.net
www.murrayc.com


_______________________________________________
to unsubscribe or change your subscription parameters :
https://lists.sourceforge.net/lists/listinfo/gtkmm-main


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic