Synchronize Dirs - Compare: Context menu entry "delete" for a file is (sometimes) greyed out

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

HuSc
Junior Member
Junior Member
Posts: 25
Joined: 2014-03-10, 15:55 UTC

Synchronize Dirs - Compare: Context menu entry "delete" for a file is (sometimes) greyed out

Post by *HuSc »

Hi,

I noticed this issue when I used "Synchronize Dirs - Compare" for two folders with hundreds of files, but only 1 different file. After the "Compare" showed me the results, I deselected the corresponding "Show: (green resp. blue) arrow". So that I could easily see only that single file without having to scroll the panel.


Problem:
Under certain circumstances, the "delete" context menu entry is greyed out! It gets accessible only after a second action (RMB or click into the results window).

Hint:
The disabled context menu entry "delete" seems to depend much on the toggling of the "Show: (green/blue) Arrow" icons.

--------

My workflow to reproduce this problem:

Given:
- TC11.02 RC1 on Win7-x64
- I don't know since which TC version this effect has started. Momentarily, I can't test with older TC versions.

Workflow:
- Create two folders ("Test1" and "Test2") with an arbitrary amount of files therein.
- Open folder "Test1" in left panel and "Test2" in right panel.
- Rename one file in one of the panels.
- Use menu "Commands" > "Synchronize Dirs..." and click button "Compare".
- The result shows the different file(s).
- No problem: Right click on any of those files. The corresponding "delete" entry is enabled in the context menu.
- NOW click on the "Show:" "green arrow" button to disable it.
- BUG: Right click on the single file in the right panel. It gets selected, but the "delete" is greyed out in the context menu!
- Right click *again* on that file and now, the "delete" is enabled in the context menu!
- Toggle the "green arrow" to On and immediately agian to Off.
- Right click on the single file in the right panel. It gets selected, but the "delete" is greyed out again!
- A second right click will enable "delete" entry.
- Toggle the "green arrow" on/off and the "disabled delete" effect will reoccur .....

Same happens accordingly for the left panel/side.

With 2 different files (e.g. in the right panel):
- Perform a Synchronize Dirs - Compare.
- Toggle the "green arrow" off.
- Select 2nd file with a right click: "delete" is greyed out.
- Select 1st file with a right click: "delete" is enabled.
- Select 2nd file with a right click: "delete" is greyed out.
- Left click somewhere into the result panel.
- Select 2nd file with a right click: "delete" is enabled.
- Toggle the "green arrow" on/off and the effect will reoccur.


[EDIT]

Here the *shortest* way to reproduce this issue:
- Create a folder TEST2 in right panel (and copy 3 files into it).
- Create an empty folder TEST1 in left panel.
- Excecute "Synchronize Dirs - Compare".
- Toggle the "Show: green arrow" to OFF
- Right click on 1st or 2nd file will show "delete" entry as enabled. But RMB on 3rd file as disabled! (It seems as only the *last* file in that list is affected.)


Can you reproduce this issue?

Regards
Hubert
User avatar
petermad
Power Member
Power Member
Posts: 14810
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Synchronize Dirs - Compare: Context menu entry "delete" for a file is (sometimes) greyed out

Post by *petermad »

I see the opposite - when I disable left-to-right copying (green arrow button) and click on the single right file i get the option to delete in both sides ("<- Delete left" and "-> Delete right") instead of only getting the "-> Delete right".

I can ONLY reproduce this in DARK MODE.

It seem to only happen, if I after disabling either the green or the blue arrow button, right-click on the file. It does not happen if I left-click on the file first and thereafter right-click on the file.

Also, if I click on one of the single files and get the options of deleting both ways, then if I actually choose one of the two options, then it appeasr that TC thinks that one of the other not selected files is selected.

See video: https://tcmd.madsenworld.dk/syncdelete.mp4

EDIT
I read your description again, an saw that you apparently have showing of equal files and unequal files disabled.

If I test with that, I can confirm that if I right-click on the file right after clicking the green of blue arrow button, then both delete options are disabled

This I can reproduce ONLY in NORMAL mode.
See video: https://tcmd.madsenworld.dk/syncdelete2.mp4

In Dark mode it behaves as described above.
See video: https://tcmd.madsenworld.dk/syncdelete3.mp4
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
HuSc
Junior Member
Junior Member
Posts: 25
Joined: 2014-03-10, 15:55 UTC

Re: Synchronize Dirs - Compare: Context menu entry "delete" for a file is (sometimes) greyed out

Post by *HuSc »

