Ticket #4328: 0001-Journal-fix-layout-reordering-for-right-to-left-lang.patch

File 0001-Journal-fix-layout-reordering-for-right-to-left-lang.patch, 2.0 KB (added by manuq, 11 years ago)

Proposed patch.

  • src/jarabe/journal/detailview.py

    From 2239ae24709f658135d317d6523a3f655010a716 Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= <manuq@laptop.org>
    Date: Mon, 17 Dec 2012 09:13:54 -0300
    Subject: [PATCH shell] Journal: fix layout reordering for right-to-left
     languages - SL #4328
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    Mail-Followup-To: <sugar-devel@lists.sugarlabs.org>
    
    This was introduced in the de-hippo move.  reverse() was a method of
    hippo.CanvasBox .  Now using Gtk boxes can do:
    
        for child in box.get_children():
            box.reorder_child(child, 0)
    
    Signed-off-by: Manuel Quiñones <manuq@laptop.org>
    ---
     src/jarabe/journal/detailview.py    | 4 +++-
     src/jarabe/journal/expandedentry.py | 4 +++-
     2 files changed, 6 insertions(+), 2 deletions(-)
    
    diff --git a/src/jarabe/journal/detailview.py b/src/jarabe/journal/detailview.py
    index c7748ed..ade8718 100644
    a b class BackBar(Gtk.EventBox): 
    9999        self.add(hbox)
    100100
    101101        if Gtk.Widget.get_default_direction() == Gtk.TextDirection.RTL:
    102             hbox.reverse()
     102            # Reverse hbox children.
     103            for child in hbox.get_children():
     104                hbox.reorder_child(child, 0)
    103105
    104106        self.connect('enter-notify-event', self.__enter_notify_event_cb)
    105107        self.connect('leave-notify-event', self.__leave_notify_event_cb)
  • src/jarabe/journal/expandedentry.py

    diff --git a/src/jarabe/journal/expandedentry.py b/src/jarabe/journal/expandedentry.py
    index d2188c4..5959d2a 100644
    a b class ExpandedEntry(Gtk.EventBox): 
    106106        header.pack_start(self._date, False, False, style.DEFAULT_SPACING)
    107107
    108108        if Gtk.Widget.get_default_direction() == Gtk.TextDirection.RTL:
    109             header.reverse()
     109            # Reverse header children.
     110            for child in header.get_children():
     111                header.reorder_child(child, 0)
    110112
    111113        # First body column
    112114        self._preview_box = Gtk.Frame()