Return True if the configuration was added or changed. If the value is the same as the default, then remove it from user config file.
(self, section, opt)
| 2045 | return |
| 2046 | |
| 2047 | def set_extension_value(self, section, opt): |
| 2048 | """Return True if the configuration was added or changed. |
| 2049 | |
| 2050 | If the value is the same as the default, then remove it |
| 2051 | from user config file. |
| 2052 | """ |
| 2053 | name = opt['name'] |
| 2054 | default = opt['default'] |
| 2055 | value = opt['var'].get().strip() or default |
| 2056 | opt['var'].set(value) |
| 2057 | # if self.defaultCfg.has_section(section): |
| 2058 | # Currently, always true; if not, indent to return. |
| 2059 | if (value == default): |
| 2060 | return self.ext_userCfg.RemoveOption(section, name) |
| 2061 | # Set the option. |
| 2062 | return self.ext_userCfg.SetOption(section, name, value) |
| 2063 | |
| 2064 | def save_all_changed_extensions(self): |
| 2065 | """Save configuration changes to the user config file. |
no test coverage detected