[gimp/gimp-2-8] Bug 679214 - widget direction set to system locale, not user-set lang



commit c1314499ffa6aa4cf7543e00b028d987209fa6fc
Author: Jehan <jehan girinstud io>
Date:   Mon Dec 9 19:31:48 2013 +1300

    Bug 679214 - widget direction set to system locale, not user-set lang
    
    In particular a RTL-localized OS, where the user sets GIMP to a LTR lang
    would still have a RTL UI (menus, etc.). And vice versa.
    (cherry picked from commit 735f00b886283f0a8fcee5ac9b414543f19a6ef4)

 app/gui/gui.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/app/gui/gui.c b/app/gui/gui.c
index faaa91b..3f65546 100644
--- a/app/gui/gui.c
+++ b/app/gui/gui.c
@@ -198,6 +198,17 @@ gui_init (Gimp     *gimp,
 
   the_gui_gimp = gimp;
 
+  /* Normally this should have been taken care of during command line
+   * parsing as a post-parse hook of gtk_get_option_group(), using the
+   * system locales.
+   * But user config may have overriden the language, therefore we must
+   * check the widget directions again.
+   */
+  if (g_strcmp0 (dgettext ("gtk20", "default:LTR"), "default:RTL") == 0)
+    gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL);
+  else
+    gtk_widget_set_default_direction (GTK_TEXT_DIR_LTR);
+
   gui_unique_init (gimp);
 
   gimp_widgets_init (gui_help_func,


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