comparison frontends/src/primitivus/contact_list.py @ 737:378af36155c2

frontends: set and retrieve your own presence and status
author souliane <souliane@mailoo.org>
date Mon, 25 Nov 2013 01:56:07 +0100
parents 6246eb6d64a0
children bfabeedbf32e
comparison
equal deleted inserted replaced
736:6246eb6d64a0 737:378af36155c2
20 import urwid 20 import urwid
21 from urwid_satext import sat_widgets 21 from urwid_satext import sat_widgets
22 from sat_frontends.quick_frontend.quick_contact_list import QuickContactList 22 from sat_frontends.quick_frontend.quick_contact_list import QuickContactList
23 from sat_frontends.quick_frontend.quick_utils import escapePrivate, unescapePrivate 23 from sat_frontends.quick_frontend.quick_utils import escapePrivate, unescapePrivate
24 from sat.tools.jid import JID 24 from sat.tools.jid import JID
25 from sat_frontends.primitivus.status import StatusBar
25 from sat_frontends.primitivus.constants import Const 26 from sat_frontends.primitivus.constants import Const
26 27
27 class ContactList(urwid.WidgetWrap, QuickContactList): 28 class ContactList(urwid.WidgetWrap, QuickContactList):
28 signals = ['click','change'] 29 signals = ['click','change']
29 30
35 self.alert_jid=set() 36 self.alert_jid=set()
36 self.show_status = False 37 self.show_status = False
37 self.show_disconnected = False 38 self.show_disconnected = False
38 39
39 #we now build the widget 40 #we now build the widget
40 self.frame = urwid.Frame(self.__buildList()) 41 self.host.status_bar = StatusBar(host)
42 self.frame = urwid.Frame(self.__buildList(), None, self.host.status_bar)
41 self.main_widget = sat_widgets.LabelLine(self.frame, sat_widgets.SurroundedText(_("Contacts"))) 43 self.main_widget = sat_widgets.LabelLine(self.frame, sat_widgets.SurroundedText(_("Contacts")))
42 urwid.WidgetWrap.__init__(self, self.main_widget) 44 urwid.WidgetWrap.__init__(self, self.main_widget)
43 if on_click: 45 if on_click:
44 urwid.connect_signal(self, 'click', on_click, user_data) 46 urwid.connect_signal(self, 'click', on_click, user_data)
45 if on_change: 47 if on_change: