Temp panel plugin issues

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

ghisler(Author) wrote:I have just tested it: To make internal associations work, just return FS_EXEC_YOURSELF. Currently TC will transfer the file to temp and execute it with internal association. In the next release, TC will try to get the local name. You can try to return it in RemoteName field, but I haven't tested that yet.
That's nice, thanks. BTW, in context menu internal items (e.g. Open(TC)) are present and work w/o any modifications.

Will you increase a bit plugin interface version to detect if this feature is supported? :?:
User avatar
nsp
Power Member
Power Member
Posts: 1804
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

ghisler(Author) wrote:I have just tested it: To make internal associations work, just return FS_EXEC_YOURSELF. Currently TC will transfer the file to temp and execute it with internal association. In the next release, TC will try to get the local name. You can try to return it in RemoteName field, but I haven't tested that yet.
Can you also try to support %L %UL %WL %S ... to also point to local name instead of current implementation ( for buton and user command ) ?

Or expose a windows message than retrieve local name ?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I will try.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Can someone tell why in FS plugins change attributes window behaviour is other than in usual panels?

In usual panel when only one file is selected, attributes flags have only 2 states - checked and unchecked. In TP panel attribute flags have third state - grayed. This is a bit confusing because user need to click twice to remove some attribute.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Hmm, this is normally used only for the case where more than one file is selected, or a directory. The grayed state means "leave it unchanged". I will check why TC uses this form of the dialog box.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Another problem with FS interface. When user tries to delete link to inaccessible folder, TC tries (twice! :)) to read folder contents and stops deletion. So plugin doesn't receive deletion command and can't remove link. I suggested to add possibility to pass direct put/delete whole folder commands to plugin before, it might solve this problem.
MVV wrote:B add function to put/delete folder with subfolders (if plugin can't perform operation, use usual method);
I have one simple idea. You need to add one little function like

Code: Select all

int FsOperationFlags(LPCTSTR Source, LPCTSTR Target, int InfoOperation);
int FsOperationFlagsW(const WCHAR* Source, const WCHAR* Target, int InfoOperation);
(params will allow to determine what TC will do - for delete only source will be used, for put source is real path and target is virtual, for get - vice versa) - you may call it immediately after calling FsStatusInfo(, FS_STATUS_START,) - and plugin will return to TC some flags for current operation. E.g. for put/delete operations such flag may be FS_COPYFLAGS_RECURSE/FS_DELETEFLAGS_RECURSE - if TC receives such flags, it sends to plugin ONLY ONE put/delete operation for each top-level folder to allow plugin to do the rest. This will solve problem of adding links to folders and to remove inaccessible for TC folders. Also maybe some way to change flags during operation (e.g. to call FsOperationFlags before processing every top-level object to allow to copy some folders by plugin itself and some - by TC itself).

What do you think? Is it a good change in FS plugin interface?

Some things that can be realized w/o troubles (I think so):
2 fill time field when user opening attributes dialog for file in FS/TP;
7 beep if FsExecuteFile(, , "properties")==0 instead of displaying version dialog w/o any information in FS/TP;
9 do not show "to: " label in delete dialog;
A correct handling of flag FILE_ATTRIBUTE_REPARSE_POINT for FS/TP objects (e.g. deleting);
C allow to execute FS commands via buttonbar buttons (I mean passing command "quote ..." to FS plugin), if plugin folder is specified as working dir e.g. (this would be useful for creating plugin-specific user-commands, bar buttons etc);
D not to return 1 in ProcessProc every time after user press Cancel, return 1 only when user presses Escape/Cancel button again - this is necessary in order to allow user to continue operation on false cancel;
E when I use Shift+F4 inside vrtual folder, I expect that TC will call RemoteNameToLocal and create new file according to returned path, but not that TC will create file in TOTALCMD.exe's current directory;
G disable drop-down hints when start cmdline param with \ or ..\ in FS plugin - TC suggests wrong items from its current real folder. But don't disable hints when user types full path from real drive like "F:\..." (in any path of command line);
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Another problem with FS interface. When user tries to delete link to inaccessible folder, TC tries (twice! Smile) to read folder contents and stops deletion.
Yes, TC stops deletion for security reasons if it cannot enter a directory.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I solved problem with deleting inaccessible folder - instead of returning error immediately I return just "." item for such folders. :)



Dear Mr. Ghisler,
I have another reason to add root name to FsDefaultParamStruct struct so plugin will know which root name is used for it. The new reason is that since TC doesn't process cd command within FS plugins, I want to realize it, but I need this root name to changing dir using relative path. I know that you may add new data to struct safely, previous versions of plugins just won't use it, but this small addition will help people. :)
MVV wrote:F add to FsDefaultParamStruct struct field RootName to inform plugin which root name is used in TC if not default; by FsDefaultParamStruct::size field plugin may determine if enchanced version of structure is used;
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Another problem - within FS internal associations doesn't work for multiple selected files. E.g. if I have 'add to playlist (TC)' context menu item, I can't select some mp3 files within virtual panel in order to add them to playlist using 'add to playlist (TC)'. Will TC support internal associations for multiple files?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Currently the internal association system supports 2 ways to pass multiple files to the same program:
1. Start the program n times, and pass one file to each
2. Start the program only once, and pass all files to it on the command line

Currently not supported (but planned) is DDE.

From the help:
You need to put %1 or "%1" (or %2) behind the program name so the file is passed as a parameter. The difference between %1 and %2 only appears when right clicking on multiple files. Choosing an internal command with %1 will open all selected files in separate editors, while %2 will pass them all to the same program. This will of course only work when that editor can accept multiple files as parameters.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

ghisler(Author) wrote:Currently the internal association system supports 2 ways to pass multiple files to the same program:
1. Start the program n times, and pass one file to each
2. Start the program only once, and pass all files to it on the command line
Yes but in virtual panel internal context menu items are absent if more than one file is selected. E.g. I have defined two actions (cmd1 with "%1", cmd2 with "%2"), in usual panel I can see and use both for single file and for selection, but in virtual panel I can see and use both only for single file but not for selection. So I can't select many files and pass their names to associated program (e.g. I can't select 2 or more .mp3 files in virtual panel and use cmd1 or cmd2 to add files to playlist).
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Indeed it's currently not supported in virtual panel because TC cannot know in advance whether all files will reveal their target or not.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Why not just to skip bad files and execute command for good ones? It would be very useful there since drag-n-drop doesn't work (of course, d-n-d support would be even greater).
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

ghisler(Author),
So what about internal associations support for virtual panel?
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Another issue: truncated context menus and no overlay icons for temporary panel items.
Post Reply