/* select-keys.c - GTK+ based key selection
- * Copyright (C) 2001-2007 Werner Koch (dd9jn) and the Claws Mail team
+ * Copyright (C) 2001-2009 Werner Koch (dd9jn) and the Claws Mail team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/* first check whether the key is capable of encryption which is not
* the case for revoked, expired or sign-only keys */
- if (!key->can_encrypt)
+ if (!key->can_encrypt || key->revoked || key->expired || key->disabled)
return;
+
algo_buf = g_strdup_printf ("%du/%s",
key->subkeys->length,
gpgme_pubkey_algo_name(key->subkeys->pubkey_algo) );
switch (key->uids->validity)
{
case GPGME_VALIDITY_UNDEFINED:
- s = "q";
+ s = _("Undefined");
break;
case GPGME_VALIDITY_NEVER:
- s = "n";
+ s = _("Never");
break;
case GPGME_VALIDITY_MARGINAL:
- s = "m";
+ s = _("Marginal");
break;
case GPGME_VALIDITY_FULL:
- s = "f";
+ s = _("Full");
break;
case GPGME_VALIDITY_ULTIMATE:
- s = "u";
+ s = _("Ultimate");
break;
case GPGME_VALIDITY_UNKNOWN:
default:
- s = "?";
+ s = _("Unknown");
break;
}
text[COL_VALIDITY] = s;
update_progress (sk, ++running, pattern);
while ( !(err = gpgme_op_keylist_next ( ctx, &key )) ) {
gpgme_user_id_t uid = key->uids;
- if (!key->can_encrypt)
+ if (!key->can_encrypt || key->revoked || key->expired || key->disabled)
continue;
debug_print ("%% %s:%d: insert\n", __FILE__ ,__LINE__ );
set_row (clist, key, proto );
continue;
raw_mail = g_strdup(uid->email);
extract_address(raw_mail);
- if (!strcmp(pattern, raw_mail)) {
+ if (!strcasecmp(pattern, raw_mail)) {
exact_match = TRUE;
g_free(raw_mail);
break;
titles[COL_KEYID] = _("Key ID");
titles[COL_NAME] = _("Name");
titles[COL_EMAIL] = _("Address");
- titles[COL_VALIDITY] = _("Val");
+ titles[COL_VALIDITY] = _("Trust");
clist = gtk_cmclist_new_with_titles (N_COL_TITLES, (char**)titles);
gtk_container_add (GTK_CONTAINER (scrolledwin), clist);
hbox = gtk_hbox_new (FALSE, 8);
gtk_box_pack_end (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+ /* TRANSLATORS: check that the accelerators in _Select, _Other and
+ * Do_n't encrypt are different than the one in the stock Cancel
+ * button */
gtkut_stock_button_set_create (&bbox,
- &select_btn, _("Select"),
- &other_btn, _("Other"),
- &dont_encrypt_btn, _("Don't encrypt"));
+ &select_btn, _("_Select"),
+ &other_btn, _("_Other"),
+ &dont_encrypt_btn, _("Do_n't encrypt"));
cancel_btn = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
GTK_WIDGET_SET_FLAGS(cancel_btn, GTK_CAN_DEFAULT);