Re: [gtk-list] another silly question?



On Sunday, May  8, 1998, at 08:01 PM, jb screamed:

> Hi,
> 
>      i have not the source at hand, so i might as well as here... it
> there a way to disable signals emission in Gtk? This would be useful in
> the following case: say i have a text widget with an associated callback
> for the "changed" signal, then if in the callback function i modify the
> contents of the text box, that callback function will be invoked again,
> and since it's not reentrant it'll crash...

One approach (I think), is to call gtk_signal_disconnect() (disconnecting
the "changed" signal), modify the contents, then call gtk_signal_connect()
(again connecting the "changed" signal), all within the "changed" callback.

-Brian



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