Magellan Linux

Annotation of /trunk/dia/patches/dia-0.94-fallbacktoxpmicons.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 144 - (hide annotations) (download)
Tue May 8 20:06:05 2007 UTC (17 years, 1 month ago) by niro
File size: 1142 byte(s)
-import

1 niro 144 --- dia-0.94/app/interface.c.orit 2005-03-10 08:29:36.000000000 +0000
2     +++ dia-0.94/app/interface.c 2005-03-10 08:30:44.000000000 +0000
3     @@ -877,6 +877,17 @@
4     GError* gerror = NULL;
5    
6     pixbuf = gdk_pixbuf_new_from_file(sheet_obj->pixmap_file, &gerror);
7     + if (pixbuf == NULL) {
8     + int len = strlen(sheet_obj->pixmap_file);
9     + if ((len > 4) && !strcmp(sheet_obj->pixmap_file+len-4, ".png"))
10     + {
11     + GError* gerrortwo = NULL;
12     + strcpy(sheet_obj->pixmap_file+len-4, ".xpm");
13     + pixbuf = gdk_pixbuf_new_from_file(sheet_obj->pixmap_file, &gerrortwo);
14     + if (gerrortwo) g_error_free (gerrortwo);
15     + }
16     + }
17     +
18     if (pixbuf != NULL) {
19     gdk_pixbuf_render_pixmap_and_mask(pixbuf, &pixmap, &mask, 1.0);
20     gdk_pixbuf_unref(pixbuf);
21     @@ -885,6 +896,7 @@
22     g_warning("failed to load pixbuf for file %s; cause=%s",
23     sheet_obj->pixmap_file,gerror?gerror->message:"[NULL]");
24     }
25     + if (gerror) g_error_free (gerror);
26     } else {
27     DiaObjectType *type;
28     type = object_get_type(sheet_obj->object_type);