Poor man's tabbed Salamander (freeware)

This is a place for users to discuss Altap Salamander. Please feel free to ask, answer questions, and express your opinion. Please do not post problems, bug reports or feature requests here.
jh092
Posts: 4
Joined: 12 Aug 2006, 01:19

Poor man's tabbed Salamander (freeware)

Post by jh092 »

Hi all,

I'm working on a little utility I have called SalShell (Salamander Shell). It is basically a container, with tabs, that will house multiple instances of Servant Salamander within the one window. This will allow quick change between Salamander sessions, as well as drag and drop between tabs/instances.

I was basically writing it for myself but thought some others might find it useful. It is not finished yet but I wanted to post a screenshot and see what you think and whether it is worth my while tidying it up a bit and finishing it properly.

It might be useful until we get true tabbed browsing implemented within Servant Salamander.

Image

thanks

John
Jan Rysavy
ALTAP Staff
ALTAP Staff
Posts: 5231
Joined: 08 Dec 2005, 06:34
Location: Novy Bor, Czech Republic
Contact:

Post by Jan Rysavy »

This looks unbelievable :) Please, let us know when the public release of your shell will be available.

Btw: try to use PNG instead of JPG for screenshots.
cincura.net
Posts: 593
Joined: 09 Dec 2005, 17:30
Location: a step further
Contact:

Post by cincura.net »

Are you using (similar) constructs (here for ObjectPascal)?

var
Wnd : HWND;
begin
WinExec('notepad', SW_Show);
Wnd := FindWindow('notepad', nil);
if Wnd <> 0 then begin
Windows.SetParent(Wnd, Handle);
MoveWindow(Wnd, 0, 0 ,ClientWidth, ClientHeight, False);
SetForegroundWindow(Wnd);
end;
end;

I was playing with this, but I have problems with memory (a lot of running instances of SS) and also with configuration saving, and some others as you can imagine.

Or are you using some more "smart" way (if the idea isn't secret)?
Jiri {x2} Cincura
JohnFredC
Posts: 162
Joined: 10 Dec 2005, 15:44

Post by JohnFredC »

I definitely would be interested in giving SalShell a try!
Mouse-centric, Registered
Tomcat
Posts: 44
Joined: 28 Apr 2006, 17:21

Post by Tomcat »

Me too.

jh092, please post here when you have a release version.

Would you mind to not only make it Freeware but also Open Source? I am interested how you are doing this (seems that cincura.net is also).
JohnFredC
Posts: 162
Joined: 10 Dec 2005, 15:44

Post by JohnFredC »

Plus... this looks to me like a very good generic tool, not just for Salamander.

Many years ago I found (on the web) an example for sub-classing applications into a user's program window with Visual Basic, but lost the source for it.

Maybe such a tool is already "out there"?
Mouse-centric, Registered
jh092
Posts: 4
Joined: 12 Aug 2006, 01:19

SalShell

Post by jh092 »

Hi cincura.net, Tomcat and others...

How did you know it was Delphi (the horrible default icon)? :D

Happy to make it open source, it's no big secret and it's not actually that difficult. :D

It is written in Delphi 7 (but should work with pretty much any version of Delphi). I am not using WinExec, I am using CreateProcess, that gives a bit more control over the launching of the app.

It uses one freeware Delphi component which simplifies the creation and running of the Salamander process. It uses the Servant Salamander windows class (which is "SalamanderMainWindowVer16"), launches the app, waits for the app to go "idle", then reparents Salamander into a new tab. It doesn't really need to subclass Salamander, but I will. This will allow a bit of extra functionality such as changing the tab captions to match the Salamander window caption. It will also allow me to pick up a keystroke combination within Salamander and use that to switch between tabs. For example, the hotkey to go to the next tab in SalShell is CTRL+N, if Salamander has the focus and it is not subclassed, then I have no way of detecting that keystroke combination.

The resizing of the Salamander windows is done with SalShell. Salamander runs "full screen" within each tab, so when you resize SalShell (by dragging or maximising), you just send a "resize" message to each Salamander instance and they will fill the tab.

One point to note:

1. I think the Salamander option of "Save on Exit" should be turned off. I think it may cause problems if Salamander saves it settings on exit, and you have 4 or 5 of them running at once, and they all close at much the same time when closing SalShell.

And yes, I guess it could be made generic to work with other stuff (notepad, windows explorer etc, but I might leave that to some other bright spark).
User avatar
SvA
Posts: 484
Joined: 29 Mar 2006, 02:41
Location: DE

Post by SvA »

When terminating SalShell you should terminate one Salamander instance after the other waiting for each to terminate before you start to close the next. The one that had the focus should be last.

Or, if possible, even better, turn off saving for all but the one that has focus.

Further thought should be given to saving plugin's configuration (not all might be loaded in all instances of Salamander) and to the case where autosaving configuration was turned on or off in some of the instances manualy (which I do when I want to make some temporary or persistent changes to the configuration while more than one instance of Servant Salamander is running (which is standard on my systems)).
Jan Rysavy
ALTAP Staff
ALTAP Staff
Posts: 5231
Joined: 08 Dec 2005, 06:34
Location: Novy Bor, Czech Republic
Contact:

Post by Jan Rysavy »

I see several problems here. The main window of SS will not be happy from this cage :) It relies on some messages that are delivered only to the top level windows. Also activation messages handling (WM_NCACTIVATE and WM_ACTIVATE) is very tricky in SS.

So, it can "somehow" work, but be prepared to problems you don't know now...

Also I hope this will not complicate our Bug Reports handling. We are walking through bug reports from our users, trying to fix repetitive problems. If some problems will be introduced by this shell, we will hunt non-existing bugs...
jh092
Posts: 4
Joined: 12 Aug 2006, 01:19

Thanks Jan

Post by jh092 »

Ok, understood. So far so good but we'll see what happens...

:shock:
jh092
Posts: 4
Joined: 12 Aug 2006, 01:19

Thanks Jan

Post by jh092 »

Hi Jan, Thanks for that info. I would hate to introduce problems by this that meant you spending your valuable time looking into. As I said, this was just going to be for my own use and I only mentioned it here as I thought it might provide some benefit for others too. If you think there is some risk with this then I am happy to leave things be.

John
rebb
Posts: 7
Joined: 09 Dec 2005, 17:51

Post by rebb »

Very cool :).
Let's hope we don't have to use the "poor man's" Tabs for too long ;D.
Post Reply