gpgme_user_id_t uid;
address_entry *ae;
GList *addr_list = NULL;
+ gint i;
/* 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;
+ i = 0;
/* walk all user ids within a key */
while (uid != NULL) {
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;
+
uid = uid->next;
+ i++;
}
}
gpgme_key_release(key);
{"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,
{
gboolean auto_check_signatures;
gboolean autocompletion;
+ gint autocompletion_limit;
gboolean use_gpg_agent;
gboolean store_passphrase;
gint store_passphrase_timeout;