INI: redirected colour settings

English support forum

Moderators: sheep, Hacker, Stefan2, white

Post Reply
NotNull
Member
Member
Posts: 105
Joined: 2019-11-25, 20:43 UTC
Location: NL

INI: redirected colour settings

Post by *NotNull »

So I was toying around with colour settings to see if I could make it into a theme manager (mentioned in another recent thread).
Works rather well, but I noticed something unexpected:

WINCMD.INI

Code: Select all

[ColorsDark]
RedirectSection="C:\test\_FileMgr\TotalCommander_950b7x64\Themes\MyFirst.tctheme"

MyFirst.tctheme

Code: Select all

[ColorsDark]
InverseCursor=0
ThemedCursor=1
(etcetera ..)
This functions properly. But with this WINCMD.INI setting:

WINCMD.INI

Code: Select all

[ColorsDark]
RedirectSection="Themes\MyFirst.tctheme"
I get the correct colour settings, BUT Menu:Configuration > Options > Color does not show the loaded configuration.
No problem if RedirectSection does not support this type of paths, but two routines that handle this setting differently was .. unexpected.
User avatar
Usher
Power Member
Power Member
Posts: 886
Joined: 2011-03-11, 10:11 UTC

Re: INI: redirected colour settings

Post by *Usher »

You shouldn't use relative paths, they may be different for different TC instances or dependent on the way you call TC.
Use %COMMANDER_PATH% and/or other environment variables if needed:

RedirectSection="%COMMANDER_PATH%\Themes\MyFirst.tctheme"
Regards from Poland
Andrzej P. Wozniak
NotNull
Member
Member
Posts: 105
Joined: 2019-11-25, 20:43 UTC
Location: NL

Re: INI: redirected colour settings

Post by *NotNull »

Usher wrote:
2020-01-04, 20:07 UTC
You shouldn't use relative paths,
Thanks. Yes, I was aware of that (*) (read it somewhere on these forums when "researching" options).
Point was that 2 routines to read the same INI colour settings behave differently.


(*) And tried it anyhow :). I often "break" things as that reveals the inner working. Good for a deeper understanding ..
Post Reply