2009-02-15 [colin] 3.7.0cvs66
[claws.git] / src / plugins / pgpcore / select-keys.c
index f2c341bfe47b2d94cd2e303436e4367e23b26556..6d4cfbccf9cbe73b60f033221743d25daf29bed2 100644 (file)
@@ -1,5 +1,5 @@
 /* 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
@@ -183,7 +183,7 @@ set_row (GtkCMCList *clist, gpgme_key_t key, gpgme_protocol_t proto)
 
     /* 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 || key->revoked || key->expired)
+    if (!key->can_encrypt || key->revoked || key->expired || key->disabled)
         return;
 
     algo_buf = g_strdup_printf ("%du/%s", 
@@ -302,7 +302,7 @@ fill_clist (struct select_keys_s *sk, const char *pattern, gpgme_protocol_t prot
     update_progress (sk, ++running, pattern);
     while ( !(err = gpgme_op_keylist_next ( ctx, &key )) ) {
        gpgme_user_id_t uid = key->uids;
-       if (!key->can_encrypt || key->revoked || key->expired)
+       if (!key->can_encrypt || key->revoked || key->expired || key->disabled)
                continue;
         debug_print ("%% %s:%d:  insert\n", __FILE__ ,__LINE__ );
         set_row (clist, key, proto );