From e7d20cf352688bf717a01f4e6d9e6f497c2bea4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sat, 20 Sep 2025 19:19:34 +0200 Subject: New upstream version 5.3.1Beta2 --- app/wlib/gtklib/bitmap.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'app/wlib/gtklib/bitmap.c') diff --git a/app/wlib/gtklib/bitmap.c b/app/wlib/gtklib/bitmap.c index b1ff2ed..7136461 100644 --- a/app/wlib/gtklib/bitmap.c +++ b/app/wlib/gtklib/bitmap.c @@ -67,8 +67,11 @@ wBitmapCreate( wWin_p parent, wWinPix_t x, wWinPix_t y, long options, gtk_widget_realize( parent->widget ); /* force allocation, if pending */ } - /* create the bitmap from supplied xpm data */ - pixbuf = gdk_pixbuf_new_from_xpm_data( (const char **)iconP->bits ); + /* create the bitmap from supplied data */ + assert ( *(int*)iconP->bits == 0x47646b50 || + *(int*)iconP->bits == 0x506b6447 ); + pixbuf = gdk_pixbuf_new_from_inline( -1, iconP->bits, FALSE, NULL ); + g_object_ref_sink(pixbuf); image = gtk_image_new_from_pixbuf( pixbuf ); gtk_widget_show( image ); @@ -106,7 +109,7 @@ wIcon_p wIconCreateBitMap( wWinPix_t w, wWinPix_t h, const char * bits, ip->color = color; // Copy bits int nBytes = ( ( w + 7 ) / 8 ) * h; - ip->bits = (char*)malloc( nBytes ); + ip->bits = (wIconBitMap_t)malloc( nBytes ); memcpy( (void*)ip->bits, bits, nBytes ); return ip; } @@ -117,7 +120,7 @@ wIcon_p wIconCreateBitMap( wWinPix_t w, wWinPix_t h, const char * bits, * \returns icon handle */ -wIcon_p wIconCreatePixMap( char *pm[] ) +wIcon_p wIconCreatePixMap( wIconBitMap_t pm ) { wIcon_p ip; ip = (wIcon_p)malloc( sizeof *ip ); @@ -125,7 +128,7 @@ wIcon_p wIconCreatePixMap( char *pm[] ) ip->w = 0; ip->h = 0; ip->color = 0; - ip->bits = pm; + ip->bits = (wIconBitMap_t) pm; return ip; } -- cgit v1.2.3