changeset 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
files cagou/core/cagou_main.py
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/cagou/core/cagou_main.py	Mon Mar 11 08:39:43 2019 +0100
+++ b/cagou/core/cagou_main.py	Mon Mar 11 08:39:43 2019 +0100
@@ -861,6 +861,14 @@
             if widget.type == C.CHAT_ONE2ONE and widget.target == bare_jid:
                 widget.onOTRState(state, dest_jid, profile)
 
+    def _debugHandler(self, action, parameters, profile):
+        if action == u"visible_widgets_dump":
+            from pprint import pformat
+            log.info(u"Visible widgets dump:\n{data}".format(
+                data=pformat(self._visible_widgets)))
+        else:
+            return super(Cagou, self)._debugHandler(action, parameters, profile)
+
     ## misc ##
 
     def plugging_profiles(self):