[gthumb] sharpen: Fix the undo symbols in RTL



commit 3ba64552d2ffac3162e885a5ccde914a99b35fc4
Author: Yosef Or Boczko <yoseforb src gnome org>
Date:   Mon Feb 3 18:55:25 2014 +0200

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

 extensions/file_tools/data/ui/sharpen-options.ui |    4 +---
 extensions/file_tools/gth-file-tool-sharpen.c    |    7 +++++++
 2 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/extensions/file_tools/data/ui/sharpen-options.ui 
b/extensions/file_tools/data/ui/sharpen-options.ui
index a33a493..1a634f7 100644
--- a/extensions/file_tools/data/ui/sharpen-options.ui
+++ b/extensions/file_tools/data/ui/sharpen-options.ui
@@ -194,11 +194,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-sharpen.c b/extensions/file_tools/gth-file-tool-sharpen.c
index 8ecb88d..67009e7 100644
--- a/extensions/file_tools/gth-file-tool-sharpen.c
+++ b/extensions/file_tools/gth-file-tool-sharpen.c
@@ -253,9 +253,12 @@ gth_file_tool_sharpen_get_options (GthFileTool *base)
        cairo_surface_t    *source;
        GtkWidget          *options;
        GtkWidget          *image_navigator;
+       gboolean            rtl;
 
        self = (GthFileToolSharpen *) base;
 
+       rtl = gtk_widget_get_direction (GTK_WIDGET (base)) == GTK_TEXT_DIR_RTL;
+
        source = gth_image_viewer_page_tool_get_source (GTH_IMAGE_VIEWER_PAGE_TOOL (self));
        if (source == NULL)
                return NULL;
@@ -265,6 +268,10 @@ gth_file_tool_sharpen_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->preview = gth_image_viewer_new ();
        gth_image_viewer_set_reset_scrollbars (GTH_IMAGE_VIEWER (self->priv->preview), FALSE);
        gth_image_viewer_set_fit_mode (GTH_IMAGE_VIEWER (self->priv->preview), GTH_FIT_NONE);


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