Commit d99bd97f authored by Sebastian Wilhelmi's avatar Sebastian Wilhelmi Committed by Sebastian Wilhelmi
Browse files

Remove assorted G_OBJECT casts where unnecessary.


2001-12-13  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* gdk-pixbuf-animation.c, gdk-pixbuf-loader.c, gdk-pixpuf.c,
	io-gif-animation.c, io-gif.c, io-tiff.c, test-loaders.c: Remove
	assorted G_OBJECT casts where unnecessary.

	* gdk-pixbuf-loader.c: Call g_object_ref and g_object_unref
	instead of gdk_pixbuf_animation_ref and gdk_pixbuf_animation_unref
	resp.

	* gdk-pixbuf-csource.c, io-bmp.c, io-gif-animation.c, io-ico.c,
	io-jpeg.c, io-png.c, io-pnm.c, io-ras.c, io-tga.c, io-wbmp.c,
	io-xbm.c, io-xpm.c, test-gdk-pixbuf.c: Dito for gdk_pixbuf_ref and
	gdk_pixbuf_unref.

	* Makefile.am, pixops/Makefile.am: Compile everything with
	-DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED

	* gdk-pixdata.c: Use g_ascii_strup() instead of g_strup().

	* io-xpm.c: Use g_ascii_strcasecmp() instead of g_strcasecmp().

	* demos/testpixbuf-drawable.c, demos/testpixbuf-save.c,
	demos/testpixbuf-scale.c, demos/testpixbuf.c: Call g_object_ref
	and g_object_unref instead of gdk_pixbuf_ref and gdk_pixbuf_unref
	resp.
