Closed deb75 closed 6 years ago
Hello,
connect_signal
uses GDBus' g-signal under the hood... well, actually it's lgi
's magic plus g-signal
.
Attaching a no-op callback to the signal as you describe should work (I never had a use case for this, so I can't really tell). I'd be interested to know from you whether that's actually the case.
Closing for lack of feedback.
Hi,
Sorry for the delay :-) ... a small baby girl is just what you cannot delay :-)
I tested attaching a no-op callback, it does not work the way I would like.
Calling connect_signal
several times attaches each function to the signal. So you may have several functions attached to the same signal.
Attaching again one different function with the same name does not replace the previous attached one (with the same name), it just adds it to the signal.
I would have expected the newly attached function to replace the one with the same name. I could not find in GDBus'g-signal documentation any method to disconnect or deattach a callback function.
Regards
No problem! One's gotta do what they gotta do ;)
TBH, I am a bit clueless. You could try to delete the whole proxy object (i.e. assign it to nil
) and check whether the signal goes away. I think that I've run out of options though.
If you manage to find a possible solution, feel free to reopen this issue (or a new one).
Thanks
Hello,
I use the function :
But sometimes, I would like to remove the function attached to the signal. But I did not find a function suitable for this. Ho can I do that ?
If I try to attach a void function, will it remove the
callback
one ?