Ticket #4331: 0003-Journal-list-view-use-one-column-for-each-buddy-to-g.patch

File 0003-Journal-list-view-use-one-column-for-each-buddy-to-g.patch, 1.7 KB (added by manuq, 11 years ago)

Patch for the buddy wrong size in the list view.

  • src/jarabe/journal/listview.py

    From b0cc9a53ee784b451162e80e8a0b0870355fdb9b Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= <manuq@laptop.org>
    Date: Sat, 15 Dec 2012 11:27:40 -0300
    Subject: [PATCH shell 3/3] Journal list view: use one column for each buddy
     to get the original width - SL #4331
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    Mail-Followup-To: <sugar-devel@lists.sugarlabs.org>
    
    Otherwise if the row has invisible buddy cells the other buddy cells
    are expanded horizontally to fit the column width.
    
    Signed-off-by: Manuel Quiñones <manuq@laptop.org>
    ---
     src/jarabe/journal/listview.py | 8 +++++---
     1 file changed, 5 insertions(+), 3 deletions(-)
    
    diff --git a/src/jarabe/journal/listview.py b/src/jarabe/journal/listview.py
    index 4955b86..fde4910 100644
    a b class BaseListView(Gtk.Bin): 
    172172                                         ListModel.COLUMN_TITLE)
    173173        self.tree_view.append_column(self._title_column)
    174174
    175         buddies_column = Gtk.TreeViewColumn()
    176         buddies_column.props.sizing = Gtk.TreeViewColumnSizing.FIXED
    177         self.tree_view.append_column(buddies_column)
    178175
    179176        for column_index in [ListModel.COLUMN_BUDDY_1,
    180177                             ListModel.COLUMN_BUDDY_2,
    181178                             ListModel.COLUMN_BUDDY_3]:
     179
     180            buddies_column = Gtk.TreeViewColumn()
     181            buddies_column.props.sizing = Gtk.TreeViewColumnSizing.FIXED
     182            self.tree_view.append_column(buddies_column)
     183
    182184            cell_icon = CellRendererBuddy(self.tree_view,
    183185                                          column_index=column_index)
    184186            buddies_column.pack_start(cell_icon, True)