diff options
author | Benjamin Otte <otte@redhat.com> | 2010-10-15 18:16:11 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-10-30 01:50:01 +0800 |
commit | f284383f6986fe03332296c4114614c0728829d3 (patch) | |
tree | a81b84410288010927a557a61fb2ca69a18ef049 /libgnomecanvas | |
parent | a13b6c8068cfa1cccd66f4eec44f72cc27695786 (diff) | |
download | gsoc2013-evolution-f284383f6986fe03332296c4114614c0728829d3.tar gsoc2013-evolution-f284383f6986fe03332296c4114614c0728829d3.tar.gz gsoc2013-evolution-f284383f6986fe03332296c4114614c0728829d3.tar.bz2 gsoc2013-evolution-f284383f6986fe03332296c4114614c0728829d3.tar.lz gsoc2013-evolution-f284383f6986fe03332296c4114614c0728829d3.tar.xz gsoc2013-evolution-f284383f6986fe03332296c4114614c0728829d3.tar.zst gsoc2013-evolution-f284383f6986fe03332296c4114614c0728829d3.zip |
gnome-canvas: Fix refcounting for GnomeCanvasPixbuf
Diffstat (limited to 'libgnomecanvas')
-rw-r--r-- | libgnomecanvas/gnome-canvas-pixbuf.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/libgnomecanvas/gnome-canvas-pixbuf.c b/libgnomecanvas/gnome-canvas-pixbuf.c index 822630f748..2d5197ae53 100644 --- a/libgnomecanvas/gnome-canvas-pixbuf.c +++ b/libgnomecanvas/gnome-canvas-pixbuf.c @@ -256,9 +256,6 @@ gnome_canvas_pixbuf_destroy (GnomeCanvasItem *object) /* remember, destroy can be run multiple times! */ if (priv) { - gnome_canvas_request_redraw ( - item->canvas, item->x1, item->y1, item->x2, item->y2); - if (priv->pixbuf) g_object_unref (priv->pixbuf); @@ -294,27 +291,12 @@ gnome_canvas_pixbuf_set_property (GObject *object, switch (param_id) { case PROP_PIXBUF: - if (g_value_get_object (value)) - pixbuf = GDK_PIXBUF (g_value_get_object (value)); - else - pixbuf = NULL; + pixbuf = g_value_get_object (value); if (pixbuf != priv->pixbuf) { - if (pixbuf) { - g_return_if_fail - (gdk_pixbuf_get_colorspace (pixbuf) == GDK_COLORSPACE_RGB); - g_return_if_fail - (gdk_pixbuf_get_n_channels (pixbuf) == 3 - || gdk_pixbuf_get_n_channels (pixbuf) == 4); - g_return_if_fail - (gdk_pixbuf_get_bits_per_sample (pixbuf) == 8); - - g_object_ref (pixbuf); - } - if (priv->pixbuf) g_object_unref (priv->pixbuf); - priv->pixbuf = pixbuf; + priv->pixbuf = g_object_ref (pixbuf); } gnome_canvas_item_request_update (item); @@ -398,7 +380,7 @@ gnome_canvas_pixbuf_get_property (GObject *object, switch (param_id) { case PROP_PIXBUF: - g_value_set_object (value, G_OBJECT (priv->pixbuf)); + g_value_set_object (value, priv->pixbuf); break; case PROP_WIDTH: |