diff options
| author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2025-09-20 19:19:41 +0200 | 
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2025-09-20 19:19:41 +0200 | 
| commit | 63ec5715054be18ac4db5675e067b41c955d03b9 (patch) | |
| tree | 42bb5764b05bd3bc5bffadb55f4375e6dce8a521 /app/wlib/gtklib/bitmap.c | |
| parent | 6c1a798b0302034a7fdcaf93b8f014e2e458c2a0 (diff) | |
| parent | e7d20cf352688bf717a01f4e6d9e6f497c2bea4c (diff) | |
Update upstream source from tag 'upstream/5.3.1Beta2'
Update to upstream version '5.3.1Beta2'
with Debian dir 36e53756d97319b1944d0ea744717abc9326f697
Diffstat (limited to 'app/wlib/gtklib/bitmap.c')
| -rw-r--r-- | app/wlib/gtklib/bitmap.c | 13 | 
1 files changed, 8 insertions, 5 deletions
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;  }  | 
