[gthumb] adjust colors: Fix the undo symbols in RTL



commit d33de023310e568ae7957c805a5d01c92cc4294c
Author: Yosef Or Boczko <yoseforb src gnome org>
Date:   Mon Feb 3 18:53:21 2014 +0200

    adjust colors: Fix the undo symbols in RTL
    
    https://bugzilla.gnome.org/show_bug.cgi?id=723542

 .../file_tools/data/ui/adjust-colors-options.ui    |    4 +---
 .../file_tools/gth-file-tool-adjust-colors.c       |    7 +++++++
 2 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/extensions/file_tools/data/ui/adjust-colors-options.ui 
b/extensions/file_tools/data/ui/adjust-colors-options.ui
index fa1497d..f6e0035 100644
--- a/extensions/file_tools/data/ui/adjust-colors-options.ui
+++ b/extensions/file_tools/data/ui/adjust-colors-options.ui
@@ -365,11 +365,9 @@
                     <property name="tooltip_text" translatable="yes">Reset</property>
                     <property name="use_underline">True</property>
                     <child>
-                      <object class="GtkImage" id="image1">
+                      <object class="GtkImage" id="reset_image">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="icon_name">edit-undo-symbolic</property>
-                        <property name="icon_size">1</property>
                       </object>
                     </child>
                   </object>
diff --git a/extensions/file_tools/gth-file-tool-adjust-colors.c 
b/extensions/file_tools/gth-file-tool-adjust-colors.c
index 26a8376..a1f6438 100644
--- a/extensions/file_tools/gth-file-tool-adjust-colors.c
+++ b/extensions/file_tools/gth-file-tool-adjust-colors.c
@@ -406,9 +406,12 @@ gth_file_tool_adjust_colors_get_options (GthFileTool *base)
        GtkWidget               *options;
        int                      width, height;
        GtkAllocation            allocation;
+       gboolean                 rtl;
 
        self = (GthFileToolAdjustColors *) base;
 
+       rtl = gtk_widget_get_direction (GTK_WIDGET (base)) == GTK_TEXT_DIR_RTL;
+
        viewer_page = gth_image_viewer_page_tool_get_page (GTH_IMAGE_VIEWER_PAGE_TOOL (self));
        if (viewer_page == NULL)
                return NULL;
@@ -437,6 +440,10 @@ gth_file_tool_adjust_colors_get_options (GthFileTool *base)
        options = _gtk_builder_get_widget (self->priv->builder, "options");
        gtk_widget_show (options);
 
+       gtk_image_set_from_icon_name (GTK_IMAGE (GET_WIDGET("reset_image")), rtl ? "edit-undo-rtl-symbolic" :
+                                                                                  "edit-undo-symbolic",
+                                                                            GTK_ICON_SIZE_MENU);
+
        self->priv->histogram_view = gth_histogram_view_new (self->priv->histogram);
        gtk_widget_show (self->priv->histogram_view);
        gtk_box_pack_start (GTK_BOX (GET_WIDGET ("histogram_hbox")), self->priv->histogram_view, TRUE, TRUE, 
0);


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