Re: GtkNotebook accelerators.



Alexander Larsson <alla lysator liu se> writes: 
> Another interesting thing jamesh mentioned is that the notebook should
> disable accelerators on non-visible pages. This kinda means that each
> notebook page should have its own accelerator group.
> 
> One possible way could be to introduce an optional default_accel_group in
> GtkWidget. Then gtk_widget_get_default_accel_group () propagates up the
> widget hierarchy until it finds a widget with a defautl_accel_group. Some
> widgets (like the notebook) could (possibly optionally) add default accel
> groups automatically, and handle them (so that i.e. only the accel group
> of the visible notebook page is active).
> 
> There is still the question of which widget the label is for, and what
> action signal is to be invoked though, so this may not be such a good
> idea.
> 

Our general idea on this is that accelerators should just be
properties of widgets, and then we have some magic so that they get
registered with the toplevel default accel group while widgets are
mapped and unregistered when widgets are unmapped. So then everything
Just Works for the most part, with some special-casing to handle
menus.

Currently very torn between trying to fix accelerators in this way for
2.0, or punting it. Owen already partially had to deal with it to
implement plug/socket in terms of the XEmbed spec, and the notebook
thing brings it up, etc. so those are arguments for just dealing with
the problem, but on the other hand it might cause delays.

Havoc





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