[gtk+] shortcuts: the accelerator should always be LTR



commit a68915abd1f8c3f01f48ffe97c7fa88d6e8c1403
Author: Christian Hergert <chergert redhat com>
Date:   Mon Oct 10 13:52:50 2016 -0700

    shortcuts: the accelerator should always be LTR
    
    Even on RTL languages, we want the shortcut to be LTR so that we always
    have <control> to the left of the accel keyval.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=772695

 gtk/gtkshortcutlabel.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkshortcutlabel.c b/gtk/gtkshortcutlabel.c
index 905a27b..bfacbd3 100644
--- a/gtk/gtkshortcutlabel.c
+++ b/gtk/gtkshortcutlabel.c
@@ -499,6 +499,9 @@ static void
 gtk_shortcut_label_init (GtkShortcutLabel *self)
 {
   gtk_box_set_spacing (GTK_BOX (self), 6);
+
+  /* Always use LTR so that modifiers are always left to the keyval */
+  gtk_widget_set_direction (GTK_WIDGET (self), GTK_TEXT_DIR_LTR);
 }
 
 /**


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