Remember View Mode upon exit

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Remember View Mode upon exit

Post by *Hacker »

Hi all,
I have some View Modes and some Auto Switch Mode rules defined.
I am in a dir covered only by the Default View Mode and no Auto Switch Mode rules. Default is Sort by Extension, I change the sorting to sort by Date (by clicking the Date header) and exit TC.
Upon starting TC I am in the correct dir but the sorting is set to Extension instead of Date.
Is there any way to keep my custom sort order upon exiting TC and not overwrite it by the Default View Mode upon start?

Thanks
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately not: TC changes the view mode when entering a auto-switch "zone". This also happens when TC starts.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2Hacker
1. Set the Sorting for your Default View Mode to "Unchanged"
2. Make sure the option: "Operation" -> "Save on exit" -> "Panels (brief/full etc.)" is selected.

Then it should work as you requested.

If you don't want ot set "Save on exit" -> "Panels (brief/full etc.)", then you have to perform a "Save Setings" to save your new custom sorting method.
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

petermad,
Set the Sorting for your Default View Mode to "Unchanged"
That would not work, since I have a dir Download, which when I enter I want to set sorting by date and when I browse elsewhere I want to switch to my default sorting by extension. But thank you.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

I have a dir Download, which when I enter I want to set sorting by date and when I browse elsewhere I want to switch to my default sorting by extension
You can change the date sroting when leaving the Download dir by adding |cm_SrcByExt to the "Auto-run commands" field - will that be a help?

Help:
To run commands when a view mode is left, put them behind | (vertical line).
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

petermad,
You can change the date sroting when leaving the Download dir by adding |cm_SrcByExt to the "Auto-run commands" field - will that be a help?
Yes, that is actually a nice solution, thank you!

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

petermad,
OK, now the problem is when I am in my Download dir and change the sort mode to Ext for a minute and then exit the Download dir to browse for something else, I end up with Ext reversed. :?

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2Hacker

Then change the command to: |cm_SrcByExt 1

History.txt
20.09.16 Added: The following internal commands now accept parameters 0 (toggle, default), 1 (true), and 2 (false), except in main menu (* stands for LEFT, RIGHT, and SRC): CM_VERTICALPANELS,CM_*THUMBS,CM_*BYNAME,CM_*BYEXT,CM_*BYSIZE,CM_*BYDATETIME,CM_*NEGORDER (32/64)
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

petermad,
Let's try, thank you.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Hmm, I have another issue.
I have a view mode that sorts by date descending and executes "|cm_SrcByExt 1" when leaving the folder. The view mode is applied by an auto switch mode rule for "C:\Download\*" or-ed with "D:\Download\*". So far, so good.
Now I have these dirs in two tabs in the right panel. Switching between them works fine. However, when I restart TC and switch to the other tab the sort order is by extension instead of by date.

Relevant INI lines:

Code: Select all

[ViewModes]
0_name=<default>
0_icon=
0_options=0|-1|0||-1|-1|-1
1_name=By Date
1_icon=
1_commands=|cm_SrcByExt 1
1_options=-1|3|1||-1|-1|-1

[ViewModeSwitch]
Enabled=1
0_rules=+C:\Download\*\||+D:\Download\*\
0_mode=1
Any ideas appreciated.

TIA
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Post Reply