comparison frontends/src/primitivus/contact_list.py @ 1139:75025461141f

move sat.tools.jid to sat_frontends.tools.jid
author souliane <souliane@mailoo.org>
date Tue, 26 Aug 2014 12:52:46 +0200
parents 0a9986452bba
children c0f15e52695a
comparison
equal deleted inserted replaced
1138:a7cdf03c00e9 1139:75025461141f
20 from sat.core.i18n import _ 20 from sat.core.i18n import _
21 import urwid 21 import urwid
22 from urwid_satext import sat_widgets 22 from urwid_satext import sat_widgets
23 from sat_frontends.quick_frontend.quick_contact_list import QuickContactList 23 from sat_frontends.quick_frontend.quick_contact_list import QuickContactList
24 from sat_frontends.quick_frontend.quick_utils import escapePrivate, unescapePrivate 24 from sat_frontends.quick_frontend.quick_utils import escapePrivate, unescapePrivate
25 from sat.tools.jid import JID 25 from sat_frontends.tools.jid import JID
26 from sat_frontends.primitivus.status import StatusBar 26 from sat_frontends.primitivus.status import StatusBar
27 from sat_frontends.primitivus.constants import Const 27 from sat_frontends.primitivus.constants import Const
28 28
29 class ContactList(urwid.WidgetWrap, QuickContactList): 29 class ContactList(urwid.WidgetWrap, QuickContactList):
30 signals = ['click','change'] 30 signals = ['click','change']
77 return True 77 return True
78 return False 78 return False
79 79
80 def setFocus(self, text, select=False): 80 def setFocus(self, text, select=False):
81 """give focus to the first element that matches the given text. You can also 81 """give focus to the first element that matches the given text. You can also
82 pass in text a sat.tools.jid.JID (it's a subclass of unicode). 82 pass in text a sat_frontends.tools.jid.JID (it's a subclass of unicode).
83 @param text: contact group name, contact or muc userhost, muc private dialog jid 83 @param text: contact group name, contact or muc userhost, muc private dialog jid
84 @param select: if True, the element is also clicked 84 @param select: if True, the element is also clicked
85 """ 85 """
86 idx = 0 86 idx = 0
87 for widget in self.frame.body.body: 87 for widget in self.frame.body.body: