Re: GtkButtons and RUN_FIRST/RUN_LAST



Tim Janik <timj gtk org> writes:

> On Wed, 24 Oct 2001, Manish Singh wrote:
> 
> > The change:
> > 
> > 2001-10-18  Havoc Pennington  <hp redhat com>
> > 
> >         * gtk/gtkbutton.c (gtk_button_class_init): Change button signals
> >         to GTK_RUN_LAST, #50239
> > 
> > broke GtkRadioButton clicked signal behavior.
> 
> eek, this change looks "highly dubious to me", to say the least.
> and i remember no dicussion pointing out why this should be done,
> or an examination of expected breakage. in fact, i expect this
> to break many more user connections, we can't simply toggle
> emission stages at will.
> 
> havoc, could you please provide rationale for this and tell
> me what dicussion i missed pointing to this change?
> and even then, we probably need to change things back
> to maintain the lots of gtkbutton connections out there.
 
This was done at my approval, so yell at me rather than Havoc.

Note that there is _already_ a thread discussing this on
gtk-devel-list, so it would be a lot more productive to contribute to
that, rather than starting a new thread.

This has been in the GTK+ bug tracker for a long time, and has come up
on IRC too. I don't know if there has been discussion on this list. It
was my (wrong) opinion that this wouldn't affect application code, and
we certainly have the policy that all signals should be RUN_LAST
unless there is compelling reason otherwise.

As I said in the other thread, connecting to "clicked" to get
notification of something happening in response to "clicked" such as
toggling a toggle button is wrong by principle - and there is a better
way to do it -- connect to "toggled"; though if too much code is
broken by this, we may have to revert anyways.

                                        Owen



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