Re: non-latin accelerator keys



Matthias Clasen wrote:

On 12/21/05, Abel Cheung <abelcheung gmail com> wrote:
Hi,

On 12/22/05, Matthias Clasen <mclasen redhat com> wrote:
http://bugzilla.gnome.org/show_bug.cgi?id=323956
http://bugzilla.gnome.org/show_bug.cgi?id=104112

The first bug complains about the fact that the "(_F)" form in which
many CJK strings display the accelerator is not fully stripped out
when showing the string in a toolbar, and you end up with "(F)" in
the visible string.

I am considering to change gtk_toolbar_elide_underscores() to strip not
only lone _ characters, but also a sequence of the form " (_<single
character>)" at the end of the string.

I have a number of questions here:
- Does this sound like a reasonable thing to do ? (the risk of
 accidentally stripping something thats not an accelerator is
 probably minimal, but not 0.
Indeed, there can be cases where a single CJK character is enclosed inside
parenthesis, and that's not uncommon; although when enclosed
character is a latin character it mostly means mnemonic key.


- Is the (_F) approach generally considered just a workaround for
 the second bug, or are there languages where it is the
 preferred/standard way to display accel keys ?
Well, it is preferred, since multiple keystrokes are needed to input
non-latin characters, and I doubt if anything like Alt-<char> can
be entered at all. Hope anybody can enlighten me if this is
possible or not.



Ok,  GTK+ 2.10 will strip out a suffix of the form "(_<single character>)"
in
addition to underlines, when displaying labels in toolbars. Please let me
know if you
notice any problems due to this.
I feel the end-user expects that shortcuts refer to the physical keys.
For example, in GTK+ apps as found in GNOME,
Alt-A     (that's latin A)
Alt-Α     (that's greek Α)
point to the same physical key, so menu entries like "_Αρχείο" works just fine no matter which layout is active at the moment.
(Mozilla and OOo have trouble with this on XOrg and they work on it).

Regarding the solution of this, could GTK+
 While loading the menu item strings
     Extract shortkey letter (like Ά)
Search in gtk_compose_seqs[] (gtk+/gtk/gtkimcontextsimple.c) if the character is there ('A is "GDK_dead_acute, GDK_Greek_ALPHA, 0, 0, 0, 0x0386, //* GREEK CAPITAL LETTER ALPHA WITH TONOS */") If shortkey letter is found, set the shortkey letter to "physical" key (/GDK_Greek_ALPHA in this case)

For this to work efficiently, the structure gtk_compose_seqs[] (gtk+/gtk/gtkimcontextsimple.c) should be duplicated with a sorted version by the last entry (codepoint).

There is a pending issue of update gtk_compose_seqs[] (gtk+/gtk/gtkimcontextsimple.c).

Are there languages/scripts not covered by this structure (for example, not using GTK+ IM?).

Simos




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