Configuration, Tabstops: setting the negative position values disables edit controls of the positions fields

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Configuration, Tabstops: setting the negative position values disables edit controls of the positions fields

Post by *DrShark »

In some of session yesterday I changed the value of Extensions field on Configuration, Tabstops (it seems from 24 to 224 and then back to 24 or so, but I'm not sure).
Today when I started TC it showed me [..] instead of filenames for files, though both Name and Ext columns were visible and didn't have unusual width.
So I opened Configuration, Tabstops and the value of Extension field was negative (-34).
The control was editable, for experiment I changed it to 224 and pressed OK. This made "Ext" column disappear, though AFAIR now TC showed the file names properly instead of [..].
Then I tried to set the value back to -34 to see whether it will be possible to reproduce the problem with names in filelist. Names were OK,
and the widths of tabstops weren't unusual, but if to open Configuration, Tabstops, it shows negative value "-1" instead of "-34" now, and the edit control is disabled (it's possible to click on spinbar/scrollbar buttons, but it doesn't make any changes). It's possible to actually change the widths of tabstops by moving the separator of column headers with further call of menu Caonfiguration->Save Settings, but changes made this way aren't shown in Extensions edit box on Tabstops page of Configuration dialog - it is still disabled with negative value "-1".
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Configuration, Tabstops: setting the negative position values disables the positions edit controls

Post by *ghisler(Author) »

-1 is used to show the extension directly after the name.

Negative values for field position can happen when TC adjusts the name field width to the window width, and the screen resolution changes. You will have to use Configuration - Options - Tabstops - Default - OK to fix bad values.
Author of Total Commander
https://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Re: Configuration, Tabstops: setting the negative position values disables the positions edit controls

Post by *DrShark »

ghisler(Author) wrote: 2021-05-24, 08:32 UTC -1 is used to show the extension directly after the name.
1. OK, I see. Then to reflect this I suggest to activate an option "directly after the name" on Configuration->Tabstops immediately when user presses Apply button after manually changing the value of Extension field to negative one, or even at the moment when user actually types negative value.
ghisler(Author) wrote: 2021-05-24, 08:32 UTCNegative values for field position can happen when TC adjusts the name field width to the window width, and the screen resolution changes.
2. It's interesting that in this case instead of disabled Extensions edit control with -1 value and active option "directly after the name" TC shows the negative value like -34 or -16 and allows to change it (though then disables it with activation of "directly after the name" then if new changed value will be negative too), while the filenames in filelist can show up like [..]. Wouldn't it be more consistentfor TC in such a case to use the default value for Extension field but also auto activate the "directly after the name" which would disable Extension edit control with "-1" value? This I guess would prevent the display of [..] instead of actual filenames in Names column after such screen resolution changes...
ghisler(Author) wrote: 2021-05-24, 08:32 UTCYou will have to use Configuration - Options - Tabstops - Default - OK to fix bad values.
3. It seems TC uses different defaults depending on how the settings are saved.

A. If I press Defaults button on on Configuration->Tabstops,
I get following values:
Extension: 156
Size: 217
DateTime: 221
Attributes: 263
Comments (fixed): 94

B. If I set all these fields to "-1", after reopening Configuration->Options->Tabstops I see following:
Extension: -1 (disabled, and the option "directly after the name" in Show file extensions group is active)
Size: 60
DateTime: 60
Attributes: 60
Comments (fixed): -1 (control is not disabled, and what this actually means?)

C. If I then enable an option "aligned (with Tab)" in Show file extensions, then reopen the Configuration dialog, the value in Extension files is now 42:
Extension: 42
Size: 60
DateTime: 60
Attributes: 60
Comments (fixed): -1

So why the default values are different in these cases?
Last edited by DrShark on 2021-05-27, 10:17 UTC, edited 2 times in total.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Configuration, Tabstops: setting the negative position values disables edit controls of the positions fields

Post by *ghisler(Author) »

I cannot reproduce these strange findings, clicking on "Default" always returns the same values here, comparable to your first (depending on the current window size).
Author of Total Commander
https://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Re: Configuration, Tabstops: setting the negative position values disables edit controls of the positions fields

Post by *DrShark »

ghisler(Author) wrote: 2021-05-25, 15:46 UTC I cannot reproduce these strange findings, clicking on "Default" always returns the same values here, comparable to your first (depending on the current window size).
It's about the difference of values after pressing "Default" button (case A) and the values TC sets in cases B/C
(case B: option "aligned (with Tab)" active, we're typing negative values, e.g. -1/-1/-1/-1/-1, then press OK, close and restart TC: now open Configuration->Tabstops again, you'll see "directly after filename" option is active, and the values will be -1 (disabled)/60/60/60/-1;
case C: now activate "aligned (with Tab)" again, this will activate "Extensions" field which value will become 42.)

BTW, the default value of "Comments (fixed)" field, as shown by TC launched with clean ini file, is 94 here, but when changed any other, the "Default" button does not restore it to default one.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Configuration, Tabstops: setting the negative position values disables edit controls of the positions fields

Post by *petermad »

case C: now activate "aligned (with Tab)" again, this will activate "Extensions" field which value will become 42.)
This is what I described and asked for a change for in 2019: viewtopic.php?p=357180#p357180
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
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Configuration, Tabstops: setting the negative position values disables edit controls of the positions fields

