code cleanup
- move qute_bindings block AFTER qute_settings block - remove unnecessary variable declaration
This commit is contained in:
parent
1e8694f3cc
commit
4848182204
@ -423,20 +423,6 @@ def _qute_settings_set(url):
|
|||||||
return 'text/html', b'error: ' + str(e).encode('utf-8')
|
return 'text/html', b'error: ' + str(e).encode('utf-8')
|
||||||
|
|
||||||
|
|
||||||
@add_handler('bindings')
|
|
||||||
def qute_bindings(url):
|
|
||||||
"""Handler for qute://bindings View qute bindings."""
|
|
||||||
|
|
||||||
bindings = {}
|
|
||||||
html = ''
|
|
||||||
for mode in "normal hint command insert passthrough".split():
|
|
||||||
bindings[mode] = config.key_instance.get_bindings_for(mode)
|
|
||||||
|
|
||||||
html = jinja.render('bindings.html', title='bindings',
|
|
||||||
bindings=bindings)
|
|
||||||
return 'text/html', html
|
|
||||||
|
|
||||||
|
|
||||||
@add_handler('settings')
|
@add_handler('settings')
|
||||||
def qute_settings(url):
|
def qute_settings(url):
|
||||||
"""Handler for qute://settings. View/change qute configuration."""
|
"""Handler for qute://settings. View/change qute configuration."""
|
||||||
@ -449,6 +435,19 @@ def qute_settings(url):
|
|||||||
return 'text/html', html
|
return 'text/html', html
|
||||||
|
|
||||||
|
|
||||||
|
@add_handler('bindings')
|
||||||
|
def qute_bindings(url):
|
||||||
|
"""Handler for qute://bindings View qute bindings."""
|
||||||
|
|
||||||
|
bindings = {}
|
||||||
|
for mode in "normal hint command insert passthrough".split():
|
||||||
|
bindings[mode] = config.key_instance.get_bindings_for(mode)
|
||||||
|
|
||||||
|
html = jinja.render('bindings.html', title='bindings',
|
||||||
|
bindings=bindings)
|
||||||
|
return 'text/html', html
|
||||||
|
|
||||||
|
|
||||||
@add_handler('back')
|
@add_handler('back')
|
||||||
def qute_back(url):
|
def qute_back(url):
|
||||||
"""Handler for qute://back.
|
"""Handler for qute://back.
|
||||||
|
Loading…
Reference in New Issue
Block a user