From a9eb591c307a4d346658f85c5f601c9c149c7653 Mon Sep 17 00:00:00 2001
From: Aleksey Lim <alsroot@member.fsf.org>
Date: Sat, 19 Sep 2009 23:01:32 +0000
Subject: Invisible downlading progress bar in Journal #1388
---
src/jarabe/journal/listview.py | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/src/jarabe/journal/listview.py b/src/jarabe/journal/listview.py
index 7189fc6..adc1d58 100644
a
|
b
|
class BaseListView(gtk.Bin): |
170 | 170 | buddies_column.pack_start(cell_icon) |
171 | 171 | buddies_column.props.fixed_width += cell_icon.props.width |
172 | 172 | buddies_column.add_attribute(cell_icon, 'buddy', column_index) |
| 173 | buddies_column.set_cell_data_func(cell_icon, |
| 174 | self.__buddies_set_data_cb, lambda x: x >= 100) |
| 175 | |
| 176 | cell_progress = gtk.CellRendererProgress() |
| 177 | cell_progress.props.ypad = style.GRID_CELL_SIZE / 4 |
| 178 | buddies_column.pack_start(cell_progress) |
| 179 | buddies_column.add_attribute(cell_progress, 'value', |
| 180 | ListModel.COLUMN_PROGRESS) |
| 181 | buddies_column.set_cell_data_func(cell_progress, |
| 182 | self.__buddies_set_data_cb, lambda x: x < 100) |
173 | 183 | |
174 | 184 | cell_text = gtk.CellRendererText() |
175 | 185 | cell_text.props.xalign = 1 |
… |
… |
class BaseListView(gtk.Bin): |
212 | 222 | if self._model is not None: |
213 | 223 | self._model.stop() |
214 | 224 | |
| 225 | def __buddies_set_data_cb(self, column, cell, tree_model, tree_iter, |
| 226 | get_visible): |
| 227 | progress = tree_model[tree_iter][ListModel.COLUMN_PROGRESS] |
| 228 | cell.props.visible = get_visible(progress) |
| 229 | |
215 | 230 | def __favorite_set_data_cb(self, column, cell, tree_model, tree_iter): |
216 | 231 | favorite = tree_model[tree_iter][ListModel.COLUMN_FAVORITE] |
217 | 232 | if favorite: |