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

Dennis Preiser <[email protected]> Mon, 3 Nov 2008 11:06:52 +0100
Newsgroups gmane.network.tin.devel
Message-ID <[email protected]>
On 03.11.2008, at 10:05, Urs Janßen wrote:

> In <[email protected]>, Dennis Preiser  
> wrote:
>>>> The following lines:
>>>>
>>>> group->attribute->ATTRIBUTE = tinrc.ATTRIBUTE;
>>>> glob_attributes.ATTRIBUTE = tinrc.ATTRIBUTE;
>>>>
>>>> are useless in my mind.
>>
>> 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.
>
> IMHO it's not clear if the current code is 'nonsense' - we don't have

I'm afraid this is a misunderstanding. Not the code is nonsense but  
my text was nonsense, so I corrected the two paragraphs I wrote.

> an attributes menu, so we don't have any way to change group/global
> attributes except the 'M'enu. it's very likely that if a user enters
> the 'M'enu (from the group level) that he (also) wan'ts to change the
> group specific attribute and that's what the current code does. set
> all values (tinrc, global attributes, group attributes) to the new
> value.

That's the behavior I expected but tin write out the *old* tinrc- 
value to the attributes-file (as I described above). This results in  
a mix: the new value is stored in tinrc and the old value is stored  
in attributes.

>> case GLOBAL_QUIT:
>>        write_config_file(local_config_file);
>>        read_attributes_files();
>>        /* FALLTHROUGH */
>> case CONFIG_NO_SAVE:
>>        clear_note_area();
>>        return;
>
> then you can't change group specific settings like mm_network_charset
> on the fly anymore as they will always be resetted to the
> 'old'-attributes value.

OK.

> all this 'confusion' will vanish once we have an attributes menu.

Yes ,-)

Dennis