Ticket #4190: 0002-Journal-list-view-make-buddy-cells-invisible-if-the-.2.patch

File 0002-Journal-list-view-make-buddy-cells-invisible-if-the-.2.patch, 1.2 KB (added by manuq, 11 years ago)

Patch that goes after http://bugs.sugarlabs.org/attachment/ticket/3888/0001-Journal-list-call-do_get_value-directly-to-get-the-b.patch

  • src/jarabe/journal/listview.py

    From 22499022dcc3a91293b35e7d761fcc2d1802f2dd Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= <manuq@laptop.org>
    Date: Sat, 24 Nov 2012 12:56:35 -0300
    Subject: [PATCH shell 2/2] Journal list view: make buddy cells invisible if
     the cell doesn't have a buddy - SL #4190
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    Mail-Followup-To: <sugar-devel@lists.sugarlabs.org>
    
    Signed-off-by: Manuel Quiñones <manuq@laptop.org>
    ---
     src/jarabe/journal/listview.py | 5 +++++
     1 file changed, 5 insertions(+)
    
    diff --git a/src/jarabe/journal/listview.py b/src/jarabe/journal/listview.py
    index 0cf6d35..a03b948 100644
    a b class BaseListView(Gtk.Bin): 
    239239
    240240    def __buddies_set_data_cb(self, column, cell, tree_model,
    241241                              tree_iter, data):
     242        buddy = tree_model.do_get_value(tree_iter, cell._model_column_index)
     243        if buddy is None:
     244            cell.props.visible = False
     245            return
     246
    242247        progress = tree_model[tree_iter][ListModel.COLUMN_PROGRESS]
    243248        cell.props.visible = progress >= 100
    244249