Bug 3486 - allow to limit PGP autocompletion to first address only
Summary: allow to limit PGP autocompletion to first address only
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail
Classification: Unclassified
Component: Plugins/Privacy/PGP (show other bugs)
Version: 3.13.0
Hardware: All All
: P3 enhancement
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2015-08-01 00:21 CEST by Christian Hesse
Modified: 2015-09-08 02:46 CEST (History)
0 users

See Also:


Attachments
allow to limit PGP autocompletion to first address only (5.11 KB, application/x-download)
2015-08-01 00:21 CEST, Christian Hesse
no flags Details
1/3: introduce new macro PACK_CHECK_BUTTON_INDENT() (1.07 KB, patch)
2015-08-27 17:19 CEST, Christian Hesse
no flags Details | Diff
2/3: allow to limit PGP autocompletion to first address only (4.72 KB, patch)
2015-08-27 17:19 CEST, Christian Hesse
no flags Details | Diff
3/3: code cleanup, use macro (1.63 KB, patch)
2015-08-27 17:21 CEST, Christian Hesse
no flags Details | Diff
hidden preference to limit PGP autocompletion (2.70 KB, patch)
2015-09-07 20:26 CEST, Christian Hesse
mones: applied+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Hesse 2015-08-01 00:21:50 CEST
Created attachment 1555 [details]
allow to limit PGP autocompletion to first address only

Some keys have a lot of UIDs, resulting in a huge dropdown list. This
allows to limit PGP autocompletion to use the first UID/address of a key
only.
Comment 1 Christian Hesse 2015-08-27 17:19:09 CEST
Created attachment 1563 [details]
1/3: introduce new macro PACK_CHECK_BUTTON_INDENT()

introduce new macro PACK_CHECK_BUTTON_INDENT()
Comment 2 Christian Hesse 2015-08-27 17:19:52 CEST
Created attachment 1564 [details]
2/3: allow to limit PGP autocompletion to first address only

allow to limit PGP autocompletion to first address only

Some keys have a lot of UIDs, resulting in a huge dropdown list. This
allows to limit PGP autocompletion to use the first UID/address of a key
only.
Comment 3 Christian Hesse 2015-08-27 17:21:21 CEST
Created attachment 1565 [details]
3/3: code cleanup, use macro

code cleanup, use macro

This is where I got my initial code from. It's a bad idea to use empty labels for indention, so let's clean up.
Comment 4 Ricardo Mones 2015-08-28 12:37:04 CEST
(In reply to comment #0)
> Created attachment 1555 [details]
> allow to limit PGP autocompletion to first address only
> 
> Some keys have a lot of UIDs, resulting in a huge dropdown list. This
> allows to limit PGP autocompletion to use the first UID/address of a key
> only.

Why only first? Why not first two or first three?

This is probably also a candidate for a hidden preference, since I believe most users wouldn't like to cut auto-completion candidates, but this is of course debatable.
Comment 5 Christian Hesse 2015-08-28 13:31:10 CEST
(In reply to comment #4)
> (In reply to comment #0)
> > Created attachment 1555 [details]
> > allow to limit PGP autocompletion to first address only
> > 
> > Some keys have a lot of UIDs, resulting in a huge dropdown list. This
> > allows to limit PGP autocompletion to use the first UID/address of a key
> > only.
> 
> Why only first? Why not first two or first three?

Because you need one mail address when mailing someone. The idea is to make everybody reachable but to limit the number of drop down entries.

I am fine with adding another option, though.

> This is probably also a candidate for a hidden preference, since I believe
> most users wouldn't like to cut auto-completion candidates, but this is of
> course debatable.

I would be fine with that as well. Let me know if you prefer that. Any more opinions?

Do you like the new macro or do you want this to go into the code the usual way?
I thought we have some more indented checkboxes... Was surprise to find only one. Possibly some dialogs or plugins have more.
Comment 6 Ricardo Mones 2015-09-07 19:15:17 CEST
(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #0)
> > > Created attachment 1555 [details]
> > > allow to limit PGP autocompletion to first address only
> > > 
> > > Some keys have a lot of UIDs, resulting in a huge dropdown list. This
> > > allows to limit PGP autocompletion to use the first UID/address of a key
> > > only.
> > 
> > Why only first? Why not first two or first three?
> 
> Because you need one mail address when mailing someone. The idea is to make
> everybody reachable but to limit the number of drop down entries.

Yep, but my point is that the first address may not be the address you're looking for, or even the address the recipient wants you to use (I've seen spam trap addresses among the key UIDs, for example).
 
> I am fine with adding another option, though.

Great :)

> > This is probably also a candidate for a hidden preference, since I believe
> > most users wouldn't like to cut auto-completion candidates, but this is of
> > course debatable.
> 
> I would be fine with that as well. Let me know if you prefer that. Any more
> opinions?

Personally I'd prefer that, and also not just a boolean for the first but an integer to specify how many addresses are allowed from a key. Setting it to 1 would give you the feature you want. Setting it to 0 would mean to allow all addresses as you may have guessed (which would be the default value).

Sounds it good to you?

> Do you like the new macro or do you want this to go into the code the usual
> way?
> I thought we have some more indented checkboxes... Was surprise to find only
> one. Possibly some dialogs or plugins have more.

Since I prefer the hidden option I'd say this refactoring is not necessary now.

Thanks!
Comment 7 Christian Hesse 2015-09-07 20:26:47 CEST
Created attachment 1567 [details]
hidden preference to limit PGP autocompletion

Some keys have a lot of UIDs, resulting in a huge dropdown list. This
allows to limit PGP autocompletion to use the first n UID/address of a
key only.
Comment 8 Ricardo Mones 2015-09-08 02:45:25 CEST
Comment on attachment 1567 [details]
hidden preference to limit PGP autocompletion

Applied, thanks!