[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: x_dialog.c
User: pcjc2
Date: 07/03/31 09:26:56
Modified: . x_dialog.c
Log:
Fixed confirm save on page-close dialogs to correctly
cancel, rather than assert if the dialog is closed with the
ESCAPE key, or with the window-manager's destroy button.
Revision Changes Path
1.81 +17 -15 eda/geda/gaf/gschem/src/x_dialog.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: x_dialog.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_dialog.c,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -b -r1.80 -r1.81
--- x_dialog.c 24 Feb 2007 18:43:14 -0000 1.80
+++ x_dialog.c 31 Mar 2007 13:26:55 -0000 1.81
@@ -3833,10 +3833,6 @@
x_window_close_page (toplevel, page);
break;
- case GTK_RESPONSE_CANCEL:
- /* action selected: cancel */
- /* nothing to do */
- break;
case GTK_RESPONSE_YES:
/* action selected: save */
@@ -3851,8 +3847,14 @@
/* do not close page */
break;
+ case GTK_RESPONSE_CANCEL:
+ /* action selected: cancel */
+ /* fall through */
default:
- g_assert_not_reached ();
+ /* Hit when the user breaks out of the dialog with the escape key
+ * or otherwise destroys the dialog window without a proper response */
+ /* nothing to do */
+ break;
}
gtk_widget_destroy (dialog);
@@ -3908,12 +3910,6 @@
ret = TRUE;
break;
- case GTK_RESPONSE_CANCEL:
- /* action selected: cancel */
- /* do not close window */
- ret = FALSE;
- break;
-
case GTK_RESPONSE_YES:
/* action selected: save */
/* prompts user for the filename and ultimate confirmation for */
@@ -3934,8 +3930,14 @@
g_list_free (unsaved_pages);
break;
+ case GTK_RESPONSE_CANCEL:
+ /* action selected: cancel */
+ /* fall through */
default:
- g_assert_not_reached ();
+ /* Hit when the user breaks out of the dialog with the escape key
+ * or otherwise destroys the dialog window without a proper response */
+ ret = FALSE;
+ break;
}
gtk_widget_destroy (dialog);
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs