aboutsummaryrefslogtreecommitdiffstats
path: root/smime/gui/certificate-manager.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-07-14 22:38:47 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-07-14 22:40:20 +0800
commitd3d4fbbe25bccb73bfadef4f5b60a5c9f44aae2b (patch)
tree581f8d12613060a973e11f7b6085be7da501000c /smime/gui/certificate-manager.c
parent31128ea462c72c1e00d7864f39cbdc1bc2294108 (diff)
downloadgsoc2013-evolution-d3d4fbbe25bccb73bfadef4f5b60a5c9f44aae2b.tar.gz
gsoc2013-evolution-d3d4fbbe25bccb73bfadef4f5b60a5c9f44aae2b.tar.zst
gsoc2013-evolution-d3d4fbbe25bccb73bfadef4f5b60a5c9f44aae2b.zip
Bug 624237 - Fails to start when smartcard is inserted
Diffstat (limited to 'smime/gui/certificate-manager.c')
-rw-r--r--smime/gui/certificate-manager.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/smime/gui/certificate-manager.c b/smime/gui/certificate-manager.c
index 9c28945c42..e35bb1d5fd 100644
--- a/smime/gui/certificate-manager.c
+++ b/smime/gui/certificate-manager.c
@@ -1069,9 +1069,11 @@ load_certs (CertificateManagerData *cfm,
CERT_DestroyCertList (certList);
}
-static void
+static gboolean
populate_ui (CertificateManagerData *cfm)
{
+ /* This is an idle callback. */
+
unload_certs (cfm, E_CERT_USER);
load_certs (cfm, E_CERT_USER, add_user_cert);
@@ -1084,6 +1086,8 @@ populate_ui (CertificateManagerData *cfm)
/* expand all three trees */
gtk_tree_view_expand_all (GTK_TREE_VIEW (cfm->yourcerts_treeview));
gtk_tree_view_expand_all (GTK_TREE_VIEW (cfm->contactcerts_treeview));
+
+ return FALSE;
}
void
@@ -1128,7 +1132,11 @@ certificate_manager_config_init (EShell *shell)
initialize_contactcerts_ui(cfm_data);
initialize_authoritycerts_ui(cfm_data);
- populate_ui (cfm_data);
+ /* Run this in an idle callback so Evolution has a chance to
+ * fully initialize itself and start its main loop before we
+ * load certificates, since doing so may trigger a password
+ * dialog, and dialogs require a main loop. */
+ g_idle_add ((GSourceFunc) populate_ui, cfm_data);
widget = e_builder_get_widget (cfm_data->builder, "cert-manager-notebook");
g_object_ref (widget);