Page 1 of 2

Do not store IconDll_*.bar in [Buttonbar] section!

Posted: 2016-11-04, 08:02 UTC
by MVV
As I've noticed, when one switches to a buttonbar and edits it in TC, TC adds IconDll_Filename.bar parameter to [Buttonbar] section, I have some, all with empty values, and none of them are really required in that section.

Please DO NOT STORE file-specific settings in common [Buttonbar] section, it is configuration section while IconDll_*.bar parameters are garbage (history, private file names, cache, but not really a settings that are required for work).

Please move them intoseparate IconDll section to allow redirecting this section to another INI before releasing TC 9!
Only default iconlib name may be stored in general [Buttonbar] section, not file-specific ones!

Posted: 2016-11-04, 10:58 UTC
by ghisler(Author)
Why? Where is the problem?

Posted: 2016-11-04, 12:13 UTC
by MVV
I've described where the problem is. Iconlib per bar file is not a generic setting but additional setting like history or saved templates, so it is more correct to use separate section for that (like Windows uses different Roaming and Local Settings folders for conatsnt and temporary settings).

Posted: 2016-11-10, 08:36 UTC
by MVV
Please don't leave it as is when it still can be changed before releasing TC9! Or at least make caching optional...

I don't think BTW that many people will use different iconlibs for different BAR files (it will look inconsistently)...

Posted: 2016-11-10, 08:44 UTC
by petermad
I don't think BTW that many people will use different iconlibs for different BAR files (it will look inconsistently)...
That is not the purpose of the IconDll_Filename.bar parameter - it is there so TC can compare the current bar file with the last used - if they differ TC resets the .br2 file and reloads the bar. See: http://ghisler.ch/board/viewtopic.php?p=319496#319496

Posted: 2016-11-10, 18:11 UTC
by MVV
Ah, thank you for this note.

Anyway, I see that it is exactly a cached value, not a setting, so it shouldn't be in a setting section.

Posted: 2016-11-10, 21:21 UTC
by petermad
a cached value, not a setting, so it shouldn't be in a setting section.
I tend to agree, also since the IconDll_Filename.bar parameter also applies to the vertical buttonbar, so we actually have a parameter that in a way belongs to two different sections.

[ButtonBarCache] or something like that would be a better place to save them.

Posted: 2016-11-23, 22:02 UTC
by MVV
It is sad that TC 9 is the first TC version with garbage values in configuration sections...

Posted: 2016-11-24, 15:02 UTC
by ghisler(Author)
Sorry, I found no better place to store that. It is concerning the button bar, so where else should it go?

Posted: 2016-11-24, 18:30 UTC
by MVV
You should definitely create a separate section with name like ButtonbarCache or ButtonbarIconLibs. It is ok for separate section because there can be many values in it, and these values only required temporarily (and nothing will be broken w/o these values) so such section name looks consistent. And since it will be a separate section, you can make parameter names shorter.

Posted: 2016-11-25, 16:15 UTC
by ghisler(Author)
Hmm, but should this then be relocated automatically to other ini when using AlternateUserIni? I'm not talking about RedirectSection.

Posted: 2016-11-25, 20:41 UTC
by MVV
I think it should be relocated via AlternateUserIni by default. Only really important sections are not relocated by default.

Posted: 2016-12-01, 07:23 UTC
by MVV
Thank you, TC 9.0a RC1 stores cache in separate ButtonbarCache section!

However I don't understand is it correct: I've selected wcmicon77.dll and then modified buttonbar, and TC have cached file description instead of its name in IconDll_* parameter... Shouldn't IconDll_* values be consistent with DefaultLib value (which remembers library name)?

Also I don't think that there is a need to support reading old IconDll_* location because TC will only need a single BAR file update w/o these values.

Posted: 2016-12-01, 11:46 UTC
by petermad
instead of its name in IconDll_* parameter... Shouldn't IconDll_* values be consistent with DefaultLib value (which remembers library name)?
See: http://ghisler.ch/board/viewtopic.php?p=319619#319619

Posted: 2016-12-01, 11:52 UTC
by MVV
Thank you for the link, it is exactly what I've asked.