This forum uses cookies. Click X button to hide this message. What is stored? / Privacy
Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Save position does not work anymore in TC 9
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Total Commander Forum Index -> TC Behaviour which will not be changed Printable version
View previous topic :: View next topic  
Author Message
Wilhelm M.
Power Member
Power Member


Joined: 05 Jun 2003
Posts: 733

PostPosted: Tue Feb 13, 2018 1:27 pm    Post subject: Save position does not work anymore in TC 9 Reply with quote

Changes of the tap stop positions should - according to the TC help - be saved by pressing "save position" in the configuration.
In TC 9.12 this does not work any longer. A restart of TC always re-establishes the original tab positions.
Even the "save settings" comman does not store the new tab positions.
This was also confirmed by starting TC with a fresh ini file.

About my system: Win 7 64 bit and Win 7 32 bit, TC 32 bit, programme path is D:\Tools\TC (no user restrictions),
UseIniInProgramDir=7 is set and the programme uses this wincmd.ini.

This error was also confirmed by other users in the German Forum.
_________________
Grüße/Regards,
Wilhelm


Last edited by Wilhelm M. on Thu Feb 15, 2018 8:15 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
elgonzo
Senior Member
Senior Member


Joined: 04 Sep 2013
Posts: 377

PostPosted: Tue Feb 13, 2018 7:57 pm    Post subject: Reply with quote

Cannot confirm with TC9.12 32bit and 64bit.
OS: Win 7 Pro x64 english

I tested in a fresh Win7 Pro x64 VM, so no TC registry keys were present. Like Wilhelm, I used a fresh wincmd.ini with UseIniInProgramDir=7 in the TC folder (C:\TC) which had full permissions (TC in fact updated the INI file).

"Save positions" saved the changed column widths without problems. After restart, TC used those changed column width as expected.

