Re: gtk_menu_ensure_uline_accel_group()

On 20 Mar 1999, Guillaume Laurent wrote:

> Is there any reason not to integrate this function in
> gtk_menu_get_uline_accel_group() ?

yes, i first had gtk_menu_get_uline_accel_group() ensure that
the uline accel group is present, but that takes away the possibility
to check whether one has been present before.
the policy for automated accelerator installation is now that menus
that have an uline accel group will not accept single letters
as new accelerators, only ones with a modifier will be accepted.
this is required to resolve the clash on whether single letters are
pressed as a shortcut for underlined menu items or whether they are
meant to override the current menu item's accelerator.
most applications would only want accelerators with modifiers
anyways, and if they need single letters without modifiers to act
as accelerators for menu items, they simply can't use single letter
shortcuts for the corresponding menu.

so gtk_menu_get_uline_accel_group() will return NULL if there is
no uline accel group present, and thus single letters can be used as
accelerators, while gtk_menu_ensure_uline_accel_group() will always
return an uline accel group and thusly disable single letters as
accelerators for this menu.

> -- 
> 					Guillaume.


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