AccelLabel: Fix displaying accel unichars >= 0x80

In GTK+ 2, the ch < 0x80 was ORd with klass->latin1_to_char, and that
was unconditionally set to TRUE in the class init function, so
effectively the ch < 0x80 never mattered before or served any purpose.

When klass->latin1_to_char was deleted from the class in commit
f760538f17, this check’s sense changed.

The resuls was that accel keyvals with gunichar value >= 0x80 stopped
being rendered as symbols, instead falling back to their keysym name.
Instead of recognisable symbols for these, we get raw, often obscure,
and untranslatable keysym names. This breaks accessibility as well as
client users who may be parsing such accels and migrating from GTK+ 2.

So, remove the < 0x80 to restore the behaviour from before said commit.

https://bugzilla.gnome.org/show_bug.cgi?id=783906
This commit is contained in:
Daniel Boles 2017-08-05 20:21:28 +01:00 committed by Daniel Boles
parent a86de5905c
commit c48297ed12

View File

@ -864,7 +864,7 @@ _gtk_accel_label_class_get_accelerator_label (GtkAccelLabelClass *klass,
}
ch = gdk_keyval_to_unicode (accelerator_key);
if (ch && ch < 0x80 && (g_unichar_isgraph (ch) || ch == ' '))
if (ch && (ch == ' ' || g_unichar_isgraph (ch)))
{
if (seen_mod)
g_string_append (gstring, klass->mod_separator);