comparison src/cagou/plugins/plugin_wid_chat.py @ 35:20b04c58868f

chat: header_input text is reset when widget is changed due to input
author Goffi <goffi@goffi.org>
date Sun, 28 Aug 2016 14:59:49 +0200
parents d09bd16dbbe2
children 6cf08d0ee460
comparison
equal deleted inserted replaced
34:02acbb297a61 35:20b04c58868f
156 # G.host.bridge.MUCJoin(unicode(jid_), "", "", self.profile) 156 # G.host.bridge.MUCJoin(unicode(jid_), "", "", self.profile)
157 else: 157 else:
158 plugin_info = [p for p in G.host.getPluggedWidgets() if p["factory"] == self.factory][0] # FIXME: Q&D way, need a proper method in host 158 plugin_info = [p for p in G.host.getPluggedWidgets() if p["factory"] == self.factory][0] # FIXME: Q&D way, need a proper method in host
159 factory = plugin_info['factory'] 159 factory = plugin_info['factory']
160 G.host.switchWidget(self, factory(plugin_info, jid_, profiles=[self.profile])) 160 G.host.switchWidget(self, factory(plugin_info, jid_, profiles=[self.profile]))
161 self.header_input.text = ''
161 162
162 def discoEb(failure): 163 def discoEb(failure):
163 log.warning(u"Disco failure, ignore this text: {}".format(failure)) 164 log.warning(u"Disco failure, ignore this text: {}".format(failure))
164 165
165 G.host.bridge.discoInfos(jid_.domain, self.profile, callback=discoCb, errback=discoEb) 166 G.host.bridge.discoInfos(jid_.domain, self.profile, callback=discoCb, errback=discoEb)