[evolution-patches] Addressbook: Crash when closing contact list editor and choosing to save



Hi guys,

Here's bug information.
http://bugzilla.gnome.org/show_bug.cgi?id=327203

Checking the validity of contact editor should be done after
extracting all fields. Otherwise, "File Under" field is always empty.
Actually this's done in save_contact().

To avoid repeating free memory, delete eab_editor_close(). In fact,
eab_editor_save_contact() has done it before.


Thanks,
-Simon
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/ChangeLog,v
retrieving revision 1.2034
diff -u -p -r1.2034 ChangeLog
--- ChangeLog	16 Jan 2006 07:15:51 -0000	1.2034
+++ ChangeLog	16 Jan 2006 12:55:49 -0000
@@ -1,3 +1,15 @@
+2006-01-16  Simon Zheng  <simon zheng sun com>
+
+	** Fixes #327203
+
+	* gui/contact-editor/e-contact-editor.c (app_delete_event_cb): 
+	Checking the validity of contact editor should be done after 
+	extracting all fields. This's done in save_contact().
+	* gui/contact-editor/eab-editor.c
+	(eab_editor_prompt_to_save_changes): To avoid repeating free memory,
+	 delete eab_editor_close(). In fact, eab_editor_save_contact() has 
+	done it before.
+
 2005-01-16  Devashish Sharma  <sdevashish novell com>
 	
 	* importers/evolution-csv-importer.c : Added support for CSV and TAB
Index: gui/contact-editor/e-contact-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/contact-editor/e-contact-editor.c,v
retrieving revision 1.246
diff -u -p -r1.246 e-contact-editor.c
--- gui/contact-editor/e-contact-editor.c	16 Jan 2006 06:44:37 -0000	1.246
+++ gui/contact-editor/e-contact-editor.c	16 Jan 2006 12:55:49 -0000
@@ -3096,9 +3096,6 @@ app_delete_event_cb (GtkWidget *widget, 
 	if (ce->changed) {
 		switch (eab_prompt_save_dialog (GTK_WINDOW (ce->app))) {
 			case GTK_RESPONSE_YES:
-				if (!eab_editor_is_valid (EAB_EDITOR (ce)))
-					return TRUE;
-
 				eab_editor_save_contact (EAB_EDITOR (ce), TRUE);
 				return TRUE;
 
Index: gui/contact-editor/eab-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/contact-editor/eab-editor.c,v
retrieving revision 1.8
diff -u -p -r1.8 eab-editor.c
--- gui/contact-editor/eab-editor.c	29 Jul 2005 06:35:22 -0000	1.8
+++ gui/contact-editor/eab-editor.c	16 Jan 2006 12:55:49 -0000
@@ -269,7 +269,6 @@ eab_editor_prompt_to_save_changes (EABEd
 			return FALSE;
 		}
 		eab_editor_save_contact (editor, TRUE);
-		eab_editor_close (EAB_EDITOR (editor));
 		return TRUE;
 	case GTK_RESPONSE_NO:
 		eab_editor_close (EAB_EDITOR (editor));


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