Drag'n'Drop on buttons with em_ command depends on Parameters field

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Dalai
Power Member
Power Member
Posts: 9393
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Drag'n'Drop on buttons with em_ command depends on Parameters field

Post by *Dalai »

Hi there.

Not sure if this is actually a bug, but it sure looks like one.
  1. Start TC with a clean wincmd.ini
  2. Create the following new user-defined command in usercmd.ini, either via GUI or directly in the file:

    Code: Select all

    [em_notepad]
    cmd=notepad.exe
  3. Put the new em_ command on a new button, e.g. something like this:

    Code: Select all

    button40=wcmicons.dll
    cmd40=em_notepad
  4. Test the button; it should launch Notepad.
  5. Drag any file onto this button - you'll get the red crossed circle icon that is shown when a drop is not possible. This is not what should happen in my opinion.
  6. Edit the button and add any number of characters into the Parameters field. I used a single space character since that doesn't interfere with the command itself in any meaningful way.
  7. Drag a file onto the button again - now the drop is possible and Notepad will be launched with the dragged/dropped file.
To me it looks like when Parameters were added to em_ commands (in TC 11.0?) the Drag'n'Drop feature was left out by mistake; I don't think that it's intentional.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Drag'n'Drop on buttons with em_ command depends on Parameters field

Post by *ghisler(Author) »

This happens because buttons with parameters are treated differently from buttons without them: Those without can hold multiple commands, e.g. cm_focusleft,em_notepad which isn't possible when there are parameters. In your specific case, TC would have to analyze the command more before deciding whether drag&drop is allowed or not. I will check whether this is feasible.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Drag'n'Drop on buttons with em_ command depends on Parameters field

Post by *ghisler(Author) »

This should work now in Total Commander 11.03 RC1, please check it!
Author of Total Commander
https://www.ghisler.com
User avatar
Dalai
Power Member
Power Member
Posts: 9393
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Drag'n'Drop on buttons with em_ command depends on Parameters field

Post by *Dalai »

Code: Select all

05.12.23 Fixed: Allow drag&drop on buttons with user-defined commands (em_command) without parameters (32/64)
Confirm the fix for 11.03 RC1 32-bit. I haven't tested the 64-bit version yet.

[EDIT]
Fix also confirmed for the 64-bit version.
[/EDIT]
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Drag'n'Drop on buttons with em_ command depends on Parameters field

Post by *ghisler(Author) »

Great, thanks for checking both!

Moderator message

Moved to fixed bugs
Author of Total Commander
https://www.ghisler.com
Post Reply