Re: Blocking signals



This is one of the recurring problems in GTK.
If you only want to block your own handlers, the easiest way is to have a global flags
that every handler checks to determine whether or not it should execute.
It is not elegant, but it's easy and failproof. Of course if you are trying to block default handlers
this might not work, but usually you only care about your own handlers.

Prewitt, Nathan C ERDC-ITL-MS Contractor wrote:

   I would like to write a generic routine that will set the value of a
GtkHScale, for example, without it triggering a signal.  I have used
g_signal_handlers_block_by_func() before, but that requires that I know the
function name.  If the routine is generic, I would have a pointer to the
GtkHScale but I don't know exactly which one it is.  Therefore, I don't know
the name of the specific signal handler to block.  So, is there a function
that I can call that will block all signals from being emitted by a widget
while I change the value?

Thanks,

Nathan

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list





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