From 61ad152dcca127ff6f3c081ea944291e9e1eaec5 Mon Sep 17 00:00:00 2001 From: anubhav Date: Sat, 2 Oct 2010 21:17:51 +0530 Subject: [PATCH] Mirror arrow icons when running in RTL mode(SL#306) This patch inserts a if condition in the intiallization of the the class of the toolbar.Which check for the direction of the language is right to left or left to right thus reverting the buttons of toolbar (in the case of rtl ) This patch handels the problem with read toolbar in read activity --- source/read/readtoolbar.py | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/source/read/readtoolbar.py b/source/read/readtoolbar.py index 53a756f..bc6f9ef 100644 --- a/source/read/readtoolbar.py +++ b/source/read/readtoolbar.py @@ -37,6 +37,14 @@ class EditToolbar(activity.EditToolbar): activity.EditToolbar.__init__(self) self._evince_view = None + + if gtk.widget_get_default_direction() == gtk.TEXT_DIR_RTL: + self.nextbutton = 'go-previous-paired' + self.previousbutton = 'go-next-paired' + + else : + self.nextbutton = 'go-next-paired' + self.previousbutton = 'go-previous-paired' self._document = None self._find_job = None @@ -60,14 +68,14 @@ class EditToolbar(activity.EditToolbar): self.insert(search_item, -1) search_item.show() - self._prev = ToolButton('go-previous-paired') + self._prev = ToolButton(self.previousbutton) self._prev.set_tooltip(_('Previous')) self._prev.props.sensitive = False self._prev.connect('clicked', self._find_prev_cb) self.insert(self._prev, -1) self._prev.show() - self._next = ToolButton('go-next-paired') + self._next = ToolButton(self.nextbutton) self._next.set_tooltip(_('Next')) self._next.props.sensitive = False self._next.connect('clicked', self._find_next_cb) -- 1.7.0.4