Merge branch 'peterlvilim-show-default-value'
This commit is contained in:
commit
395047d778
@ -110,12 +110,14 @@ class SettingValueCompletionModel(base.BaseCompletionModel):
|
|||||||
self._section = section
|
self._section = section
|
||||||
self._option = option
|
self._option = option
|
||||||
objreg.get('config').changed.connect(self.update_current_value)
|
objreg.get('config').changed.connect(self.update_current_value)
|
||||||
cur_cat = self.new_category("Current", sort=0)
|
cur_cat = self.new_category("Current/Default", sort=0)
|
||||||
value = config.get(section, option, raw=True)
|
value = config.get(section, option, raw=True)
|
||||||
if not value:
|
if not value:
|
||||||
value = '""'
|
value = '""'
|
||||||
self.cur_item, _descitem, _miscitem = self.new_item(cur_cat, value,
|
self.cur_item, _descitem, _miscitem = self.new_item(cur_cat, value,
|
||||||
"Current value")
|
"Current value")
|
||||||
|
self.new_item(cur_cat, configdata.DATA[section][option].default(),
|
||||||
|
"Default value")
|
||||||
if hasattr(configdata.DATA[section], 'valtype'):
|
if hasattr(configdata.DATA[section], 'valtype'):
|
||||||
# Same type for all values (ValueList)
|
# Same type for all values (ValueList)
|
||||||
vals = configdata.DATA[section].valtype.complete()
|
vals = configdata.DATA[section].valtype.complete()
|
||||||
|
Loading…
Reference in New Issue
Block a user