[gcompris] Added ifdefs to compile with gdkpixbuf > 2.24



commit 9899b2264c72813dbc19b7a45d3d93a2261f7869
Author: Hans de Goede <hdegoede redhat com>
Date:   Mon Jan 2 21:33:33 2012 +0100

    Added ifdefs to compile with gdkpixbuf > 2.24

 .../algebra_guesscount.c                           |    7 +++
 src/awele-activity/awele.c                         |   10 ++++
 src/babymatch-activity/shapegame.c                 |   32 +++++++++++-
 src/boards/menu2.c                                 |   12 ++++
 src/boards/py-mod-skin.c                           |    4 ++
 src/boards/py-mod-utils.c                          |    4 ++
 src/chess_computer-activity/chess.c                |    4 ++
 src/clickgame-activity/clickgame.c                 |    5 ++
 src/crane-activity/crane.c                         |   12 ++++
 src/enumerate-activity/enumerate.c                 |   12 ++++
 src/erase-activity/erase.c                         |    4 ++
 src/fifteen-activity/fifteen.c                     |    4 ++
 src/gcompris/about.c                               |    4 ++
 src/gcompris/bonus.c                               |    4 ++
 src/gcompris/gameutil.c                            |    4 ++
 src/gcompris/gcompris.c                            |   12 ++++
 src/gcompris/images_selector.c                     |    8 +++
 src/gcompris/timer.c                               |   16 ++++++
 src/hanoi_real-activity/hanoi_real.c               |    8 +++
 src/imageid-activity/imageid.c                     |    4 ++
 src/leftright-activity/leftright.c                 |    4 ++
 src/magic_hat_minus-activity/magic_hat.c           |    8 +++
 src/maze-activity/maze.c                           |    8 +++
 src/memory-activity/memory.c                       |   20 +++++++
 src/missing_letter-activity/missingletter.c        |   16 ++++++
 src/money-activity/money.c                         |    4 ++
 src/photohunter-activity/photohunter.c             |    7 ++-
 src/railroad-activity/railroad.c                   |    8 +++
 src/reversecount-activity/reversecount.c           |   16 ++++++
 src/scalesboard-activity/scale.c                   |   29 ++++++++++
 src/submarine-activity/submarine.c                 |   56 ++++++++++++++++++++
 src/tangram-activity/gtans_interface.c             |   10 ++++
 src/wordprocessor-activity/wordprocessor.c         |    8 +++
 33 files changed, 362 insertions(+), 2 deletions(-)
