[gthumb] toolbox: Fix the undo and the redo symbols in RTL



commit 46396e7e5cb478ab00ce24562670e088d527fb33
Author: Yosef Or Boczko <yoseforb src gnome org>
Date:   Mon Feb 3 18:56:13 2014 +0200

    toolbox: Fix the undo and the redo symbols in RTL
    
    https://bugzilla.gnome.org/show_bug.cgi?id=723542

 extensions/file_tools/gth-file-tool-redo.c |    8 +++++++-
 extensions/file_tools/gth-file-tool-undo.c |    8 +++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/extensions/file_tools/gth-file-tool-redo.c b/extensions/file_tools/gth-file-tool-redo.c
index 95919cd..ed974c6 100644
--- a/extensions/file_tools/gth-file-tool-redo.c
+++ b/extensions/file_tools/gth-file-tool-redo.c
@@ -72,5 +72,11 @@ gth_file_tool_redo_class_init (GthFileToolRedoClass *klass)
 static void
 gth_file_tool_redo_init (GthFileToolRedo *self)
 {
-       gth_file_tool_construct (GTH_FILE_TOOL (self), "edit-redo-symbolic", _("Redo"), 
GTH_TOOLBOX_SECTION_FILE);
+       gboolean rtl;
+
+       rtl = gtk_widget_get_direction (GTK_WIDGET (self)) == GTK_TEXT_DIR_RTL;
+
+       gth_file_tool_construct (GTH_FILE_TOOL (self), rtl ? "edit-redo-rtl-symbolic" :
+                                                            "edit-redo-symbolic",
+                                                      _("Redo"), GTH_TOOLBOX_SECTION_FILE);
 }
diff --git a/extensions/file_tools/gth-file-tool-undo.c b/extensions/file_tools/gth-file-tool-undo.c
index d6dfc07..8fc27c9 100644
--- a/extensions/file_tools/gth-file-tool-undo.c
+++ b/extensions/file_tools/gth-file-tool-undo.c
@@ -72,5 +72,11 @@ gth_file_tool_undo_class_init (GthFileToolUndoClass *klass)
 static void
 gth_file_tool_undo_init (GthFileToolUndo *self)
 {
-       gth_file_tool_construct (GTH_FILE_TOOL (self), "edit-undo-symbolic", _("Undo"), 
GTH_TOOLBOX_SECTION_FILE);
+       gboolean rtl;
+
+       rtl = gtk_widget_get_direction (GTK_WIDGET (self)) == GTK_TEXT_DIR_RTL;
+
+       gth_file_tool_construct (GTH_FILE_TOOL (self), rtl ? "edit-undo-rtl-symbolic" :
+                                                            "edit-undo-symbolic",
+                                                      _("Undo"), GTH_TOOLBOX_SECTION_FILE);
 }


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