[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: g_funcs.c
User: cnieves
Date: 07/02/10 16:10:04
Modified: . g_funcs.c x_print.c
Log:
* src/g_funcs.c: propagate f_print_file errors to scheme functions.
* src/x_print.c: Fixed compiler warning. Also added a popup message
warning the user if the f_print_file function fails.
Revision Changes Path
1.20 +8 -4 eda/geda/gaf/gschem/src/g_funcs.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: g_funcs.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/g_funcs.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- g_funcs.c 30 Aug 2006 11:06:16 -0000 1.19
+++ g_funcs.c 10 Feb 2007 21:10:04 -0000 1.20
@@ -52,9 +52,11 @@
SCM_ARG1, "gschem-print");
if (output_filename) {
- f_print_file (global_window_current, output_filename);
+ if (f_print_file (global_window_current, output_filename))
+ return SCM_BOOL_F;
} else {
- f_print_file (global_window_current, SCM_STRING_CHARS (filename));
+ if (f_print_file (global_window_current, SCM_STRING_CHARS (filename)))
+ return SCM_BOOL_F;
}
return SCM_BOOL_T;
@@ -71,9 +73,11 @@
SCM_ARG1, "gschem-postscript");
if (output_filename) {
- f_print_file (global_window_current, output_filename);
+ if (f_print_file (global_window_current, output_filename))
+ return SCM_BOOL_F;
} else {
- f_print_file (global_window_current, SCM_STRING_CHARS (filename));
+ if (f_print_file (global_window_current, SCM_STRING_CHARS (filename)))
+ return SCM_BOOL_F;
}
return SCM_BOOL_T;
1.29 +14 -2 eda/geda/gaf/gschem/src/x_print.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: x_print.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_print.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- x_print.c 3 Jan 2007 14:43:13 -0000 1.28
+++ x_print.c 10 Feb 2007 21:10:04 -0000 1.29
@@ -388,7 +388,7 @@
GTK_WIDGET (dialog->fnfield),
1, 2, 0, 1, GTK_EXPAND | GTK_FILL, 0, 0, 0);
- dialog->saveasbutton = gtk_button_new();
+ dialog->saveasbutton = (GtkButton *) gtk_button_new();
gtk_container_add(GTK_CONTAINER(dialog->saveasbutton),
gtk_image_new_from_stock(GTK_STOCK_OPEN,
GTK_ICON_SIZE_SMALL_TOOLBAR));
@@ -677,6 +677,7 @@
gint paperidx, x, y, result;
gchar *string, *destination;
gboolean usefile = FALSE;
+ GtkWidget *popup_message;
/* Work out current paper size by iterating through available paper
* sizes. Set the default paper size as the active selection */
@@ -770,6 +771,17 @@
{
s_log_message (_("Cannot print current schematic to [%s]\n"),
destination);
+
+ /* Pop up a message warning the user */
+ popup_message =
+ gtk_message_dialog_new (GTK_WINDOW(dialog),
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_CLOSE,
+ _("Error printing to file '%s'\n"
+ "Check the log window for more information"),
+ destination);
+ gtk_dialog_run (GTK_DIALOG (popup_message));
}
else
{
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs