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

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

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

Post 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!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Why? Where is the problem?
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post 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).
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post 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)...
User avatar
petermad
Power Member
Power Member
Posts: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post 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
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post 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.
User avatar
petermad
Power Member
Power Member
Posts: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post 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.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

It is sad that TC 9 is the first TC version with garbage values in configuration sections...
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, I found no better place to store that. It is concerning the button bar, so where else should it go?
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post 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.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Hmm, but should this then be relocated automatically to other ini when using AlternateUserIni? I'm not talking about RedirectSection.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I think it should be relocated via AlternateUserIni by default. Only really important sections are not relocated by default.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post 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.
User avatar
petermad
Power Member
Power Member
Posts: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post 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
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Thank you for the link, it is exactly what I've asked.
Post Reply