[evolution-patches] patch for eab-editor.c



Hi,
eab_editor_is_valid check is moved to proper place so that which it gets
executed only user want to save the changes.With out this change the
following are the problems 
(i) while creating a new contact list , if the user changes his mind not
to create , there is no way he can close the contact-list-editor 
(ii) when modifying a contact/contact-list if user enter wrong data in
some field , there is no way for him to discard the changes and close
the editor. 

Thanks
Sivaiah

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/ChangeLog,v
retrieving revision 1.1621
diff -u -r1.1621 ChangeLog
--- ChangeLog	25 Mar 2004 04:13:37 -0000	1.1621
+++ ChangeLog	25 Mar 2004 11:29:45 -0000
@@ -1,3 +1,8 @@
+2004-03-25 Sivaiah Nallagatla <snallagatla novell com>
+
+	* gui/component/eab-editor.c (eab_editor_prompt_to_save_changes) : 
+	do  eab_editor_is_valid check only when user wants to save.
+
 2004-03-24  Chris Toshok  <toshok ximian com>
 
 	* gui/component/addressbook-component.c
Index: gui/contact-editor/eab-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/contact-editor/eab-editor.c,v
retrieving revision 1.1
diff -u -r1.1 eab-editor.c
--- gui/contact-editor/eab-editor.c	24 Mar 2004 19:58:15 -0000	1.1
+++ gui/contact-editor/eab-editor.c	25 Mar 2004 11:29:45 -0000
@@ -250,16 +250,15 @@
 gboolean
 eab_editor_prompt_to_save_changes (EABEditor *editor, GtkWindow *window)
 {
-	if (!eab_editor_is_valid (editor)) {
-		/* XXX pop up dialog about things being invalid */
-		return FALSE;
-	}
-
 	if (!eab_editor_is_changed (editor))
 		return TRUE;
 
 	switch (eab_prompt_save_dialog (window)) {
 	case GTK_RESPONSE_YES:
+		if (!eab_editor_is_valid (editor)) {
+			/* XXX pop up dialog about things being invalid */
+			return FALSE;
+		}
 		eab_editor_save_contact (editor, FALSE);
 		return TRUE;
 	case GTK_RESPONSE_NO:


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