g_signal_handler_block() for individual signals?



Hi,

is there a solution for this (please consider the toggle button as an
example only for various cases like these I am interested in):

For example: The "clicked" signal handler is connected to a toggle
button. Now, different threads call gtk_toggle_button_set_active() to
toggle it, however, for some individual calls the "clicked" signal
shall not be emitted.

The docs say: "g_signal_handler_block: Blocks a handler of an instance
so it will not be called during any [!!] signal emissions", so it
seems g_signal_handler_block() is not appropriate for this purpose.

Further, it seems that somehow passing an ID of the calling thread
would not even be enough since the thread may have called the toggle
function more than once (or they the signals may arrive in another
order).

So to put it more general: Is there a way to exactly distinguish
between multiple signals (of the same type) on arrival and find out
which exact function call triggered them?

Thank You
Felix



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