Permalink
Browse files

Add a qute://configdiff page

  • Loading branch information...
The-Compiler committed Sep 15, 2017
1 parent 2e8419d commit 54c417391dbe4544eed7ecfa51aa87292826b10a
Showing with 770 additions and 1 deletion.
  1. +12 −1 qutebrowser/browser/qutescheme.py
  2. +758 −0 qutebrowser/config/configdiff.py
@@ -34,7 +34,7 @@
from PyQt5.QtCore import QUrlQuery, QUrl
import qutebrowser
from qutebrowser.config import config, configdata, configexc
from qutebrowser.config import config, configdata, configexc, configdiff
from qutebrowser.utils import (version, utils, jinja, log, message, docutils,
objreg, usertypes, qtutils)
from qutebrowser.misc import objects
@@ -421,3 +421,14 @@ def qute_settings(url):
configdata=configdata,
confget=config.instance.get_str)
return 'text/html', html
@add_handler('configdiff')
def qute_configdiff(_url):
"""Handler for qute://configdiff."""
try:
return 'text/html', configdiff.get_diff()
except OSError as e:
error = (b'Failed to read old config: ' +
str(e.strerror).encode('utf-8'))
return 'text/plain', error
Oops, something went wrong.

0 comments on commit 54c4173

Please sign in to comment.