diff src/cagou/plugins/plugin_wid_chat.py @ 41:7cac2d1a6f20

core: new getPluginInfo method to retrieve plugin info corresponding to filter(s)
author Goffi <goffi@goffi.org>
date Sun, 28 Aug 2016 16:11:07 +0200
parents 6cf08d0ee460
children 286865bc013a
line wrap: on
line diff
--- a/src/cagou/plugins/plugin_wid_chat.py	Sun Aug 28 15:37:22 2016 +0200
+++ b/src/cagou/plugins/plugin_wid_chat.py	Sun Aug 28 16:11:07 2016 +0200
@@ -155,7 +155,7 @@
                 raise NotImplementedError(u"MUC not implemented yet")
                 # G.host.bridge.MUCJoin(unicode(jid_), "", "", self.profile)
             else:
-                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
+                plugin_info = G.host.getPluginInfo(main=Chat)
                 factory = plugin_info['factory']
                 G.host.switchWidget(self, factory(plugin_info, jid_, profiles=[self.profile]))
                 self.header_input.text = ''