After a handler of an instance has been blocked with g_signal_handler_block
, is it possible to check if the handler is still being blocked or has been unblocked by g_signal_handler_unblock in the meantime, apart from storing the state in a boolean variable for example?
I hoped something like that would be possible
g_signal_handler_block (selection, handler_id_row_selected);
if (g_signal_handler_is_blocked (selection, handler_id_row_selected))
g_print ("is still blocked");
But a "g_signal_handler_is_blocked"
function does not exist. g_signal_handler_is_connected
is not the right function to use, since the signal handler remains connected, thus the function returns TRUE.
I have tried g_signal_handler_find ()
, since there is G_SIGNAL_MATCH_UNBLOCKED
as one of the match types, but it has not worked yet. Even though I have rewritten my code anyway, I still would like to know if it is possible, since i use the blocking/unblocking relatively often.