lazy sessions
This commit is contained in:
parent
95f8c07d7f
commit
ade7004f8f
@ -424,6 +424,7 @@ def qute_settings(url):
|
||||
confget=config.instance.get_str)
|
||||
return 'text/html', html
|
||||
|
||||
|
||||
@add_handler('back')
|
||||
def qute_back(url):
|
||||
"""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')
|
||||
return 'text/html', html
|
||||
|
||||
|
||||
@add_handler('configdiff')
|
||||
def qute_configdiff(url):
|
||||
"""Handler for qute://configdiff."""
|
||||
|
@ -348,8 +348,8 @@ class SessionManager(QObject):
|
||||
new_tab.data.pinned = histentry['pinned']
|
||||
|
||||
active = (histentry.get('active', False) and
|
||||
(not config.val.session_lazy_restore or
|
||||
histentry['url'].startswith('qute://')))
|
||||
(not config.val.session_lazy_restore or
|
||||
histentry['url'].startswith('qute://')))
|
||||
url = QUrl.fromEncoded(histentry['url'].encode('ascii'))
|
||||
if 'original-url' in histentry:
|
||||
orig_url = QUrl.fromEncoded(
|
||||
@ -370,8 +370,10 @@ class SessionManager(QObject):
|
||||
active = last.get('active', False)
|
||||
|
||||
if not last['url'].startswith('qute://'):
|
||||
entries.append(TabHistoryItem(url=QUrl.fromEncoded(url.encode('ascii')),
|
||||
title=title, active=active, user_data={}))
|
||||
entries.append(TabHistoryItem(
|
||||
url=QUrl.fromEncoded(url.encode('ascii')),
|
||||
title=title, active=active, user_data={}))
|
||||
|
||||
if active:
|
||||
new_tab.title_changed.emit(title)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user