lazy sessions
This commit is contained in:
parent
95f8c07d7f
commit
ade7004f8f
@ -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."""
|
||||||
|
@ -348,8 +348,8 @@ class SessionManager(QObject):
|
|||||||
new_tab.data.pinned = histentry['pinned']
|
new_tab.data.pinned = histentry['pinned']
|
||||||
|
|
||||||
active = (histentry.get('active', False) and
|
active = (histentry.get('active', False) and
|
||||||
(not config.val.session_lazy_restore or
|
(not config.val.session_lazy_restore or
|
||||||
histentry['url'].startswith('qute://')))
|
histentry['url'].startswith('qute://')))
|
||||||
url = QUrl.fromEncoded(histentry['url'].encode('ascii'))
|
url = QUrl.fromEncoded(histentry['url'].encode('ascii'))
|
||||||
if 'original-url' in histentry:
|
if 'original-url' in histentry:
|
||||||
orig_url = QUrl.fromEncoded(
|
orig_url = QUrl.fromEncoded(
|
||||||
@ -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(
|
||||||
title=title, active=active, user_data={}))
|
url=QUrl.fromEncoded(url.encode('ascii')),
|
||||||
|
title=title, active=active, user_data={}))
|
||||||
|
|
||||||
if active:
|
if active:
|
||||||
new_tab.title_changed.emit(title)
|
new_tab.title_changed.emit(title)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user