Universal Viewer - Lister alternative

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

Very nice work, detection works pretty good! :)
I have sent another test file.

Icfu
This account is for sale
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

2icfu
Fixed algorythm.
Try again please.
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

Maybe it's too early to say that but I'd call it perfect. ;)

Icfu
This account is for sale
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

2icfu
The idea is simple. See it your topic here: http://ghisler.ch/board/viewtopic.php?p=92891#92891
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

The beta version of 1.5 is out:
see "Version wihout installer" in first post.
Test it please. Especially new Text mode.


2Icfu:
If OEM detection will fail, try to increase buffer size for text from 2Kb to 5-10Kb.
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

For other readers:
Buffer is "TextDetectSize" INI-setting.

Tests are positive for OEM detection, but, scrolling is very sluggish now. The scrollbar permanently changes its size, that doesn't look too good.

Don't know if it's related to the automatic detection. I don't hope so.

Icfu
This account is for sale
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

For other readers:
Buffer is "TextDetectSize" INI-setting.
It's available in dialog too - see button "..." on the right of text extensions list.
but, scrolling is very sluggish now. The scrollbar permanently changes its size, that doesn't look too good.
Yes, it's by design. :)

It's because in new Text mode scrollbar size is determined by number of chars in current view. When you scroll, lines become longer or shorter, so view area size changes.
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

I am sorry to say that, but it's a very bad design. It is way too resource consuming, it also looks very irritating to have the size change permanently. I am used to have the size of bar depending on size of complete file, not part of it, very unusual.
It's available in dialog too - see button "..." on the right of text extensions list.
Ah, that wasn't too obvious. ;)

Icfu
This account is for sale
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

2icfu
Why resource comsuming? No, it's not.

And what do you suggest - to make it like in RichEdit (permanent bar size)? But RichEdit loads *whole* file in memory, so it knows total number of lines, and can set bar size to number of *lines* in view.

I can't do this: Viewer loads only part of file into memory, so it only can set bar size to number of *bytes* in view. Otherwise you'll get bar size not corr-g to file contents.
Other suggestion?
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

Why resource comsuming? No, it's not.
Well, I see a huge difference. Like I said, scrolling is sluggish.
But RichEdit loads *whole* file in memory, so it knows total number of lines, and can set bar size to number of *lines* in view.
Why do you need to load the file in memory to see how big is it? Just size it according to filesize, that's what lister also does I think and also the former Universal Viewer had no problems with that.
Otherwise you'll get bar size not corr-g to file contents.
This is exactly what I expect. I don't want the bar size related to "lines" in current view, I don't see any advantages here, only disadvantages.
Other suggestion?
Just do it like in former version. No problems there. ;)

Icfu
This account is for sale
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

2icfu
Yes, it's sluggish a little. I'll try to fix it.
Why do you need to load the file in memory to see how big is it? Just size it according to filesize, that's what lister also does I think and also the former Universal Viewer had no problems with that.
I *am* sizing it according to filesize. And to current view size (to number of bytes in view, not lines).

You suggest to make it like in prev version. So, to size it according to number of *lines* (not bytes) in view. But I don't know total num of lines, so in this case bar will be not actual. It may be actual only in RichEdit view.


PS You can "revert" to prev version by pressing 8.
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

That was a misunderstanding then. I haven't noticed that you have dropped RichEdit in text mode already...
And to current view size (to number of bytes in view, not lines).
So, maybe this is what makes your viewer sluggish because you have to permanently calculate how much bytes are in view.
But I don't know total num of lines, so in this case bar will be not actual.
I suggest the following:
Do it like TC lister does, at least optionally! Do not calculate anything, just display a fixed size scrollbar, independent from size but make it bigger than the one in lister, because I hate those tiny bars! ;)
Really, the most important point (for me!) in a viewer is speed. If it's not as speedy as TC lister because of some cosmetical stuff like scrollbar size, I won't use it regularly.
PS You can "revert" to prev version by pressing 8.
Ok, nice workaround, but not helpful for everyday use (AHK script for autopressing 8 maybe...). In this case I would always prefer to load TC lister instead.

Edit, haven't seen that:
Yes, it's sluggish a little. I'll try to fix it.
I will stay tuned. :)

Icfu
This account is for sale
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

I haven't noticed that you have dropped RichEdit in text mode already...
Ah, Ok..
So, maybe this is what makes your viewer sluggish because you have to permanently calculate how much bytes are in view.
No, calculating is simple subtraction:
PageSize:= LastPos-FViewPos;
//LastPos is already calculated!

I think it's because in Text mode viewer jumps over NN-chars steps. I'll decrease NN.
I suggest the following:
Do it like TC lister does, at least optionally!
Another misuner-ing.. TC Lister doen nothing.
It doesn't set bar size at all.
Do not calculate anything, just display a fixed size scrollbar, independent from size
Ok, I can make an option. "Do not calculate scrollbar size". :)
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

Ok, nice workaround, but not helpful for everyday use (AHK script for autopressing 8 maybe...).
Do you need option "List of extensions for RTF mode" (in the first groupbox)? It will contain one ext "rtf" by default.
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Updated---

Post by *Clo »

2Alextp

:) Hello Alexeï !

• Please, check your mail…

• The updated French LNG is available HERE.

:D Nice job anyway, thanks “You take the good tip” !

:mrgreen: KR
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
Post Reply