Ticket #238 (accepted enhancement)

Opened 6 years ago

Last modified 6 years ago

make swish more usable with 3rd party file managers

Reported by: umeca74@hotmail.com Owned by: alamaison
Priority: minor (e.g. uncommon, cosmetic, has workaround) Milestone:
Component: host folder Version: 0.7.4
Keywords: Cc:

Description

Hello
this is not a bug per se, but have you considered making your extension usable in other file managers? I am the developer of xplorer2, which can work with most NSEs.

The main problem is that you don't have a background menu in your SWISH root folder offering the commands to add a location. You rely on the defview to add menu commands to the explorer window and task panes. None of these routes works in 3rd party file managers (not in xplorer2 anyway)

it would be simple for you to add a couple of commands in your view background menu (?) and offer these commands. At present your background menu for the root folder is empty.

also, xplorer2 can show quick previews of your NSE items (once a connection is established). I am not sure why there is an error message each time a file is downloaded though. If you would like to look into the problem I can send you a complimentary key for xplorer2

thanks!
Nikos

Change History

comment:1 Changed 6 years ago by alamaison

  • Status changed from new to accepted

Hi Nikos,

I'm well aware of your work on xplorer2 because your blog, and the questions you'd asked on MS shell forums, were invaluable in getting Swish off the ground in the early days. For that, a belated thanks!

So I'm keen that Swish should actually work with xplorer2.

The background menu you request may fall out as a side effect of some menu-related stuff I'm working on at the moment. Once it does, we can sort out any remaining issues. As always, I can't give any sort of ETA as free time is scarce.

Alex

comment:2 follow-up: ↓ 3 Changed 6 years ago by anonymous

cheers, I miss the time where the shell newsgroup was alive and a useful source of information. Anyway, the times have moved on

I am currently investigating exposing IShellBrowser and see if the default shell view will notify xplorer2 of the menu changes. Chances are slim but I will have a look.

Anyway it would be good if you could add the commands to the background menu whenever you get the chance. If we manage to work through the warts I will add SWISH to the list of recommended downloads for xplorer2, and that should send quite some traffic your end :)

nikos

PS I used to be at imperial too up till 2005

comment:3 in reply to: ↑ 2 ; follow-up: ↓ 4 Changed 6 years ago by alamaison

Replying to anonymous:

I am currently investigating exposing IShellBrowser and see if the default shell view will notify xplorer2 of the menu changes. Chances are slim but I will have a look.

How do you expose the Browser to the View? I'm not so familiar with the Browser-View side of the triangle.

Presumably, the Browser must be able to get this info from the folder somehow, otherwise the menu items that Swish plugs in via IShellFolderViewCB would never appear in the Windows Explorer menu. I'm assuming here that the menu is owned by the Browser not the View; I could be wrong, of course. You'd know.

comment:4 in reply to: ↑ 3 Changed 6 years ago by alamaison

Replying to alamaison:

Replying to anonymous:

I am currently investigating exposing IShellBrowser and see if the default shell view will notify xplorer2 of the menu changes. Chances are slim but I will have a look.

How do you expose the Browser to the View? I'm not so familiar with the Browser-View side of the triangle.

Presumably, the Browser must be able to get this info from the folder somehow, otherwise the menu items that Swish plugs in via IShellFolderViewCB would never appear in the Windows Explorer menu. I'm assuming here that the menu is owned by the Browser not the View; I could be wrong, of course. You'd know.

Actually, am I right in thinking you don't use the default implementation of IShellView but rolled your own instead? In that case, it should be easy to get commands added via IShellFolderViewCB.

comment:5 follow-up: ↓ 6 Changed 6 years ago by umeca74@hotmail.com

right now I am not using IShellBrowser or IShellView except for a few odd places. There is a codeproject article I will experiment with and that will tell if there's any point implementing IShellBrowser in xplorer2

 http://www.codeproject.com/Articles/1163/Implementing-IShellBrowser-to-host-IShellView

at imperial I did a PhD in process systems engineering (my coding style looks nothing like yours :) and then stayed on a few years as we were trying to make a spin-out work (www.parostech.com), but that was a failure and xplorer2 was good enough for a day job!

comment:6 in reply to: ↑ 5 Changed 6 years ago by alamaison

Replying to umeca74@…:

right now I am not using IShellBrowser or IShellView except for a few odd places. There is a codeproject article I will experiment with and that will tell if there's any point implementing IShellBrowser in xplorer2

 http://www.codeproject.com/Articles/1163/Implementing-IShellBrowser-to-host-IShellView

I've had a think about this and I'm not sure you can get the menu/command information that way. You don't use the IShellView that the folder would create so, AFAIK, there is nothing for xplorer2 to expose itself to.

