Re: [bug] attributes stuff in options_menu.c broken

Dennis Preiser <[email protected]> Sat, 1 Nov 2008 09:47:02 +0100
Newsgroups gmane.network.tin.devel
Message-ID <[email protected]>
On 31.10.2008, at 20:49, Dennis Preiser wrote:

> Hello,
>
> 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).

Just for clarification, 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).

happens after removing the first line in  
options_menu.c:change_config_file().

> 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:
>
> case GLOBAL_QUIT:
> 	write_config_file(local_config_file);
> 	read_attributes_files();
> 	break;
>
> Is this acceptable?
>
> Dennis