summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Wilhelmi <wilhelmi@ira.uka.de>2001-12-13 21:22:12 +0000
committerSebastian Wilhelmi <wilhelmi@src.gnome.org>2001-12-13 21:22:12 +0000
commitd99bd97fe86bc13dbb483e174722eb68e916781f (patch)
treedb4c4a56f167c57efd6de8da7cc119201cef2570
parentd3403353cbd651a18264c4c28044c6c78c49b938 (diff)
downloadgdk-pixbuf-d99bd97fe86bc13dbb483e174722eb68e916781f.tar.gz
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.
-rw-r--r--ChangeLog7
-rw-r--r--ChangeLog.pre-2-07
-rw-r--r--ChangeLog.pre-2-107
-rw-r--r--ChangeLog.pre-2-27
-rw-r--r--ChangeLog.pre-2-47
-rw-r--r--ChangeLog.pre-2-67
-rw-r--r--ChangeLog.pre-2-87
-rw-r--r--demos/testpixbuf-drawable.c2
-rw-r--r--demos/testpixbuf-save.c2
-rw-r--r--demos/testpixbuf-scale.c2
-rw-r--r--demos/testpixbuf.c2
-rw-r--r--gdk-pixbuf/ChangeLog22
-rw-r--r--gdk-pixbuf/Makefile.am2
-rw-r--r--gdk-pixbuf/gdk-pixbuf-animation.c10
-rw-r--r--gdk-pixbuf/gdk-pixbuf-csource.c4
-rw-r--r--gdk-pixbuf/gdk-pixbuf-loader.c12
-rw-r--r--gdk-pixbuf/gdk-pixbuf.c3
-rw-r--r--gdk-pixbuf/gdk-pixdata.c3
-rw-r--r--gdk-pixbuf/io-bmp.c4
-rw-r--r--gdk-pixbuf/io-gif-animation.c18
-rw-r--r--gdk-pixbuf/io-gif.c8
-rw-r--r--gdk-pixbuf/io-ico.c4
-rw-r--r--gdk-pixbuf/io-jpeg.c2
-rw-r--r--gdk-pixbuf/io-png.c2
-rw-r--r--gdk-pixbuf/io-pnm.c8
-rw-r--r--gdk-pixbuf/io-ras.c4
-rw-r--r--gdk-pixbuf/io-tga.c26
-rw-r--r--gdk-pixbuf/io-tiff.c2
-rw-r--r--gdk-pixbuf/io-wbmp.c4
-rw-r--r--gdk-pixbuf/io-xbm.c2
-rw-r--r--gdk-pixbuf/io-xpm.c4
-rw-r--r--gdk-pixbuf/pixops/Makefile.am2
-rw-r--r--gdk-pixbuf/test-gdk-pixbuf.c4
-rw-r--r--gdk-pixbuf/test-loaders.c6
34 files changed, 144 insertions, 69 deletions
diff --git a/ChangeLog b/ChangeLog
index f4f90d4f1..3bc5cb972 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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>
* gtk/gtktreeview.c (validate_visible_area): free path
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index f4f90d4f1..3bc5cb972 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,10 @@
+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>
* gtk/gtktreeview.c (validate_visible_area): free path
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index f4f90d4f1..3bc5cb972 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,10 @@
+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>
* gtk/gtktreeview.c (validate_visible_area): free path
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index f4f90d4f1..3bc5cb972 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,10 @@
+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>
* gtk/gtktreeview.c (validate_visible_area): free path
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index f4f90d4f1..3bc5cb972 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,10 @@
+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>
* gtk/gtktreeview.c (validate_visible_area): free path
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index f4f90d4f1..3bc5cb972 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,10 @@
+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>
* gtk/gtktreeview.c (validate_visible_area): free path
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index f4f90d4f1..3bc5cb972 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,10 @@
+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>
* gtk/gtktreeview.c (validate_visible_area): free path
diff --git a/demos/testpixbuf-drawable.c b/demos/testpixbuf-drawable.c
index 7afb8658f..04114fd6b 100644
--- a/demos/testpixbuf-drawable.c
+++ b/demos/testpixbuf-drawable.c
@@ -60,7 +60,7 @@ configure_cb (GtkWidget *drawing_area, GdkEventConfigure *evt, gpointer data)
new_pixbuf = gdk_pixbuf_get_from_drawable (NULL, root, NULL,
0, 0, 0, 0, evt->width, evt->height);
g_object_set_data (G_OBJECT (drawing_area), "pixbuf", new_pixbuf);
- gdk_pixbuf_unref (pixbuf);
+ g_object_unref (pixbuf);
}
return FALSE;
diff --git a/demos/testpixbuf-save.c b/demos/testpixbuf-save.c
index 1ed689bd5..f592ffc45 100644
--- a/demos/testpixbuf-save.c
+++ b/demos/testpixbuf-save.c
@@ -205,7 +205,7 @@ configure_cb (GtkWidget *drawing_area, GdkEventConfigure *evt, gpointer data)
new_pixbuf = gdk_pixbuf_get_from_drawable (NULL, root, NULL,
0, 0, 0, 0, evt->width, evt->height);
g_object_set_data (G_OBJECT (drawing_area), "pixbuf", new_pixbuf);
- gdk_pixbuf_unref (pixbuf);
+ g_object_unref (pixbuf);
}
return FALSE;
diff --git a/demos/testpixbuf-scale.c b/demos/testpixbuf-scale.c
index 0f25487c4..2f1fe441c 100644
--- a/demos/testpixbuf-scale.c
+++ b/demos/testpixbuf-scale.c
@@ -47,7 +47,7 @@ expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data)
event->area.width, event->area.height,
GDK_RGB_DITHER_NORMAL, event->area.x, event->area.y);
- gdk_pixbuf_unref (dest);
+ g_object_unref (dest);
return TRUE;
}
diff --git a/demos/testpixbuf.c b/demos/testpixbuf.c
index f79f6c66d..d704151cf 100644
--- a/demos/testpixbuf.c
+++ b/demos/testpixbuf.c
@@ -474,7 +474,7 @@ progressive_prepared_callback (GdkPixbufLoader* loader, gpointer data)
pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
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");
diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog
index 0300a432b..3fa1ba9df 100644
--- a/gdk-pixbuf/ChangeLog
+++ b/gdk-pixbuf/ChangeLog
@@ -1,3 +1,25 @@
+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>
* gdk-pixbuf-io.c: Markup fixes.
diff --git a/gdk-pixbuf/Makefile.am b/gdk-pixbuf/Makefile.am
index 07df4d2c1..5f5247ee8 100644
--- a/gdk-pixbuf/Makefile.am
+++ b/gdk-pixbuf/Makefile.am
@@ -210,6 +210,8 @@ INCLUDES = @STRIP_BEGIN@ \
-I$(top_srcdir)/gdk-pixbuf \
-I$(top_builddir)/gdk-pixbuf \
-DGTK_VERSION=\"@GTK_VERSION@\" \
+ -DG_DISABLE_DEPRECATED \
+ -DGDK_PIXBUF_DISABLE_DEPRECATED \
@INCLUDED_LOADER_DEFINE@ \
@GTK_DEBUG_FLAGS@ \
@GDK_PIXBUF_DEP_CFLAGS@ \
diff --git a/gdk-pixbuf/gdk-pixbuf-animation.c b/gdk-pixbuf/gdk-pixbuf-animation.c
index 274813c50..4da08f976 100644
--- a/gdk-pixbuf/gdk-pixbuf-animation.c
+++ b/gdk-pixbuf/gdk-pixbuf-animation.c
@@ -211,7 +211,7 @@ gdk_pixbuf_animation_new_from_file (const char *filename,
animation = gdk_pixbuf_non_anim_new (pixbuf);
- g_object_unref (G_OBJECT (pixbuf));
+ g_object_unref (pixbuf);
} else {
fseek (f, 0, SEEK_SET);
animation = (* image_module->load_animation) (f, error);
@@ -617,7 +617,7 @@ gdk_pixbuf_non_anim_finalize (GObject *object)
GdkPixbufNonAnim *non_anim = GDK_PIXBUF_NON_ANIM (object);
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);
}
@@ -632,7 +632,7 @@ gdk_pixbuf_non_anim_new (GdkPixbuf *pixbuf)
non_anim->pixbuf = pixbuf;
if (pixbuf)
- g_object_ref (G_OBJECT (pixbuf));
+ g_object_ref (pixbuf);
return GDK_PIXBUF_ANIMATION (non_anim);
}
@@ -681,7 +681,7 @@ gdk_pixbuf_non_anim_get_iter (GdkPixbufAnimation *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);
}
@@ -750,7 +750,7 @@ gdk_pixbuf_non_anim_iter_finalize (GObject *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);
}
diff --git a/gdk-pixbuf/gdk-pixbuf-csource.c b/gdk-pixbuf/gdk-pixbuf-csource.c
index ea56798b4..0c853200c 100644
--- a/gdk-pixbuf/gdk-pixbuf-csource.c
+++ b/gdk-pixbuf/gdk-pixbuf-csource.c
@@ -101,7 +101,7 @@ main (int argc,
}
print_csource (stdout, pixbuf);
- gdk_pixbuf_unref (pixbuf);
+ g_object_unref (pixbuf);
}
else /* parse name, file pairs */
{
@@ -125,7 +125,7 @@ main (int argc,
return 1;
}
print_csource (stdout, pixbuf);
- gdk_pixbuf_unref (pixbuf);
+ g_object_unref (pixbuf);
p++;
}
toggle = !toggle;
diff --git a/gdk-pixbuf/gdk-pixbuf-loader.c b/gdk-pixbuf/gdk-pixbuf-loader.c
index f3eb4629a..66372dab9 100644
--- a/gdk-pixbuf/gdk-pixbuf-loader.c
+++ b/gdk-pixbuf/gdk-pixbuf-loader.c
@@ -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.");
if (priv->animation)
- gdk_pixbuf_animation_unref (priv->animation);
+ g_object_unref (priv->animation);
g_free (priv);
@@ -180,13 +180,13 @@ gdk_pixbuf_loader_prepare (GdkPixbuf *pixbuf,
priv = GDK_PIXBUF_LOADER (loader)->priv;
if (anim)
- g_object_ref (G_OBJECT (anim));
+ g_object_ref (anim);
else
anim = gdk_pixbuf_non_anim_new (pixbuf);
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
@@ -201,7 +201,7 @@ gdk_pixbuf_loader_update (GdkPixbuf *pixbuf,
priv = GDK_PIXBUF_LOADER (loader)->priv;
- g_signal_emit (G_OBJECT (loader),
+ g_signal_emit (loader,
pixbuf_loader_signals[AREA_UPDATED],
0,
x, y,
@@ -424,7 +424,7 @@ gdk_pixbuf_loader_new_with_type (const char *image_type,
if (tmp != NULL)
{
g_propagate_error (error, tmp);
- g_object_unref (G_OBJECT (retval));
+ g_object_unref (retval);
return NULL;
}
@@ -541,7 +541,7 @@ gdk_pixbuf_loader_close (GdkPixbufLoader *loader,
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;
}
diff --git a/gdk-pixbuf/gdk-pixbuf.c b/gdk-pixbuf/gdk-pixbuf.c
index 17df45fc7..bc8395ce7 100644
--- a/gdk-pixbuf/gdk-pixbuf.c
+++ b/gdk-pixbuf/gdk-pixbuf.c
@@ -83,6 +83,7 @@ gdk_pixbuf_finalize (GObject *object)
G_OBJECT_CLASS (parent_class)->finalize (object);
}
+
/**
* gdk_pixbuf_ref:
@@ -248,7 +249,7 @@ gdk_pixbuf_new_subpixbuf (GdkPixbuf *src_pixbuf,
NULL, NULL);
/* 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_quark_from_static_string ("gdk-pixbuf-subpixbuf-src"),
diff --git a/gdk-pixbuf/gdk-pixdata.c b/gdk-pixbuf/gdk-pixdata.c
index 3c61497e9..c2b87e840 100644
--- a/gdk-pixbuf/gdk-pixdata.c
+++ b/gdk-pixbuf/gdk-pixdata.c
@@ -625,8 +625,7 @@ gdk_pixdata_to_csource (GdkPixdata *pixdata,
height = pixdata->height;
rowstride = pixdata->rowstride;
rle_encoded = (pixdata->pixdata_type & GDK_PIXDATA_ENCODING_RLE) > 0;
- macro_name = g_strdup (name);
- g_strup (macro_name);
+ macro_name = g_ascii_strup (name, -1);
cdata.dump_macros = (dump_type & GDK_PIXDATA_DUMP_MACROS) > 0;
cdata.dump_struct = (dump_type & GDK_PIXDATA_DUMP_PIXDATA_STRUCT) > 0;
diff --git a/gdk-pixbuf/io-bmp.c b/gdk-pixbuf/io-bmp.c
index 225cbde34..4285b5ac5 100644
--- a/gdk-pixbuf/io-bmp.c
+++ b/gdk-pixbuf/io-bmp.c
@@ -225,7 +225,7 @@ static GdkPixbuf *gdk_pixbuf__bmp_image_load(FILE * f, GError **error)
}
if (State->pixbuf != NULL)
- gdk_pixbuf_ref(State->pixbuf);
+ g_object_ref(State->pixbuf);
pb = State->pixbuf;
@@ -516,7 +516,7 @@ static gboolean gdk_pixbuf__bmp_image_stop_load(gpointer data, GError **error)
g_free(context->Colormap);
if (context->pixbuf)
- gdk_pixbuf_unref(context->pixbuf);
+ g_object_unref(context->pixbuf);
g_free(context->buff);
g_free(context);
diff --git a/gdk-pixbuf/io-gif-animation.c b/gdk-pixbuf/io-gif-animation.c
index d334cc421..0a3ce6b70 100644
--- a/gdk-pixbuf/io-gif-animation.c
+++ b/gdk-pixbuf/io-gif-animation.c
@@ -97,11 +97,11 @@ gdk_pixbuf_gif_anim_finalize (GObject *object)
for (l = gif_anim->frames; l; l = l->next) {
frame = l->data;
- gdk_pixbuf_unref (frame->pixbuf);
+ g_object_unref (frame->pixbuf);
if (frame->composited)
- gdk_pixbuf_unref (frame->composited);
+ g_object_unref (frame->composited);
if (frame->revert)
- gdk_pixbuf_unref (frame->revert);
+ g_object_unref (frame->revert);
g_free (frame);
}
@@ -175,7 +175,7 @@ gdk_pixbuf_gif_anim_get_iter (GdkPixbufAnimation *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);
@@ -250,7 +250,7 @@ gdk_pixbuf_gif_anim_iter_finalize (GObject *object)
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);
}
@@ -356,7 +356,7 @@ gdk_pixbuf_gif_anim_frame_composite (GdkPixbufGifAnim *gif_anim,
if (f->need_recomposite) {
if (f->composited) {
- g_object_unref (G_OBJECT (f->composited));
+ g_object_unref (f->composited);
f->composited = NULL;
}
}
@@ -376,7 +376,7 @@ gdk_pixbuf_gif_anim_frame_composite (GdkPixbufGifAnim *gif_anim,
if (f->need_recomposite) {
if (f->composited) {
- g_object_unref (G_OBJECT (f->composited));
+ g_object_unref (f->composited);
f->composited = NULL;
}
}
@@ -457,7 +457,7 @@ gdk_pixbuf_gif_anim_frame_composite (GdkPixbufGifAnim *gif_anim,
(gif_anim->bg_blue << 8) |
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) {
f->composited = gdk_pixbuf_copy (prev_frame->composited);
@@ -487,7 +487,7 @@ gdk_pixbuf_gif_anim_frame_composite (GdkPixbufGifAnim *gif_anim,
f->revert = gdk_pixbuf_copy (area);
- g_object_unref (G_OBJECT (area));
+ g_object_unref (area);
}
/* Put current frame onto f->composited */
diff --git a/gdk-pixbuf/io-gif.c b/gdk-pixbuf/io-gif.c
index 62cea01d2..c6bb34ecc 100644
--- a/gdk-pixbuf/io-gif.c
+++ b/gdk-pixbuf/io-gif.c
@@ -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));
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);
@@ -1417,7 +1417,7 @@ gdk_pixbuf__gif_image_stop_load (gpointer data, GError **error)
retval = FALSE;
}
- g_object_unref (G_OBJECT (context->animation));
+ g_object_unref (context->animation);
g_free (context->buf);
g_free (context);
@@ -1518,7 +1518,7 @@ gdk_pixbuf__gif_image_load_animation (FILE *file,
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
_("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;
}
diff --git a/gdk-pixbuf/io-ico.c b/gdk-pixbuf/io-ico.c
index 364fcd9df..4e871fb9d 100644
--- a/gdk-pixbuf/io-ico.c
+++ b/gdk-pixbuf/io-ico.c
@@ -174,7 +174,7 @@ context_free (struct ico_progressive_state *context)
g_free (context->HeaderBuf);
if (context->pixbuf)
- gdk_pixbuf_unref (context->pixbuf);
+ g_object_unref (context->pixbuf);
g_free (context);
}
@@ -213,7 +213,7 @@ gdk_pixbuf__ico_image_load(FILE * f, GError **error)
}
}
if (State->pixbuf != NULL)
- gdk_pixbuf_ref (State->pixbuf);
+ g_object_ref (State->pixbuf);
else {
g_set_error (error,
GDK_PIXBUF_ERROR,
diff --git a/gdk-pixbuf/io-jpeg.c b/gdk-pixbuf/io-jpeg.c
index ec054dd2c..0cc66cdbf 100644
--- a/gdk-pixbuf/io-jpeg.c
+++ b/gdk-pixbuf/io-jpeg.c
@@ -385,7 +385,7 @@ gdk_pixbuf__jpeg_image_stop_load (gpointer data, GError **error)
*/
if (context->pixbuf)
- gdk_pixbuf_unref (context->pixbuf);
+ g_object_unref (context->pixbuf);
/* if we have an error? */
if (sigsetjmp (context->jerr.setjmp_buffer, 1)) {
diff --git a/gdk-pixbuf/io-png.c b/gdk-pixbuf/io-png.c
index 8d102d94a..d4cd96228 100644
--- a/gdk-pixbuf/io-png.c
+++ b/gdk-pixbuf/io-png.c
@@ -454,7 +454,7 @@ gdk_pixbuf__png_image_stop_load (gpointer context, GError **error)
*/
if (lc->pixbuf)
- gdk_pixbuf_unref (lc->pixbuf);
+ g_object_unref (lc->pixbuf);
png_destroy_read_struct(&lc->png_read_ptr, NULL, NULL);
g_free(lc);
diff --git a/gdk-pixbuf/io-pnm.c b/gdk-pixbuf/io-pnm.c
index 455bd2f78..bb188eedf 100644
--- a/gdk-pixbuf/io-pnm.c
+++ b/gdk-pixbuf/io-pnm.c
@@ -709,7 +709,7 @@ gdk_pixbuf__pnm_image_load (FILE *f, GError **error)
if (nbytes == 0) {
/* we ran out of data? */
if (context.pixbuf)
- gdk_pixbuf_unref (context.pixbuf);
+ g_object_unref (context.pixbuf);
g_set_error (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
@@ -785,7 +785,7 @@ gdk_pixbuf__pnm_image_load (FILE *f, GError **error)
break;
} else if (retval == PNM_FATAL_ERR) {
if (context.pixbuf)
- gdk_pixbuf_unref (context.pixbuf);
+ g_object_unref (context.pixbuf);
return NULL;
}
@@ -860,7 +860,7 @@ gdk_pixbuf__pnm_image_stop_load (gpointer data,
g_return_val_if_fail (context != NULL, TRUE);
if (context->pixbuf)
- gdk_pixbuf_unref (context->pixbuf);
+ g_object_unref (context->pixbuf);
#if 0
/* We should ignore trailing newlines and we can't
@@ -1014,7 +1014,7 @@ gdk_pixbuf__pnm_image_load_increment (gpointer data,
break;
} else if (retval == PNM_FATAL_ERR) {
if (context->pixbuf)
- gdk_pixbuf_unref (context->pixbuf);
+ g_object_unref (context->pixbuf);
return FALSE;
} else if (retval == PNM_OK) {
/* send updated signal */
diff --git a/gdk-pixbuf/io-ras.c b/gdk-pixbuf/io-ras.c
index 84b7c27f9..ad692428b 100644
--- a/gdk-pixbuf/io-ras.c
+++ b/gdk-pixbuf/io-ras.c
@@ -130,7 +130,7 @@ static GdkPixbuf *gdk_pixbuf__ras_image_load(FILE * f, GError **error)
}
g_free(membuf);
if (State->pixbuf != NULL)
- gdk_pixbuf_ref(State->pixbuf);
+ g_object_ref(State->pixbuf);
pb = State->pixbuf;
@@ -271,7 +271,7 @@ gdk_pixbuf__ras_image_stop_load(gpointer data, GError **error)
g_free(context->HeaderBuf);
if (context->pixbuf)
- gdk_pixbuf_unref(context->pixbuf);
+ g_object_unref(context->pixbuf);
g_free(context);
diff --git a/gdk-pixbuf/io-tga.c b/gdk-pixbuf/io-tga.c
index f48f1276e..d8dd9c78d 100644
--- a/gdk-pixbuf/io-tga.c
+++ b/gdk-pixbuf/io-tga.c
@@ -752,7 +752,7 @@ static gboolean gdk_pixbuf__tga_stop_load(gpointer data, GError **err)
g_free(ctx->hdr);
if (ctx->cmap)
g_free(ctx->cmap);
- gdk_pixbuf_unref(ctx->pbuf);
+ g_object_unref(ctx->pbuf);
if (ctx->in->size)
ctx->in = io_buffer_free_segment(ctx->in, ctx->in->size, err);
if (!ctx->in) {
@@ -905,14 +905,14 @@ static GdkPixbuf *get_image_pseudocolor(FILE *f, TGAHeader *hdr,
n = count = 0;
for (; n < pbuf->width * pbuf->height;) {
if (!fread_check(&tag, 1, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
if (tag & 0x80) {
count = (tag & 0x7f) + 1;
n += count;
if (!fread_check(&color, 1, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
for (; count; count--) {
@@ -927,7 +927,7 @@ static GdkPixbuf *get_image_pseudocolor(FILE *f, TGAHeader *hdr,
n += count;
for (; count; count--) {
if (!fread_check(&color, 1, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
*p++ = cmap->cols[color].r;
@@ -941,7 +941,7 @@ static GdkPixbuf *get_image_pseudocolor(FILE *f, TGAHeader *hdr,
} else {
for (n = 0; n < pbuf->width * pbuf->height; n++) {
if (!fread_check(&color, 1, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
*p++ = cmap->cols[color].r;
@@ -1001,14 +1001,14 @@ static GdkPixbuf *get_image_truecolor(FILE *f, TGAHeader *hdr,
n = count = 0;
for (; n < pbuf->width * pbuf->height;) {
if (!fread_check(&tag, 1, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
if (tag & 0x80) {
count = (tag & 0x7f) + 1;
n += count;
if (!fread_check(&pixel, pbuf->n_channels, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
for (; count; count--) {
@@ -1019,7 +1019,7 @@ static GdkPixbuf *get_image_truecolor(FILE *f, TGAHeader *hdr,
count = tag + 1;
n += count;
if (!fread_check(p, pbuf->n_channels * count, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
p += pbuf->n_channels * count;
@@ -1027,7 +1027,7 @@ static GdkPixbuf *get_image_truecolor(FILE *f, TGAHeader *hdr,
}
} else {
if (!fread_check(p, pbuf->rowstride * pbuf->height, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
}
@@ -1067,14 +1067,14 @@ static GdkPixbuf *get_image_grayscale(FILE *f, TGAHeader *hdr,
n = count = 0;
for (; n < pbuf->width * pbuf->height;) {
if (!fread_check(&tag, 1, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
if (tag & 0x80) {
count = (tag & 0x7f) + 1;
n += count;
if (!fread_check(&color, 1, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
for (; count; count--) {
@@ -1086,7 +1086,7 @@ static GdkPixbuf *get_image_grayscale(FILE *f, TGAHeader *hdr,
n += count;
for (; count; count--) {
if (!fread_check(&color, 1, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
p[0] = p[1] = p[2] = color;
@@ -1097,7 +1097,7 @@ static GdkPixbuf *get_image_grayscale(FILE *f, TGAHeader *hdr,
} else {
for (n = 0; n < pbuf->width * pbuf->height; n++) {
if (!fread_check(&color, 1, 1, f, err)) {
- gdk_pixbuf_unref(pbuf);
+ g_object_unref(pbuf);
return NULL;
}
p[0] = p[1] = p[2] = color;
diff --git a/gdk-pixbuf/io-tiff.c b/gdk-pixbuf/io-tiff.c
index 874a8a73d..d0de10637 100644
--- a/gdk-pixbuf/io-tiff.c
+++ b/gdk-pixbuf/io-tiff.c
@@ -420,7 +420,7 @@ gdk_pixbuf__tiff_image_stop_load (gpointer data,
pixbuf = tiff_image_parse (tiff, context, error);
if (pixbuf)
- g_object_unref (G_OBJECT (pixbuf));
+ g_object_unref (pixbuf);
retval = pixbuf != NULL;
TIFFClose (tiff);
if (global_error)
diff --git a/gdk-pixbuf/io-wbmp.c b/gdk-pixbuf/io-wbmp.c
index c495b21cb..d483e360c 100644
--- a/gdk-pixbuf/io-wbmp.c
+++ b/gdk-pixbuf/io-wbmp.c
@@ -101,7 +101,7 @@ static GdkPixbuf *gdk_pixbuf__wbmp_image_load(FILE * f, GError **error)
}
if (State->pixbuf != NULL)
- gdk_pixbuf_ref(State->pixbuf);
+ g_object_ref(State->pixbuf);
pb = State->pixbuf;
@@ -152,7 +152,7 @@ static gboolean gdk_pixbuf__wbmp_image_stop_load(gpointer data,
g_return_val_if_fail(context != NULL, TRUE);
if (context->pixbuf)
- gdk_pixbuf_unref(context->pixbuf);
+ g_object_unref(context->pixbuf);
g_free(context);
diff --git a/gdk-pixbuf/io-xbm.c b/gdk-pixbuf/io-xbm.c
index 62413a1a9..c5589bc97 100644
--- a/gdk-pixbuf/io-xbm.c
+++ b/gdk-pixbuf/io-xbm.c
@@ -327,7 +327,7 @@ gdk_pixbuf__xbm_image_load_real (FILE *f, XBMData *context, GError **error)
if (context) {
(* context->update_func) (pixbuf, 0, 0, w, h, context->user_data);
- gdk_pixbuf_unref (pixbuf);
+ g_object_unref (pixbuf);
pixbuf = NULL;
}
diff --git a/gdk-pixbuf/io-xpm.c b/gdk-pixbuf/io-xpm.c
index 3efb4324a..5328e75cd 100644
--- a/gdk-pixbuf/io-xpm.c
+++ b/gdk-pixbuf/io-xpm.c
@@ -1297,7 +1297,7 @@ pixbuf_create_from_xpm (const gchar * (*get_buf) (enum buf_op op, gpointer handl
color_name = xpm_extract_color (buffer);
- if ((color_name == NULL) || (g_strcasecmp (color_name, "None") == 0)
+ if ((color_name == NULL) || (g_ascii_strcasecmp (color_name, "None") == 0)
|| (parse_color (color_name, color) == FALSE)) {
color->transparent = TRUE;
color->red = 0;
@@ -1476,7 +1476,7 @@ gdk_pixbuf__xpm_image_stop_load (gpointer data,
NULL,
context->user_data);
(* context->update_func) (pixbuf, 0, 0, pixbuf->width, pixbuf->height, context->user_data);
- gdk_pixbuf_unref (pixbuf);
+ g_object_unref (pixbuf);
retval = TRUE;
}
diff --git a/gdk-pixbuf/pixops/Makefile.am b/gdk-pixbuf/pixops/Makefile.am
index a1df47711..13cf33efe 100644
--- a/gdk-pixbuf/pixops/Makefile.am
+++ b/gdk-pixbuf/pixops/Makefile.am
@@ -4,6 +4,8 @@ INCLUDES = @STRIP_BEGIN@ \
-I$(top_srcdir) -I$(top_builddir) \
@GTK_DEBUG_FLAGS@ \
@GDK_PIXBUF_DEP_CFLAGS@ \
+ -DG_DISABLE_DEPRECATED \
+ -DGDK_PIXBUF_DISABLE_DEPRECATED \
@STRIP_END@
noinst_PROGRAMS = timescale
diff --git a/gdk-pixbuf/test-gdk-pixbuf.c b/gdk-pixbuf/test-gdk-pixbuf.c
index 5b52128b7..0732ee8cb 100644
--- a/gdk-pixbuf/test-gdk-pixbuf.c
+++ b/gdk-pixbuf/test-gdk-pixbuf.c
@@ -99,8 +99,8 @@ simple_composite_test_one (GdkInterpType type,
+ 16 * gdk_pixbuf_get_n_channels (destination_pixbuf),
destination_alpha);
- gdk_pixbuf_unref (source_pixbuf);
- gdk_pixbuf_unref (destination_pixbuf);
+ g_object_unref (source_pixbuf);
+ g_object_unref (destination_pixbuf);
if (result_pixel != expected_result) {
char *interpolation_type, *source_string, *destination_string, *result_string, *expected_string;
diff --git a/gdk-pixbuf/test-loaders.c b/gdk-pixbuf/test-loaders.c
index f34e22d43..95c4a6ec0 100644
--- a/gdk-pixbuf/test-loaders.c
+++ b/gdk-pixbuf/test-loaders.c
@@ -155,7 +155,7 @@ test_loader (const guchar *bytes, gsize len, gboolean data_is_ok)
err = NULL;
did_fail = TRUE;
}
- g_object_unref (G_OBJECT (loader));
+ g_object_unref (loader);
if (data_is_ok == did_fail)
return FALSE;
@@ -192,7 +192,7 @@ mem_test (const guchar *bytes, gsize len)
} while (!did_fail);
for (i = loaders; i != NULL; i = i->next)
- g_object_unref (G_OBJECT (i->data));
+ g_object_unref (i->data);
g_list_free (loaders);
}
@@ -249,7 +249,7 @@ assault (const gchar *header, gsize header_size,
err = NULL;
}
- g_object_unref (G_OBJECT (loader));
+ g_object_unref (loader);
}
}