[evolution-patches] deleting certificate bug




not sure what this was from, but its a patch i've had in my tree for ages and forgot to mail out.  it may, or may not relate to a bug in bugzilla, or something i hit whilst testing.

--
Michael Zucchi <notzed ximian com>
"Ride, Work, Sleep. Beer."
Novell's Evolution and Free Software Developer
? smime/gui/a
Index: smime/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/smime/ChangeLog,v
retrieving revision 1.41.2.2
diff -u -p -r1.41.2.2 ChangeLog
--- smime/ChangeLog	12 Oct 2004 02:25:35 -0000	1.41.2.2
+++ smime/ChangeLog	19 Jan 2005 03:26:15 -0000
@@ -1,3 +1,10 @@
+2004-11-23  Not Zed  <NotZed Ximian com>
+
+	* 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.
+
 2004-10-11  Not Zed  <NotZed Ximian com>
 
 	* gui/e-cert-selector.c (e_cert_selector_new): dont try to
Index: smime/gui/certificate-manager.c
===================================================================
RCS file: /cvs/gnome/evolution/smime/gui/certificate-manager.c,v
retrieving revision 1.14
diff -u -p -r1.14 certificate-manager.c
--- smime/gui/certificate-manager.c	12 Aug 2004 20:37:27 -0000	1.14
+++ smime/gui/certificate-manager.c	19 Jan 2005 03:26:15 -0000
@@ -177,10 +177,10 @@ delete_your (GtkWidget *widget, Certific
 				    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, Certi
 				    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, Certificat
 				    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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]