Register tab registry in meta registry.

This commit is contained in:
Florian Bruhin 2014-09-25 07:50:07 +02:00
parent 1e7861660e
commit 143fdc5b9f
2 changed files with 6 additions and 0 deletions

View File

@ -23,6 +23,7 @@ Module attributes:
_UNSET: Used as default argument in the constructor so default can be None.
"""
import itertools
import operator
import collections.abc
import enum as pyenum
@ -35,6 +36,9 @@ from qutebrowser.utils import log, qtutils
_UNSET = object()
tab_id_gen = itertools.count(0)
def enum(name, *items, start=1, is_int=False):
"""Factory for simple enumerations.

View File

@ -98,6 +98,8 @@ class WebView(QWebView):
hintmanager.mouse_event.connect(self.on_mouse_event)
hintmanager.set_open_target.connect(self.set_force_open_target)
objreg.register('hintmanager', hintmanager, registry=self.registry)
tab_id = next(usertypes.tab_id_gen)
objreg.register('tab-{}'.format(tab_id), self.registry, scope='meta')
page.linkHovered.connect(self.linkHovered)
page.mainFrame().loadStarted.connect(self.on_load_started)
page.change_title.connect(self.titleChanged)