[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gEDA-dev: Patches for x_fileselect.c, "discard_changes" bug,separate button ordering patch
Hi,
I've just produced a patch against CVS head which stops the file-save
dialog offering a "Discard Changes" button unless the dialog the page is
being closed for some reason.
Also, a patch which re-orders the buttons on the File->Open and
File->SaveAs dialogs, so the affermative action is on the right hand
side. (More Gnome HIG compliant)
This puts the order at
[ "Discard Changes" ] "Cancel" "Save As"
Or
"Cancel" "Open"
To avoid conflicts, the patch to re-order the file buttons is against
x_fileselect.c, with the Discard changes patch applied, NOT against CVS
HEAD.
I think both should be simple enough to go in before the release.
Regards
Peter Clifton
Index: x_fileselect.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_fileselect.c,v
retrieving revision 1.24
diff -U3 -p -r1.24 x_fileselect.c
--- x_fileselect.c 22 Aug 2006 03:01:21 -0000 1.24
+++ x_fileselect.c 5 Sep 2006 15:56:08 -0000
@@ -2331,16 +2331,27 @@ void x_fileselect_setup (TOPLEVEL *w_cur
} else if ( (filesel_type == SAVEAS) || (filesel_type == SAVEAS_CLOSE) ){
title = g_strdup(_("Save As..."));
- f_current->xfwindow = gtk_file_chooser_dialog_new (title,
- GTK_WINDOW(w_current->main_window),
- GTK_FILE_CHOOSER_ACTION_SAVE,
- GTK_STOCK_SAVE_AS,
- GTK_RESPONSE_ACCEPT,
- GTK_STOCK_CANCEL,
- GTK_RESPONSE_CANCEL,
- _("Discard changes"),
- GTK_RESPONSE_REJECT,
- NULL);
+ if ( filesel_type == SAVEAS_CLOSE ) {
+ f_current->xfwindow = gtk_file_chooser_dialog_new (title,
+ GTK_WINDOW(w_current->main_window),
+ GTK_FILE_CHOOSER_ACTION_SAVE,
+ GTK_STOCK_SAVE_AS,
+ GTK_RESPONSE_ACCEPT,
+ GTK_STOCK_CANCEL,
+ GTK_RESPONSE_CANCEL,
+ _("Discard changes"),
+ GTK_RESPONSE_REJECT,
+ NULL);
+ } else {
+ f_current->xfwindow = gtk_file_chooser_dialog_new (title,
+ GTK_WINDOW(w_current->main_window),
+ GTK_FILE_CHOOSER_ACTION_SAVE,
+ GTK_STOCK_SAVE_AS,
+ GTK_RESPONSE_ACCEPT,
+ GTK_STOCK_CANCEL,
+ GTK_RESPONSE_CANCEL,
+ NULL);
+ }
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(f_current->xfwindow),
sch_filefilter);
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(f_current->xfwindow),
--- cvs_geda.discard_changes/geda/gaf/gschem/src/x_fileselect.c 2006-09-05 16:53:03.000000000 +0100
+++ cvs_geda.file_button_order/geda/gaf/gschem/src/x_fileselect.c 2006-09-05 16:49:40.000000000 +0100
@@ -2275,10 +2275,10 @@ void x_fileselect_setup (TOPLEVEL *w_cur
f_current->xfwindow = gtk_file_chooser_dialog_new (title,
GTK_WINDOW(w_current->main_window),
GTK_FILE_CHOOSER_ACTION_OPEN,
- GTK_STOCK_OPEN,
- GTK_RESPONSE_ACCEPT,
GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL,
+ GTK_STOCK_OPEN,
+ GTK_RESPONSE_ACCEPT,
NULL);
gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(f_current->xfwindow), TRUE);
@@ -2335,21 +2335,21 @@ void x_fileselect_setup (TOPLEVEL *w_cur
f_current->xfwindow = gtk_file_chooser_dialog_new (title,
GTK_WINDOW(w_current->main_window),
GTK_FILE_CHOOSER_ACTION_SAVE,
- GTK_STOCK_SAVE_AS,
- GTK_RESPONSE_ACCEPT,
- GTK_STOCK_CANCEL,
- GTK_RESPONSE_CANCEL,
_("Discard changes"),
GTK_RESPONSE_REJECT,
+ GTK_STOCK_CANCEL,
+ GTK_RESPONSE_CANCEL,
+ GTK_STOCK_SAVE_AS,
+ GTK_RESPONSE_ACCEPT,
NULL);
} else {
f_current->xfwindow = gtk_file_chooser_dialog_new (title,
GTK_WINDOW(w_current->main_window),
GTK_FILE_CHOOSER_ACTION_SAVE,
- GTK_STOCK_SAVE_AS,
- GTK_RESPONSE_ACCEPT,
GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL,
+ GTK_STOCK_SAVE_AS,
+ GTK_RESPONSE_ACCEPT,
NULL);
}
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(f_current->xfwindow),
_______________________________________________
geda-dev mailing list
geda-dev@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev