lazy sessions

This commit is contained in:
mhm@mhm.com 2017-11-18 00:48:31 +01:00
parent 95f8c07d7f
commit ade7004f8f
2 changed files with 8 additions and 4 deletions

View File

@ -424,6 +424,7 @@ def qute_settings(url):
confget=config.instance.get_str) confget=config.instance.get_str)
return 'text/html', html return 'text/html', html
@add_handler('back') @add_handler('back')
def qute_back(url): def qute_back(url):
"""Handler for qute://back. Simple page to free ram / lazy load a site, """Handler for qute://back. Simple page to free ram / lazy load a site,
@ -432,6 +433,7 @@ def qute_back(url):
html = jinja.render('back.html', title='Suspended') html = jinja.render('back.html', title='Suspended')
return 'text/html', html return 'text/html', html
@add_handler('configdiff') @add_handler('configdiff')
def qute_configdiff(url): def qute_configdiff(url):
"""Handler for qute://configdiff.""" """Handler for qute://configdiff."""

View File

@ -370,8 +370,10 @@ class SessionManager(QObject):
active = last.get('active', False) active = last.get('active', False)
if not last['url'].startswith('qute://'): if not last['url'].startswith('qute://'):
entries.append(TabHistoryItem(url=QUrl.fromEncoded(url.encode('ascii')), entries.append(TabHistoryItem(
url=QUrl.fromEncoded(url.encode('ascii')),
title=title, active=active, user_data={})) title=title, active=active, user_data={}))
if active: if active:
new_tab.title_changed.emit(title) new_tab.title_changed.emit(title)