From b6436c2a972e485bbd72c41b311a7cd35a1a17f2 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Thu, 20 Jan 2005 05:54:53 +0000 Subject: don't remove the tree node if deleting the cert failed. (delete_your): 2004-11-23 Not Zed * gui/certificate-manager.c (delete_ca): don't remove the tree node if deleting the cert failed. (delete_your): same. (delete_contact): same. Hoorah for code-reuse. svn path=/trunk/; revision=28456 --- smime/gui/certificate-manager.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'smime/gui') diff --git a/smime/gui/certificate-manager.c b/smime/gui/certificate-manager.c index 16bb261bfc..2e1f92a030 100644 --- a/smime/gui/certificate-manager.c +++ b/smime/gui/certificate-manager.c @@ -177,10 +177,10 @@ delete_your (GtkWidget *widget, CertificateManagerData *cfm) 4, &cert, -1); - if (cert) { + if (cert + && e_cert_db_delete_cert (e_cert_db_peek (), cert)) { GtkTreeIter child_iter; printf ("DELETE\n"); - e_cert_db_delete_cert (e_cert_db_peek (), cert); gtk_tree_model_sort_convert_iter_to_child_iter (GTK_TREE_MODEL_SORT (cfm->yourcerts_streemodel), &child_iter, &iter); @@ -421,10 +421,10 @@ delete_contact (GtkWidget *widget, CertificateManagerData *cfm) 3, &cert, -1); - if (cert) { + if (cert + && e_cert_db_delete_cert (e_cert_db_peek (), cert)) { GtkTreeIter child_iter; printf ("DELETE\n"); - e_cert_db_delete_cert (e_cert_db_peek (), cert); gtk_tree_model_sort_convert_iter_to_child_iter (GTK_TREE_MODEL_SORT (cfm->contactcerts_streemodel), &child_iter, &iter); @@ -640,10 +640,10 @@ delete_ca (GtkWidget *widget, CertificateManagerData *cfm) 1, &cert, -1); - if (cert) { + if (cert + && e_cert_db_delete_cert (e_cert_db_peek (), cert)) { GtkTreeIter child_iter; printf ("DELETE\n"); - e_cert_db_delete_cert (e_cert_db_peek (), cert); gtk_tree_model_sort_convert_iter_to_child_iter (GTK_TREE_MODEL_SORT (cfm->authoritycerts_streemodel), &child_iter, &iter); -- cgit