Post by *ghisler(Author) »

You are right, I have now changed it to set it to a more reasonable value, depending on the start of the size column and the current font size. I have tried saving the value, but had to give up after about an hour because that value changes very dynamically depending on window size, resolution, list arrangements, vertical button bar etc.
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:

Re: Configuration, Tabstops: setting the negative position values disables edit controls of the positions fields

Post by *petermad »

Ghisler(author) wrote: I have tried saving the value, but had to give up after about an hour because that value changes very dynamically depending on window size, resolution, list arrangements, vertical button bar etc.
history.txt wrote:27.05.21 Fixed: Configuration - Options - Tabstops: When switching from "directly after filename" to "aligned (with Tab), set a more reasonable position for the extension (32/64)
It is much better now in TC 10 rc2 - but maybe you should save the value for the extension anyway. I, for one, almost never change the size of my TC window, so using the last nown setting to me seems like a better idea, than any attempt to guess the value. I think a saved value would have a better chance of being, what the user espects.

Maybe save the value for both the extension and the name, and if the name value is unchanged when changing extension from -1 then use the saved values, otherwise try to compute them.
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
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Configuration, Tabstops: setting the negative position values disables edit controls of the positions fields

Post by *ghisler(Author) »

That's a good idea, which gave me an even better idea: How about saving the difference between the positions of the size and the ext field?
This difference stays the same when resizing, only the name field width changes.

But it may have problems when using a different view mode like custom view or comment view.
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:

Re: Configuration, Tabstops: setting the negative position values disables edit controls of the positions fields

Post by *petermad »

2ghisler(Author)
Any way that would ensure that if I change the "aligned (with Tab)" setting and then restart TC (so that TC's window is back to its saved size), and then change the "aligned (with Tab)" setting back, then I get the same tab widths as before.
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
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Configuration, Tabstops: setting the negative position values disables edit controls of the positions fields

Post by *ghisler(Author) »

Yes, of course, this was my main intent.
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:

Re: Configuration, Tabstops: setting the negative position values disables edit controls of the positions fields

Post by *petermad »

Now that we are at the subject of saving previous values for disabled settings, there are still these: https://www.ghisler.ch/board/viewtopic.php?f=14&t=54472&hilit=disabled and https://www.ghisler.ch/board/viewtopic.php?f=14&t=33164&hilit=disabled
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
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Configuration, Tabstops: setting the negative position values disables edit controls of the positions fields

Post by *ghisler(Author) »

How often do you really change these? Sounds like a lot of needed changes for very little benefit...
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:

Re: Configuration, Tabstops: setting the negative position values disables edit controls of the positions fields

Post by *petermad »

ghisler(Author) wrote: 2021-05-31, 13:36 UTC How often do you really change these? Sounds like a lot of needed changes for very little benefit...
It is actually because I don't change them so often, that it would be nice if they were remembered when disabled - because I am less likely to remember in my head, values that I don't disable often - and also because TC do remember some values but not others - it is a lottery if the one I disable is one that should be written down, or one that TC remembers for me.
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
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Configuration, Tabstops: setting the negative position values disables edit controls of the positions fields

Post by *petermad »

history.txt wrote:30.05.21 Fixed: Configuration - Options - Tabstops: When switching from "aligned (with Tab)" to "directly after filename", remember last tab position of file extension (32/64)
Confirmed fixed in TC 10 rc3 :-)
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
Post Reply