New upstream version 0.79.6
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/* dvdisaster: Additional error correction for optical media.
|
||||
* Copyright (C) 2004-2015 Carsten Gnoerlich.
|
||||
* Copyright (C) 2004-2017 Carsten Gnoerlich.
|
||||
*
|
||||
* Email: carsten@dvdisaster.org -or- cgnoerlich@fsfe.org
|
||||
* Project homepage: http://www.dvdisaster.org
|
||||
@@ -29,9 +29,25 @@
|
||||
***/
|
||||
|
||||
static GdkPixbuf* create_icon(GtkIconFactory *ifact, char *name, const guint8 *inline_data)
|
||||
{ GdkPixbuf *pb = gdk_pixbuf_new_from_inline(-1, inline_data, FALSE, NULL);
|
||||
GtkIconSet *iset = gtk_icon_set_new_from_pixbuf(pb);
|
||||
{ GdkPixbuf *pb;
|
||||
GtkIconSet *iset;
|
||||
int width, height, rowstride;
|
||||
|
||||
/* gdk_pixbuf_new_from_inline() deprecated; recommended to replace with GResource XML crap.
|
||||
One day I'll get rid of GTK+. I swear.
|
||||
|
||||
pb = gdk_pixbuf_new_from_inline(-1, inline_data, FALSE, NULL);
|
||||
*/
|
||||
|
||||
rowstride = (inline_data[12] << 24) + (inline_data[13] << 16) + (inline_data[14] << 8) + inline_data[15];
|
||||
width = (inline_data[16] << 24) + (inline_data[17] << 16) + (inline_data[18] << 8) + inline_data[19];
|
||||
height = (inline_data[20] << 24) + (inline_data[21] << 16) + (inline_data[22] << 8) + inline_data[23];
|
||||
|
||||
pb = gdk_pixbuf_new_from_data(inline_data+24, GDK_COLORSPACE_RGB, TRUE, 8,
|
||||
width, height, rowstride, NULL, NULL);
|
||||
|
||||
iset = gtk_icon_set_new_from_pixbuf(pb);
|
||||
|
||||
gtk_icon_factory_add(ifact, name, iset);
|
||||
return pb;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user