---
diff --git a/src/algebra_guesscount-activity/algebra_guesscount.c b/src/algebra_guesscount-activity/algebra_guesscount.c
index a5fe7de..dc0dcdc 100644
--- a/src/algebra_guesscount-activity/algebra_guesscount.c
+++ b/src/algebra_guesscount-activity/algebra_guesscount.c
@@ -684,8 +684,15 @@ static gboolean item_event_num (GooCanvasItem  *item,
 static void destroy_board() {
   int i;
 
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   for (i=0; i<NUM_VALUES; i++)
     gdk_pixbuf_unref(num_pixmap[i]);
   for (i=0; i<5; i++)
     gdk_pixbuf_unref(oper_pixmap[i]);
+#else
+  for (i=0; i<NUM_VALUES; i++)
+    g_object_unref(num_pixmap[i]);
+  for (i=0; i<5; i++)
+    g_object_unref(oper_pixmap[i]);
+#endif
 }
diff --git a/src/awele-activity/awele.c b/src/awele-activity/awele.c
index 6775673..33c0d3d 100644
--- a/src/awele-activity/awele.c
+++ b/src/awele-activity/awele.c
@@ -297,9 +297,15 @@ awele_destroy_all_items ()
     {
       for (i = 0; i < NBHOLE / 2; i++)
 	{
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
 	  gdk_pixbuf_unref(graphsElt->pixbufButton[i]);
 	  gdk_pixbuf_unref(graphsElt->pixbufButtonNotify[i]);
 	  gdk_pixbuf_unref(graphsElt->pixbufButtonClicked[i]);
+#else
+	  g_object_unref(graphsElt->pixbufButton[i]);
+	  g_object_unref(graphsElt->pixbufButtonNotify[i]);
+	  g_object_unref(graphsElt->pixbufButtonClicked[i]);
+#endif
 	}
       g_free(graphsElt);
       graphsElt = NULL;
@@ -335,7 +341,11 @@ awele_create_item (GooCanvasItem * parent)
 			0,
 			OFFSET_Y,
 			NULL);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
 
   /*
    * Display text
diff --git a/src/babymatch-activity/shapegame.c b/src/babymatch-activity/shapegame.c
index a30c282..1892cdc 100644
--- a/src/babymatch-activity/shapegame.c
+++ b/src/babymatch-activity/shapegame.c
@@ -493,8 +493,13 @@ static void destroy_shape (Shape *shape)
   g_free(shape->targetfile);
   g_free(shape->soundfile);
   g_free(shape->tooltip);
-  if(shape->pixmap)
+  if(shape->pixmap) {
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
     gdk_pixbuf_unref(shape->pixmap);
+#else
+    g_object_unref(shape->pixmap);
+#endif
+  }
   g_free(shape);
 }
 
@@ -758,7 +763,11 @@ add_shape_to_list_of_shapes(Shape *shape)
 		  GdkPixbuf *scale, *hand;
 
 		  scale = gdk_pixbuf_scale_simple(pixmap, w, h, GDK_INTERP_BILINEAR);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
 		  gdk_pixbuf_unref(pixmap);
+#else
+		  g_object_unref(pixmap);
+#endif
 
 		  pixmap = gdk_pixbuf_new( GDK_COLORSPACE_RGB, TRUE, 8,
 					   ICON_WIDTH, ICON_HEIGHT);
@@ -766,7 +775,11 @@ add_shape_to_list_of_shapes(Shape *shape)
 		  // add the shape
 		  gdk_pixbuf_copy_area( scale, 0, 0, w, h,
 					pixmap, (ICON_WIDTH-w )/2, (ICON_HEIGHT-h)/2 );
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
 		  gdk_pixbuf_unref(scale);
+#else
+		  g_object_unref(scale);
+#endif
 
 		  // add the hand
 		  hand = gc_pixmap_load("shapegame/hand.svg");
@@ -775,8 +788,13 @@ add_shape_to_list_of_shapes(Shape *shape)
 		  scale = gdk_pixbuf_scale_simple(hand, w, h, GDK_INTERP_BILINEAR);
 		  gdk_pixbuf_copy_area(scale, 0, 0, w, h,
 				       pixmap, ICON_WIDTH-w,0);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
 		  gdk_pixbuf_unref(hand);
 		  gdk_pixbuf_unref(scale);
+#else
+		  g_object_unref(hand);
+		  g_object_unref(scale);
+#endif
 
 		  w = ICON_WIDTH;
 		  h = ICON_HEIGHT;
@@ -793,7 +811,11 @@ add_shape_to_list_of_shapes(Shape *shape)
 					y_offset - h/2);
 	      goo_canvas_item_scale(item, z, z);
 	      g_object_set_data(G_OBJECT(item), "z", GINT_TO_POINTER((int)(z * 1000)));
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
 	      gdk_pixbuf_unref(pixmap);
+#else
+	      g_object_unref(pixmap);
+#endif
 
 	      icon_shape = create_shape(SHAPE_ICON, shape->name, shape->tooltip,
 					shape->pixmapfile, shape->targetfile,
@@ -1012,7 +1034,11 @@ item_event_drag(GooCanvasItem *item,
 		       GOO_CANVAS_ITEM_INVISIBLE, NULL);
 	  g_object_set(shadow_item, "pointer-events",
 		       GOO_CANVAS_EVENTS_NONE, NULL);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
 	  gdk_pixbuf_unref(dest);
+#else
+	  g_object_unref(dest);
+#endif
 	}
       dragged = shape->item;
       gc_drag_item_move(event, NULL);
@@ -1421,7 +1447,11 @@ add_shape_to_canvas(Shape *shape)
 				    shape->zoomx, shape->zoomy);
 
 	      shape->targetitem = item;
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
 	      gdk_pixbuf_unref(targetpixmap);
+#else
+	      g_object_unref(targetpixmap);
+#endif
 	    }
 	  // An empty targetfile means no target and no point
 	}
diff --git a/src/boards/menu2.c b/src/boards/menu2.c
index 453a0d5..d19fb25 100644
--- a/src/boards/menu2.c
+++ b/src/boards/menu2.c
@@ -338,7 +338,11 @@ create_panel(GooCanvasItem *parent)
 				   y,
 				   NULL);
 
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
       gdk_pixbuf_unref(pixmap);
+#else
+      g_object_unref(pixmap);
+#endif
 
       y += int_y + icon_size_panel;
 
@@ -556,7 +560,11 @@ static void menu_create_item(GooCanvasItem *parent, MenuItems *menuitems, Gcompr
     }
 
 
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(menu_pixmap);
+#else
+  g_object_unref(menu_pixmap);
+#endif
 
   // display menu icon ========================== END
 
@@ -833,7 +841,11 @@ create_top(GooCanvasItem *parent, gchar *path)
 				current_top_x,
 				current_top_y);
       goo_canvas_item_scale(item, ratio, ratio);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
       gdk_pixbuf_unref(pixmap);
+#else
+      g_object_unref(pixmap);
+#endif
 
       current_top_x += top_int_x + icon_size_top;
 
diff --git a/src/boards/py-mod-skin.c b/src/boards/py-mod-skin.c
index 18eb6eb..541b48c 100644
--- a/src/boards/py-mod-skin.c
+++ b/src/boards/py-mod-skin.c
@@ -69,7 +69,11 @@ py_gc_skin_pixmap_load(PyObject* self, PyObject* args)
   /* Create and return the result */
   pyresult = (PyObject*) pygobject_new((GObject*) result);
 
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(result);
+#else
+  g_object_unref(result);
+#endif
 
   return(pyresult);
 }
diff --git a/src/boards/py-mod-utils.c b/src/boards/py-mod-utils.c
index 529cb79..888c275 100644
--- a/src/boards/py-mod-utils.c
+++ b/src/boards/py-mod-utils.c
@@ -47,7 +47,11 @@ py_gc_pixmap_load(PyObject* self, PyObject* args)
   /* Create and return the result */
   pyresult = (PyObject*) pygobject_new((GObject*) result);
 
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(result);
+#else
+  g_object_unref(result);
+#endif
 
   return(pyresult);
 
