[cheese] Fix the page navigation icons in RTL



commit 80c45374b715005f1bbe30d1adcf897ed18c14fc
Author: Yosef Or Boczko <yoseforb src gnome org>
Date:   Tue Feb 4 00:47:53 2014 +0200

    Fix the page navigation icons in RTL
    
    https://bugzilla.gnome.org/show_bug.cgi?id=723569

 data/cheese-main-window.ui |    4 +---
 src/cheese-window.vala     |   15 +++++++++++++++
 2 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/data/cheese-main-window.ui b/data/cheese-main-window.ui
index ade94f3..70d23da 100644
--- a/data/cheese-main-window.ui
+++ b/data/cheese-main-window.ui
@@ -121,7 +121,6 @@
                             <property name="visible">True</property>
                             <child>
                               <object class="GtkImage" id="effects_prev_page_button_image">
-                                <property name="icon_name">go-previous-symbolic</property>
                                 <property name="visible">True</property>
                               </object>
                             </child>
@@ -157,8 +156,7 @@
                             <property name="tooltip_text" translatable="yes">Navigate to the next page of 
effects</property>
                             <property name="visible">True</property>
                             <child>
-                              <object class="GtkImage" id="effects_prev_next_button_image">
-                                <property name="icon-name">go-next-symbolic</property>
+                              <object class="GtkImage" id="effects_next_page_button_image">
                                 <property name="visible">True</property>
                               </object>
                             </child>
diff --git a/src/cheese-window.vala b/src/cheese-window.vala
index dcee6c7..ef4b412 100644
--- a/src/cheese-window.vala
+++ b/src/cheese-window.vala
@@ -71,6 +71,10 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow
     [GtkChild]
     private Gtk.ToggleButton effects_toggle_button;
     [GtkChild]
+    private Gtk.Image effects_prev_page_button_image;
+    [GtkChild]
+    private Gtk.Image effects_next_page_button_image;
+    [GtkChild]
     private Gtk.Widget buttons_area;
     private Gtk.Menu thumbnail_popup;
 
@@ -118,6 +122,17 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow
     public MainWindow (Gtk.Application application)
     {
         GLib.Object (application: application);
+
+        if (get_direction () == Gtk.TextDirection.RTL)
+        {
+            effects_prev_page_button_image.icon_name = "go-previous-rtl-symbolic";
+            effects_next_page_button_image.icon_name = "go-next-rtl-symbolic";
+        }
+        else
+        {
+            effects_prev_page_button_image.icon_name = "go-previous-symbolic";
+            effects_next_page_button_image.icon_name = "go-next-symbolic";
+        }
     }
 
     private bool on_window_state_change_event (Gtk.Widget widget,


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