BugBashing

Attachment '40001-Mirror-arrow-icons-when-running-in-RTL-mode-SL-306.patch'

Download

   1 From 61ad152dcca127ff6f3c081ea944291e9e1eaec5 Mon Sep 17 00:00:00 2001
   2 From: anubhav <anubhav@dev.seeta.in>
   3 Date: Sat, 2 Oct 2010 21:17:51 +0530
   4 Subject: [PATCH] Mirror arrow icons when running in RTL mode(SL#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 read toolbar in read activity
  10 ---
  11  source/read/readtoolbar.py |   12 ++++++++++--
  12  1 files changed, 10 insertions(+), 2 deletions(-)
  13 
  14 diff --git a/source/read/readtoolbar.py b/source/read/readtoolbar.py
  15 index 53a756f..bc6f9ef 100644
  16 --- a/source/read/readtoolbar.py
  17 +++ b/source/read/readtoolbar.py
  18 @@ -37,6 +37,14 @@ class EditToolbar(activity.EditToolbar):
  19          activity.EditToolbar.__init__(self)
  20  
  21          self._evince_view = None
  22 +        
  23 +        if gtk.widget_get_default_direction() == gtk.TEXT_DIR_RTL:
  24 +           self.nextbutton = 'go-previous-paired'
  25 +           self.previousbutton = 'go-next-paired'
  26 +                      
  27 +        else :
  28 +           self.nextbutton = 'go-next-paired'
  29 +           self.previousbutton = 'go-previous-paired'
  30  
  31          self._document = None
  32          self._find_job = None
  33 @@ -60,14 +68,14 @@ class EditToolbar(activity.EditToolbar):
  34          self.insert(search_item, -1)
  35          search_item.show()
  36  
  37 -        self._prev = ToolButton('go-previous-paired')
  38 +        self._prev = ToolButton(self.previousbutton)
  39          self._prev.set_tooltip(_('Previous'))
  40          self._prev.props.sensitive = False
  41          self._prev.connect('clicked', self._find_prev_cb)
  42          self.insert(self._prev, -1)
  43          self._prev.show()
  44  
  45 -        self._next = ToolButton('go-next-paired')
  46 +        self._next = ToolButton(self.nextbutton)
  47          self._next.set_tooltip(_('Next'))
  48          self._next.props.sensitive = False
  49          self._next.connect('clicked', self._find_next_cb)
  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.
  • [get | view] (2010-10-02 18:07:36, 2.1 KB) [[attachment:10001-Mirror-arrow-icons-when-running-in-RTL-mode-306.patch]]
  • [get | view] (2010-10-02 18:08:33, 2.1 KB) [[attachment:20001-Mirror-arrow-icons-when-running-in-RTL-mode-306.patch]]
  • [get | view] (2010-10-02 18:08:54, 3.6 KB) [[attachment:30001-Mirror-arrow-icons-when-running-in-RTL-mode-SL-306.patch]]
  • [get | view] (2010-10-02 18:09:06, 2.0 KB) [[attachment:40001-Mirror-arrow-icons-when-running-in-RTL-mode-SL-306.patch]]
 All files | Selected Files: delete move to page

You are not allowed to attach a file to this page.