Re: [bug] attributes stuff in options_menu.c broken
Dennis Preiser <[email protected]> Tue, 4 Nov 2008 21:29:09 +0100
| Newsgroups | gmane.network.tin.devel |
|---|---|
| Message-ID | <[email protected]> |
On 03.11.2008, at 22:18, Dennis Preiser wrote: > On 03.11.2008, at 20:50, Urs Janßen wrote: > >> the change_config_file() code is mostly correct (IMHO it's lacking a >> write_attributes_file(local_attributes_file); in the GLOBAL_QUIT >> case), >> but th rest of the code is not (e.g. the read_attributes_files() >> in select >> is wrong (at least if we do not write out the attributes in read_attributes_files() in select.c is IMO needed to apply changed options to all groups. Without this, changes in the menu have no effect because we check against group->attribute->ATTRIBUTE instead of tinrc.OPTION (for instance show_signature in cook.c). >> change_config_file()) - if you check the contents of >> group->attribute->trim_article_body >> glob_attributes.trim_article_body >> and tinrc.trim_article_body >> in change_config_file() they are updated correct, dunno why >> gargabe is >> written out. > > I guess the scope-specific attributes (local_attributes[]) needs to > be updated too in change_config_file(). In > attrib.c:write_attributes_file() we check only this scope-specific > attributes against the default attributes build from the > tinrc.VARIABLEs. Attached is a patch which writes changed numeric options into the scope-specific attributes. This should tin stop writing this garbage in case of numeric options. I guess we need a similar macro for string options too. Dennis
20081104.diff.gz
(application/x-gzip, 962 B) - not displayed