Re: Toolbar keyboard navigation / secondary focus chain



Hi Soeren,

On Sun, 2003-02-23 at 17:34, Soeren Sandmann wrote:
> Currently, the EggToolbar turns off focus for buttons simply by
> unsetting their GTK_CAN_FOCUS flag. Still doing this means:
> 
> 	- By using the mouse or a mnemonic, you can still focus other
> 	  items than buttons.  This is correct behavior, because
> 	  toolitems such as entries would be useless otherwise.
> 
> 	- When keyboard navigation starts, the CAN_FOCUS flags will
> 	  have to be turned on again. When keyboard navigation ends,
> 	  the flags should be turned off. This is easy to do since the
> 	  "set_secondary_focus" signal propagates down. the
> 	  hierarchy. Toolitems that have turned off CAN_FOCUS can turn
> 	  it back on in their handler.
> 
> Although turning CAN_FOCUS on and off dynamically seems a bit dubious,
> it will probably work well in practice.

	I took this approach in libbonoboui, which is at a disadvantage since
we couldn't add hooks to the gtk+ internals to make things work
pleasantly (which makes me concerned that we can add things to this new
focus chain externally as well).

	I'd be slightly concerned too about changing the flags on tens of
widgets when the key combo is pressed though - since (if done right)
this would result in a flood of atk 'state change' traffic (?). The
alternatives are not very pretty though as you say.

	I think we had some interesting issues with items remaining focused,
due to not restoring the original item's focus on changes, but generally
- as you say it works fairly well in practice for toolbars, and menus
are the sticking point.

	Anyway - looks like a great analysis to me.

	Regards,

		Michael.

-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot




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