Try to fix qute://settings
This commit is contained in:
parent
5414744439
commit
4c2f65819b
@ -471,7 +471,7 @@ def qute_settings(url):
|
||||
if url.path() == '/set':
|
||||
return _qute_settings_set(url)
|
||||
|
||||
config_getter = config.instance.get # FIXME to_str
|
||||
html = jinja.render('settings.html', title='settings',
|
||||
configdata=configdata, confget=config_getter)
|
||||
configdata=configdata,
|
||||
confget=config.instance.get_str)
|
||||
return 'text/html', html
|
||||
|
@ -124,10 +124,17 @@ class NewConfigManager(QObject):
|
||||
|
||||
def get(self, option):
|
||||
try:
|
||||
value = self.options[option]
|
||||
opt = self.options[option]
|
||||
except KeyError:
|
||||
raise configexc.NoOptionError(option)
|
||||
return value.typ.to_py(value.default)
|
||||
return opt.typ.to_py(opt.default)
|
||||
|
||||
def get_str(self, option):
|
||||
try:
|
||||
opt = self.options[option]
|
||||
except KeyError:
|
||||
raise configexc.NoOptionError(option)
|
||||
return opt.typ.to_str(opt.default)
|
||||
|
||||
def set(self, option, value):
|
||||
raise configexc.Error("Setting doesn't work yet!")
|
||||
|
Loading…
Reference in New Issue
Block a user