def set_activities(self): buff_widget = [] for b in tyrs.get_buffers(): if b == self.buffer: buff_widget.append(('current_tab', display[b])) else: buff_widget.append(('other_tab', display[b])) if b in ('home', 'mentions', 'direct'): buff_widget.append(self.get_unread(b)) return urwid.Text(buff_widget)
def __init__(self): self.api = tyrs.get_api() self.conf = tyrs.get_conf() self.timelines = tyrs.get_timelines() self.buffers = tyrs.get_buffers() self.completion = tyrs.get_completion() self.help = False tyrs.set_interface(self) self.update_last_read_home() self.api.set_interface() self.regex_retweet = re.compile('^RT @\w+:') self.stoped = False self.buffer = 'home' self.first_update() self.main_loop()