Hi petermad,

thanks for your elaborate testing! Also for your descriptive videos. (Which tool do you use to create these videos?)

- In Sync > Compare > Show: I have by default" green arrow", "unequal" and "blue arrow" enabled.
- I don't use Dark Mode. Thanks for checking this!
- TC suggests to delete a non-existing left file (cf. your "syncdelete.mp4")?! That is quite a surprise. ;)

PS:
Yesterday, I had access to an old Win2k configuration with a TC10. There, the context menu *always* shows *all* 3 delete entries enabled (left, right and both direction). Regardless of the Show: buttons settings resp. the amount of existing or different files.


Regards
Hubert
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48092
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Synchronize Dirs - Compare: Context menu entry "delete" for a file is (sometimes) greyed out

Post by *ghisler(Author) »

I have checked this in the debugger: Windows reports some list items as selected although they aren't. It gets fixed when removing the selection from all items before applying the display filter.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14810
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Synchronize Dirs - Compare: Context menu entry "delete" for a file is (sometimes) greyed out

Post by *petermad »

HuSc wrote: 2023-10-11, 07:50 UTC thanks for your elaborate testing! Also for your descriptive videos. (Which tool do you use to create these videos?)
I use ZD Soft Screen Recorder https://www.zdsoft.com/screen-recorder/
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
petermad
Power Member
Power Member
Posts: 14810
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Synchronize Dirs - Compare: Context menu entry "delete" for a file is (sometimes) greyed out

Post by *petermad »

ghisler(Author) wrote: 2023-10-11, 10:18 UTC I have checked this in the debugger: Windows reports some list items as selected although they aren't. It gets fixed when removing the selection from all items before applying the display filter.
The history for TC 11.02rc2 says:
history.txt wrote:11.10.23 Fixed: Synchronize dirs: Clear selection when clicking on one of the buttons <- = =/= -> duplicates singles, otherwise Windows sometimes reports items as selected when they aren't (32/64)
I guess that is fix for the bug in this topic, but I can still reproduce it as described in my previous post here above.

It is only 64bit TC that seems to have the problem. I cannot reproduce if with 32bit TC neither for v. 11.02rc1 and 11.02rc2.


Notice that when I test I close the context menu with Escape between each click on the buttons.
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
ghisler(Author)
Site Admin
Site Admin
Posts: 48092
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Synchronize Dirs - Compare: Context menu entry "delete" for a file is (sometimes) greyed out

Post by *ghisler(Author) »

I cannot reproduce it any more. You reported so many steps in one post, can you tell me where exactly you still get a wrongly enabled menu item?
Author of Total Commander
https://www.ghisler.com
HuSc
Junior Member
Junior Member
Posts: 25
Joined: 2014-03-10, 15:55 UTC

Re: Synchronize Dirs - Compare: Context menu entry "delete" for a file is (sometimes) greyed out

Post by *HuSc »

@petermad: Thanks for the tool's name.


@ghisler: I can still reproduce it in TC11.02-RC2

Given:
- TC11.02-RC2 64bit (on a Win7-x64 configuration)
- Have an empty folder opened in left panel. A folder with just 1 file opened in right panel.
- Perform a Synchronize Dirs - Compare. (green arrow, unequal and blue arrow are enabled, also the single and double buttons)
- Right side shows the single file as result.
- Right click onto that file and "delete right" is acctive in the context menu.
- ** Toggle the green arrow OFF and ON again**
- BUG: Right click on the file and "Delete right" is now greyed out! (Whereas e.g. "Right properties" is active.)
- Right click again on the file and now, "Delete right" is active.

PS:
With 2 or more files in the right side folder: That inactive "Delete right" occurs only for the last file/line in that result list. (Immediately after I changed the green arrow status to OFF and again to ON.)

Can you reproduce this?

Regards
Hubert
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48092
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Synchronize Dirs - Compare: Context menu entry "delete" for a file is (sometimes) greyed out

Post by *ghisler(Author) »

I still can't reproduce it on Windows 11, and neither on Windows 7.

Does the line get selected when you right click after toggling the arrow button? It does here on both Windows 11 and 7.

Because the "delete right" menu items will only be enabled when there are SELECTED lines which have files on the right side. When nothing is selected, then the delete menu items don't get enabled because they are for deleting multiple selected files.

The only way I can reproduce it is when using Shift+F10 or the context menu button while nothing is selected (which is the case after toggling an arrow button).
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14810
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Synchronize Dirs - Compare: Context menu entry "delete" for a file is (sometimes) greyed out

