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



commit 735f00b886283f0a8fcee5ac9b414543f19a6ef4
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.

 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 6314d46..24cebdc 100644
--- a/app/gui/gui.c
+++ b/app/gui/gui.c
@@ -199,6 +199,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_language_store_parser_init ();
 


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