Re: [evolution-patches] patch for #70371 (address book)



with patch attached this time.

Siva
On Sat, 2005-02-19 at 01:07 +0530, Sivaiah Nallagatla wrote:
>command_state_changed called from list_added_cb tries to access the
>editor gui , but that is already destroyed by app_delete_event_cb.
>
>Siva
>
>
>
>_______________________________________________
>evolution-patches mailing list
>evolution-patches lists ximian com
>http://lists.ximian.com/mailman/listinfo/evolution-patches
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/ChangeLog,v
retrieving revision 1.1920
diff -u -p -r1.1920 ChangeLog
--- ChangeLog	14 Feb 2005 18:58:21 -0000	1.1920
+++ ChangeLog	18 Feb 2005 19:28:47 -0000
@@ -1,3 +1,18 @@
+2005-02-19  Sivaiah Nallagatla <snallagatla novell com>
+
+	* gui/contact-editor/eab-editor.c 
+	(eab_editor_prompt_to_save_changes) : close
+	the editor here in case of save and discard
+	so that callers need not worry about closing
+
+	* gui/contact-list-editor/e-contact-list-editor.c 
+	(closed_cb) (app_delete_event_cb) : don't close
+	the editor here as that is handled by _save_changes
+	call. Also no need to check for return value of that
+	function as it does not matter here.
+	
+	Fixes #70371
+	
 2005-02-09  Sivaiah Nallagatla <snallagatla novell com>
                                                                                 
         * gui/component/addressbook-config.c
Index: gui/contact-editor/eab-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/contact-editor/eab-editor.c,v
retrieving revision 1.4
diff -u -p -r1.4 eab-editor.c
--- gui/contact-editor/eab-editor.c	22 Jul 2004 02:21:37 -0000	1.4
+++ gui/contact-editor/eab-editor.c	18 Feb 2005 19:28:49 -0000
@@ -250,7 +250,11 @@ eab_editor_get_window (EABEditor *editor
 	else
 		return NULL;
 }
-
+/* This function prompts for saving if editor conents are in changed state and
+   save or discards or cancels(just returns with out doing anything) according to user input. 
+   Editor gets destoryed in case of save and discard case. 
+   */
+   
 gboolean
 eab_editor_prompt_to_save_changes (EABEditor *editor, GtkWindow *window)
 {
@@ -262,9 +266,10 @@ eab_editor_prompt_to_save_changes (EABEd
 		if (!eab_editor_is_valid (editor)) {
 			return FALSE;
 		}
-		eab_editor_save_contact (editor, FALSE);
+		eab_editor_save_contact (editor, TRUE);
 		return TRUE;
 	case GTK_RESPONSE_NO:
+		eab_editor_close (EAB_EDITOR (editor));
 		return TRUE;
 	case GTK_RESPONSE_CANCEL:
 	default:
Index: gui/contact-list-editor/e-contact-list-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/contact-list-editor/e-contact-list-editor.c,v
retrieving revision 1.67
diff -u -p -r1.67 e-contact-list-editor.c
--- gui/contact-list-editor/e-contact-list-editor.c	28 Jan 2005 19:29:55 -0000	1.67
+++ gui/contact-list-editor/e-contact-list-editor.c	18 Feb 2005 19:28:53 -0000
@@ -470,10 +470,7 @@ e_contact_list_editor_get_window (EABEdi
 static void
 close_cb (GtkWidget *widget, EContactListEditor *cle)
 {
-	if (!eab_editor_prompt_to_save_changes (EAB_EDITOR (cle), GTK_WINDOW (cle->app)))
-		return;
-
-	eab_editor_close (EAB_EDITOR (cle));
+	eab_editor_prompt_to_save_changes (EAB_EDITOR (cle), GTK_WINDOW (cle->app));
 }
 
 static void
@@ -864,10 +861,7 @@ app_delete_event_cb (GtkWidget *widget, 
 	if (ce->in_async_call)
 		return TRUE;
 
-	if (!eab_editor_prompt_to_save_changes (EAB_EDITOR (ce), GTK_WINDOW (ce->app)))
-		return TRUE;
-
-	eab_editor_close (EAB_EDITOR (ce));
+	eab_editor_prompt_to_save_changes (EAB_EDITOR (ce), GTK_WINDOW (ce->app));
 	return TRUE;
 }
 


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