tags:

views:

16

answers:

1

How to prevent further signal handlers to be called from the first signal handler callback in GSignal?

For example, i register three functions - func1, func2 and func3 for the same signal "mysignal". If func1 is called first, how can i prevent func2 and func3 to be called from func1?

This should not be made permanent. It should be runtime. ie func1 can decide whether func2 and func3 can get the callback based on the input parameters it get.

+1  A: 

g_signal_stop_emission_by_name () and g_signal_stop_emission () solves this problem.

Calling g_signal_stop_emission_by_name() from func1 prevents further propagation to func2 and func3.

Bharathwaaj