diff --git a/src/chess_computer-activity/chess.c b/src/chess_computer-activity/chess.c
index c7f987e..7a3e4fa 100644
--- a/src/chess_computer-activity/chess.c
+++ b/src/chess_computer-activity/chess.c
@@ -599,7 +599,11 @@ chess_create_item(GooCanvasItem *parent)
 	      g_signal_connect(item, "button_press_event",
 			       (GCallback) item_event_black, NULL);
 
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
 	    gdk_pixbuf_unref(pixmap);
+#else
+	    g_object_unref(pixmap);
+#endif
 	  }
       }
   }
diff --git a/src/clickgame-activity/clickgame.c b/src/clickgame-activity/clickgame.c
index d536d69..d804717 100644
--- a/src/clickgame-activity/clickgame.c
+++ b/src/clickgame-activity/clickgame.c
@@ -739,8 +739,13 @@ clickgame_create_item()
 				  y,
 				  NULL);
       goo_canvas_item_scale(rev, imageZoom, imageZoom);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
       gdk_pixbuf_unref(pixmap);
       gdk_pixbuf_unref(pixmap2);
+#else
+      g_object_unref(pixmap);
+      g_object_unref(pixmap2);
+#endif
 
       fishitem->fwd_frames = g_slist_prepend (fishitem->fwd_frames, fwd);
       fishitem->rev_frames = g_slist_prepend (fishitem->rev_frames, rev);
diff --git a/src/crane-activity/crane.c b/src/crane-activity/crane.c
index 1bc8b66..4526e58 100644
--- a/src/crane-activity/crane.c
+++ b/src/crane-activity/crane.c
@@ -535,7 +535,11 @@ static void draw_arrow() {
   	g_signal_connect(item_arrow, "button_press_event",
 			 (GCallback) arrow_event, GINT_TO_POINTER(i));
 	gc_item_focus_init(item_arrow, NULL);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
 	gdk_pixbuf_unref( arrow[i].pixmap);
+#else
+	g_object_unref( arrow[i].pixmap);
+#endif
 
   }
 
@@ -570,7 +574,11 @@ static void draw_redhands() {
 				    "height", (double) (CRANE_FRAME_IMAGE_SIZE + 5),
 				    NULL);
 
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
 
   g_object_set (red_hands,
 		"visibility", GOO_CANVAS_ITEM_INVISIBLE,
@@ -646,7 +654,11 @@ static void place_item(int x, int y, int active) {
 					   (x + 5 + ((i % CRANE_FRAME_COLUMN) * CRANE_FRAME_CELL)),
 					   (y + 5 + (floor(i / CRANE_FRAME_COLUMN) * CRANE_FRAME_CELL)),
 					   NULL);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
 	gdk_pixbuf_unref( pixmap);
+#else
+	g_object_unref( pixmap);
+#endif
 
 	if (active)
 	  {
diff --git a/src/enumerate-activity/enumerate.c b/src/enumerate-activity/enumerate.c
index a40505d..1e6edf8 100644
--- a/src/enumerate-activity/enumerate.c
+++ b/src/enumerate-activity/enumerate.c
@@ -438,7 +438,11 @@ static GooCanvasItem *enumerate_create_item(GooCanvasItem *parent)
       g_signal_connect(item, "button-press-event",
 		       (GCallback) item_event_focus, GINT_TO_POINTER(i));
 
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
       gdk_pixbuf_unref(pixmap_answer);
+#else
+      g_object_unref(pixmap_answer);
+#endif
 
       pixmap_answer = gc_pixmap_load("enumerate/enumerate_answer.png");
 
@@ -449,7 +453,11 @@ static GooCanvasItem *enumerate_create_item(GooCanvasItem *parent)
 			      current_y - ANSWER_HEIGHT/2,
 			      NULL);
 
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
       gdk_pixbuf_unref(pixmap_answer);
+#else
+      g_object_unref(pixmap_answer);
+#endif
       g_object_set (answer_item_focus[i], "visibility", GOO_CANVAS_ITEM_INVISIBLE, NULL);
 
       item = goo_canvas_image_new (boardRootItem,
@@ -463,7 +471,11 @@ static GooCanvasItem *enumerate_create_item(GooCanvasItem *parent)
 					   current_y - 5,
 					   scale, 0.0);
 
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
       gdk_pixbuf_unref(pixmap);
+#else
+      g_object_unref(pixmap);
+#endif
 
       g_signal_connect(item, "button-press-event",
 		       (GCallback) item_event_focus, GINT_TO_POINTER(i));
diff --git a/src/erase-activity/erase.c b/src/erase-activity/erase.c
index dbadb53..636dd02 100644
--- a/src/erase-activity/erase.c
+++ b/src/erase-activity/erase.c
@@ -259,7 +259,11 @@ static void set_cursor()
 					      gdk_pixbuf_get_height(cursor_pixbuf)/2);
 	  gdk_window_set_cursor(gc_get_window()->window, cursor);
 	  gdk_cursor_unref(cursor);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
 	  gdk_pixbuf_unref(cursor_pixbuf);
+#else
+	  g_object_unref(cursor_pixbuf);
+#endif
 	}
     }
 }
