Index: libcryptui/cryptui-key-chooser.c
===================================================================
--- libcryptui/cryptui-key-chooser.c	(revision 1775)
+++ libcryptui/cryptui-key-chooser.c	(working copy)
@@ -147,6 +147,9 @@ construct_recipients (CryptUIKeyChooser 
     GtkWidget *scroll;
     GtkWidget *label;
     GtkWidget *hbox;
+    CryptUIKeyset *keyset;
+    GList *self_key = NULL;
+    const gchar *key = NULL;
 
     /* Top filter box */
     hbox = gtk_hbox_new (FALSE, 12);
@@ -206,6 +209,38 @@ construct_recipients (CryptUIKeyChooser 
     gtk_box_set_child_packing (box, scroll, TRUE, TRUE, 0, GTK_PACK_START);
     selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (chooser->priv->keylist));
     g_signal_connect (selection, "changed", G_CALLBACK (recipients_changed), chooser);
+    
+    /* If encrypt to self, then select that key */        
+    keyset = cryptui_key_list_get_keyset (chooser->priv->keylist);
+    
+    if (_cryptui_gconf_get_boolean (SEAHORSE_ENCRYPTSELF_KEY) == TRUE) {
+        /* Lookup the default key */
+        if (key == NULL) {
+            gchar *gval = get_keyset_value (keyset, SEAHORSE_DEFAULT_KEY);
+            if (gval != NULL)
+                key = _cryptui_keyset_get_internal_keyid (keyset, gval);
+        }
+        
+        /* Use first secret key */
+        if (key == NULL) {
+            GList *l, *keys = cryptui_keyset_get_keys (keyset);
+            for (l = keys; l; l = g_list_next (l)) {
+                guint flags = cryptui_keyset_key_flags (keyset, (const gchar*)l->data);
+                if (flags & CRYPTUI_FLAG_CAN_SIGN && flags & CRYPTUI_FLAG_CAN_ENCRYPT) {
+                    key = l->data;
+                    break;
+                }
+            }
+            g_list_free (keys);
+        }
+
+        if (!key)
+            g_warning ("Encrypt to self is set, but no personal keys can be found");
+        else {
+            self_key = g_list_append (self_key, (gpointer)key);
+            cryptui_key_chooser_set_recipients (chooser, self_key);
+        }
+     }                                  
 }
 
 static void
@@ -418,6 +453,7 @@ cryptui_key_chooser_new (CryptUIKeyset *
 {
     GObject *obj = g_object_new (CRYPTUI_TYPE_KEY_CHOOSER, "keyset", ckset, 
                                                            "mode", mode, NULL);
+             
     return CRYPTUI_KEY_CHOOSER (obj);
 }
 
@@ -433,48 +469,10 @@ cryptui_key_chooser_get_recipients (Cryp
 {
     CryptUIKeyset *keyset;
     GList *recipients;
-    const gchar *key;
     
     g_return_val_if_fail (chooser->priv->keylist != NULL, NULL);
     recipients = cryptui_key_list_get_selected_keys (chooser->priv->keylist);
     
-    if (!chooser->priv->enforce_prefs || 
-        !_cryptui_gconf_get_boolean (SEAHORSE_ENCRYPTSELF_KEY))
-        return recipients;
-
-    /* If encrypt to self, then add that key */
-    keyset = cryptui_key_list_get_keyset (chooser->priv->keylist);
-    key = NULL;
-    
-    /* If we have a signer then use that */
-    if (chooser->priv->keycombo)
-        key = cryptui_key_combo_get_key (chooser->priv->keycombo);
-    
-    /* Lookup the default key */
-    if (key == NULL) {
-        gchar *gval = get_keyset_value (keyset, SEAHORSE_DEFAULT_KEY);
-        if (gval != NULL)
-            key = _cryptui_keyset_get_internal_keyid (keyset, gval);
-    }
-    
-    /* Use first secret key */
-    if (key == NULL) {
-        GList *l, *keys = cryptui_keyset_get_keys (keyset);
-        for (l = keys; l; l = g_list_next (l)) {
-            guint flags = cryptui_keyset_key_flags (keyset, (const gchar*)l->data);
-            if (flags & CRYPTUI_FLAG_CAN_SIGN && flags & CRYPTUI_FLAG_CAN_ENCRYPT) {
-                key = l->data;
-                break;
-            }
-        }
-        g_list_free (keys);
-    }
-
-    if (!key)
-        g_warning ("Encrypt to self is set, but no personal keys can be found");
-    else
-        recipients = g_list_prepend (recipients, (gpointer)key);
-    
     return recipients;
 }
 
