parent
1704438777
commit
8e000dfe54
@ -11,8 +11,9 @@ Migrating older configurations
|
|||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
qutebrowser does no automatic migration for the new configuration. However,
|
qutebrowser does no automatic migration for the new configuration. However,
|
||||||
there's a special link:qute://configdiff[] page in qutebrowser, which will show
|
there's a special link:qute://configdiff/old[configdiff] page in qutebrowser,
|
||||||
you the changes you did in your old configuration, compared to the old defaults.
|
which will show you the changes you did in your old configuration, compared to
|
||||||
|
the old defaults.
|
||||||
|
|
||||||
Other changes in default settings:
|
Other changes in default settings:
|
||||||
|
|
||||||
|
@ -408,11 +408,15 @@ def qute_settings(url):
|
|||||||
|
|
||||||
|
|
||||||
@add_handler('configdiff')
|
@add_handler('configdiff')
|
||||||
def qute_configdiff(_url):
|
def qute_configdiff(url):
|
||||||
"""Handler for qute://configdiff."""
|
"""Handler for qute://configdiff."""
|
||||||
|
if url.path() == '/old':
|
||||||
try:
|
try:
|
||||||
return 'text/html', configdiff.get_diff()
|
return 'text/html', configdiff.get_diff()
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
error = (b'Failed to read old config: ' +
|
error = (b'Failed to read old config: ' +
|
||||||
str(e.strerror).encode('utf-8'))
|
str(e.strerror).encode('utf-8'))
|
||||||
return 'text/plain', error
|
return 'text/plain', error
|
||||||
|
else:
|
||||||
|
data = config.instance.dump_userconfig().encode('utf-8')
|
||||||
|
return 'text/plain', data
|
||||||
|
Loading…
Reference in New Issue
Block a user