tags:

views:

57

answers:

1

After reading "Using your signals" I am wondering if it is possible to connect the signals to "sinks" in an "anonymous" way?

In order words, if the example following (snippet from reference above):

aCar = Car()
aCar.connect('engine-started', myCallback) 

Is it possible just to connect myCallback to all the signal engine-started sources in one go? Something along the lines of:

gbus.connect('engine-started', myCallback)

Of course gbus here is just an example.

+1  A: 

Yes, you can use gobject.add_emission_hook (g_signal_add_emission_hook).

Johannes Sasongko
+1: interesting... I'll look into this facility. Thanks!
jldupont
related: http://stackoverflow.com/questions/2088451/gobject-addemissionhook-usage
jldupont