Re: [gtk-list] [ repeat message] toggle button: clicked == toggled, and vice versa




Paul Barton-Davis <pbd@op.net> writes:

> Pardon the remailing, but I would really appreciate some feedback on this
> from the GTK folk. I am happy to do the work to fix this problem, but its 
> not worth it if its not going to be accepted into the mainstream GTK+.

[...]

> 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.

You'll need to explain a bit more about what you are trying to
do - to justify _why_ you want this change, instead of explaining
_what_ you want.

Several common approaches have been suggested as to how people
typically deal with the problem - blocking handlers, using a
global boolean, connecting your signal handlers after you set
up the initial state.

It seems that you aren't satisfied by these approaches because
you want to do something that is more generic and allow other
people to connect to your signals as well. But you haven't
really given enough context to allow us to figure out what
sort of thing you are trying to do.

Any change to make "clicked" not be emitted via
gtk_toggle_button_set_active() could potentially break existing
code, so would have to be approached with caution.

Regards,
                                        Owen



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