Strange behaviour of directory menu

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Vulpix
Junior Member
Junior Member
Posts: 28
Joined: 2013-05-15, 18:06 UTC

Strange behaviour of directory menu

Post by *Vulpix »

W10 x64 (though I think that is not relevant)
Latest TC 9 x64

This all relates to one issue which manifests in two ways.

In the directory menu, I want to have two directory links. One that only opens in the current panel, and the other which also opens a specific directory in the "target" panel - but the "base" directory of both is the same.


Example:

Suppose we have these folders:

Code: Select all

d:\Testingdir_A\subfolder1\
d:\Testingdir_A\subfolder2\
and I want to create two directory menu entries, one of which opens

Code: Select all

d:\Testingdir_A\subfolder1\
only in the current panel...



... whilst the second directory menu entry should open

Code: Select all

d:\Testingdir_A\subfolder1\
in the current panel and

Code: Select all

d:\Testingdir_A\subfolder2\
in the target panel.

First issue is that you can't configure this the normal way (via the directory menu->add current dir), because once you configure either of the two (for example say you configure just the "active" panel directory to be saved), the option to "add current dir" is gone from the directory menu, instead it is replaced by "Remove current dir". This makes sense because technically you shouldn't want to save the same dir twice - but if you want to have two links, one of which also saves the target directory, this behavior is undesirable. So the workaround is to use the configuration menu of the directory menu and add a new entry manually.

The second issue becomes apparent once you have these two entries saved. The entries work correctly when clicked, however when you display the directory menu, you will always only see one of the two entries marked as highlighted, regardless of which of the two links you have opened; the only thing that matters is the actual order of the two in the list.

In the picture below, I clearly have d:\Testingdir_A\subfolder1\ selected in the left panel, but in the right panel, you can see that it's not even the same disk, and yet the menu is highlighting the wrong "directory menu" item - simply because they both share the current panel path (which is correct) and this item is higher on the list in the directory menu.

Image: https://i.imgur.com/oMM0hjc.png

Is this a bug? It's not really breaking my workflow, but it is a little strange, considering that saving the target directory is an option during the creation of the directory menu items.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

It is not a bug, TC sets mark near the first entry with current directory, it doesn't remember which item was used for switching directory. Your situation is really unusual BTW, and I don't really see any need in highlighting correct item since both point to the same directory...
Vulpix
Junior Member
Junior Member
Posts: 28
Joined: 2013-05-15, 18:06 UTC

Post by *Vulpix »

They both point to the same directory, but the "source and target" directory menu item also changes the target directory. It's relevant for me because I often open the directory to copy files to the "target" directory, but sometimes I also want to just open the source directory on its own without changing the target. It probably isn't a bug, but you can see how it's somewhat confusing. Then again, I do agree that my use case is probably not very common (but it is also not some kind of hack or tweak, it is standard functionality; just used in ways that were not considered)
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

Yes, what you did is a some kind of hack because you didn't use the normal way to add the entries (via the GUI) but "behind TC's back". I wouldn't expect software to behave normally when you did something to their config files manually instead of the intended way...

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Vulpix
Junior Member
Junior Member
Posts: 28
Joined: 2013-05-15, 18:06 UTC

Post by *Vulpix »

I didn't modify any configuration files, it's a standard option and comes with a regular dialogue, via the gui.
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

I didn't modify any configuration files, it's a standard option and comes with a regular dialogue, via the gui.
Well, since the GUI only allows you to make one entry for the same source directory (using the "Add current dir" option), you must obviously have made the second entry, by making it from another source directory and then secondly having edited the path for that entry manually using the "Configure..." option in the Directory menu - that is kind of a hack ;-)

The checkmark next to an entry in the Directory menu is there to show you if you currently are in the source directory of the entry - not to show which entry you last clicked. You might have gotten into the source directory by navigating and not via the Directory menu
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
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

you must obviously have made the second entry, by making it from another source directory and then secondly having edited the path for that entry manually
One can simply add new entry with any path using the "Configure..." command, no need in creating fake entry and editing it. :)
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

Vulpix wrote:I didn't modify any configuration files, it's a standard option and comes with a regular dialogue, via the gui.
You're right. Sorry, I misread "manually" as "edited wincmd.ini".

I see now what you mean. TC obviously only matches the first source it can find in the directory list and sets the checkmark there. We should wait for Ghisler to comment on that and whether or not TC can also match target directory (the comparison should be simple but what to do when target doesn't match?).

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Vulpix
Junior Member
Junior Member
Posts: 28
Joined: 2013-05-15, 18:06 UTC

Post by *Vulpix »

petermad wrote: The checkmark next to an entry in the Directory menu is there to show you if you currently are in the source directory of the entry - not to show which entry you last clicked. You might have gotten into the source directory by navigating and not via the Directory menu
Of course it is not to indicate what I last clicked. It is to indicate that the directory that corresponds with the preset is loaded. You can check this already yourself - if you navigate into any source directory which matches a directory menu entry, that directory menu entry will become checked/highlighted, regardless of whether you used the menu to navigate there or not :3

Dalai wrote:We should wait for Ghisler to comment on that and whether or not TC can also match target directory (the comparison should be simple but what to do when target doesn't match?).

Regards
Dalai
I'm quite curious about this too; let's wait. And no problem, the issue itself is so difficult to describe that I probably made a mistake somewhere and that caused the misunderstanding.

Thanks for not immediately dismissing it! :)
Vulpix
Junior Member
Junior Member
Posts: 28
Joined: 2013-05-15, 18:06 UTC

Post by *Vulpix »

Any news on this one? It's not a major problem but it kinda makes sense to have this work the way I suggested.

Thanks!
Post Reply