@̶W̶i̶l̶h̶e̶l̶m̶,̶ ̶p̶l̶e̶a̶s̶e̶ ̶c̶h̶e̶c̶k̶ ̶y̶o̶u̶r̶ ̶r̶e̶g̶i̶s̶t̶r̶y̶.̶ ̶D̶o̶e̶s̶ ̶i̶t̶ ̶c̶o̶n̶t̶a̶i̶n̶ ̶"̶G̶h̶i̶s̶l̶e̶r̶"̶ ̶k̶e̶y̶s̶ ̶i̶n̶ ̶e̶i̶t̶h̶e̶r̶ ̶ ̶H̶K̶C̶U̶/̶S̶o̶f̶t̶w̶a̶r̶e̶ ̶o̶r̶ ̶H̶K̶L̶M̶/̶S̶o̶f̶t̶w̶a̶r̶e̶?̶ ̶I̶f̶ ̶s̶o̶,̶ ̶"̶U̶s̶e̶I̶n̶i̶I̶n̶P̶r̶o̶g̶r̶a̶m̶D̶i̶r̶"̶ ̶m̶i̶g̶h̶t̶ ̶n̶o̶t̶ ̶t̶a̶k̶e̶ ̶e̶f̶f̶e̶c̶t̶ ̶a̶s̶ ̶T̶C̶ ̶m̶i̶g̶h̶t̶ ̶t̶a̶k̶e̶ ̶t̶h̶e̶ ̶l̶o̶c̶a̶t̶i̶o̶n̶ ̶o̶f̶ ̶t̶h̶e̶ ̶w̶i̶n̶c̶m̶d̶.̶i̶n̶i̶ ̶f̶i̶l̶e̶ ̶f̶r̶o̶m̶ ̶t̶h̶e̶ ̶r̶e̶g̶i̶s̶t̶r̶y̶ ̶(̶a̶n̶d̶ ̶i̶f̶ ̶t̶h̶a̶t̶ ̶p̶a̶t̶h̶ ̶r̶e̶f̶e̶r̶s̶ ̶t̶o̶ ̶a̶ ̶r̶e̶s̶t̶r̶i̶c̶t̶e̶d̶ ̶o̶r̶ ̶n̶o̶n̶-̶e̶x̶i̶s̶t̶i̶n̶g̶ ̶d̶i̶r̶e̶c̶t̶o̶r̶y̶,̶ ̶u̶p̶d̶a̶t̶e̶s̶ ̶t̶o̶ ̶t̶h̶e̶ ̶i̶n̶i̶ ̶f̶i̶l̶e̶ ̶p̶e̶r̶h̶a̶p̶s̶ ̶f̶a̶i̶l̶ ̶s̶i̶l̶e̶n̶t̶l̶y̶;̶ ̶b̶u̶t̶ ̶i̶ ̶d̶o̶n̶'̶t̶ ̶k̶n̶o̶w̶ ̶f̶o̶r̶ ̶s̶u̶r̶e̶)̶
With UseIniInProgramDir=7, registry keys will be ignored anyway. Hmm, whatever the cause, it seems some "environmental" factors play a role here, as i am unable to reproduce the problem...
_________________
Windows 7 Pro x64 SP1
Back to top
View user's profile Send private message
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 35745
Location: Switzerland

PostPosted: Thu Feb 15, 2018 4:48 am    Post subject: Reply with quote

I cannot confirm it either. Could you check whether this is a problem with writing to wincmd.ini, or reading from it?

1. Make copy of wincmd.ini
2. Slightly change tab positions
3. Configuration - Save position
4. Compare by content of old and new wincmd.ini
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
tuska
Power Member
Power Member


Joined: 21 May 2007
Posts: 1091

PostPosted: Thu Feb 15, 2018 6:41 am    Post subject: Reply with quote

ghisler(Author) wrote:
I cannot confirm it either.

It may be that configuring - save position works in a certain way.
But after a TC restart, at least under certain conditions, the view of the column widths changes up from TC 9.0 and following.
TC up from 9.0 and following

Since this is not the case under TC 8.52a, it was considered a bug.
TC 8.52a

If you compare the wincmd.ini's, you'll notice that after saving/exiting <- AND -> restarting the TC, the [lefttabs] section has been moved,
although no change has been made yet. For me, this looks like TC is performing a calculation on restart, which is not necessary in this case,
as it should continue to work with the previously saved values.

Incidentally, I assume that you have read the topic in the German forum

What I have learned now is that hints in a forum obviously are not as important as an entry in the bug forum.
Unfortunately, the language is not my main language, so it means much more effort for me.

That was my last statement on this topic anyway, because I do not use this setting and just wanted to confirm
to another user that there is an inconsistency here.

EDIT: I made corrections to this statements here...
https://ghisler.ch/board/viewtopic.php?p=338130#338130


Last edited by tuska on Thu Feb 15, 2018 9:11 am; edited 1 time in total
Back to top
View user's profile Send private message
Wilhelm M.
Power Member
Power Member


Joined: 05 Jun 2003
Posts: 733

PostPosted: Thu Feb 15, 2018 8:10 am    Post subject: Reply with quote

@Ghisler
Sorry for the delay.
I have changed the tab positions significantly (!), not just a few pixels, and pressed Save position.
Then restarted TC and the original position seemed to be restored (that's the bug I am supposing).

But: the comparison shows that the positons are almost the same
but not exactly. Here the relevant differences:

[1280x1024 (8x16)]
New wincmd.ini: Tabstops=191,199,258,-1,576,93
Old wincmd.ini: Tabstops=192,200,264,-1,576,93

[Tabstops]
New wincmd.in:
0=191
1=199
3=258
4=0
5=93

Old wincmd.ini:
0=192
1=200
3=264
4=0
5=93

These slight differnces are virtually unvisible. The changes that I really made were much larger!
E.g. the colum for the file name was moved to approx. half of the file list window.
_________________
Grüße/Regards,
Wilhelm
Back to top
View user's profile Send private message Send e-mail
Wilhelm M.
Power Member
Power Member


Joined: 05 Jun 2003
Posts: 733

PostPosted: Thu Feb 15, 2018 8:30 am    Post subject: Reply with quote

Just made another test. The error does only occur if the file extensions are placed directly behind the filenames.
In my first contribution I forgot the say that, sorry.
When I switch to "aligned" the changes are correctly stored and also survive a restart of TC.
_________________
Grüße/Regards,
Wilhelm
Back to top
View user's profile Send private message Send e-mail
Wilhelm M.
Power Member
Power Member


Joined: 05 Jun 2003
Posts: 733

PostPosted: Thu Feb 15, 2018 8:48 am    Post subject: Reply with quote

elgonzo wrote:
So, the problem does not occur with a fresh wincmd.ini, but when file extensions are directly behind the file names.

You put it a bit ambiguosly. If the extensions are placed directly behind the filenames, the error occurs.
In this case it makes no difference wheter the windcmd.ini is fresh or not.
_________________
Grüße/Regards,
Wilhelm
Back to top
View user's profile Send private message Send e-mail
elgonzo
Senior Member
Senior Member


Joined: 04 Sep 2013
Posts: 377

PostPosted: Thu Feb 15, 2018 8:50 am    Post subject: Reply with quote

Just did a very quick and dirty test, taking into account the update from tuska and Wilhelm.

When the file extensions are shown directly behind the file names, i can experience the issue. If i make the file name column larger and save the position, it seems TC will load and restore the width of the column correctly. However, if i make the file name column smaller than a certain width and save its position again, TC will ignore this at the next restart and make the column somewhat larger. I haven't checked yet whether the issue is with saving the position info to the INI, or whether it is an issue with loading the positions and initializing the columns during program start. Just wanted to let you know that i can "see something" now...
_________________
Windows 7 Pro x64 SP1
Back to top
View user's profile Send private message
elgonzo
Senior Member
Senior Member


Joined: 04 Sep 2013
Posts: 377

PostPosted: Thu Feb 15, 2018 8:56 am    Post subject: Reply with quote

Wilhelm M. wrote:
elgonzo wrote:
So, the problem does not occur with a fresh wincmd.ini, but when file extensions are directly behind the file names.

You put it a bit ambiguosly. If the extensions are placed directly behind the filenames, the error occurs.
In this case it makes no difference wheter the windcmd.ini is fresh or not.

I removed the post you were responding to. I noticed that you made a comprehensive update to your bug report, which made my deleted (and already edited Wink )post largely meaningless and confusing. Sorry about the hiccup... (why can't the forum software not tell me if something new has been posted to the topic when i hit the submit button? Evil or Very Mad )

In this deleted post i also mentioned that just saying "starting TC with a fresh wincmd.ini" can and will be understood as using TC with its default settings. If you alter some setting(s), then you are not using TC with its default settings anymore. But yeah, if you just take that sentence stand-alone, it is indeed ambiguous... Smile
_________________
Windows 7 Pro x64 SP1
Back to top
View user's profile Send private message
tuska
Power Member
Power Member


Joined: 21 May 2007
Posts: 1091

PostPosted: Thu Feb 15, 2018 9:05 am    Post subject: Reply with quote

I have to correct my statements made above:
1. After clicking on the "Apply" button other values (wrong) are saved in the wincmd.ini under the section [Tabstops].
2. With Configuration - Save Position the wrong values are saved (again) in the wincmd.ini
3. A comparison of the wincmd.ini files (before - after restart of TC) then brings no difference

That Configuration - Save Position works.
The indicated error is from TC 9.0 and following still available.

http://www.bilder-hochladen.net/files/big/lwdu-r-3f0d.png

EDIT: -Addition-
For TC 8.52a, after clicking on the "Apply" button in wincmd.ini, under section [Tabs], the correct values are saved.


Last edited by tuska on Thu Feb 15, 2018 2:53 pm; edited 1 time in total
Back to top
View user's profile Send private message
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 35745
Location: Switzerland

PostPosted: Thu Feb 15, 2018 11:41 am    Post subject: Reply with quote

If you use the option "Directly after file name", the position of the Extension column cannot be saved. It is restored to a fixed percentage of the name/ext columns combined. The reason is that the width of the Ext column is irrelevant in this case. The header only used for sorting.
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
elgonzo
Senior Member
Senior Member


Joined: 04 Sep 2013
Posts: 377

PostPosted: Thu Feb 15, 2018 11:56 am    Post subject: Reply with quote

ghisler(Author) wrote:
If you use the option "Directly after file name", the position of the Extension column cannot be saved. It is restored to a fixed percentage of the name/ext columns combined. The reason is that the width of the Ext column is irrelevant in this case. The header only used for sorting.

Ah, okay. So me only looking at the name column might not mean much. I should look at the combined width of the name+extension columns. I will have to check again...
_________________
Windows 7 Pro x64 SP1
Back to top
View user's profile Send private message
elgonzo
Senior Member
Senior Member


Joined: 04 Sep 2013
Posts: 377

PostPosted: Thu Feb 15, 2018 2:14 pm    Post subject: Reply with quote

So, i have finally taken a closer look...

TC64 9.12a
OS: Windows 7 Pro x64, english
Display: 1920x1080, 96 DPI (100% text scaling, system default), Aero DWM enabled


From the tests i describe below it should be pretty clear that somewhere deep down in its guts, TC is somehow getting its arithmetic for the Name and Extension column width wrong.

In test 2, a shrinking Name column could compensate for the expanding Expansion column, thus keeping the other columns at their intended positions.
However, tests 3 and 4 completely expose the issue: The widths of the Name+Extension columns is calculated or stored incorrectly, causing them to expand more and more each time their positions are saved + TC is restarted.


Test 1 ("Preparations for War")
  1. Start TC with a fresh wincmd.ini.
  2. In the Tabstops configuration dialog, enable "Show file extensions directly after file name" and disable "Adjust tabs to window width".
  3. Close the Tabstops configuration dialog.
  4. Change the column widths with the mouse. (If you align the column edges with separators in the button bar, you can later easily tell if some column has the wrong width.)
  5. Open the Tabstops configuration dialog again. Write down the numbers (or make a screenshot).
Screenshot of my test 1: https://imgur.com/a/uuPSZ


Test 2 ("All the Promises in the World")
  1. Delete the old wincmd.ini, and start TC again with a fresh wincmd.ini.
  2. Again, in the Tabstops configuration dialog, enable "Show file extensions directly after file name" and disable "Adjust tabs to window width".
  3. However, this time do NOT close the Tabstops configuration dialog yet.
  4. Now, enter manually the numbers you have written down at the end of test 1.
  5. Now close the Tabstops configuration dialog (OK button).
  6. Expected result is that the columns would appear the same as at the end of test 1. But this is not the case. Note how the Extension column is somewhat larger (about 20px in my case). The Name column shrinks by this amount, thus maintaining its combined width and the position of the other columns.
    So far so good.
Screenshot of my test 2: https://imgur.com/a/siErQ


Test 3 ("A Thursday Evening Murder")
  1. Once more, delete the old wincmd.ini, and start TC again with a fresh wincmd.ini.
  2. Like test 2, in the Tabstops configuration dialog, enable "Show file extensions directly after file name" and disable "Adjust tabs to window width".
  3. Like test 2, enter the numbers you wrote down (in test 1) before closing the Tabstops configuration dialog (OK button).
  4. Now, save the positions (main menu Configuration -> Save Position). This step might or might not be necessary, i haven't verified this.
  5. Restart TC.
  6. Note that the column width for the Extension column does grow much more than compared to test 2. Also, this time the Name column does not compensate for the Extension column greediness, and thus pushing the other columns further to the right.
  7. Open the Tabstops configuration dialog.
  8. Note that the numbers are different from what you have originally entered.
Screenshot of my test 3 (EDIT: screenshot shows result at the end of test 3): https://imgur.com/a/qQjjb


Test 4 ("A Series of Unfortunate Events")

With the TC instance from test 3 still running (close the configuration dialog), do the following in a loop:
  1. Click main menu Configuration -> Save position.
  2. Restart TC.
  3. Note how the width of the Name+Extension columns has grown.
  4. Repeat this test (Click Configuration -> Save position, restart TC, observe further growth of Name+Extension columns)
  5. Rinse and repeat. After each iteration of this test you will notice that the width of both the Name and Extension columns grows more and more and more...

_________________
Windows 7 Pro x64 SP1


Last edited by elgonzo on Thu Feb 15, 2018 3:34 pm; edited 2 times in total
Back to top
View user's profile Send private message
HolgerK
Power Member
Power Member


Joined: 26 Jan 2006
Posts: 4804
Location: Europe, Aachen

PostPosted: Thu Feb 15, 2018 3:17 pm    Post subject: Reply with quote

Let's try to make this more reproducible.

Save this initial ini file into your temp folder:
%Temp%\test.ini wrote:
[Configuration]
ResolutionSpecific=0
Aligned extension=0
UseNewDefFont=1
SetEncoding=дц.do.not.remove
firstmnu=3770
FirstTimeIconLib=0
FirstTime=0
SeparateTree=0
PanelsVertical=0
test=76
ShowCentury=1
SizeStyle=0
SizeFooter=1
[Tabstops]
0=223
1=226
3=280
4=-1
6=629
5=100
AdjustWidth=0
[AllResolutions]
maximized=0
x=410
y=120
dx=1100
dy=800
Divider=500
DividerQuickView=500
DividerComments=500
Tabstops=223,226,280,-1,629,100

For convenience we create two buttons:
button New TC instance wrote:
TOTALCMD#BAR#DATA
%COMMANDER_EXE%
/n /i="%%TEMP%%\test.ini"
%COMMANDER_EXE%
new TC with Test.ini


-1

button Save Position wrote:
TOTALCMD#BAR#DATA
cm_ConfigSavePos

wcmicons.dll


0
493

S2R:
- Use the first button to start a fresh instance using the test.ini
- Paste both buttons into the button bar
- now repeat multiple times
a) the button "Save Position"
b) the button "New TC instance"
-> with every new TC Instance the Name+Extension column becomes broader.

So yes: there is a (rounding?) bug in "Save position" in combination with
Aligned extension=0
AdjustWidth=0

Regards
Holger
_________________
Make our planet great again
Back to top
View user's profile Send private message Send e-mail
elgonzo
Senior Member
Senior Member


Joined: 04 Sep 2013
Posts: 377

PostPosted: Thu Feb 15, 2018 3:18 pm    Post subject: Reply with quote

Oh... i forgot including the part about the INI file. Here it comes... Smile

INI file observations ("A Day In the Life of...")

When executing test 3, after entering the numbers manually in the configuration dialog (as per screenshot for test 1: https://imgur.com/a/uuPSZ) and confirming it with "OK", the INI file contains the following values with regard to the tabstops:

Code:
[Tabstops]
0=209
1=219
3=329
4=-1
6=629
5=100
AdjustWidth=0
[1920x1080 (8x16)]
Tabstops=209,219,329,-1,629,100


Note that those are NOT the values as were entered in the configuration dialog. You will notice that these numbers appear in the configuration dialog after TC has been restarted (Screenshot from test 3: https://imgur.com/a/qQjjb).

This makes me think the error is somewhere in the code path that obtains and writes the column width values to the INI file...
_________________
Windows 7 Pro x64 SP1
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> TC Behaviour which will not be changed All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Imprint/Impressum: This site is maintained by Ghisler Software GmbH
Privacy Policy | Datenschutzerklärung | Politique de Confidentialité

Using phpBB © phpBB Group