[evince/gnome-3-8] ev-toolbar: Set history button arrow icons according to locale's text direction



commit 3059e014563cdf1a7a7c5ab77dfde20b322de1b7
Author: Yosef Or Boczko <yosefor3 walla com>
Date:   Wed Jun 19 09:30:35 2013 +0300

    ev-toolbar: Set history button arrow icons according to locale's text direction
    
    https://bugzilla.gnome.org/show_bug.cgi?id=702585

 shell/ev-history-action-widget.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/shell/ev-history-action-widget.c b/shell/ev-history-action-widget.c
index 048190d..8d825b3 100644
--- a/shell/ev-history-action-widget.c
+++ b/shell/ev-history-action-widget.c
@@ -209,6 +209,9 @@ ev_history_action_widget_create_button (EvHistoryActionWidget *history_widget,
         GtkWidget   *image;
         const gchar *icon_name = NULL;
         const gchar *tooltip_text = NULL;
+        gboolean rtl;
+
+        rtl = (gtk_widget_get_direction (GTK_WIDGET (history_widget)) == GTK_TEXT_DIR_RTL);
 
         button = gtk_button_new ();
         g_signal_connect (button, "clicked",
@@ -220,11 +223,11 @@ ev_history_action_widget_create_button (EvHistoryActionWidget *history_widget,
 
         switch (action_button) {
         case EV_HISTORY_ACTION_BUTTON_BACK:
-                icon_name = "go-previous-symbolic";
+                icon_name = rtl ? "go-previous-rtl-symbolic" : "go-previous-symbolic";
                 tooltip_text = _("Go to previous history item");
                 break;
         case EV_HISTORY_ACTION_BUTTON_FORWARD:
-                icon_name = "go-next-symbolic";
+                icon_name = rtl ? "go-next-rtl-symbolic" : "go-next-symbolic";
                 tooltip_text = _("Go to next history item");
                 break;
         }


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