Added chronicle flag
This commit is contained in:
parent
d1154759d1
commit
554b9b2bda
@ -602,7 +602,7 @@ class HintManager(QObject):
|
|||||||
star_args_optional=True, maxsplit=2)
|
star_args_optional=True, maxsplit=2)
|
||||||
@cmdutils.argument('win_id', win_id=True)
|
@cmdutils.argument('win_id', win_id=True)
|
||||||
def start(self, rapid=False, group=webelem.Group.all, target=Target.normal,
|
def start(self, rapid=False, group=webelem.Group.all, target=Target.normal,
|
||||||
*args, win_id, mode=None):
|
*args, win_id, mode=None, chronicle=False):
|
||||||
"""Start hinting.
|
"""Start hinting.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -691,6 +691,7 @@ class HintManager(QObject):
|
|||||||
self._context.target = target
|
self._context.target = target
|
||||||
self._context.rapid = rapid
|
self._context.rapid = rapid
|
||||||
self._context.hint_mode = mode
|
self._context.hint_mode = mode
|
||||||
|
self._context.chronicle = chronicle
|
||||||
try:
|
try:
|
||||||
self._context.baseurl = tabbed_browser.current_url()
|
self._context.baseurl = tabbed_browser.current_url()
|
||||||
except qtutils.QtValueError:
|
except qtutils.QtValueError:
|
||||||
@ -860,6 +861,8 @@ class HintManager(QObject):
|
|||||||
return
|
return
|
||||||
handler = functools.partial(url_handlers[self._context.target],
|
handler = functools.partial(url_handlers[self._context.target],
|
||||||
url, self._context)
|
url, self._context)
|
||||||
|
if self._context.chronicle:
|
||||||
|
objreg.get('web-history').add_from_tab(url, url, "")
|
||||||
else:
|
else:
|
||||||
raise ValueError("No suitable handler found!")
|
raise ValueError("No suitable handler found!")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user