comparison gtk3/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 de49c1f284b2
children cebf830e3da7
comparison
equal deleted inserted replaced
1717:8228b3cf8f37 1718:fae374a0055b
4302 4302
4303 if (!id && !data) 4303 if (!id && !data)
4304 return; 4304 return;
4305 4305
4306 DW_MUTEX_LOCK; 4306 DW_MUTEX_LOCK;
4307 if (id) 4307 if(data)
4308 tmp = _find_pixbuf((HICN)id, NULL, NULL); 4308 {
4309 else
4310 {
4311 if (!data)
4312 {
4313 DW_MUTEX_UNLOCK;
4314 return;
4315 }
4316 /* 4309 /*
4317 * A real hack; create a temporary file and write the contents 4310 * A real hack; create a temporary file and write the contents
4318 * of the data to the file 4311 * of the data to the file
4319 */ 4312 */
4320 file = tmpnam( NULL ); 4313 file = tmpnam( NULL );
4331 } 4324 }
4332 tmp = gdk_pixbuf_new_from_file(file, NULL ); 4325 tmp = gdk_pixbuf_new_from_file(file, NULL );
4333 /* remove our temporary file */ 4326 /* remove our temporary file */
4334 unlink (file ); 4327 unlink (file );
4335 } 4328 }
4329 else if (id)
4330 tmp = _find_pixbuf((HICN)id, NULL, NULL);
4336 4331
4337 if(tmp) 4332 if(tmp)
4338 { 4333 {
4339 gtk_image_set_from_pixbuf(GTK_IMAGE(handle), tmp); 4334 gtk_image_set_from_pixbuf(GTK_IMAGE(handle), tmp);
4340 } 4335 }