iconcache: Guard deprecated gdk-pixbuf APIs

This commit is contained in:
Benjamin Otte 2015-09-11 18:33:05 +02:00
parent 41b386cd6a
commit f92c861eec
2 changed files with 6 additions and 0 deletions

View File

@ -163,9 +163,11 @@ check_pixel_data (CacheInfo *info,
{
GdkPixdata data;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
check ("pixel data", gdk_pixdata_deserialize (&data, length,
(const guint8*)info->cache + offset + 8,
NULL));
G_GNUC_END_IGNORE_DEPRECATIONS;
}
return TRUE;

View File

@ -514,7 +514,9 @@ maybe_cache_image_data (Image *image,
if (pixbuf)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gdk_pixdata_from_pixbuf (&idata->pixdata, pixbuf, FALSE);
G_GNUC_END_IGNORE_DEPRECATIONS;
idata->size = idata->pixdata.length + 8;
idata->has_pixdata = TRUE;
}
@ -825,7 +827,9 @@ write_image_data (FILE *cache, ImageData *image_data, int offset)
if (!write_card32 (cache, 0))
return FALSE;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
s = gdk_pixdata_serialize (pixdata, &len);
G_GNUC_END_IGNORE_DEPRECATIONS;
if (!write_card32 (cache, len))
{