Problem with cm_ConfigSaveSettings ???

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
eitang
Senior Member
Senior Member
Posts: 250
Joined: 2003-05-19, 20:08 UTC
Location: France
Contact:

Problem with cm_ConfigSaveSettings ???

Post by *eitang »

Hi all,

While writing a Delphi program using (thanks to you, friends) a call to TC
with WM_USER + 51, I discovered a problem (or a need for an explanation).

What I sent to TC is the above cm_ command (so I can recuperate the list of TABs in the Right TC pane).

I discovered that what this does is different to what is done with the normal "Save Tabs To File" command. (with Right Click)

Save To File saves a TAB file like this: (Notice that C: is present) and this is the correct behavior:

[activetabs]
0_path=C:\tabs\
0_options=1|3|1|0|0|0|0
1_path=G:\to install\
1_options=1|3|1|0|0|0|0
2_path=f:\to install\
2_options=1|3|1|0|0|0|0
3_path=i:\to install\
3_options=1|3|1|0|0|0|0
4_path=j:\to install\
4_options=1|3|1|0|0|0|0
activetab=0

Whereas the WM_USER + 51 does this (note that C is not present), which is incorrect, as C:\tabs is not listed.: Actually any tab I "am" on is missing from the list.

[righttabs]
0_path=G:\to install\
0_options=1|3|1|0|0|0|0
1_path=f:\to install\
1_options=1|3|1|0|0|0|0
2_path=i:\to install\
2_options=1|3|1|0|0|0|0
3_path=j:\to install\
3_options=1|3|1|0|0|0|0
activetab=0

Any explanation ? or is this a bug (I'd be surprised...)

Thanks,
Best Wishes,

Eitan Gilboa (License #: 17011)
URL: https://eitang.pagesperso-orange.fr/
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Active tabs for left and right panels are not stored in [lefttabs] and [righttabs] sections, they stored in [left] and [right] sections due to compatibility (older versions had no tab support and used only [left] and [right] sections).

So you need to insert paths from [left] and [right] to your lists built from [lefttabs] and [righttabs] at positions specitied by activetab parameters.
eitang
Senior Member
Senior Member
Posts: 250
Joined: 2003-05-19, 20:08 UTC
Location: France
Contact:

Post by *eitang »

As usual here, quick reply !!! Thank you MVV.

I understand your reply, and checked it - You are right <vbg>.

So if I want the 'actives' I'll get them as you suggest. As it is, this behavior suits me fine <g>
Best Wishes,

Eitan Gilboa (License #: 17011)
URL: https://eitang.pagesperso-orange.fr/
Post Reply