Button to show/hide hidden files only?

English support forum

Moderators: Hacker, petermad, Stefan2, white

HBB
Senior Member
Senior Member
Posts: 295
Joined: 2008-05-05, 21:31 UTC

Button to show/hide hidden files only?

Post by *HBB »

Currently ShowHiddenSystem variable in "wincmd.ini" supports to show/hide system and hidden files together or seperately.

cm_SwitchHidSys can have a value 0 or 1. Is there any way to create a button to show/hide only hidden files (such as ShowHiddenSystem have values of 0 and 2)?

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

Post by *petermad »

2HBB
Upgrade to TC 8.5 b7 and use one of the two new commands cm_SwitchHid and cm_SwitchSys ;-)
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
HBB
Senior Member
Senior Member
Posts: 295
Joined: 2008-05-05, 21:31 UTC

Post by *HBB »

I currently use TC8.5B7 and I missed them unfortunately. I see that they exist from TC8.5B3. Thanks...
HBB
Senior Member
Senior Member
Posts: 295
Joined: 2008-05-05, 21:31 UTC

Post by *HBB »

I located cm_SwitchHidSys, cm_SwitchHid and cm_SwitchSys on seperate buttons. When I press the buttons of cm_SwitchHid or cm_SwitchSys, the button of cm_SwitchHidSys turns to pressed view. I think that it should have unpressed view unless ShowHiddenSystem is 1. Am I wrong?
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

HBB,
HidSys is down if any of Hid or Sys enabled. If you click HidSys, it will disable both Hid and Sys then.
HBB
Senior Member
Senior Member
Posts: 295
Joined: 2008-05-05, 21:31 UTC

Post by *HBB »

MVV,
I am trying to say that HidSys should not be down when only one of the Hid or Sys is down. If so, it can be understood both Hidden and System files are visible, but actually not (Note that, some files may have only hidden attribute and some files may have only system attribute).
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Both half-cases are confusing. But the question is what we want to do by cm_SwitchHidSys if only hidden or system are visible? Two possible cases: we want to show both or we want to hide both (as is). I think second one is more logical...
User avatar
white
Power Member
Power Member
Posts: 6015
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

HBB wrote:MVV,
I am trying to say that HidSys should not be down when only one of the Hid or Sys is down. If so, it can be understood both Hidden and System files are visible, but actually not (Note that, some files may have only hidden attribute and some files may have only system attribute).
MVV wrote:Both half-cases are confusing. But the question is what we want to do by cm_SwitchHidSys if only hidden or system are visible? Two possible cases: we want to show both or we want to hide both (as is). I think second one is more logical...
HBB is right. It is not logical. You are saying cm_SwitchHidSys means hide both hidden and system files. But the button must be unpressed for this/checkmark in menu must be removed for this/option must be disabled for this. Turning off an option to enable it's function is not logical.

So what you are saying which is also current behavior:
cm_SwitchHidSys (when disabled, hide hidden and system files)
cm_SwitchHid (when disabled, hide hidden files)
cm_SwitchSys (when disabled, hide system files)

This is wrong. It should be either:
(1)
cm_SwitchHidSys (when enabled, hide hidden and system files)
cm_SwitchHid (when enabled, hide hidden files)
cm_SwitchSys (when enabled, hide system files)

or:
(2)
cm_SwitchHidSys (when enabled, show hidden and system files)
cm_SwitchHid (when enabled, show hidden files)
cm_SwitchSys (when enabled, show system files)

(2) is conform the options in the configuration/options/Display.
If (1) is chosen the options in the configuration/options/Display must be changed also.
In either case enabling cm_SwitchHidSys (bringing the button to a pressed state) means enabling cm_SwitchHid and cm_SwitchSys.

The current behavior to disable an option to disable two other options is not correct. So this is a bug.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

white,
When options enabled, corresponding files are shown, not hidden. Put three buttons together onto a button bar (HS, H, S) and do quick test in a folder with hidden and system files (h.bin, s.bin and sh.bin in my case).

Release all buttons. Displaying of both hidden and system files is disabled, as it was for years. OK.

