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

Re: Signal disconnecting



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1




On Sat, 16 Aug 2003, Ross McFarland wrote:

> 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);

My problem I would like to reassign the function called when a button is
hit a second time, so then disconnect would be done in the callback
function to which I can't pass the $handler_id.
That's the reason I was looking for the disconnect_by_func.

I'll try to find another solution.

Regards,

Fred.


>
> that's the gist of it anyway. i'll leave the detailed description to
> muppet, should he feel one is nec.
>
> -rm
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/PpL6gcR1FkaCE7oRAnftAKCZLemrHVnneAXEFXKT2ngXO3eM8wCeJieC
uT4+//sfSuTqo87k4aUeIF0=
=M4hb
-----END PGP SIGNATURE-----



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