[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: x_window.c
User: cnieves
Date: 07/06/09 12:42:34
Modified: . x_window.c
Log:
Added check for missing pixmap file.
Fix for bug #1714493. If a pixmap file doesn't exist, write
a message to the log window. Thanks to the anonymous submitter.
Revision Changes Path
1.57 eda/geda/gaf/gschem/src/x_window.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: x_window.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_window.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -b -r1.56 -r1.57
--- x_window.c 9 Jun 2007 15:14:08 -0000 1.56
+++ x_window.c 9 Jun 2007 16:42:34 -0000 1.57
@@ -371,7 +371,7 @@
*/
static GtkWidget *x_window_stock_pixmap(const char *stock, TOPLEVEL *w_current)
{
- GtkWidget *wpixmap;
+ GtkWidget *wpixmap = NULL;
GdkPixmap *pixmap;
GdkBitmap *mask;
GtkStockItem item;
@@ -393,7 +393,11 @@
/* Fallback to the original custom icon */
pixmap = gdk_pixmap_create_from_xpm (window, &mask,
background, filename);
+ if (pixmap != NULL) {
wpixmap = gtk_image_new_from_pixmap (pixmap, mask);
+ } else {
+ s_log_message("Could not find image at file: %s.\n", filename);
+ }
}
g_free(filename);
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs