Universal Viewer - Lister alternative

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Applause !

Post by *Clo »

2icfu

:) Hi Jeff !

• Clap, clap, clap ! Great, that works OK here too !

- You win the medal : "The Fox of the year" :D

:mrgreen: VG
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

Hej there.

I just found a little bug when using ATView as alternate Viewer with default hotkey ALT F3. Every second time it is not acitvated but is open in the background, behind TC, and I have to click on the taskbar tab to activate it. This is bad becuase I can't use ESC for quick exit before activation.

---

Can anybody, or you, tell me: Is it possible to replace quick view with this utility ?

If not, can you work on some workaround to achive quick view functionality without flickering when moved with cursor keys through list of (selected) files ? I have some ideas if you are willing to implement.

---
Alex, another small thing.

When I use SGViewer in full screen, in Lister I can use middle mouse click to switch to normal view. In your application this doesn't work.

Actually, I can not exit the full screen view at all !
ALT ENTER don't work also and it is even grayed !
It may be the SGViewer problem thou, because it used some hard coded classes to recognise lister, but you should check before we note the SGViewer author.

EDIT: OK, I descovered how can I switch view. If I press 7 I return to normal view but without the title and menu. When I press any other number, then 7, I get the menu, without the title. After that, I still can't switch to Full Screen.

EDIT2: Interestignly enough, if I set SGViewer not to start in full screen mode, when I click middle mouse it will go to full screen, but on another middle mouse it will not return !
Habemus majkam!
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

2majkinetor !
Every second time it is not acitvated but is open in the background, behind TC, and I have to click on the taskbar tab to activate it.
Thanks for feedback.
Fixed this (added SetForegroundWindow call). Uploaded to totalcmd.net.
Can anybody, or you, tell me: Is it possible to replace quick view with this utility ?
If not, can you work on some workaround to achive quick view functionality without flickering
No, it's not possible.

Before working on workaround, I want to know what it is. I think, you are willing to suggest some TC hack, like reading TC's handles/ window position and adjusting Viewer to them... Am I right?
Alex, another small thing.
Well, Alt+Enter is grayed because of SGViewer itself (yes, you should ask its author in what cases it's grayed, then I'll try to fix). But about middle mouse button: I don't know. Maybe, I didn't set focus to SGViewer, maybe it's also because of SGViewer itself...
EDIT: OK, I descovered how can I switch view.
Ok.

Edit: added ussie.
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

Before working on workaround, I want to know what it is. I think, you are willing to suggest some TC hack, like reading TC's handles/ window position and adjusting Viewer to them... Am I right?
Something like that.
But, the point is not in window position. The point is to recognise up/down keys to be able to send new file name to the viewer witch will display it without flickering. Taking handles to adjust position will just make this thing look more good. I would really like to see that, since app is very fast here, it opens with almost the same speed as integrated Lister, and you can use lister plugin without TC at all (I must admit that in the beginning I didn't see the point in this app, bu now I do, and I think it is excellent idea). So if you could only be able to set it work while I am moving through files, it would be perfect.

Idea:
1. We need to hook windows procedure to recognise up/down. Then we need to discover file name and send it to the app. U must add WM_* message that will receive the name of the file, since this the fastest method. The hook should be installed by the Viewer itself, on startup and removed on closing, so you will need to add dll for this (witch you may not like since you have single exe - of course, this can be added into exe repository, extracted on first run, and kept in TEMP until deleted, if you want to keep single exe). You ask now, how is this connected to Quick View, and I say it isn't. If we want that, the hook must be separated of your app witch is not cool. So, you will also have to add another program mode, that will, once set on, install the hook and trace the keyboard in TC. So to summarize this, I will have to do this to call Quick View:

1. Press regular F3 on file. This will start ATViewer.
2. Press, another hotkey, to switch the mode, lets say F2 (this is approprite, since I can quickly use F3 F2 when I want QV, and F3 when I want just view. ATViewer will reposition itself in the oposite panel and set selection to the src panel.
3. I move, you update.


2. We can do exactly the same in AHK, but you will still need to add WM_* that will receive the string (file name) and update the screen



I didn't discuss trivial things, like hiding the title, menu, etc... those are esasy to handle, and can even be visible for the start.

I think this will add another big value to the app, and many people will apreciate that, and we will finaly solve Ghislers ignorance to update WLS API.
Habemus majkam!
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

2majkinetor !
Well, I don't know..

I didn't ever write hooks, only normal apps/plugins.

Plus, all this described is too TC-specific. Viewer was designed as app independent of TC, and you suggest to make it as TC-addon...

Majkinetor, can you write such hook? So that I'll just receive messages from it.


PS
We don't need "F3-F2" mode, we just need hook that will send messages to Viewer. One of this message can be "hide menu and caption and position to X1,Y1-X2,Y2".
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

, and you suggest to make it as TC-addon...
nope.. it will still be independent in regular usage. If you want to be Quick View capable then you actually want it to be TC addon and you have TC installed. So nobody is harmed. Those that don't have TC will not use quick view mode.
We don't need "F3-F2" mode,
We do. I might open the ATViewer with one file, and move cursor to the other files without the wish to display them. So we need to set the mode explicitely.
Majkinetor, can you write such hook? So that I'll just receive messages from it.
Yes I can. It must be in a separate dll though, as designed by Windows architecture (you can't hook other apps then yourself from the exe, just from dll).

What do you say to first try to do this in AHK, since it will allow us to act more quickly to see how things function, as AHK can set the hook I want with one command. Latter, if everybody is happy with this, I can rewrite this to dll. You need to implement following things for now:

1. Toggle menu
2. Toggle caption
3. Set size/position. X,Y,W,H (should take 1&2 into account)
4. Receive file

I can create formal description of this if you are interested to implement.

If you don't know how to do 1, I can show you how to do this.
Habemus majkam!
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

Last edited by Alextp on 2006-07-08, 07:20 UTC, edited 1 time in total.
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

Wiki page with issues:
http://www.ghisler.ch/wiki/index.php/ATViewer:_issues_with_WLX_plugins

Added issue with xBaseView plugin.
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Wish…

Post by *Clo »

2Alextp

:) Hello Alexeï !

• Just a tiny wish :  We miss the small local-menu (right-click) with the single <Copy to Clipboard> entry in text mode, like we have in the embedded Lister F3 when something is selected…
• Please, could you add it ? TIA !

:mrgreen: KR
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

2Clo
Yes, I'll try.
(but with 2 items: Copy and Select all)
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Ah... !

Post by *Clo »

2Alextp

:) Thanks ! It should be even better :D

:mrgreen: KR
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

2Clo
And, they will be disabled (grayed) when command cannot be run. Don't understand why Ghisler made them hidden instead.
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Hum…

Post by *Clo »

2Alextp

:roll: «Mystery and gum !» (like late myGrand Mum said…) :lol:

• Seriously : if we have only "Copy to Clipboard", it's useless to display the menu while nothing is selected.
- But if you add "Select All", indeed it must be displayed always…

:mrgreen: KR
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

2Clo
Added it.

----

By the way, Clo, did you see AHK script by majkinetor?
It is able to show ATViewer window over TC panel like it's a Quick View mode.
Works nice. Almost works, it's in beta state.
Post Reply