diff options
Diffstat (limited to 'smime/gui/certificate-manager.c')
-rw-r--r-- | 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 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); |