Re: [bug] attributes stuff in options_menu.c broken
Dennis Preiser <[email protected]> Sun, 2 Nov 2008 12:34:16 +0100
| Newsgroups | gmane.network.tin.devel |
|---|---|
| Message-ID | <[email protected]> |
Sorry for the confusion, I have to correct me again. On 01.11.2008, at 09:47, Dennis Preiser wrote: >> currently I'm incorporating tinrc-variables into the attributes >> system. During testing I ran into trouble with the >> options_menu.c:change_config_file()-code. >> >> The following lines: >> >> group->attribute->ATTRIBUTE = tinrc.ATTRIBUTE; >> glob_attributes.ATTRIBUTE = tinrc.ATTRIBUTE; >> >> are useless in my mind. >> >> If you change an option at group-level, the first line overwrites >> a attribute set from the attributes-file (if present). This: >> If you change an option at group-level, the second line causes tin >> to write this changed value to all scopes which matches this group >> (if this option is not set in the attributes-file for those scopes). is nonsense and should be: If you change an option at group-level and this option is not set in the attributes-file for this group, the second line causes tin to write the *former* value of this option to all scopes which matches this group and which have not set this option already. >> I'm in favor of wiping out all attributes-specific stuff from >> options_menu.c:change_config_file() and call read_attributes_files >> () in options_menu.c this way: This: >> case GLOBAL_QUIT: >> write_config_file(local_config_file); >> read_attributes_files(); >> break; is nonsense too and should be: case GLOBAL_QUIT: write_config_file(local_config_file); read_attributes_files(); /* FALLTHROUGH */ case CONFIG_NO_SAVE: clear_note_area(); return; in options_menu.c:change_config_file(). I have used the latest snapshot. The option has to be available as an attribute to reproduce the described behavior (for instance trim_article_body). Dennis