def __init__(self, topic, callback=None):
super(TopicRow, self).__init__('', on_press=callback,
user_data=(topic.key, topic.name))
self.mark = False
self._style = None
self.topic_key = topic.key
self.name = urwid.Text('')
self._setName(topic.name)
self.name.set_wrap_mode('clip')
self.active_stories = urwid.Text(u'', align=urwid.RIGHT)
col = urwid.Columns([
self.name,
('fixed', ACTIVE_COL_WIDTH, self.active_stories),
])
self.row_style = urwid.AttrMap(col, '')
self._w = urwid.AttrMap(self.row_style, None, focus_map=self.project_focus_map)
self._style = 'subscribed-project'
self.row_style.set_attr_map({None: self._style})
self.update(topic)
评论列表
文章目录