[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: x_fileselect.nw
User: cnieves
Date: 06/04/09 15:10:57
Modified: . x_fileselect.nw
Log:
Add the "discard changes" button to the close page dialog. This fixes bug 1442948.
Revision Changes Path
1.38 +23 -9 eda/geda/devel/gschem/noweb/x_fileselect.nw
(In the diff below, changes in quantity of whitespace are not shown.)
Index: x_fileselect.nw
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gschem/noweb/x_fileselect.nw,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -b -r1.37 -r1.38
--- x_fileselect.nw 22 Jan 2006 13:55:33 -0000 1.37
+++ x_fileselect.nw 9 Apr 2006 19:10:57 -0000 1.38
@@ -2663,6 +2663,8 @@
GTK_RESPONSE_ACCEPT,
GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL,
+ _("Discard changes"),
+ GTK_RESPONSE_REJECT,
NULL);
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(f_current->xfwindow),
sch_filefilter);
@@ -2679,7 +2681,9 @@
gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER (f_current->xfwindow),
w_current->page_current->page_filename);
}
- if (gtk_dialog_run (GTK_DIALOG (f_current->xfwindow)) == GTK_RESPONSE_ACCEPT)
+ switch (gtk_dialog_run (GTK_DIALOG (f_current->xfwindow))) {
+
+ case GTK_RESPONSE_ACCEPT:
{
char *filename;
@@ -2687,8 +2691,18 @@
x_fileselect_saveas(NULL, f_current);
g_free (filename);
}
- else {
+ break;
+ case GTK_RESPONSE_CANCEL:
+ x_fileselect_close (NULL, f_current);
+ break;
+
+ case GTK_RESPONSE_REJECT:
x_fileselect_close (NULL, f_current);
+ /* Set the CHANGED flag to 0, so i_callback_page_close won't
+ ask again if save the page or not. */
+ w_current->page_current->CHANGED = 0;
+ i_callback_page_close (w_current, 0, NULL);
+ break;
}
free (title);