diff gtk/dw.c @ 1258:3df86772b625

Updated the list of supported image formats for GTK. This could be generated automatically by querying pixbuf loaders... However it does not take into account formats that support transparency. So for right now we keep using a static list... and include the most popular formats.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 24 Oct 2011 08:30:53 +0000
parents 28c2c7e6671c
children 61d0c5f84644
line wrap: on
line diff
--- a/gtk/dw.c	Mon Oct 24 08:01:42 2011 +0000
+++ b/gtk/dw.c	Mon Oct 24 08:30:53 2011 +0000
@@ -101,14 +101,18 @@
 /*
  * List those icons that have transparency first
  */
-#define NUM_EXTS 5
+#define NUM_EXTS 9
 char *image_exts[NUM_EXTS] =
 {
    ".xpm",
    ".png",
    ".ico",
+   ".icns",
+   ".gif",
    ".jpg",
-   ".bmp",
+   ".jpeg",
+   ".tiff",
+   ".bmp"
 };
 
 #ifndef max
@@ -4557,7 +4561,7 @@
       tmp = _find_pixmap(&bitmap, (HICN)id, handle, NULL, NULL);
    else
    {
-      char *file = alloca(strlen(filename) + 5);
+      char *file = alloca(strlen(filename) + 6);
 #if GTK_MAJOR_VERSION > 1
       GdkPixbuf *pixbuf;
 #elif defined(USE_IMLIB)
@@ -6615,7 +6619,7 @@
 #elif defined(USE_IMLIB)
    GdkImlibImage *image;
 #endif
-   char *file = alloca(strlen(filename) + 5);
+   char *file = alloca(strlen(filename) + 6);
    unsigned long z, ret = 0;
    int found_ext = 0;
    int i;
@@ -8357,7 +8361,7 @@
 #ifdef USE_IMLIB
    GdkImlibImage *image;
 #endif
-   char *file = alloca(strlen(filename) + 5);
+   char *file = alloca(strlen(filename) + 6);
    int found_ext = 0;
    int i;