[gthumb] rotate image: Fix the undo symbols in RTL



commit 71fd11b6856a00c2faa7db2684cc6bafd8904a92
Author: Yosef Or Boczko <yoseforb src gnome org>
Date:   Mon Feb 3 18:54:36 2014 +0200

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

 extensions/file_tools/data/ui/rotate-options.ui |    4 +---
 extensions/file_tools/gth-file-tool-rotate.c    |    7 +++++++
 2 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/extensions/file_tools/data/ui/rotate-options.ui b/extensions/file_tools/data/ui/rotate-options.ui
index 54b2379..19ee5a3 100644
--- a/extensions/file_tools/data/ui/rotate-options.ui
+++ b/extensions/file_tools/data/ui/rotate-options.ui
@@ -494,11 +494,9 @@
                         <property name="receives_default">True</property>
                         <property name="tooltip_text" translatable="yes">Reset</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-rotate.c b/extensions/file_tools/gth-file-tool-rotate.c
index 14bb4df..4df5786 100644
--- a/extensions/file_tools/gth-file-tool-rotate.c
+++ b/extensions/file_tools/gth-file-tool-rotate.c
@@ -387,9 +387,12 @@ gth_file_tool_rotate_get_options (GthFileTool *base)
        GtkWidget         *viewer;
        char              *color_spec;
        GdkRGBA            background_color;
+       gboolean           rtl;
 
        self = (GthFileToolRotate *) base;
 
+       rtl = gtk_widget_get_direction (GTK_WIDGET (base)) == GTK_TEXT_DIR_RTL;
+
        window = gth_file_tool_get_window (base);
        viewer_page = gth_browser_get_viewer_page (GTH_BROWSER (window));
        if (! GTH_IS_IMAGE_VIEWER_PAGE (viewer_page))
@@ -405,6 +408,10 @@ gth_file_tool_rotate_get_options (GthFileTool *base)
 
        self->priv->builder = _gtk_builder_new_from_file ("rotate-options.ui", "file_tools");
 
+       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->rotation_angle_adj = gth_color_scale_label_new (GET_WIDGET ("rotation_angle_hbox"),
                                                                    GTK_LABEL (GET_WIDGET 
("rotation_angle_label")),
                                                                    GTH_COLOR_SCALE_DEFAULT,


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