Merge branch 'peterlvilim-show-default-value'

This commit is contained in:
Florian Bruhin 2015-01-21 07:14:55 +01:00
commit 6c2471bf9c
2 changed files with 5 additions and 3 deletions

View File

@ -130,8 +130,8 @@ Contributors, sorted by the number of commits in descending order:
// QUTE_AUTHORS_START
* Florian Bruhin
* Claude
* John ShaggyTwoDope Jenkins
* Peter Vilim
* John ShaggyTwoDope Jenkins
* rikn00
* Martin Zimmermann
* Joel Torstensson

View File

@ -116,8 +116,10 @@ class SettingValueCompletionModel(base.BaseCompletionModel):
value = '""'
self.cur_item, _descitem, _miscitem = self.new_item(cur_cat, value,
"Current value")
self.new_item(cur_cat, configdata.DATA[section][option].default(),
"Default value")
default_value = configdata.DATA[section][option].default()
if not default_value:
default_value = '""'
self.new_item(cur_cat, default_value, "Default value")
if hasattr(configdata.DATA[section], 'valtype'):
# Same type for all values (ValueList)
vals = configdata.DATA[section].valtype.complete()