Re: Signal disconnecting



On Sat, 2003-08-16 at 14:53, Fred. Oger wrote:

Could someone tell me how I can disconnect a signal from a widget by
function name ?

that function isn't implemented in the bindings and and in reality can't
be due to the way that signals are handled (probably by any binding not
just gtk2-perl(-xs)). you should use the common method:

connect:
$handler_id = $widget->signal_connect( clicked => &\handler_func );

disconnect:
Glib::Signal->handler_disconnect($handler_id);

that's the gist of it anyway. i'll leave the detailed description to
muppet, should he feel one is nec.

-rm




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