[gimp/gtk3-port: 217/262] Use GTK+3 gtk_get_locale_direction() function instead of current hack.
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gtk3-port: 217/262] Use GTK+3 gtk_get_locale_direction() function instead of current hack.
- Date: Sun, 29 Apr 2018 17:02:12 +0000 (UTC)
commit f97868265d1fb0117ce291f2529f4e222909c2c6
Author: Jehan <jehan girinstud io>
Date: Thu Jan 16 15:50:58 2014 +1300
Use GTK+3 gtk_get_locale_direction() function instead of current hack.
This new function is available from the released dev version 3.11.4. But
we don't want to require GTK+ master for the gtk3-port branch, so I
leave the old hack in a GTK_CHECK_VERSION() macro, to be removed later
when we update GTK+ required version.
app/gui/gui.c | 20 ++++++--------------
1 files changed, 6 insertions(+), 14 deletions(-)
---
diff --git a/app/gui/gui.c b/app/gui/gui.c
index e3edb33..a0f126d 100644
--- a/app/gui/gui.c
+++ b/app/gui/gui.c
@@ -228,21 +228,13 @@ gui_init (Gimp *gimp,
the_gui_gimp = gimp;
- /* TRANSLATORS: there is no need to translate this in GIMP. This uses
- * "gtk20" domain as a special trick to determine language direction,
- * but xgettext extracts it anyway mistakenly into GIMP po files.
- * Leave an empty string as translation. It does not matter.
+ /* 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)
- /* 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 overridden the language, therefore we must
- * check the widget directions again.
- */
- gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL);
- else
- gtk_widget_set_default_direction (GTK_TEXT_DIR_LTR);
+ gtk_widget_set_default_direction (gtk_get_locale_direction ());
gui_unique_init (gimp);
gimp_language_store_parser_init ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]