comparison gtk/dw.c @ 1718:fae374a0055b

Same fix for GTK2/3 as committed for OS/2 and Windows... Not sure why I did it that way at all in the first place.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 08 May 2012 18:28:39 +0000
parents df5f0857f765
children 535e8c19a13d
comparison
equal deleted inserted replaced
1717:8228b3cf8f37 1718:fae374a0055b
4990 4990
4991 if (!id && !data) 4991 if (!id && !data)
4992 return; 4992 return;
4993 4993
4994 DW_MUTEX_LOCK; 4994 DW_MUTEX_LOCK;
4995 if (id) 4995 if(data)
4996 tmp = _find_pixmap(&bitmap, (HICN)id, handle, NULL, NULL);
4997 else
4998 { 4996 {
4999 #if GTK_MAJOR_VERSION > 1 4997 #if GTK_MAJOR_VERSION > 1
5000 GdkPixbuf *pixbuf; 4998 GdkPixbuf *pixbuf;
5001 #elif defined(USE_IMLIB) 4999 #elif defined(USE_IMLIB)
5002 GdkImlibImage *image; 5000 GdkImlibImage *image;
5003 #endif 5001 #endif
5004 if (!data)
5005 {
5006 DW_MUTEX_UNLOCK;
5007 return;
5008 }
5009 /* 5002 /*
5010 * A real hack; create a temporary file and write the contents 5003 * A real hack; create a temporary file and write the contents
5011 * of the data to the file 5004 * of the data to the file
5012 */ 5005 */
5013 file = tmpnam( NULL ); 5006 file = tmpnam( NULL );
5036 tmp = gdk_pixmap_create_from_xpm_d(handle->window, &bitmap, &_colors[DW_CLR_PALEGRAY], mydata); 5029 tmp = gdk_pixmap_create_from_xpm_d(handle->window, &bitmap, &_colors[DW_CLR_PALEGRAY], mydata);
5037 #endif 5030 #endif
5038 /* remove our temporary file */ 5031 /* remove our temporary file */
5039 unlink (file ); 5032 unlink (file );
5040 } 5033 }
5034 else if (id)
5035 tmp = _find_pixmap(&bitmap, (HICN)id, handle, NULL, NULL);
5041 5036
5042 if(tmp) 5037 if(tmp)
5043 { 5038 {
5044 #if GTK_MAJOR_VERSION > 1 5039 #if GTK_MAJOR_VERSION > 1
5045 gtk_image_set_from_pixmap(GTK_IMAGE(handle), tmp, bitmap); 5040 gtk_image_set_from_pixmap(GTK_IMAGE(handle), tmp, bitmap);