Re: GIMP menu items (was: Discussion topics for GU4DEC BoF)
- From: Ole Laursen <olau hardworking dk>
- To: gnome-i18n gnome org
- Subject: Re: GIMP menu items (was: Discussion topics for GU4DEC BoF)
- Date: 15 Mar 2003 18:30:16 +0100
Sven Neumann <sven@gimp.org> writes:
> Ole Laursen <olau@hardworking.dk> writes:
>
> > In fact, if this is the case, AFAICS you must already have the same
> > problem with the underscore accelerators in the English
> > texts. Unless they are repeated in all menu paths that contains
> > e.g. "/Edit", one of the strings has to be the 'master' that
> > dictates how the Edit menu is going to look like.
>
> the first menu entry creates the branch and there's code that extracts
> the translation of the menu labels from the translated menu path. We
> solve the problem with underscore accelerators by creating the menu
> branch explicitely.
And you don't think that it is a dirty hack? :-)
Another problem with having the path and the presentation so tightly
coupled is that you can't have slashes in the item. I got bitten by
this when I tried to translate "Brightness-Contrast" into
"Lysstyrke/kontrast".
> GIMP doesn't use a lot of access keys for menus yet since they
> collide with the ability to change keybindings on the fly. We might
> decide to disable that feature and add more access keys to our menus
> but this is still subject to discussion.
Can't you solve that by reserving a special key combination for adding
the keybinding? Say, press Alt + F10, then the keybinding?
> I had a quick look at the code today and I although I was confident
> after reading Karl's mail, I'm now back to the point that the current
> approach is still the best of all choices.
Argh. Isn't the item factory just an easier way to setup the menus?
But with this interface, you're trading convenience for safety and
extra work for us. Why wouldn't
create_menu("/Edit", _("_Edit"));
// ...
create_item("/Edit", _("Stroke"));
be convenient enough? Or
create("/Edit", _("_Edit"));
create("/Edit/Stroke", _("Stroke"));
if you don't want to differentiate between menus and items.
Or perhaps
setup_item("/Edit", _("_Edit"));
// menu empty
setup_item("/Edit/Stroke", _("Stroke"));
create("/Edit/Stroke"); // menu now contains /_Edit/Stroke
Then main GIMP just need to setup the main menus. The plugins can
setup items and submenus of their own.
--
Ole Laursen
http://www.cs.auc.dk/~olau/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]