parent
cc738fa846
commit
71ffe8f656
@ -29,6 +29,7 @@ Module attributes:
|
||||
pyeval_output: The output of the last :pyeval command.
|
||||
"""
|
||||
|
||||
import functools
|
||||
import configparser
|
||||
|
||||
from PyQt5.QtCore import pyqtSlot, QObject
|
||||
@ -171,8 +172,10 @@ def qute_help(win_id, request):
|
||||
|
||||
def qute_settings(win_id, _request):
|
||||
"""Handler for qute:settings. View/change qute configuration."""
|
||||
config_getter = functools.partial(objreg.get('config').get, raw=True)
|
||||
html = jinja.env.get_template('settings.html').render(
|
||||
win_id=win_id, title='settings', config=configdata)
|
||||
win_id=win_id, title='settings', config=configdata,
|
||||
confget=config_getter)
|
||||
return html.encode('UTF-8', errors='xmlcharrefreplace')
|
||||
|
||||
|
||||
|
@ -24,11 +24,11 @@ th pre { color: grey; text-align: left; }
|
||||
<tr><th colspan="2"><h3>{{ section }}</h3><pre>{{ config.SECTION_DESC.get(section)|wordwrap(width=120) }}</pre></th></tr>
|
||||
{% for d, e in config.DATA.get(section).items() %}
|
||||
<tr>
|
||||
<td>{{ d }} (Current: {{ e.value()|truncate(100) }})</td>
|
||||
<td>{{ d }} (Current: {{ confget(section, d)|truncate(100) }})</td>
|
||||
<td>
|
||||
<input type="input"
|
||||
onblur="cset('{{ section }}', '{{ d }}', this)"
|
||||
value="{{ e.value() }}">
|
||||
value="{{ confget(section, d) }}">
|
||||
</input>
|
||||
</td>
|
||||
</tr>
|
||||
|
Loading…
Reference in New Issue
Block a user