Return True if the configuration value was added or changed. Helper for save_all.
(config_type, section, item, value)
| 815 | |
| 816 | @staticmethod |
| 817 | def save_option(config_type, section, item, value): |
| 818 | """Return True if the configuration value was added or changed. |
| 819 | |
| 820 | Helper for save_all. |
| 821 | """ |
| 822 | if idleConf.defaultCfg[config_type].has_option(section, item): |
| 823 | if idleConf.defaultCfg[config_type].Get(section, item) == value: |
| 824 | # The setting equals a default setting, remove it from user cfg. |
| 825 | return idleConf.userCfg[config_type].RemoveOption(section, item) |
| 826 | # If we got here, set the option. |
| 827 | return idleConf.userCfg[config_type].SetOption(section, item, value) |
| 828 | |
| 829 | def save_all(self): |
| 830 | """Save configuration changes to the user config file. |