BugBashing
Attachment '10001-Mirror-arrow-icons-when-running-in-RTL-mode-306.patch'
Download 1 From 612b5df238c40e69d7306d14b05198ab50895053 Mon Sep 17 00:00:00 2001
2 From: anubhav <anubhav@dev.seeta.in>
3 Date: Sat, 2 Oct 2010 21:36:07 +0530
4 Subject: [PATCH] Mirror arrow icons when running in RTL mode(#306)
5
6 This patch inserts a if condition in the intiallization of the the class of the
7 toolbar.Which check for the direction of the language is right to left or
8 left to right thus reverting the buttons of toolbar (in the case of rtl )
9 This patch handels the problem with the log viewer bar in log activity
10 ---
11 source/log/logviewer.py | 14 +++++++++++---
12 1 files changed, 11 insertions(+), 3 deletions(-)
13
14 diff --git a/source/log/logviewer.py b/source/log/logviewer.py
15 index cdd77ed..fcb5a86 100644
16 --- a/source/log/logviewer.py
17 +++ b/source/log/logviewer.py
18 @@ -324,7 +324,15 @@ class LogActivity(activity.Activity):
19 def __init__(self, handle):
20 activity.Activity.__init__(self, handle)
21 self.set_title(_('Log'))
22 -
23 +
24 + if gtk.widget_get_default_direction() == gtk.TEXT_DIR_RTL:
25 + self.nextbutton = 'go-previous-paired'
26 + self.previousbutton = 'go-next-paired'
27 +
28 + else :
29 + self.nextbutton = 'go-next-paired'
30 + self.previousbutton = 'go-previous-paired'
31 +
32 # Paths to watch: ~/.sugar/someuser/logs, /var/log
33 paths = []
34 paths.append(env.get_profile_path('logs'))
35 @@ -377,12 +385,12 @@ class LogActivity(activity.Activity):
36 search_item.add(search_entry)
37 toolbar_box.toolbar.insert(search_item, -1)
38
39 - self._search_prev = ToolButton('go-previous-paired')
40 + self._search_prev = ToolButton(self.previousbutton)
41 self._search_prev.set_tooltip(_('Previous'))
42 self._search_prev.connect('clicked', self._search_prev_cb)
43 toolbar_box.toolbar.insert(self._search_prev, -1)
44
45 - self._search_next = ToolButton('go-next-paired')
46 + self._search_next = ToolButton(self.nextbutton)
47 self._search_next.set_tooltip(_('Next'))
48 self._search_next.connect('clicked', self._search_next_cb)
49 toolbar_box.toolbar.insert(self._search_next, -1)
50 --
51 1.7.0.4
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.