diff --git a/src/fifteen-activity/fifteen.c b/src/fifteen-activity/fifteen.c
index 9ef1767..e0a1f31 100644
--- a/src/fifteen-activity/fifteen.c
+++ b/src/fifteen-activity/fifteen.c
@@ -210,7 +210,11 @@ static GooCanvasItem *fifteen_create_item(GooCanvasItem *parent)
 			-1*((gdk_pixbuf_get_width(pixmap)-(4*PIECE_SIZE))/2),
 			-1*((gdk_pixbuf_get_height(pixmap)-(4*PIECE_SIZE))/2)-2,
 			NULL);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
 
 
   board = g_new (GooCanvasItem *, 16);
diff --git a/src/gcompris/about.c b/src/gcompris/about.c
index f23394c..f938900 100644
--- a/src/gcompris/about.c
+++ b/src/gcompris/about.c
@@ -164,7 +164,11 @@ void gc_about_start ()
 				   (gdouble) y_start - gdk_pixbuf_get_height(pixmap) + 15,
                    NULL);
 
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
       gdk_pixbuf_unref(pixmap);
+#else
+      g_object_unref(pixmap);
+#endif
       g_free(sponsor_image);
     }
   else
diff --git a/src/gcompris/bonus.c b/src/gcompris/bonus.c
index 6970d60..6fc3ce6 100644
--- a/src/gcompris/bonus.c
+++ b/src/gcompris/bonus.c
@@ -207,7 +207,11 @@ bonus_image(char *image, GCBonusStatusList gamewon)
 			 NULL);
   }
 
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
 
   g_free(str);
   end_bonus_id = g_timeout_add (GC_BONUS_DURATION, (GSourceFunc) end_bonus, NULL);
diff --git a/src/gcompris/gameutil.c b/src/gcompris/gameutil.c
index 6ab9b39..7ecfb61 100644
--- a/src/gcompris/gameutil.c
+++ b/src/gcompris/gameutil.c
@@ -770,7 +770,11 @@ gc_util_button_text(GooCanvasItem *rootitem,
 		   "button_press_event",
 		   process, data);
   gc_item_focus_init(item_text, item);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
 }
 
 /** Display a button with the given text (BY SKIN'S SVG ID)
diff --git a/src/gcompris/gcompris.c b/src/gcompris/gcompris.c
index 368a51d..6df719e 100644
--- a/src/gcompris/gcompris.c
+++ b/src/gcompris/gcompris.c
@@ -583,7 +583,11 @@ void gc_cursor_set(guint gdk_cursor_type)
 					    cursor_pixbuf, 0, 0);
 	gdk_window_set_cursor(window->window, cursor);
 	gdk_cursor_unref(cursor);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
 	gdk_pixbuf_unref(cursor_pixbuf);
+#else
+	g_object_unref(cursor_pixbuf);
+#endif
       }
     else
       {
@@ -651,7 +655,11 @@ _set_pixmap_background(GooCanvasItem *parent, gchar *file)
 					  NULL);
   goo_canvas_item_lower(backgroundimg, NULL);
 
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(background_pixmap);
+#else
+  g_object_unref(background_pixmap);
+#endif
 
 }
 
@@ -828,7 +836,11 @@ static void setup_window ()
 	if (icon_pixbuf)
 	  {
 	    gtk_window_set_icon (GTK_WINDOW (window), icon_pixbuf);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
 	    gdk_pixbuf_unref (icon_pixbuf);
+#else
+	    g_object_unref (icon_pixbuf);
+#endif
 	  }
       }
     else
diff --git a/src/gcompris/images_selector.c b/src/gcompris/images_selector.c
index 72d501b..890b935 100644
--- a/src/gcompris/images_selector.c
+++ b/src/gcompris/images_selector.c
@@ -371,7 +371,11 @@ display_image(gchar *imagename, GooCanvasItem *root_item)
 			       NULL);
   goo_canvas_item_translate(item, ix, iy);
   goo_canvas_item_scale(item, xratio, xratio);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
 
   g_signal_connect(item, "button_press_event",
 		   (GCallback) item_event_images_selector,
@@ -426,7 +430,11 @@ display_image_set(gchar *imagename, GSList *imagelist)
 			       NULL);
   goo_canvas_item_translate(item, 5, isy);
   goo_canvas_item_scale(item, xratio, xratio);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
   g_object_set_data (G_OBJECT (item), "imagelist", imagelist);
 
   g_signal_connect(item, "button_press_event",
diff --git a/src/gcompris/timer.c b/src/gcompris/timer.c
index b6d44ed..1deed20 100644
--- a/src/gcompris/timer.c
+++ b/src/gcompris/timer.c
@@ -90,7 +90,11 @@ gc_timer_display(int ax, int ay,
 					      y,
                           NULL);
 
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
 	gdk_pixbuf_unref(pixmap);
+#else
+	g_object_unref(pixmap);
+#endif
 	g_free(filename);
       }
       break;
@@ -123,7 +127,11 @@ gc_timer_display(int ax, int ay,
        */
       ystep = (BOARDHEIGHT-y-gdk_pixbuf_get_height(pixmap))/second;
 
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
       gdk_pixbuf_unref(pixmap);
