Re: [gtk-list] Re: how to set toggle/radio buttons without "clicked"
- From: Paul Barton-Davis <pbd op net>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: how to set toggle/radio buttons without "clicked"
- Date: Sun, 16 Jan 2000 08:22:37 -0500
> You can use
> gtk_signal_handler_block_by_func(GtkObject *, GtkSignalFunc *,
>gpointer)
> (the func and the data pointer must be equal to the correponding
>gtk_signal_connect()
> parameters)
>
> Or
> gtk_signal_handler_block_by_data(GtkObject *, gpointer)
> (the data parameter must be the same as in the gtk_signal_connect()
>call)
Yes, but as I think you understand, this also involves knowing the
specific signal connection(s) I want to block. I can't know that.
All I really want is a way to set a button to be "active" without
making it appear that there was user interaction.
The error, I think, is that toggle buttons have 2 signals, but anytime
you generate 1, you also generate the other. It seemed to me from
reading the docs that one could connect to "toggled" instead of
"clicked", and would then *every* change to the button
state. Alternatively, one could connect to "clicked", and see only
those changes caused by a mouse click.
Instead, the function that handles a pure toggle causes "clicked" to
be sent. This seems like a mistake to me. The button has not been
clicked, its been toggled, and so you're sending the wrong signal ...
"clicked" should be reserved for the completion of a button release
event.
Comments ?
> BTW, it should be nice to have a
> gtk_signal_handler_xxx_by_name(GtkObject *, const gchar *)
> where xxx is disconnect, block, unblock or pending.
Yes, indeed it would. Owen, etc: if someone writes this (these?) will
you accept them into GTK ?
--p
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]