About a little enhancement of API for nonstrictly FS-plugins

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
Hank
Junior Member
Junior Member
Posts: 8
Joined: 2010-04-16, 08:11 UTC

About a little enhancement of API for nonstrictly FS-plugins

Post by *Hank »

1. MVV wrote concerning disconnecting of speaker when it is not required in function RequestProc.
See "Speaker beeps when request dialog popups" - http://www.ghisler.ch/board/viewtopic.php?t=26426 .

I just used function RequestProc with values RT_MsgOK and RT_MsgYesNo (in parameter RequestType) in the named plugin.
(I somehow wrote to the forum concerning working out of a netscan plugin: http://ghisler.ch/board/viewtopic.php?t=25999&highlight= .)
And I have been a little surprised after have switched on speakers. The above-named function RequestProc generates a sound always ! But in my concrete case the sound is not required.

Mr. Ghisler,
do you plan the possibility to disconnect a sound when it is not required in RequestProc ?

2. There is one more wish to enhancing of API.
It concerns uses of FS-plugin for nonstandard FS-plugin.

I use the function ProgressProc for display of a progress bar:

Code: Select all

 int __ stdcall ProgressProc (int PluginNr, char* SourceName, char* TargetName, int PercentDone);
The design of a window turns out in uniform style TC. It also is necessary for me !
Specific contents "From" - "To" are not required in my case: no files are copied in a plugin. There is a network scanning during this moment. Therefore it is necessary to write something like:

Code: Select all

 ProgressProc (PluginNumber, "", "", percent); 
- a progress bar was displayed without the accompanying comment at the top of a window.

Are there ways to "enter" the necessary text line by means of API, or is it necessary to program own function of progress bar ?


Mr. Ghisler,
yours API is intended for automation of programming of FS-plugins strictly for file systems. But if there is a requirement to manipulate with lists, the declared possibilities of yours API do not suffice. And it is necessary to bring only a minimum of small changes in yours API to adapt it for work not only with file lists, but also with any others lists. The unity of user interface will be thus guaranteed, and the writing of similar plugins will be facilitated by independent developers.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I think "From:" and/or "To:" should be displayed only if user specifies non-empty string for corresponding ProgressProc parameter.

Currently TC even when deletes files within FS, shows two labels, but label "To:" is wrong when deleting since there is no target.

Even more, I think if first passed to ProgressProc string is empty, TC should hide both labels - it will make possible to display generic progress window with plugin-specific text in second line since "From:" and "To:" labels are hidden.

So, if SourceName==0, TC should hide both labels (w/o filenames labels are unnecessary). Else TC should display "From:" label and hide label "To:" if TargetName==0 else show it (w/o target "To:" label is wrong - e.g. while deleting files). This smallest change will not break nothing in currently existing interface but will fix some bugs and will allow to display custom progress message.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50843
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I will consider it, but it's too late for 7.55 final now, sorry. You can simply give the deleted name as "From" value, and "trash" as the "To" value.
Author of Total Commander
https://www.ghisler.com
Post Reply