+#else
+      g_object_unref(pixmap);
+#endif
 
       pixmap = gc_skin_pixmap_load("timers/sea.png");
       goo_canvas_image_new (boardRootItem,
@@ -133,7 +141,11 @@ gc_timer_display(int ax, int ay,
 			    "width", (double) gdk_pixbuf_get_width(pixmap),
 			    "height", (double) gdk_pixbuf_get_height(pixmap),
 			    NULL);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
       gdk_pixbuf_unref(pixmap);
+#else
+      g_object_unref(pixmap);
+#endif
 
       break;
     default:
@@ -312,7 +324,11 @@ timer_increment(GooCanvasItem *item)
 	  g_object_set(item,
 		       "pixbuf", pixmap,
 		       NULL);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
 	  gdk_pixbuf_unref(pixmap);
+#else
+	  g_object_unref(pixmap);
+#endif
 	  g_free(filename);
 	}
       break;
diff --git a/src/hanoi_real-activity/hanoi_real.c b/src/hanoi_real-activity/hanoi_real.c
index 6dcd7ea..c7fb6bf 100644
--- a/src/hanoi_real-activity/hanoi_real.c
+++ b/src/hanoi_real-activity/hanoi_real.c
@@ -339,7 +339,11 @@ hanoi_create_item(GooCanvasItem *parent)
 				   baseline - gdk_pixbuf_get_height(pixmap) + item_height,
 				   NULL);
 
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
       gdk_pixbuf_unref(pixmap);
+#else
+      g_object_unref(pixmap);
+#endif
 
 
       for(j=0; j<number_of_item_y; j++)
@@ -357,7 +361,11 @@ hanoi_create_item(GooCanvasItem *parent)
 					   pixmap,
 					   0, 0,
 					   NULL);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
 	      gdk_pixbuf_unref(pixmap);
+#else
+	      g_object_unref(pixmap);
+#endif
 	      goo_canvas_item_translate(item,
 					position[i][j]->x - w/2,
 					position[i][j]->y);
diff --git a/src/imageid-activity/imageid.c b/src/imageid-activity/imageid.c
index fa83bd6..d2d9076 100644
--- a/src/imageid-activity/imageid.c
+++ b/src/imageid-activity/imageid.c
@@ -315,7 +315,11 @@ imageid_create_item(GooCanvasItem *parent)
 			       y,
 			       NULL);
 
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
 
   xp = HORIZONTAL_SEPARATION;
 
diff --git a/src/leftright-activity/leftright.c b/src/leftright-activity/leftright.c
index ad42bb0..7f086f6 100644
--- a/src/leftright-activity/leftright.c
+++ b/src/leftright-activity/leftright.c
@@ -259,7 +259,11 @@ static GooCanvasItem *leftright_create_item(GooCanvasItem *parent) {
 
   g_free(str);
 
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(hand_pixmap);
+#else
+  g_object_unref(hand_pixmap);
+#endif
 
   return NULL;
 }
diff --git a/src/magic_hat_minus-activity/magic_hat.c b/src/magic_hat_minus-activity/magic_hat.c
index 4a61ba2..6cf95a4 100644
--- a/src/magic_hat_minus-activity/magic_hat.c
+++ b/src/magic_hat_minus-activity/magic_hat.c
@@ -312,7 +312,11 @@ static GooCanvasItem *magic_hat_create_item()
 			0.0,
 			0.0,
 			NULL);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
 
   // Initialisation for frame1
   frame1.id = 1;
@@ -507,7 +511,11 @@ static void draw_hat(GooCanvasItem *item,
   g_object_set(item,
 	       "pixbuf", image,
 	       NULL);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(image);
+#else
+  g_object_unref(image);
+#endif
 
   if (type == STARS) {
 	 hat_event_id = g_signal_connect(item,
diff --git a/src/maze-activity/maze.c b/src/maze-activity/maze.c
index 166b849..1bc3aca 100644
--- a/src/maze-activity/maze.c
+++ b/src/maze-activity/maze.c
@@ -307,7 +307,11 @@ static void maze_next_level() {
   if(pixmap)
     {
       draw_image(mazegroup,breedte-1,end,pixmap);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
       gdk_pixbuf_unref(pixmap);
+#else
+      g_object_unref(pixmap);
+#endif
     }
 
   position[ind][0]=0;
@@ -699,7 +703,11 @@ draw_image(GooCanvasItem *group,
 			       x1+buffer,
 			       y1+buffer,
 			       NULL);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap2);
+#else
+  g_object_unref(pixmap2);
+#endif
 
   return(item);
 }
diff --git a/src/memory-activity/memory.c b/src/memory-activity/memory.c
index deb8ebb..c4b1f5a 100644
--- a/src/memory-activity/memory.c
+++ b/src/memory-activity/memory.c
@@ -1342,7 +1342,11 @@ static void create_item(GooCanvasItem *parent)
 				50,
 				140,
 				NULL);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
     gdk_pixbuf_unref(pixmap_tux);
+#else
+    g_object_unref(pixmap_tux);
+#endif
 
     tux_score = goo_canvas_text_new (parent,
 				     "",
@@ -1393,7 +1397,11 @@ static void create_item(GooCanvasItem *parent)
 	  goo_canvas_item_scale(memoryItem->backcardItem,
 				width2 / gdk_pixbuf_get_width(pixmap),
 				height2 / gdk_pixbuf_get_height(pixmap));
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
 	  gdk_pixbuf_unref(pixmap);
+#else
+	  g_object_unref(pixmap);
+#endif
 
 	  if (currentUiMode != UIMODE_SOUND){
 	    pixmap = gc_pixmap_load("memory/emptycard.png");
@@ -1407,7 +1415,11 @@ static void create_item(GooCanvasItem *parent)
 				  (width2 / gdk_pixbuf_get_width(pixmap)),
 				  (height2 / gdk_pixbuf_get_height(pixmap)));
 	    g_object_set (memoryItem->framecardItem, "visibility", GOO_CANVAS_ITEM_INVISIBLE, NULL);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
 	    gdk_pixbuf_unref(pixmap);
+#else
+	    g_object_unref(pixmap);
+#endif
 	  }
 
 
@@ -1425,7 +1437,11 @@ static void create_item(GooCanvasItem *parent)
 	    goo_canvas_item_scale(memoryItem->frontcardItem,
 				  (width2 / gdk_pixbuf_get_width(pixmap)),
 				  (height2 / gdk_pixbuf_get_height(pixmap)));
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
 	    gdk_pixbuf_unref(pixmap);
+#else
+	    g_object_unref(pixmap);
+#endif
 	  }
 	  else {
 
@@ -1452,7 +1468,11 @@ static void create_item(GooCanvasItem *parent)
 					      (width2 - gdk_pixbuf_get_width(pixmap))/2,
 					      (height2 - gdk_pixbuf_get_height(pixmap))/2);
 		 }
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
 	      gdk_pixbuf_unref(pixmap);
