Re: moving ::focus from container to widget



Federico Mena Quintero <federico ximian com> writes:
> Havoc Pennington <hp redhat com> writes:
> 
> > About to put in the following patch, which moves the "focus" method
> > from container to widget, to handle cases where a widget has focusable
> > locations which are not child widgets.
> 
> Is this necessary?  Can't the widget just eat Tab/Shift+Tab in its
> key_press_event handler if it can indeed focus to another one of its
> internal locations?
> 

No, the keybindings are not hardcoded, you can customize in your
gtkrc. Pretty much all instances of "keyval == whatever" or "switch
(keyval)" are bugs - most of them have been nuked or need nuking in
favor of GtkBindingSet.

But this change is good despite that, because all the
GTK_IS_CONTAINER() calls reveal that the virtual function is in the
wrong place. RTTI bad.

Havoc





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