Post by *petermad »

Does the line get selected when you right click after toggling the arrow button? It does here on both Windows 11 and 7.
Yes.

Make two directories with come identical files and one file in each folder that are not identical, make sure the the single file in the right side will be sorted below the single file in the left side. see video: https://tcmd.madsenworld.dk/syncdelete2.mp4 7 seconds in.

In Normal mode:
  1. Open sync tool and click compare, all buttons ( [<-] [=] [=/=] [->] [duplicates] [singles] ) are enabled.
  2. Click compare.
  3. Click the [=] button, to hide equal files.
  4. Right-click on the blue single file in the right side.
  5. Notice that BOTH delete options are disabled.
  6. Press Escape to close the context menu.
  7. Left-click on the same file.
  8. Right-click on the same file.
  9. Notice that the "-> Delete right" options is now enabled as it should be.
  10. Press Escape to close the context menu.
  11. Click on the [<-] button to hide files in the right side.
  12. Right-click on the green single file in the left side.
  13. Notice that BOTH delete options are disabled.

In Dark mode:
  1. Open sync tool and click compare, all buttons ( [<-] [=] [=/=] [->] [duplicates] [singles] ) are enabled.
  2. Click compare.
  3. DO NOT click the [=] button, to hide equal files.
  4. Click on the [->] button to hide files in the left side.
  5. Right-click on the blue single file in the right side.
  6. Notice that BOTH delete options are enabled.
  7. Press Escape to close the context menu.
  8. Click on the [->] button to show files in the left side again.
  9. Right-click on the green single file in the left side.
  10. Notice that BOTH delete options are enabled.
  11. Press Escape to close the context menu.
  12. Left-click on the same file.
  13. Right-click on the same file.
  14. Notice that only the "<- Delete left" options is now enabled as it should be.
It is only in the 64bit version of TC that I see this.

There are many other ways to get these results, but these are fully reproducable here. I can reproduce it under both Windows 7 and 10.
I think the 3 videos shows it pretty well:
https://tcmd.madsenworld.dk/syncdelete.mp4
https://tcmd.madsenworld.dk/syncdelete2.mp4
https://tcmd.madsenworld.dk/syncdelete3.mp4
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
HuSc
Junior Member
Junior Member
Posts: 25
Joined: 2014-03-10, 15:55 UTC

Re: Synchronize Dirs - Compare: Context menu entry "delete" for a file is (sometimes) greyed out

Post by *HuSc »

[ghisler] "Does the line get selected when you right click after toggling the arrow button? It does here on both Windows 11 and 7."
After toggling the green arrow button, that file in the right panel is deselected! I need to right click on it to select it. Now, the "Delete right" context menu entry is greyed out. Only after a 2nd right click on the file, the context menu will will show "Delete right".

Here is an annottated screenshot:
https://hubert-schaefer.com/hubert/temp/TC-Sync-Compare_context-menu_Delete-entry_problem_screenshot.gif
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48092
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Synchronize Dirs - Compare: Context menu entry "delete" for a file is (sometimes) greyed out

Post by *ghisler(Author) »

Sorry, I cannot reproduce that, and I cannot see any solution either. Since it enables the menu items in less cases, it's not a big problem because you wouldn't delete files by accident this way. I'm therefore moving this thread to "will not be changed".

Moderator message

Moved to will not be changed
Author of Total Commander
https://www.ghisler.com
HuSc
Junior Member
Junior Member
Posts: 25
Joined: 2014-03-10, 15:55 UTC

Re: Synchronize Dirs - Compare: Context menu entry "delete" for a file is (sometimes) greyed out

Post by *HuSc »

OK. I can live with that glitch, since a 2nd right click will enable the "Delete" entry.

It's strange that only the "Delete" entry is affected, not the other entries like "Edit", "Rename", "Properties" (cf. my screenshot). And that this behaviour occurs only with the last/bottom file, in case of multiple different files (on only one side).
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48092
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Synchronize Dirs - Compare: Context menu entry "delete" for a file is (sometimes) greyed out

Post by *ghisler(Author) »

The delete entry acts on all selected items, while the others only act on the item on which you right clicked. TC checks each item whether it is selected or not (via LB_GETSEL message), but that seems to return invalid values in your specific case.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14810
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Synchronize Dirs - Compare: Context menu entry "delete" for a file is (sometimes) greyed out

Post by *petermad »

It is just peculiar that it cannot be fixed in 64bit TC, when it works OK in 32bit TC.
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
Post Reply