+#else
+	      g_object_unref(pixmap);
+#endif
 
 	    } else {
 	      gchar *font;
diff --git a/src/missing_letter-activity/missingletter.c b/src/missing_letter-activity/missingletter.c
index 124685e..f9b61cf 100644
--- a/src/missing_letter-activity/missingletter.c
+++ b/src/missing_letter-activity/missingletter.c
@@ -329,7 +329,11 @@ missing_letter_create_item(GooCanvasItem *parent)
 			img_area_x+(img_area_w - gdk_pixbuf_get_width(pixmap))/2,
 			img_area_y+(img_area_h - gdk_pixbuf_get_height(pixmap))/2,
 			NULL);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
 
   /* Calc the number of proposals */
   i = 0;
@@ -402,7 +406,11 @@ missing_letter_create_item(GooCanvasItem *parent)
       i++;
     }
 
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(button_pixmap);
+#else
+  g_object_unref(button_pixmap);
+#endif
 }
 
 /* ==================================== */
@@ -494,7 +502,11 @@ highlight_selected(GooCanvasItem * button)
     {
       button_pixmap = gc_pixmap_load("missing_letter/button.png");
       g_object_set(selected_button, "pixbuf", button_pixmap, NULL);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
       gdk_pixbuf_unref(button_pixmap);
+#else
+      g_object_unref(button_pixmap);
+#endif
     }
 
   if (selected_button != button)
@@ -502,7 +514,11 @@ highlight_selected(GooCanvasItem * button)
       button_pixmap_selected = gc_pixmap_load("missing_letter/button_selected.png");
       g_object_set(button, "pixbuf", button_pixmap_selected, NULL);
       selected_button = button;
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
       gdk_pixbuf_unref(button_pixmap_selected);
+#else
+      g_object_unref(button_pixmap_selected);
+#endif
     }
 }
 
diff --git a/src/money-activity/money.c b/src/money-activity/money.c
index 8b73126..0388abd 100644
--- a/src/money-activity/money.c
+++ b/src/money-activity/money.c
@@ -908,7 +908,11 @@ static void display_paying_tux(guint note)
 			20,
 			130,
 			NULL);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
 
   if (note == 30)
     {
diff --git a/src/photohunter-activity/photohunter.c b/src/photohunter-activity/photohunter.c
index a2268ca..9713337 100644
--- a/src/photohunter-activity/photohunter.c
+++ b/src/photohunter-activity/photohunter.c
@@ -528,8 +528,13 @@ static void StartLevel( )
 
     search_diffs(pixmap[0], pixmap[1]);
 
-    for( ScanPhoto=0; ScanPhoto<2; ScanPhoto++ )
+    for( ScanPhoto=0; ScanPhoto<2; ScanPhoto++ ) {
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
       gdk_pixbuf_unref(pixmap[ScanPhoto]);
+#else
+      g_object_unref(pixmap[ScanPhoto]);
+#endif
+    }
 
     g_free(RandomFileToLoad);
 
diff --git a/src/railroad-activity/railroad.c b/src/railroad-activity/railroad.c
index 98f89f0..a4e80bf 100644
--- a/src/railroad-activity/railroad.c
+++ b/src/railroad-activity/railroad.c
@@ -205,13 +205,21 @@ static void end_board ()
       while(g_list_length(listPixmapEngines)>0) {
 	pixmap = g_list_nth_data(listPixmapEngines, 0);
 	listPixmapEngines = g_list_remove (listPixmapEngines, pixmap);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
 	gdk_pixbuf_unref(pixmap);
+#else
+	g_object_unref(pixmap);
+#endif
       }
 
       while(g_list_length(listPixmapWagons)>0) {
 	pixmap = g_list_nth_data(listPixmapWagons, 0);
 	listPixmapWagons = g_list_remove (listPixmapWagons, pixmap);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
 	gdk_pixbuf_unref(pixmap);
+#else
+	g_object_unref(pixmap);
+#endif
       }
 
     }
