def main_loop (self): self.header = HeaderWidget() foot = help_bar() self.listbox = self.select_current_timeline().timeline self.main_frame = urwid.Frame(urwid.AttrWrap(self.listbox, 'body'), header=self.header, footer=foot) key_handle = Keys() urwid.connect_signal(key_handle, 'help_done', self.help_done) self.loop = urwid.MainLoop(self.main_frame, palette, unhandled_input=key_handle.keystroke) update = UpdateThread() update.start() self.loop.run() update._Thread__stop() update.stop()
def main_loop (self): self.header = HeaderWidget() self.items = [] walker = urwid.SimpleListWalker(self.items) self.listbox = urwid.ListBox(walker) urwid.connect_signal(walker, 'modified', self.lazzy_load) foot = help_bar() self.main_frame = urwid.Frame(urwid.AttrWrap(self.listbox, 'body'), header=self.header, footer=foot) key_handle = Keys() urwid.connect_signal(key_handle, 'help_done', self.help_done) self.loop = urwid.MainLoop(self.main_frame, palette, unhandled_input=key_handle.keystroke) update = UpdateThread() update.start() self.loop.run() update.stop()
def clean_edit(self): footer = help_bar() self.interface.main_frame.set_focus('body') self.interface.main_frame.set_footer(footer)