Open a custom modal dialog in a java based packer plugin

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
tmalatinszki
New Member
New Member
Posts: 1
Joined: 2013-09-15, 10:58 UTC

Open a custom modal dialog in a java based packer plugin

Post by *tmalatinszki »

Hi,

I have a packer plugin written in Java, which is dealing with special files that requires a passphrase during pack/unpack operations. For packing the files I have implemented the packFiles() method, and I would like to open a modal window with one simple inputbox in the very beginning of it, where the user can set the passphrase (I would like to do the same in case of openArchive() method).

How is there any idea how would it be possible (via SWT/Swing or any "native" way)?

Regards,
Tamás
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Have you tried to return PK_CAPS_ENCRYPT flag in GetPackerCaps function and to define PkSetCryptCallback function that TC will call in order to pass PkCryptProc callback function? Maybe PkCryptProc allows asking for a password?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

PkCryptProc is meant to store a password in TC secure password store. You can just show your own dialog, like for example the 7zip plugin does.
Author of Total Commander
https://www.ghisler.com
Post Reply