diff --git a/src/reversecount-activity/reversecount.c b/src/reversecount-activity/reversecount.c
index 2cb6032..7f836bc 100644
--- a/src/reversecount-activity/reversecount.c
+++ b/src/reversecount-activity/reversecount.c
@@ -649,7 +649,11 @@ display_item_at(gchar *imagename, int block)
 				    gdk_pixbuf_get_width (pixmap) * xratio,
 				    gdk_pixbuf_get_height(pixmap) * xratio,
 				    GDK_INTERP_BILINEAR);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
 
   item = goo_canvas_image_new (boardRootItem,
 			       pixmap2,
@@ -659,7 +663,11 @@ display_item_at(gchar *imagename, int block)
 				    (gdk_pixbuf_get_height (pixmap2))) / 2,
 			       NULL);
 
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap2);
+#else
+  g_object_unref(pixmap2);
+#endif
 
   return(item);
 }
@@ -810,7 +818,11 @@ static void create_clock(double x, double y, int value)
 					   y,
 					   NULL);
 
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
   g_free(str);
 }
 
@@ -830,7 +842,11 @@ static void update_clock(int value)
 		"pixbuf", pixmap,
 		NULL);
 
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
   g_free(str);
 }
 
diff --git a/src/scalesboard-activity/scale.c b/src/scalesboard-activity/scale.c
index 734b2d2..ef17a67 100644
--- a/src/scalesboard-activity/scale.c
+++ b/src/scalesboard-activity/scale.c
@@ -636,7 +636,11 @@ scale_list_add_weight(GooCanvasItem *group,
   goo_canvas_item_translate(new_item->item,
 			    new_item->x,
 			    new_item->y);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
   g_free(weight_text);
 
   gc_item_focus_init(new_item->item, NULL);
@@ -801,7 +805,11 @@ scale_prepare_level()
 
   pixmap = gc_pixmap_load(imageList[g_random_int_range(0,imageListCount)]);
   scale_list_add_object(group_d, pixmap, objet_weight, -1, show_weight);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
 }
 
 // Defines a set of available weight-items and possible values for the "unknown" object
@@ -914,7 +922,11 @@ static void scale_prepare_level_weight()
 
     pixmap = gc_pixmap_load(imageList[g_random_int_range(0,imageListCount)]);
     scale_list_add_object(group_d, pixmap, objet_weight,-1, show_weight_objet);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
     gdk_pixbuf_unref(pixmap);
+#else
+    g_object_unref(pixmap);
+#endif
 }
 
 static void
@@ -946,14 +958,22 @@ scale_next_level()
 			      BOARDWIDTH/2 - gdk_pixbuf_get_width(pixmap2)/2,
 			      balance_left_y - 10,
 			      NULL);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap2);
+#else
+  g_object_unref(pixmap2);
+#endif
 
   goo_canvas_image_new(boardRootItem,
 				 pixmap,
 				 balance_x,
 				 balance_left_y,
 				 NULL);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
 
   /* Set a sign on the scale in case it's not easy to determine
      on which side it balances */
@@ -982,7 +1002,11 @@ scale_next_level()
 			      0,
 			      PLATE_Y,
 			      NULL);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
 
   /* create right plate */
   group_d = goo_canvas_group_new(boardRootItem, NULL);
@@ -998,8 +1022,13 @@ scale_next_level()
 			      0,
 			      PLATE_Y,
 			      NULL);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
   gdk_pixbuf_unref(pixmap2);
+#else
+  g_object_unref(pixmap);
+  g_object_unref(pixmap2);
+#endif
 
   /* display some hint */
   if(gcomprisBoard->level > 2 || board_mode == MODE_WEIGHT)
