Page MenuHome GnuPG

Kleopatra: Drag & Drop certificates to somewhere to export them
Open, WishlistPublic

Description

Something for the backlog of my wishes. I would love if I could drag one or multiple certificates (of the same protocol) somewhere to export them. Especially for a single public key.

E.g. I would like to drag it from Kleopatra into my chat client to add my public key there or from Kleopatra to Outlook to attach the file there. I believe that there should be some Qt Stuff to do this.

Event Timeline

aheinecke triaged this task as Wishlist priority.Dec 16 2023, 3:01 PM
aheinecke created this task.
TobiasFella moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Jan 23 2024, 11:42 AM
TobiasFella changed the task status from Open to Testing.Feb 15 2024, 9:06 AM
ebo changed the task status from Testing to Open.May 17 2024, 11:42 AM
ebo added a subscriber: ebo.

Does not work on windows at all. Seems it doesn't any more on Linux, either (info Tobias)

It works on linux (an presumable also on windows) but is ifdef'ed out since it requires unreleased functions from gpgme

ikloecker changed the task status from Open to Testing.Jun 19 2024, 11:22 AM
ikloecker added a subscriber: ikloecker.

I'm setting this back to Testing. In the meantime GpgME has been updated to a 1.24.0 beta version and includes the needed functionality.

aheinecke changed the task status from Testing to Open.EditedAug 14 2024, 11:51 AM

I tested it doesnt seem to work reliably on windows, it always exports into my home folder regardless of where I drag and drop in explorer or on the desktop window. The drop also seems to require an additional click while it usually works on windows on release and in Outlook it was inserted as a text block and not as a file attachment. Also, but that might be specific to the broken dev installation i have right now it seems to keep handles to the exported files open so I can't delete them or move them right after.

inserted as a text block and not as a file attachment

This is because we're adding both text/plain and text/uri-list as mime type to QMimeData when dragging. Unless we can somehow make outlook prefer the file over the text, we'd need to remove that...

Mh, in the past I would have thought that drag & drop might be worth it for the use case of browsers where you sometimes need to have your key as a text representation. That was originally the Use Case that stood behind the "Text export" in Kleopatra -> Details -> Export. But nowadays I feel that every text box I write into in browsers somehow supports also to drag a file in there for uploading. Or related I sometimes paste image data directly to phabricator and it is attached as a file. And if browsers can handle that, maybe we are even better suited if we would just export it as application/pgp-keys ? But I can't really specify that as I would develop this myself by trying some mime types on windows and see how the relevant software -> Windows Explorer, Outlook, Browser and maybe some other Office software handles that mime type.

Looking at why this isn't working correctly, my understanding is that we need to do very specific things to make this work on windows at all, see https://doc.qt.io/qt-6/qwindowsmimeconverter.html and https://doc.qt.io/qt-5/qwinmime.html (which i did not realize before yesterday). Since this would require spending probably a few days on this (and writing different code for qt5 and qt6, unfortunately), I'm proposing to remove this from the release and postponing the implementation for Qt6 until after the next release

ebo moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Oct 17 2024, 9:28 AM

The possibility to drag certificates from Kleopatra to somewhere else has been disabled for Windows builds. The change has also been backported for vsd33. In the vsd33 AppImage it should still be possible to export certificates by dragging them from Kleopatra to, for example, Dolphin. Maybe we still want to remove the vsd33 tag.

ebo edited projects, added gpd5x; removed vsd33, Restricted Project.Wed, Oct 30, 11:35 AM

ok, I confirm that this is removed in 4win-beta-70 and update the tags