parent d3403353
2001-12-13 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* demos/testpixbuf-drawable.c, demos/testpixbuf-save.c,
demos/testpixbuf-scale.c, demos/testpixbuf.c: Call g_object_ref
and g_object_unref instead of gdk_pixbuf_ref and gdk_pixbuf_unref
resp.
Thu Dec 13 22:02:41 2001 Kristian Rietveld <kris@gtk.org> Thu Dec 13 22:02:41 2001 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (validate_visible_area): free path * gtk/gtktreeview.c (validate_visible_area): free path
......
2001-12-13 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* demos/testpixbuf-drawable.c, demos/testpixbuf-save.c,
demos/testpixbuf-scale.c, demos/testpixbuf.c: Call g_object_ref
and g_object_unref instead of gdk_pixbuf_ref and gdk_pixbuf_unref
resp.
Thu Dec 13 22:02:41 2001 Kristian Rietveld <kris@gtk.org> Thu Dec 13 22:02:41 2001 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (validate_visible_area): free path * gtk/gtktreeview.c (validate_visible_area): free path
......
2001-12-13 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* demos/testpixbuf-drawable.c, demos/testpixbuf-save.c,
demos/testpixbuf-scale.c, demos/testpixbuf.c: Call g_object_ref
and g_object_unref instead of gdk_pixbuf_ref and gdk_pixbuf_unref
resp.
Thu Dec 13 22:02:41 2001 Kristian Rietveld <kris@gtk.org> Thu Dec 13 22:02:41 2001 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (validate_visible_area): free path * gtk/gtktreeview.c (validate_visible_area): free path
......
2001-12-13 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* demos/testpixbuf-drawable.c, demos/testpixbuf-save.c,
demos/testpixbuf-scale.c, demos/testpixbuf.c: Call g_object_ref
and g_object_unref instead of gdk_pixbuf_ref and gdk_pixbuf_unref
resp.
Thu Dec 13 22:02:41 2001 Kristian Rietveld <kris@gtk.org> Thu Dec 13 22:02:41 2001 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (validate_visible_area): free path * gtk/gtktreeview.c (validate_visible_area): free path
......
2001-12-13 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* demos/testpixbuf-drawable.c, demos/testpixbuf-save.c,
demos/testpixbuf-scale.c, demos/testpixbuf.c: Call g_object_ref
and g_object_unref instead of gdk_pixbuf_ref and gdk_pixbuf_unref
resp.
Thu Dec 13 22:02:41 2001 Kristian Rietveld <kris@gtk.org> Thu Dec 13 22:02:41 2001 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (validate_visible_area): free path * gtk/gtktreeview.c (validate_visible_area): free path
......
2001-12-13 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* demos/testpixbuf-drawable.c, demos/testpixbuf-save.c,
demos/testpixbuf-scale.c, demos/testpixbuf.c: Call g_object_ref
and g_object_unref instead of gdk_pixbuf_ref and gdk_pixbuf_unref
resp.
Thu Dec 13 22:02:41 2001 Kristian Rietveld <kris@gtk.org> Thu Dec 13 22:02:41 2001 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (validate_visible_area): free path * gtk/gtktreeview.c (validate_visible_area): free path
......
2001-12-13 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* demos/testpixbuf-drawable.c, demos/testpixbuf-save.c,
demos/testpixbuf-scale.c, demos/testpixbuf.c: Call g_object_ref
and g_object_unref instead of gdk_pixbuf_ref and gdk_pixbuf_unref
resp.
Thu Dec 13 22:02:41 2001 Kristian Rietveld <kris@gtk.org> Thu Dec 13 22:02:41 2001 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (validate_visible_area): free path * gtk/gtktreeview.c (validate_visible_area): free path
......
...@@ -60,7 +60,7 @@ configure_cb (GtkWidget *drawing_area, GdkEventConfigure *evt, gpointer data) ...@@ -60,7 +60,7 @@ configure_cb (GtkWidget *drawing_area, GdkEventConfigure *evt, gpointer data)
new_pixbuf = gdk_pixbuf_get_from_drawable (NULL, root, NULL, new_pixbuf = gdk_pixbuf_get_from_drawable (NULL, root, NULL,
0, 0, 0, 0, evt->width, evt->height); 0, 0, 0, 0, evt->width, evt->height);
g_object_set_data (G_OBJECT (drawing_area), "pixbuf", new_pixbuf); g_object_set_data (G_OBJECT (drawing_area), "pixbuf", new_pixbuf);
gdk_pixbuf_unref (pixbuf); g_object_unref (pixbuf);
} }
return FALSE; return FALSE;
......
...@@ -205,7 +205,7 @@ configure_cb (GtkWidget *drawing_area, GdkEventConfigure *evt, gpointer data) ...@@ -205,7 +205,7 @@ configure_cb (GtkWidget *drawing_area, GdkEventConfigure *evt, gpointer data)
new_pixbuf = gdk_pixbuf_get_from_drawable (NULL, root, NULL, new_pixbuf = gdk_pixbuf_get_from_drawable (NULL, root, NULL,
0, 0, 0, 0, evt->width, evt->height); 0, 0, 0, 0, evt->width, evt->height);
g_object_set_data (G_OBJECT (drawing_area), "pixbuf", new_pixbuf); g_object_set_data (G_OBJECT (drawing_area), "pixbuf", new_pixbuf);
gdk_pixbuf_unref (pixbuf); g_object_unref (pixbuf);
} }
return FALSE; return FALSE;
......
...@@ -47,7 +47,7 @@ expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data) ...@@ -47,7 +47,7 @@ expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data)
event->area.width, event->area.height, event->area.width, event->area.height,
GDK_RGB_DITHER_NORMAL, event->area.x, event->area.y); GDK_RGB_DITHER_NORMAL, event->area.x, event->area.y);
gdk_pixbuf_unref (dest); g_object_unref (dest);
return TRUE; return TRUE;
} }
......
...@@ -474,7 +474,7 @@ progressive_prepared_callback (GdkPixbufLoader* loader, gpointer data) ...@@ -474,7 +474,7 @@ progressive_prepared_callback (GdkPixbufLoader* loader, gpointer data)
pixbuf = gdk_pixbuf_loader_get_pixbuf (loader); pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
g_assert (pixbuf != NULL); g_assert (pixbuf != NULL);
gdk_pixbuf_ref (pixbuf); /* for the RGB window */ g_object_ref (pixbuf); /* for the RGB window */
*retloc = new_testrgb_window (pixbuf, "Progressive"); *retloc = new_testrgb_window (pixbuf, "Progressive");
......
2001-12-13 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gdk-pixbuf-animation.c, gdk-pixbuf-loader.c, gdk-pixpuf.c,
io-gif-animation.c, io-gif.c, io-tiff.c, test-loaders.c: Remove
assorted G_OBJECT casts where unnecessary.
* gdk-pixbuf-loader.c: Call g_object_ref and g_object_unref
instead of gdk_pixbuf_animation_ref and gdk_pixbuf_animation_unref
resp.
* gdk-pixbuf-csource.c, io-bmp.c, io-gif-animation.c, io-ico.c,
io-jpeg.c, io-png.c, io-pnm.c, io-ras.c, io-tga.c, io-wbmp.c,
io-xbm.c, io-xpm.c, test-gdk-pixbuf.c: Dito for gdk_pixbuf_ref and
gdk_pixbuf_unref.
* Makefile.am, pixops/Makefile.am: Compile everything with
-DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED
* gdk-pixdata.c: Use g_ascii_strup() instead of g_strup().
* io-xpm.c: Use g_ascii_strcasecmp() instead of g_strcasecmp().
2001-12-12 Matthias Clasen <matthiasc@poet.de> 2001-12-12 Matthias Clasen <matthiasc@poet.de>
* gdk-pixbuf-io.c: Markup fixes. * gdk-pixbuf-io.c: Markup fixes.
......
...@@ -210,6 +210,8 @@ INCLUDES = @STRIP_BEGIN@ \ ...@@ -210,6 +210,8 @@ INCLUDES = @STRIP_BEGIN@ \
-I$(top_srcdir)/gdk-pixbuf \ -I$(top_srcdir)/gdk-pixbuf \
-I$(top_builddir)/gdk-pixbuf \ -I$(top_builddir)/gdk-pixbuf \
-DGTK_VERSION=\"@GTK_VERSION@\" \ -DGTK_VERSION=\"@GTK_VERSION@\" \
-DG_DISABLE_DEPRECATED \
-DGDK_PIXBUF_DISABLE_DEPRECATED \
@INCLUDED_LOADER_DEFINE@ \ @INCLUDED_LOADER_DEFINE@ \
@GTK_DEBUG_FLAGS@ \ @GTK_DEBUG_FLAGS@ \
@GDK_PIXBUF_DEP_CFLAGS@ \ @GDK_PIXBUF_DEP_CFLAGS@ \
......
...@@ -211,7 +211,7 @@ gdk_pixbuf_animation_new_from_file (const char *filename, ...@@ -211,7 +211,7 @@ gdk_pixbuf_animation_new_from_file (const char *filename,
animation = gdk_pixbuf_non_anim_new (pixbuf); animation = gdk_pixbuf_non_anim_new (pixbuf);
g_object_unref (G_OBJECT (pixbuf)); g_object_unref (pixbuf);
} else { } else {
fseek (f, 0, SEEK_SET); fseek (f, 0, SEEK_SET);
animation = (* image_module->load_animation) (f, error); animation = (* image_module->load_animation) (f, error);
...@@ -617,7 +617,7 @@ gdk_pixbuf_non_anim_finalize (GObject *object) ...@@ -617,7 +617,7 @@ gdk_pixbuf_non_anim_finalize (GObject *object)
GdkPixbufNonAnim *non_anim = GDK_PIXBUF_NON_ANIM (object); GdkPixbufNonAnim *non_anim = GDK_PIXBUF_NON_ANIM (object);
if (non_anim->pixbuf) if (non_anim->pixbuf)
g_object_unref (G_OBJECT (non_anim->pixbuf)); g_object_unref (non_anim->pixbuf);
G_OBJECT_CLASS (non_parent_class)->finalize (object); G_OBJECT_CLASS (non_parent_class)->finalize (object);
} }
...@@ -632,7 +632,7 @@ gdk_pixbuf_non_anim_new (GdkPixbuf *pixbuf) ...@@ -632,7 +632,7 @@ gdk_pixbuf_non_anim_new (GdkPixbuf *pixbuf)
non_anim->pixbuf = pixbuf; non_anim->pixbuf = pixbuf;
if (pixbuf) if (pixbuf)
g_object_ref (G_OBJECT (pixbuf)); g_object_ref (pixbuf);
return GDK_PIXBUF_ANIMATION (non_anim); return GDK_PIXBUF_ANIMATION (non_anim);
} }
...@@ -681,7 +681,7 @@ gdk_pixbuf_non_anim_get_iter (GdkPixbufAnimation *anim, ...@@ -681,7 +681,7 @@ gdk_pixbuf_non_anim_get_iter (GdkPixbufAnimation *anim,
iter->non_anim = GDK_PIXBUF_NON_ANIM (anim); iter->non_anim = GDK_PIXBUF_NON_ANIM (anim);
g_object_ref (G_OBJECT (iter->non_anim)); g_object_ref (iter->non_anim);
return GDK_PIXBUF_ANIMATION_ITER (iter); return GDK_PIXBUF_ANIMATION_ITER (iter);
} }
...@@ -750,7 +750,7 @@ gdk_pixbuf_non_anim_iter_finalize (GObject *object) ...@@ -750,7 +750,7 @@ gdk_pixbuf_non_anim_iter_finalize (GObject *object)
{ {
GdkPixbufNonAnimIter *iter = GDK_PIXBUF_NON_ANIM_ITER (object); GdkPixbufNonAnimIter *iter = GDK_PIXBUF_NON_ANIM_ITER (object);
g_object_unref (G_OBJECT (iter->non_anim)); g_object_unref (iter->non_anim);
G_OBJECT_CLASS (non_iter_parent_class)->finalize (object); G_OBJECT_CLASS (non_iter_parent_class)->finalize (object);
} }
......
...@@ -101,7 +101,7 @@ main (int argc, ...@@ -101,7 +101,7 @@ main (int argc,
} }
print_csource (stdout, pixbuf); print_csource (stdout, pixbuf);
gdk_pixbuf_unref (pixbuf); g_object_unref (pixbuf);
} }
else /* parse name, file pairs */ else /* parse name, file pairs */
{ {
...@@ -125,7 +125,7 @@ main (int argc, ...@@ -125,7 +125,7 @@ main (int argc,
return 1; return 1;
} }
print_csource (stdout, pixbuf); print_csource (stdout, pixbuf);
gdk_pixbuf_unref (pixbuf); g_object_unref (pixbuf);
p++; p++;
} }
toggle = !toggle; toggle = !toggle;
......
...@@ -163,7 +163,7 @@ gdk_pixbuf_loader_finalize (GObject *object) ...@@ -163,7 +163,7 @@ gdk_pixbuf_loader_finalize (GObject *object)
g_warning ("GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed. You must explicitly end the data stream to the loader before dropping the last reference."); g_warning ("GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed. You must explicitly end the data stream to the loader before dropping the last reference.");
if (priv->animation) if (priv->animation)
gdk_pixbuf_animation_unref (priv->animation); g_object_unref (priv->animation);
g_free (priv); g_free (priv);
...@@ -180,13 +180,13 @@ gdk_pixbuf_loader_prepare (GdkPixbuf *pixbuf, ...@@ -180,13 +180,13 @@ gdk_pixbuf_loader_prepare (GdkPixbuf *pixbuf,
priv = GDK_PIXBUF_LOADER (loader)->priv; priv = GDK_PIXBUF_LOADER (loader)->priv;
if (anim) if (anim)
g_object_ref (G_OBJECT (anim)); g_object_ref (anim);
else else
anim = gdk_pixbuf_non_anim_new (pixbuf); anim = gdk_pixbuf_non_anim_new (pixbuf);
priv->animation = anim; priv->animation = anim;
g_signal_emit (G_OBJECT (loader), pixbuf_loader_signals[AREA_PREPARED], 0); g_signal_emit (loader, pixbuf_loader_signals[AREA_PREPARED], 0);
} }
static void static void
...@@ -201,7 +201,7 @@ gdk_pixbuf_loader_update (GdkPixbuf *pixbuf, ...@@ -201,7 +201,7 @@ gdk_pixbuf_loader_update (GdkPixbuf *pixbuf,
priv = GDK_PIXBUF_LOADER (loader)->priv; priv = GDK_PIXBUF_LOADER (loader)->priv;
g_signal_emit (G_OBJECT (loader), g_signal_emit (loader,
pixbuf_loader_signals[AREA_UPDATED], pixbuf_loader_signals[AREA_UPDATED],
0, 0,
x, y, x, y,
...@@ -424,7 +424,7 @@ gdk_pixbuf_loader_new_with_type (const char *image_type, ...@@ -424,7 +424,7 @@ gdk_pixbuf_loader_new_with_type (const char *image_type,
if (tmp != NULL) if (tmp != NULL)
{ {
g_propagate_error (error, tmp); g_propagate_error (error, tmp);
g_object_unref (G_OBJECT (retval)); g_object_unref (retval);
return NULL; return NULL;
} }
...@@ -541,7 +541,7 @@ gdk_pixbuf_loader_close (GdkPixbufLoader *loader, ...@@ -541,7 +541,7 @@ gdk_pixbuf_loader_close (GdkPixbufLoader *loader,
priv->closed = TRUE; priv->closed = TRUE;
g_signal_emit (G_OBJECT (loader), pixbuf_loader_signals[CLOSED], 0); g_signal_emit (loader, pixbuf_loader_signals[CLOSED], 0);
return retval; return retval;
} }
......
...@@ -83,6 +83,7 @@ gdk_pixbuf_finalize (GObject *object) ...@@ -83,6 +83,7 @@ gdk_pixbuf_finalize (GObject *object)
G_OBJECT_CLASS (parent_class)->finalize (object); G_OBJECT_CLASS (parent_class)->finalize (object);
} }
/** /**
* gdk_pixbuf_ref: * gdk_pixbuf_ref:
...@@ -248,7 +249,7 @@ gdk_pixbuf_new_subpixbuf (GdkPixbuf *src_pixbuf, ...@@ -248,7 +249,7 @@ gdk_pixbuf_new_subpixbuf (GdkPixbuf *src_pixbuf,
NULL, NULL); NULL, NULL);
/* Keep a reference to src_pixbuf */ /* Keep a reference to src_pixbuf */
g_object_ref (G_OBJECT (src_pixbuf)); g_object_ref (src_pixbuf);
g_object_set_qdata_full (G_OBJECT (sub), g_object_set_qdata_full (G_OBJECT (sub),
g_quark_from_static_string ("gdk-pixbuf-subpixbuf-src"), g_quark_from_static_string ("gdk-pixbuf-subpixbuf-src"),
......
...@@ -625,8 +625,7 @@ gdk_pixdata_to_csource (GdkPixdata *pixdata, ...@@ -625,8 +625,7 @@ gdk_pixdata_to_csource (GdkPixdata *pixdata,
height = pixdata->height; height = pixdata->height;
rowstride = pixdata->rowstride; rowstride = pixdata->rowstride;
rle_encoded = (pixdata->pixdata_type & GDK_PIXDATA_ENCODING_RLE) > 0; rle_encoded = (pixdata->pixdata_type & GDK_PIXDATA_ENCODING_RLE) > 0;
macro_name = g_strdup (name); macro_name = g_ascii_strup (name, -1);
g_strup (macro_name);
cdata.dump_macros = (dump_type & GDK_PIXDATA_DUMP_MACROS) > 0; cdata.dump_macros = (dump_type & GDK_PIXDATA_DUMP_MACROS) > 0;
cdata.dump_struct = (dump_type & GDK_PIXDATA_DUMP_PIXDATA_STRUCT) > 0; cdata.dump_struct = (dump_type & GDK_PIXDATA_DUMP_PIXDATA_STRUCT) > 0;
......
...@@ -225,7 +225,7 @@ static GdkPixbuf *gdk_pixbuf__bmp_image_load(FILE * f, GError **error) ...@@ -225,7 +225,7 @@ static GdkPixbuf *gdk_pixbuf__bmp_image_load(FILE * f, GError **error)
} }
if (State->pixbuf != NULL) if (State->pixbuf != NULL)
gdk_pixbuf_ref(State->pixbuf); g_object_ref(State->pixbuf);
pb = State->pixbuf; pb = State->pixbuf;
...@@ -516,7 +516,7 @@ static gboolean gdk_pixbuf__bmp_image_stop_load(gpointer data, GError **error) ...@@ -516,7 +516,7 @@ static gboolean gdk_pixbuf__bmp_image_stop_load(gpointer data, GError **error)
g_free(context->Colormap); g_free(context->Colormap);
if (context->pixbuf) if (context->pixbuf)
gdk_pixbuf_unref(context->pixbuf); g_object_unref(context->pixbuf);
g_free(context->buff); g_free(context->buff);
g_free(context); g_free(context);
......
...@@ -97,11 +97,11 @@ gdk_pixbuf_gif_anim_finalize (GObject *object) ...@@ -97,11 +97,11 @@ gdk_pixbuf_gif_anim_finalize (GObject *object)
for (l = gif_anim->frames; l; l = l->next) { for (l = gif_anim->frames; l; l = l->next) {
frame = l->data; frame = l->data;
gdk_pixbuf_unref (frame->pixbuf); g_object_unref (frame->pixbuf);
if (frame->composited) if (frame->composited)
gdk_pixbuf_unref (frame->composited); g_object_unref (frame->composited);
if (frame->revert) if (frame->revert)
gdk_pixbuf_unref (frame->revert); g_object_unref (frame->revert);
g_free (frame); g_free (frame);
} }
...@@ -175,7 +175,7 @@ gdk_pixbuf_gif_anim_get_iter (GdkPixbufAnimation *anim, ...@@ -175,7 +175,7 @@ gdk_pixbuf_gif_anim_get_iter (GdkPixbufAnimation *anim,
iter->gif_anim = GDK_PIXBUF_GIF_ANIM (anim); iter->gif_anim = GDK_PIXBUF_GIF_ANIM (anim);
g_object_ref (G_OBJECT (iter->gif_anim)); g_object_ref (iter->gif_anim);
iter_restart (iter); iter_restart (iter);
...@@ -250,7 +250,7 @@ gdk_pixbuf_gif_anim_iter_finalize (GObject *object) ...@@ -250,7 +250,7 @@ gdk_pixbuf_gif_anim_iter_finalize (GObject *object)
iter_clear (iter); iter_clear (iter);
g_object_unref (G_OBJECT (iter->gif_anim)); g_object_unref (iter->gif_anim);
G_OBJECT_CLASS (iter_parent_class)->finalize (object); G_OBJECT_CLASS (iter_parent_class)->finalize (object);
} }
...@@ -356,7 +356,7 @@ gdk_pixbuf_gif_anim_frame_composite (GdkPixbufGifAnim *gif_anim, ...@@ -356,7 +356,7 @@ gdk_pixbuf_gif_anim_frame_composite (GdkPixbufGifAnim *gif_anim,
if (f->need_recomposite) { if (f->need_recomposite) {
if (f->composited) { if (f->composited) {
g_object_unref (G_OBJECT (f->composited)); g_object_unref (f->composited);
f->composited = NULL; f->composited = NULL;
} }
} }
...@@ -376,7 +376,7 @@ gdk_pixbuf_gif_anim_frame_composite (GdkPixbufGifAnim *gif_anim, ...@@ -376,7 +376,7 @@ gdk_pixbuf_gif_anim_frame_composite (GdkPixbufGifAnim *gif_anim,
if (f->need_recomposite) { if (f->need_recomposite) {
if (f->composited) { if (f->composited) {
g_object_unref (G_OBJECT (f->composited)); g_object_unref (f->composited);
f->composited = NULL; f->composited = NULL;
} }
} }
...@@ -457,7 +457,7 @@ gdk_pixbuf_gif_anim_frame_composite (GdkPixbufGifAnim *gif_anim, ...@@ -457,7 +457,7 @@ gdk_pixbuf_gif_anim_frame_composite (GdkPixbufGifAnim *gif_anim,
(gif_anim->bg_blue << 8) | (gif_anim->bg_blue << 8) |
prev_frame->bg_transparent ? 0 : 255); prev_frame->bg_transparent ? 0 : 255);
g_object_unref (G_OBJECT (area)); g_object_unref (area);
} else if (prev_frame->action == GDK_PIXBUF_FRAME_REVERT) { } else if (prev_frame->action == GDK_PIXBUF_FRAME_REVERT) {
f->composited = gdk_pixbuf_copy (prev_frame->composited); f->composited = gdk_pixbuf_copy (prev_frame->composited);
...@@ -487,7 +487,7 @@ gdk_pixbuf_gif_anim_frame_composite (GdkPixbufGifAnim *gif_anim, ...@@ -487,7 +487,7 @@ gdk_pixbuf_gif_anim_frame_composite (GdkPixbufGifAnim *gif_anim,
f->revert = gdk_pixbuf_copy (area); f->revert = gdk_pixbuf_copy (area);
g_object_unref (G_OBJECT (area)); g_object_unref (area);
} }
/* Put current frame onto f->composited */ /* Put current frame onto f->composited */
......
...@@ -1363,9 +1363,9 @@ gdk_pixbuf__gif_image_load (FILE *file, GError **error) ...@@ -1363,9 +1363,9 @@ gdk_pixbuf__gif_image_load (FILE *file, GError **error)
pixbuf = gdk_pixbuf_animation_get_static_image (GDK_PIXBUF_ANIMATION (context->animation)); pixbuf = gdk_pixbuf_animation_get_static_image (GDK_PIXBUF_ANIMATION (context->animation));
if (pixbuf) if (pixbuf)
g_object_ref (G_OBJECT (pixbuf)); g_object_ref (pixbuf);
g_object_unref (G_OBJECT (context->animation)); g_object_unref (context->animation);
g_free (context->buf); g_free (context->buf);
g_free (context); g_free (context);
...@@ -1417,7 +1417,7 @@ gdk_pixbuf__gif_image_stop_load (gpointer data, GError **error) ...@@ -1417,7 +1417,7 @@ gdk_pixbuf__gif_image_stop_load (gpointer data, GError **error)
retval = FALSE; retval = FALSE;
} }
g_object_unref (G_OBJECT (context->animation)); g_object_unref (context->animation);
g_free (context->buf); g_free (context->buf);
g_free (context); g_free (context);
...@@ -1518,7 +1518,7 @@ gdk_pixbuf__gif_image_load_animation (FILE *file, ...@@ -1518,7 +1518,7 @@ gdk_pixbuf__gif_image_load_animation (FILE *file,
GDK_PIXBUF_ERROR_CORRUPT_IMAGE, GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
_("GIF file was missing some data (perhaps it was truncated somehow?)")); _("GIF file was missing some data (perhaps it was truncated somehow?)"));
g_object_unref (G_OBJECT (context->animation)); g_object_unref (context->animation);
context->animation = NULL; context->animation = NULL;
} }
......
...@@ -174,7 +174,7 @@ context_free (struct ico_progressive_state *context) ...@@ -174,7 +174,7 @@ context_free (struct ico_progressive_state *context)
g_free (context->HeaderBuf); g_free (context->HeaderBuf);
if (context->pixbuf) if (context->pixbuf)
gdk_pixbuf_unref (context->pixbuf); g_object_unref (context->pixbuf);
g_free (context); g_free (context);
} }
...@@ -213,7 +213,7 @@ gdk_pixbuf__ico_image_load(FILE * f, GError **error) ...@@ -213,7 +213,7 @@ gdk_pixbuf__ico_image_load(FILE * f, GError **error)
} }
} }
if (State->pixbuf != NULL)