summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
71b8625)
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.
gpgme_user_id_t uid;
address_entry *ae;
GList *addr_list = NULL;
gpgme_user_id_t uid;
address_entry *ae;
GList *addr_list = NULL;
/* just return if autocompletion is disabled */
if (!prefs_gpg_get_config()->autocompletion)
/* just return if autocompletion is disabled */
if (!prefs_gpg_get_config()->autocompletion)
/* skip keys that are revoked, expired, ... */
if ((key->revoked || key->expired || key->disabled || key->invalid) == FALSE) {
uid = key->uids;
/* skip keys that are revoked, expired, ... */
if ((key->revoked || key->expired || key->disabled || key->invalid) == FALSE) {
uid = key->uids;
/* walk all user ids within a key */
while (uid != NULL) {
/* walk all user ids within a key */
while (uid != NULL) {
debug_print("%s <%s>\n", uid->name, uid->email);
}
debug_print("%s <%s>\n", uid->name, uid->email);
}
+
+ if (prefs_gpg_get_config()->autocompletion_limit > 0 &&
+ prefs_gpg_get_config()->autocompletion_limit == i)
+ break;
+
}
}
gpgme_key_release(key);
}
}
gpgme_key_release(key);
{"autocompletion", "FALSE",
&prefs_gpg.autocompletion, P_BOOL,
NULL, NULL, NULL},
{"autocompletion", "FALSE",
&prefs_gpg.autocompletion, P_BOOL,
NULL, NULL, NULL},
+ {"autocompletion_limit", "0",
+ &prefs_gpg.autocompletion_limit, P_INT,
+ NULL, NULL, NULL},
{"use_gpg_agent", "TRUE", &prefs_gpg.use_gpg_agent, P_BOOL,
NULL, NULL, NULL},
{"store_passphrase", "FALSE", &prefs_gpg.store_passphrase, P_BOOL,
{"use_gpg_agent", "TRUE", &prefs_gpg.use_gpg_agent, P_BOOL,
NULL, NULL, NULL},
{"store_passphrase", "FALSE", &prefs_gpg.store_passphrase, P_BOOL,
{
gboolean auto_check_signatures;
gboolean autocompletion;
{
gboolean auto_check_signatures;
gboolean autocompletion;
+ gint autocompletion_limit;
gboolean use_gpg_agent;
gboolean store_passphrase;
gint store_passphrase_timeout;
gboolean use_gpg_agent;
gboolean store_passphrase;
gint store_passphrase_timeout;