From 7e209dc285d478a358fd5afa1b91eeaabaf77b33 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 6 Oct 2014 07:41:34 +0200 Subject: [PATCH] Print tab registries in :debug-all-objects. --- qutebrowser/utils/objreg.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/qutebrowser/utils/objreg.py b/qutebrowser/utils/objreg.py index e0dcfa129..2cb3f0cb9 100644 --- a/qutebrowser/utils/objreg.py +++ b/qutebrowser/utils/objreg.py @@ -217,8 +217,12 @@ def dump_objects(): for win_id in window_registry: registry = _get_registry('window', window=win_id) blocks.append(('window-{}'.format(win_id), registry.dump_objects())) - # FIXME: Add tab registries - for name, data in sorted(blocks, key=lambda e: e[0]): + tab_registry = get('tab-registry', scope='window', window=win_id) + for tab_id, tab in tab_registry.items(): + dump = tab.registry.dump_objects() + data = [' ' + line for line in dump] + blocks.append((' tab-{}'.format(tab_id), data)) + for name, data in blocks: lines.append("") lines.append("{} object registry - {} objects:".format( name, len(data)))