[Kde-pim] [Differential] [Commented On] D2324: Introduce Kleo::KeySelectionCombo class

aheinecke (Andre Heinecke) noreply at phabricator.kde.org
Wed Aug 3 14:05:53 BST 2016


aheinecke added a comment.


  Thanks!
  
  (I'm not sure how I can delete my old comments which are not obsolete)
  
  API for this looks (apart from the string filter) great and I'll remove my combobox in kleo and replace it with this.
  
  One "Wish" would be (but we could also add this later) that if the rowcount of the model is 1 and no custom item is set that it is not painted as a combobox but as a label. This was a wish I got for the signencrypt files dialog from my testers because a combobox with only one item is irritiating. And we think that the most regular use case is that users have one current and valid key for an identity (btw the code I have in certificatecombobox in kleopatra is not good, works for KDE Style but looks broken on Windows, you probably can do this better :-) ). But as this would not require an API change I don't see it as a requirement now.

INLINE COMMENTS

> keyselectioncombo.cpp:172
> +                         Kleo::Formatting::creationDateString(key),
> +                         Kleo::Formatting::prettyKeyID(key.shortKeyID()));
> +        }

Please remove the shortKeyID here. We should not use it in new code and start to remove it. GnuPG since 2.1.13 has removed short KeyID's from keylistings etc. Where an exact identification of a key is required we should use the full fingerprint or where the API / Protocol requires it the long fingerprint.
With Björn and Werner I've agreed that using the creation date for simple distinction between your keys. Without having to add a "complicated number" ;-)

Some background:
https://lwn.net/Articles/689792/

I'd also slightly prefer if this could be handled in the model or thorugh formatting / the keylistmodel so that we could reuse the representation. I've called this "Formatting::SummaryLine". One idea I have in mind for this is that we skip the Type in case the user only uses one Protocol. (e.g. does not have any OpenPGP or any S/MIME keys) which we expect to be common among non institutional crypto users.

> keyselectioncombo.h:49
> +
> +    void setKeyFilter(const boost::shared_ptr<const KeyFilter> &kf);
> +

What about String Filter? I think we could use the string filter to filter for a key matching the mailbox of the identity.

(Once we fix the KeyListSortFilterProxyModel to handle filtering for multiple uid's, which should be simple enough.)

REPOSITORY
  rLIBKLEO PIM: Kleo Library

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

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

To: dvratil, aheinecke
Cc: kde-pim, spencerb, dvasin, winterz, smartins, vkrause, mlaurent, knauss, dvratil
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list