comparison cagou/plugins/plugin_wid_chat.py @ 145:654b00fa3fdc

core (common): renamed JidWidget to JidItem to avoid name conflict with XMLUI
author Goffi <goffi@goffi.org>
date Sat, 14 Apr 2018 16:35:59 +0200
parents ae58f84fe4e6
children 826e7b17a19b
comparison
equal deleted inserted replaced
144:ae58f84fe4e6 145:654b00fa3fdc
30 from sat_frontends.quick_frontend import quick_widgets 30 from sat_frontends.quick_frontend import quick_widgets
31 from sat_frontends.quick_frontend import quick_chat 31 from sat_frontends.quick_frontend import quick_chat
32 from sat_frontends.tools import jid 32 from sat_frontends.tools import jid
33 from cagou.core import cagou_widget 33 from cagou.core import cagou_widget
34 from cagou.core.image import Image 34 from cagou.core.image import Image
35 from cagou.core.common import SymbolButton, JidWidget 35 from cagou.core.common import SymbolButton, JidItem
36 from kivy.uix.dropdown import DropDown 36 from kivy.uix.dropdown import DropDown
37 from cagou import G 37 from cagou import G
38 import mimetypes 38 import mimetypes
39 39
40 40
306 dropdown.clear_widgets() 306 dropdown.clear_widgets()
307 307
308 for jid_, jid_data in comp_data: 308 for jid_, jid_data in comp_data:
309 nick = jid_data.get(u'nick', u'') 309 nick = jid_data.get(u'nick', u'')
310 if text in jid_.bare or text in nick.lower(): 310 if text in jid_.bare or text in nick.lower():
311 btn = JidWidget( 311 btn = JidItem(
312 jid = jid_.bare, 312 jid = jid_.bare,
313 profile = profile, 313 profile = profile,
314 size_hint = (0.5, None), 314 size_hint = (0.5, None),
315 nick = nick, 315 nick = nick,
316 on_release=lambda dummy, txt=jid_.bare: self.onHeaderInputCompleted(wid, txt) 316 on_release=lambda dummy, txt=jid_.bare: self.onHeaderInputCompleted(wid, txt)