[gnome-font-viewer] Set button arrow icons according to locale's text direction



commit f04f3c0c40b624578353a1505efdf796ed0a090f
Author: Yosef Or Boczko <yosefor3 walla com>
Date:   Wed Jun 19 17:23:52 2013 +0300

    Set button arrow icons according to locale's text direction
    
    https://bugzilla.gnome.org/show_bug.cgi?id=702659

 src/font-view.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/font-view.c b/src/font-view.c
index d9bf3ef..e9196b1 100644
--- a/src/font-view.c
+++ b/src/font-view.c
@@ -502,9 +502,12 @@ font_view_application_do_open (FontViewApplication *self,
                                GFile *file)
 {
     gchar *uri;
+    gboolean rtl;
 
     font_view_ensure_model (self);
 
+    rtl = gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL;
+
     self->info_button = gd_header_simple_button_new ();
     gd_header_button_set_label (GD_HEADER_BUTTON (self->info_button), _("Info"));
     gd_header_bar_pack_end (GD_HEADER_BAR (self->header), self->info_button);
@@ -522,7 +525,8 @@ font_view_application_do_open (FontViewApplication *self,
 
     self->back_button = gd_header_simple_button_new ();
     gd_header_button_set_label (GD_HEADER_BUTTON (self->back_button), _("Back"));
-    gd_header_button_set_symbolic_icon_name (GD_HEADER_BUTTON (self->back_button), "go-previous-symbolic");
+    gd_header_button_set_symbolic_icon_name (GD_HEADER_BUTTON (self->back_button),
+                                            rtl ? "go-previous-rtl-symbolic" : "go-previous-symbolic");
     gd_header_bar_pack_start (GD_HEADER_BAR (self->header), self->back_button);
 
     g_signal_connect (self->back_button, "clicked",


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