[gimp/gtk3-port: 217/444] 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/444] Use GTK+3 gtk_get_locale_direction() function instead of current hack.
- Date: Sun, 13 May 2018 21:56:06 +0000 (UTC)
commit 8ff53d56b47c6ec9ef1064dfd222dfff324680d3
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 d82b909..0b6bd03 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]