Re: Accelerator-only actions
- From: Matthias Clasen <maclas gmx de>
- To: gtk-devel-list gnome org
- Subject: Re: Accelerator-only actions
- Date: 05 Sep 2003 21:24:03 +0200
Am Fre, 2003-09-05 um 20.33 schrieb Jody Goldberg:
> On Fri, Sep 05, 2003 at 12:08:59PM -0400, Owen Taylor wrote:
> >
> > Also, imagine an editing UI for an applications toolbars
> > and menus; if someone removes an item from their toolbars and menus
> > entirely, isn't it weird and unexpected if the accelerator
> > continues to work?
>
> That seems like a function of the menu/toolbar/accel editor. It
> seems reasonable that the clipboard accelerators would still work
> even if there are no clipboard items on the toolbar. The mythic
> editor could always be used to disable accelerators seperately.
>
> The main place I see these being useful is for managing different
> application modes. For example, while a user is editing a cell in
> gnumeric, or making an appointment in evo's calendar its nice to be
> able to change action groups to switch the meaning of accelerators.
This again highlights the problem spotted by Owen: the accelerators must
be installed by the ui manager, in order to take the action group
ordering into account when resolving accelerator conflicts between
actions.
>
> Where things get really interesting is for things like toolbar items
> that you want to share between modes (bold/italic/underline
> buttons). To avoid flashing those in and out the app will need to
> split those actions into a distinct group and redirect them under
> the covers.
One optimization I seem to remember being mentioned in the context of
bonobo ui merging was to not remove and re-create the "bold" menuitem,
but reuse the old one for the new action.
> One comment on the patch. Does each action truely need its own
> AccelGroup ? How much space will that consume ? I had assumed we
> would share an AccelGroup for an ActionGroup.
It is shared. I just need a way to get at the accel group from the
menuitem (to figure out whether the accelerator is locked), and since I
can get at the action (via object data :-(), but not from the action to
the action group, the simplest solution was to let the action keep a
reference to its accel group.
Matthias
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]