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 20:48:07 +0200
Am Fre, 2003-09-05 um 18.08 schrieb Owen Taylor:
> On Fri, 2003-09-05 at 05:16, Matthias Clasen wrote:
> > This is the last major API change which I want to get into the action
> > menu code to make it ready for 2.4: Switch back to installing
> > accelerators on the actions, instead of the proxies.
>
> Question here - how does this work when overriding happens when
> merging? if Edit/Copy is overriden by another Edit/Copy, how does
> <Control>C go to the right place?
>
Good question. That is probably not handled correctly currently.
> 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?
If you view the accelerator as just another proxy, it's not wierd at all
(though maybe unexpected): you simply didn't remove all proxies, only
the visible ones. I believe this feature is exactly what Jody wants.
> > This is relatively
> > straightforward except for a little problem with editing of
> > accelerators. I'd be most interested in feedback on the way I solved
> > this in gtkmenu.c.
>
> Blech. :-) If you need to make GtkMenu know about GtkAction,
> you should add gtk_menu_item_set_action().
I knew you wouldn't like it ...
> IMO, object data should never be used for inter-module API within
> GTK+.
>
I just used it since it was already there.
> But maybe a gtk_menu_item_set_edit_accel_path() or something would be
> better?
Yes, but the accel_path alone is not enough. You need to know the accel
group in order to check if it is locked.
Matthias
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]