def __init__(self): TimeLineBasePage.__init__(self) self.list.has_more_btn = False self.list.title_icons = [] self.controller = DialogController() self.icon = "help-faq" self.description = 'Conversations'
class DialogPage(TimeLineBasePage): def __init__(self): TimeLineBasePage.__init__(self) self.list.has_more_btn = False self.list.title_icons = [] self.controller = DialogController() self.icon = "help-faq" self.description = 'Conversations' def on_refresh(self): # nothing to refresh for this page pass def on_next(self): pass def show_conversations(self, start_id): def pipeline_work(): for entry in self.controller.list_conversations(start_id): if TabManager().is_current(self): gtk.threads_enter() self.list.refresh(self.controller.items) TabManager().switch_to_current_tab() gtk.threads_leave() gtk.threads_enter() self.list.refresh(self.controller.items) TabManager().switch_to_if_current(self) gtk.threads_leave() Pipeline().add_handler(pipeline_work, 'fetching conversations...')