comment:7 Changed 6 years ago by alamaison

Also, I've tried xplorer2 with Swish, (creating the hosts with normal Explorer), and it works. One strange issue is that public-key authentication doesn't work, but I'll debug that some other time.

comment:8 Changed 6 years ago by umeca74@hotmail.com

wrt xplorer2, try turning on the quickviewer Ctrl+Q command. Then you will see some errors I mentioned originally (the preview shows regardless)

I can't think of a way xplorer2 can tap in your IShellFolderViewCB. I was trying the IShellBrowser approach in that codeproject article, and although the view is adding commands in the various "explorer" menus, your items are NOT added. I have modified the codeproject code as below:

 http://zabkat.com/test/finker.7z (requires WTL)

can you please download and compile it, then debug your extension using *IT* as the executable, and see what of your IShellFolderViewCB are called wrt menus? Most of the action is within mainfrm.h (IShellBrowser) and CMainFrame::OnTreeItemSelected? where your view is created

perhaps it needs to expose IServiceProvider

thanks

comment:9 Changed 6 years ago by nikos

I added IServiceProvider too, no change :(

 http://zabkat.com/test/finker.7z (requires WTL)

I've hit a solid wall, see if you can do anything your side!

comment:10 Changed 6 years ago by alamaison

In my current development branch (not pushed yet) it *does* add the items to the menu, but can't invoke them. The menu management got a complete ground-up rewrite between the public release you are using and this version, which probably explains the difference in behaviour.

Will do some dubugging tonight.

comment:11 follow-up: ↓ 13 Changed 6 years ago by anonymous

did you try the latest version of the browser? I added the option to execute commands too. I have tested on windows XP only to be frank

 http://zabkat.com/test/finker.7z

comment:12 Changed 6 years ago by anonymous

PS better build this "finker" in debug mode and see if it throws any assertions for you?

comment:13 in reply to: ↑ 11 Changed 6 years ago by alamaison

Replying to anonymous:

did you try the latest version of the browser? I added the option to execute commands too. I have tested on windows XP only to be frank

 http://zabkat.com/test/finker.7z

The new latest finker does indeed invoke the commands correctly. All behaviours seem ok and no assertions are encountered. Now for xplorer2 ...

comment:14 Changed 6 years ago by alamaison

Well this is frustrating. Today everything seems to be working. xplorer2 preview suddenly works without the errors from before and public-key-authentication has also started working.

Perhaps it's best if we wait till I make another Swish release and you can test how the behaviour changes at your end.

comment:15 follow-up: ↓ 16 Changed 6 years ago by nikos

I am looking into IExplorerCommand, that should be easier to access your commands I think. Are you using at all the IShellItemArray or the IBindCtx of the Invoke() command? That shouldn't be required for commands like "add new connection"

I look into your code but I can't understand what's happenning, way too weird with all the boost template stuff :)

anyway in a few weeks I'll have a test xplorer2 ready and we can do more tests using your latest code

comment:16 in reply to: ↑ 15 Changed 6 years ago by alamaison

Replying to nikos:

I am looking into IExplorerCommand, that should be easier to access your commands I think. Are you using at all the IShellItemArray or the IBindCtx of the Invoke() command? That shouldn't be required for commands like "add new connection"

It depends on the command in question. As you say, the  Add command. The  remove command, on the other hand, needs to know which connection to remove, so it uses the IDataObject.

I look into your code but I can't understand what's happenning, way too weird with all the boost template stuff :)

The commands are objects implementing the  Command interface. These command objects are used for the IExplorerCommand as well as for the menu items and Windows XP task pane entries.

 CExplorerCommand turns these higher-level command objects into IExplorerCommands. The template argument T is the command object implementation, so, for instance, CExplorerCommand<Add> would be the "add host" command as an IExplorerCommand. The implementation is a bit grungy because C++03 compilers don't support variadic constructors so the Boost macro stuff is needed to allow you contruct the adapted CExplorerCommand<T> the same way as the T.

comment:17 Changed 6 years ago by alamaison

Oh and the  host_folder_command_provider functions puts the adapted commands together into an IExplorerCommandProvider.

comment:18 Changed 6 years ago by nikos

Hi Alan

I have added IExplorerCommand capabilities to this xplorer2 alpha version

 http://zabkat.com/test/kenny.7z

debug version 32 bit ultimate only, just unpack somewhere and run it

if you browse your top NSE folder and right click "nowhere" you should see a NSE submenu which should host all your commands that don't require file arguments (like create new connection)

see if it works, and then see if inside some SFTP folder there are problems previewing e.g. plain text files in the CTRL+Q previewer

thanks
nikos

Note: See TracTickets for help on using tickets.