diff --git a/src/submarine-activity/submarine.c b/src/submarine-activity/submarine.c
index cb7b3aa..9337df4 100644
--- a/src/submarine-activity/submarine.c
+++ b/src/submarine-activity/submarine.c
@@ -397,7 +397,11 @@ static GooCanvasItem *submarine_drawbackground(GooCanvasItem *parent) {
   goo_canvas_image_new (backgroundRootItem, pixmap,
   			schema_x, schema_y, NULL);
 
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
 
 #define COMMAND_OFFSET 20.0
   pixmap = gc_pixmap_load("submarine/up.png");
@@ -427,7 +431,11 @@ static GooCanvasItem *submarine_drawbackground(GooCanvasItem *parent) {
   g_signal_connect(item, "button-press-event",
 		   (GCallback) engine_event, GINT_TO_POINTER(UP));
 
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
 
   pixmap = gc_pixmap_load("submarine/down.png");
   item = goo_canvas_image_new (backgroundRootItem,
@@ -454,7 +462,11 @@ static GooCanvasItem *submarine_drawbackground(GooCanvasItem *parent) {
   g_signal_connect(item, "button-press-event",
 		     (GCallback) engine_event, GINT_TO_POINTER(DOWN));
 
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
 
   return backgroundRootItem;
 }
@@ -479,7 +491,11 @@ static GooCanvasItem *submarine_create_item(GooCanvasItem *parent) {
 					 0,
 					 NULL);
 
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
 
 
   pixmap = gc_pixmap_load("submarine/vanne.svg");
@@ -531,7 +547,11 @@ static GooCanvasItem *submarine_create_item(GooCanvasItem *parent) {
   g_signal_connect(regleur_chasse_item, "button-press-event",
 		   (GCallback) regleur_chasse_event, NULL);
 
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
 
   // DEPTH RUDDERS
   pixmap = gc_pixmap_load("submarine/rudder.png");
@@ -545,7 +565,11 @@ static GooCanvasItem *submarine_create_item(GooCanvasItem *parent) {
 					schema_x + BARRE_AR_X,
 					schema_y + BARRE_AR_Y,
 					 NULL);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
 
   // displays the speed on the engine
   sprintf(s12,"%d",(int)submarine_horizontal_speed);
@@ -716,7 +740,11 @@ static GooCanvasItem *submarine_create_item(GooCanvasItem *parent) {
 					  ALERT_SUBMARINE_X,
 					  ALERT_SUBMARINE_Y,
 					  NULL);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
   g_object_set (alert_submarine,
 		"visibility", GOO_CANVAS_ITEM_INVISIBLE,
 		NULL);
@@ -734,7 +762,11 @@ static GooCanvasItem *submarine_create_item(GooCanvasItem *parent) {
 		  "visibility", GOO_CANVAS_ITEM_INVISIBLE,
 		  NULL);
   }
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
 
   // whale item
   switch(gcomprisBoard->level)
@@ -763,7 +795,11 @@ static GooCanvasItem *submarine_create_item(GooCanvasItem *parent) {
 				whale_x,
 				whale_y,
 				NULL);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
 
   //  whale being hit
   pixmap = gc_pixmap_load("submarine/whale_hit.png");
@@ -776,7 +812,11 @@ static GooCanvasItem *submarine_create_item(GooCanvasItem *parent) {
 		"visibility", GOO_CANVAS_ITEM_INVISIBLE,
 		NULL);
 
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
 
   // treasure item
   pixmap = gc_pixmap_load("submarine/crown.png");
@@ -797,7 +837,11 @@ static GooCanvasItem *submarine_create_item(GooCanvasItem *parent) {
 			  6*1000,
 			  40,
 			  GOO_CANVAS_ANIMATE_FREEZE);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
 
   // the triggers for air compressor and battery charger
   pixmap = gc_pixmap_load("submarine/manette.png");
@@ -811,7 +855,11 @@ static GooCanvasItem *submarine_create_item(GooCanvasItem *parent) {
 					       schema_x + BATTERY_TRIGGER_X,
 					       schema_y + BATTERY_TRIGGER_Y,
 					       NULL);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
 
   g_signal_connect(air_compressor_item, "button-press-event",
 		   (GCallback) air_compressor_event, NULL);
@@ -895,7 +943,11 @@ static void start_frigate_anim()
 			  100*1000,
 			  100,
 			  GOO_CANVAS_ANIMATE_RESTART);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
 }
 
 static void stop_frigate_anim()
@@ -1663,7 +1715,11 @@ static void submarine_explosion()
   g_object_set(submarine_item,
 	       "pixbuf", pixmap,
 	       NULL);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
 
   ok();
 }
diff --git a/src/tangram-activity/gtans_interface.c b/src/tangram-activity/gtans_interface.c
index d29dd65..d1ee0f2 100644
--- a/src/tangram-activity/gtans_interface.c
+++ b/src/tangram-activity/gtans_interface.c
@@ -190,8 +190,13 @@ void create_mainwindow (GooCanvasItem *rootitem)
 				  NULL);
 
 
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(right_rot);
   gdk_pixbuf_unref(left_rot);
+#else
+  g_object_unref(right_rot);
+  g_object_unref(left_rot);
+#endif
 
   right_rot_big   = gc_pixmap_load("tangram/gtans_2x-rotate.png");
   left_rot_big    = gc_pixmap_load("tangram/gtans_2x-rotate-left.png");
@@ -209,8 +214,13 @@ void create_mainwindow (GooCanvasItem *rootitem)
 				  Y_BASE_SMALLAREA + WIDTH_SMALLAREA + 120,
 				   NULL);
 
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(right_rot_big);
   gdk_pixbuf_unref(left_rot_big);
+#else
+  g_object_unref(right_rot_big);
+  g_object_unref(left_rot_big);
+#endif
 
 
   g_signal_connect(r_rot_s, "button_press_event",
diff --git a/src/wordprocessor-activity/wordprocessor.c b/src/wordprocessor-activity/wordprocessor.c
index dde2ac2..71db76b 100644
--- a/src/wordprocessor-activity/wordprocessor.c
+++ b/src/wordprocessor-activity/wordprocessor.c
@@ -364,7 +364,11 @@ static GooCanvasItem *wordprocessor_create()
 			  17.0,
 			  y,
 			  NULL);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
   g_signal_connect(item, "button_press_event",
 		   (GCallback) save_event, buffer);
   gc_item_focus_init(item, NULL);
@@ -380,7 +384,11 @@ static GooCanvasItem *wordprocessor_create()
 			  60.0,
 			  y,
 			  NULL);
+#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
   gdk_pixbuf_unref(pixmap);
+#else
+  g_object_unref(pixmap);
+#endif
   g_signal_connect(item, "button_press_event",
 		   (GCallback) load_event, buffer);
   gc_item_focus_init(item, NULL);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]