[gnome-documents] toolbar: reverse the back icon when using an RTL layout



commit 31d36326afd049c1d75b4b3c77025a4c9eaaebf3
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu May 31 14:16:02 2012 -0400

    toolbar: reverse the back icon when using an RTL layout

 src/mainToolbar.js |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/mainToolbar.js b/src/mainToolbar.js
index c2b420c..b9262ae 100644
--- a/src/mainToolbar.js
+++ b/src/mainToolbar.js
@@ -232,8 +232,12 @@ MainToolbar.prototype = {
     },
 
     _populateForPreview: function(model) {
+        let iconName =
+            (this.widget.get_direction() == Gtk.TextDirection.RTL) ?
+            'go-next-symbolic' : 'go-previous-symbolic';
+
         let backButton =
-            this.widget.add_button('go-previous-symbolic', _("Back"), true);
+            this.widget.add_button(iconName, _("Back"), true);
         backButton.connect('clicked', Lang.bind(this,
             function() {
                 Global.modeController.setWindowMode(WindowMode.WindowMode.OVERVIEW);



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