comparison cagou/core/cagou_main.py @ 266:b3f97729e983

core (debug): added "visible_widgets_dump" action to new _debug signal
author Goffi <goffi@goffi.org>
date Mon, 11 Mar 2019 08:39:43 +0100
parents 805c4103dac5
children 896f78760b63
comparison
equal deleted inserted replaced
265:805c4103dac5 266:b3f97729e983
859 bare_jid = dest_jid.bare 859 bare_jid = dest_jid.bare
860 for widget in self.widgets.getWidgets(quick_chat.QuickChat, profiles=(profile,)): 860 for widget in self.widgets.getWidgets(quick_chat.QuickChat, profiles=(profile,)):
861 if widget.type == C.CHAT_ONE2ONE and widget.target == bare_jid: 861 if widget.type == C.CHAT_ONE2ONE and widget.target == bare_jid:
862 widget.onOTRState(state, dest_jid, profile) 862 widget.onOTRState(state, dest_jid, profile)
863 863
864 def _debugHandler(self, action, parameters, profile):
865 if action == u"visible_widgets_dump":
866 from pprint import pformat
867 log.info(u"Visible widgets dump:\n{data}".format(
868 data=pformat(self._visible_widgets)))
869 else:
870 return super(Cagou, self)._debugHandler(action, parameters, profile)
871
864 ## misc ## 872 ## misc ##
865 873
866 def plugging_profiles(self): 874 def plugging_profiles(self):
867 self.app.root.changeWidget(widgets_handler.WidgetsHandler()) 875 self.app.root.changeWidget(widgets_handler.WidgetsHandler())
868 self.bridge.menusGet("", C.NO_SECURITY_LIMIT, callback=self._menusGetCb) 876 self.bridge.menusGet("", C.NO_SECURITY_LIMIT, callback=self._menusGetCb)