Push button SH. All three buttons are pushed now and displaying of both hidden and system files is enabled, as it was for years. OK.

Push button H. Buttons SH and H are pushed now, displaying of hidden files is enabled while displaying of both hidden+system is half-enabled. I think OK however it is a matter of taste and both sides have their pros and cons (it sounds more logical for me that button is pushed for half-enabled option and disables it by click than vice versa).

Now you can disable displaying of hidden and system files by pressing SH button.

And I think it is not a bug but it is by design.
User avatar
white
Power Member
Power Member
Posts: 6015
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

2MVV
I already did the tests you describe. I know exactly how it works.
MVV wrote:Push button H. Buttons SH and H are pushed now, displaying of hidden files is enabled while displaying of both hidden+system is half-enabled. I think OK however it is a matter of taste and both sides have their pros and cons (it sounds more logical for me that button is pushed for half-enabled option and disables it by click than vice versa).
I suggest to change it in the vice versa way because I think the vice versa way is the only logical way.

You start by saying:
MVV wrote: When options enabled, corresponding files are shown, not hidden.
Exactly! So when the SH button is enabled both S en H files should be shown!

Then:
MVV wrote:Now you can disable displaying of hidden and system files by pressing SH button.
Error in logic. This is only true if both hidden and system files are shown. As you said the option is about showing files, not hiding files.

I say the function of cm_SwitchHidSys is to show hidden and system files by enabling the option.
You say the function of cm_SwitchHidSys is to hide hidden and system files by disabling the option.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

If you have enabled S or H, SH command disables both, what's wrong with it? You should think which one you need more frequently - enable both or disable both. And, which button state you want to see when S or H are shown. I prefer to see button pressed if S or H are enabled (i.e. some of hidden files are shown). As I said, it is a matter of taste, both cases are equally logical.
HBB
Senior Member
Senior Member
Posts: 295
Joined: 2008-05-05, 21:31 UTC

Post by *HBB »

MVV wrote :
Push button H. Buttons SH and H are pushed now, displaying of hidden files is enabled while displaying of both hidden+system is half-enabled
I see only hidden attributed files (not hidden+system attributed files), altough button SH is pushed. Here, SwitchHidSys button view is like SwitchHidOrSys. When pressing button SH, SwitchHidSys button functioning is like SwitchHidAndSys

Actually, I have started to use only SwitchHid and SwitchSys buttons (without using SwitchHidSys). This usage seems more logical and solved the problem for me. But, I still believe that current pressed/unpressed view of SwitchHidSys may cause misunderstanding.
User avatar
white
Power Member
Power Member
Posts: 6015
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

MVV wrote:If you have enabled S or H, SH command disables both, what's wrong with it? You should think which one you need more frequently - enable both or disable both. And, which button state you want to see when S or H are shown. I prefer to see button pressed if S or H are enabled (i.e. some of hidden files are shown). As I said, it is a matter of taste, both cases are equally logical.
There are two things wrong with it. It reverses the purpose of the cm_SwitchHidSys command which breaks compatibility. Second, having to disable an option to enable it's function is backwards.

Old situation:
Default: Files with S and H attribute are hidden
cm_SwitchHidSys: Show hidden and system files (show all files)

New situation:
Default: Files with S and H attribute are hidden
cm_SwitchHidSys: Do not hide both hidden and system files. (disable this option to hide hidden and system files)

If you want an option to hide hidden and system files you should add a new command:
cm_HideHidSys: Hide hidden and system files


If people having a button with the cm_SwitchHidSys command on the button bar are upgrading, the pressed status of the button should still indicate that all files are shown. Otherwise, people will think files aren't there while in reality they are.

2ghisler(Author)
Please change the new behavior.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50923
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

People who are upgrading do not have any problem because they either have hidden AND system enabled, or both disabled.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 6015
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

ghisler(Author) wrote:People who are upgrading do not have any problem because they either have hidden AND system enabled, or both disabled.
They do have a problem because you split the option in configuration and added 2 commands. So after some use by the user (or users), the user can have showing hidden files enabled OR showing system files enabled. How is the user to know that the pressed state of his button no longer indicates that all files are shown?
Post Reply