[evolution] Bug 624237 - Fails to start when smartcard is inserted
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug 624237 - Fails to start when smartcard is inserted
- Date: Wed, 14 Jul 2010 14:40:24 +0000 (UTC)
commit d3d4fbbe25bccb73bfadef4f5b60a5c9f44aae2b
Author: Matthew Barnes <mbarnes redhat com>
Date: Wed Jul 14 10:38:47 2010 -0400
Bug 624237 - Fails to start when smartcard is inserted
smime/gui/certificate-manager.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/smime/gui/certificate-manager.c b/smime/gui/certificate-manager.c
index 9c28945..e35bb1d 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]