def render_cell_icon(self, column, cell, store, iter, user_data):
pkg = store.get_value(iter, self.COL_PKG)
if pkg is None:
cell.set_visible(False)
return
cell.set_visible(True)
when = store.get_value(iter, self.COL_WHEN)
if isinstance(when, datetime.datetime):
action = store.get_value(iter, self.COL_ACTION)
cell.set_property('pixbuf', self._emblems[action])
#~ icon_name = Icons.MISSING_APP
#~ for m in self.db.xapiandb.postlist("AP" + pkg):
#~ doc = self.db.xapiandb.get_document(m.docid)
#~ icon_value = doc.get_value(XapianValues.ICON)
#~ if icon_value:
#~ icon_name = os.path.splitext(icon_value)[0]
#~ break
#~ if icon_name in self._app_icon_cache:
#~ icon = self._app_icon_cache[icon_name]
#~ else:
#~ try:
#~ icon = self.icons.load_icon(icon_name, self.ICON_SIZE,
#~ 0)
#~ except GObject.GError:
#~ icon = self._app_icon_cache[Icons.MISSING_APP]
#~ self._app_icon_cache[icon_name] = icon
评论列表
文章目录