[Differential] [Request, 1,899 lines] D3140: Add formatters for application/pgp-keys and application/vnd.gnupg.wks body parts

dvratil (Daniel Vrátil) noreply at phabricator.kde.org
Sun Oct 23 13:27:46 BST 2016


dvratil created this revision.
dvratil added reviewers: aheinecke, bjoernbalazs.
dvratil added a subscriber: KDE PIM.
dvratil set the repository for this revision to rKDEPIMADDONS KDE PIM Addons.
dvratil added a project: KDE PIM.
Restricted Application added a subscriber: kde-pim.

REVISION SUMMARY
  This adds a new body part formatter plugin for application/pgp-keys mime type and application/vnd.gnupg.wks mimetype.
  
  The application/pgp-keys formatter simply prints a message saying that this is an OpenPGP key and explains what that is, as seen below:
  F377010: pgp-1.png <https://phabricator.kde.org/F377010>
  
  User can click the "Show key details" link to get details about the key (uid, creation date, fingerprint), and if the key is available in local keyring there will also be "Open in Kleopatra" link.
  F377011: pgp-2.png <https://phabricator.kde.org/F377011>
  
  The application/vnd.gnupg.wks mimetype formatter is more complicated. It handles WKS publication confirmation requests. The formatter prints a message saying that this is a Key publication confirmation request and explains what it is. It shows a button in the middle saying "Checking key state..." and checks the WKD for the key. If the key is found, it says that the key has been published and allows no further interaction.
  F377012: wks-3.png <https://phabricator.kde.org/F377012>
  
  If it does not find the key in the WKD, it show "Publish key" button.
  F377013: wks-1.png <https://phabricator.kde.org/F377013>
  
  When clicked, it will create the confirmation response and send it to the WKD server and update the view again. It uses SmtpJob, so there's no email left behind in "Sent" folder.
  F377014: wks-2.png <https://phabricator.kde.org/F377014>
  
  After the response is successfully sent we go an extra mile and we store the state in an Akonadi::Attribute in the respective Akonadi::Item for the message. We then check for the presence of this attribute in case the user would open the email again before the server manages to process the confirmation response and publish the key, which would result in KMail again showing the "Publish key" button (despite response already being sent). Instead when the attribute is present we show the "Key already published" message.
  
  I would appreciate your feedback mostly regarding the user-facing strings, which can all be found in the .html files.

TEST PLAN
  Tested with locally generated messages. Have not tested actually sending out the response.

REPOSITORY
  rKDEPIMADDONS KDE PIM Addons

REVISION DETAIL
  https://phabricator.kde.org/D3140

AFFECTED FILES
  plugins/messageviewer/bodypartformatter/CMakeLists.txt
  plugins/messageviewer/bodypartformatter/gnupgwks/CMakeLists.txt
  plugins/messageviewer/bodypartformatter/gnupgwks/application_gnupgwks.desktop
  plugins/messageviewer/bodypartformatter/gnupgwks/gnupgwksakonadi.cpp
  plugins/messageviewer/bodypartformatter/gnupgwks/gnupgwksakonadi.h
  plugins/messageviewer/bodypartformatter/gnupgwks/gnupgwksformatter.cpp
  plugins/messageviewer/bodypartformatter/gnupgwks/gnupgwksformatter.h
  plugins/messageviewer/bodypartformatter/gnupgwks/gnupgwksmemento.cpp
  plugins/messageviewer/bodypartformatter/gnupgwks/gnupgwksmemento.h
  plugins/messageviewer/bodypartformatter/gnupgwks/gnupgwksmessagepart.cpp
  plugins/messageviewer/bodypartformatter/gnupgwks/gnupgwksmessagepart.h
  plugins/messageviewer/bodypartformatter/gnupgwks/gnupgwksurlhandler.cpp
  plugins/messageviewer/bodypartformatter/gnupgwks/gnupgwksurlhandler.h
  plugins/messageviewer/bodypartformatter/gnupgwks/pgpkeyformatter.cpp
  plugins/messageviewer/bodypartformatter/gnupgwks/pgpkeyformatter.h
  plugins/messageviewer/bodypartformatter/gnupgwks/pgpkeymemento.cpp
  plugins/messageviewer/bodypartformatter/gnupgwks/pgpkeymemento.h
  plugins/messageviewer/bodypartformatter/gnupgwks/pgpkeymessagepart.cpp
  plugins/messageviewer/bodypartformatter/gnupgwks/pgpkeymessagepart.h
  plugins/messageviewer/bodypartformatter/gnupgwks/plugin.cpp
  plugins/messageviewer/bodypartformatter/gnupgwks/plugin.h
  plugins/messageviewer/bodypartformatter/gnupgwks/templates.qrc
  plugins/messageviewer/bodypartformatter/gnupgwks/templates/gnupgwksmessagepart.html
  plugins/messageviewer/bodypartformatter/gnupgwks/templates/pgpkeymessagepart.html

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: dvratil, aheinecke, bjoernbalazs
Cc: kde-pim, #kde_pim, spencerb, dvasin, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20161023/e4c831ba/attachment.html>


More information about the kde-pim mailing list