[gtk+/gtk-3-22] AccelLabel: Fix displaying accel unichars >= 0x80



commit c48297ed1210550e673943f0dec55bacc2699c1b
Author: Daniel Boles <dboles src gnome org>
Date:   Sat Aug 5 20:21:28 2017 +0100

    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
    f760538f17673c5bd7fec792be2f1abf8148fc32, 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

 gtk/gtkaccellabel.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkaccellabel.c b/gtk/gtkaccellabel.c
index 2adbf7d..d18ded8 100644
--- a/gtk/gtkaccellabel.c
+++ b/gtk/gtkaccellabel.c
@@ -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);


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