Re: GtkNotebook accelerators.



On 28 Feb 2001, Owen Taylor wrote:

>    I'm sort of coming to the conclusion here that we need
>    to make some more changes to the way accelerators work in GTK+
>    for 2.0 - it's something we've discussed some here, but
>    were figuring we'd be able to punt to 2.2.
>
>    Two issues in this area, that if we address, may provide some better
>    resolution of this are:
>
>     - If we use the scheme for label properties I suggested (or
>       any scheme that allows setting of the underline), then how
>       do you find out the accelerator? How is that accelerator
>       hooked up.
>
>       It probably at least necessary to store the accelerator
>       for the label in some place that can be retrieved.
>
>     - We need some way of indicating what widget a label is "for"
>       both for accelerators, and for accessibility applications.
>
>    So, perhaps it is best to hold off on this patch until we think
>    about these things some more.

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.

/ Alex







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