[gcompris] all: preparation for a port to GTK3. Now compiles with CFLAGS+="-DGDK_DISABLE_DEPRECATED -DGTK_DISAB



commit d933ce9d93e6bfbf5c9c1585896053ddc667600b
Author: Bruno Coudoin <bruno coudoin free fr>
Date:   Mon Aug 15 02:29:58 2011 +0200

    all: preparation for a port to GTK3. Now compiles with CFLAGS+="-DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_^CPRECATED"

 src/algebra_by-activity/algebra.c                  |    4 +-
 .../algebra_guesscount.c                           |   15 ++--
 src/awele-activity/awele.c                         |    2 +-
 src/babymatch-activity/shapegame.c                 |   20 ++--
 src/billard-activity/billard.c                     |   18 ++--
 src/boards/menu2.c                                 |   18 ++--
 src/canal_lock-activity/canal_lock.c               |   24 +++---
 src/chess_computer-activity/chess.c                |   10 +-
 src/chess_computer-activity/chess_position.c       |   68 +++++--------
 src/chess_computer-activity/chess_position.h       |   20 +++--
 src/click_on_letter-activity/click_on_letter.c     |    4 +-
 src/clickgame-activity/clickgame.c                 |   48 +++++-----
 src/clockgame-activity/clockgame.c                 |   18 ++--
 src/colors-activity/colors.c                       |    8 +-
 src/crane-activity/crane.c                         |    8 +-
 src/enumerate-activity/enumerate.c                 |   12 +-
 src/erase-activity/erase.c                         |    2 +-
 src/gcompris/about.c                               |    2 +-
 src/gcompris/bar.c                                 |    8 +-
 src/gcompris/board.c                               |    2 +-
 src/gcompris/board_config_combo.c                  |    8 +-
 src/gcompris/bonus.c                               |    2 +-
 src/gcompris/config.c                              |   16 ++--
 src/gcompris/dialog.c                              |    4 +-
 src/gcompris/drag.c                                |    4 +-
 src/gcompris/file_selector.c                       |   24 +++---
 src/gcompris/gameutil.c                            |   16 ++--
 src/gcompris/gameutil.h                            |    4 +-
 src/gcompris/gcompris.c                            |   64 +++++++++---
 src/gcompris/gcompris_confirm.c                    |    8 +-
 src/gcompris/help.c                                |   22 ++--
 src/gcompris/images_selector.c                     |   10 +-
 src/gcompris/timer.c                               |    4 +-
 src/gletters-activity/gletters.c                   |   32 +++---
 src/hanoi-activity/hanoi.c                         |    8 +-
 src/hanoi_real-activity/hanoi_real.c               |    4 +-
 src/imageid-activity/imageid.c                     |    6 +-
 src/leftright-activity/leftright.c                 |    4 +-
 src/magic_hat_minus-activity/magic_hat.c           |   16 ++--
 src/maze-activity/maze.c                           |    2 +-
 src/memory-activity/memory.c                       |    2 +-
 src/missing_letter-activity/missingletter.c        |    6 +-
 src/money-activity/money.c                         |   10 +-
 src/money-activity/money_widget.c                  |  102 ++++++++++----------
 src/money-activity/money_widget.h                  |   40 ++++----
 src/paratrooper-activity/paratrooper.c             |   38 ++++----
 src/photohunter-activity/photohunter.c             |    4 +-
 src/planegame-activity/planegame.c                 |    8 +-
 src/railroad-activity/railroad.c                   |   22 ++--
 src/readingh-activity/reading.c                    |   34 ++++----
 src/reversecount-activity/reversecount.c           |   16 ++--
 src/scalesboard-activity/scale.c                   |    6 +-
 src/smallnumbers-activity/smallnumbers.c           |   26 +++---
 src/submarine-activity/submarine.c                 |   28 +++---
 src/superbrain-activity/superbrain.c               |    6 +-
 src/tangram-activity/gtans_interface.c             |   18 ++--
 src/target-activity/target.c                       |   31 +++---
 src/traffic-activity/traffic.c                     |    4 +-
 src/wordprocessor-activity/wordprocessor.c         |    6 +-
 src/wordsgame-activity/wordsgame.c                 |   14 ++--
 60 files changed, 503 insertions(+), 487 deletions(-)
---
diff --git a/src/algebra_by-activity/algebra.c b/src/algebra_by-activity/algebra.c
index 7847d1e..b445eb1 100644
--- a/src/algebra_by-activity/algebra.c
+++ b/src/algebra_by-activity/algebra.c
@@ -409,7 +409,7 @@ static void ask_for_ready()
 			  BOARDHEIGHT * 0.5,
 			  "#BUTTON_TEXT",
 			  _("I am Ready"),
-			  (GtkSignalFunc) item_event_ready,
+			  (GCallback) item_event_ready,
 			  "ready");
 }
 
@@ -566,7 +566,7 @@ display_operand(GooCanvasItem *parent,
 	      set_focus_item(toBeFoundItem, FALSE);
 	    }
 	  g_signal_connect(item, "button_press_event",
-			   (GtkSignalFunc) item_event,
+			   (GCallback) item_event,
 			   toBeFoundItem);
 	}
     }
diff --git a/src/algebra_guesscount-activity/algebra_guesscount.c b/src/algebra_guesscount-activity/algebra_guesscount.c
index 7828911..85cdc5e 100644
--- a/src/algebra_guesscount-activity/algebra_guesscount.c
+++ b/src/algebra_guesscount-activity/algebra_guesscount.c
@@ -30,7 +30,7 @@ static void		 set_level (guint level);
 static int gamewon;
 static gint process_time_id = 0;
 
-static void		 process_time(void);
+static gboolean		 process_time(gpointer data);
 static void		 game_won(void);
 static void		 destroy_board(void);
 
@@ -466,7 +466,7 @@ static GooCanvasItem *algebra_guesscount_create_item(GooCanvasItem *parent) {
 					  NULL);
     xOffset += BUTTON_WIDTH+HORIZONTAL_SEPARATION;
     g_signal_connect(oper_item[i], "button_press_event",
-		     (GtkSignalFunc) item_event_oper,
+		     (GCallback) item_event_oper,
 		     GINT_TO_POINTER(&(token_value[i*2+1])) );
     token_value[i*2+1].isNumber = FALSE;
     token_value[i*2+1].isMoved = FALSE;
@@ -502,7 +502,7 @@ static GooCanvasItem *algebra_guesscount_create_item(GooCanvasItem *parent) {
 					Y_NUM,
 					NULL);
     sid = g_signal_connect(num_item[i], "button_press_event",
-			   (GtkSignalFunc) item_event_num,
+			   (GCallback) item_event_num,
 			   (void *)&(token_value[i*2]));
     token_value[i*2].isNumber = TRUE;
     token_value[i*2].num = answer_num_index[i];
@@ -541,12 +541,13 @@ static void game_won() {
 }
 
 /* ==================================== */
-static void process_time(){
+static gboolean process_time(gpointer data){
   if (process_time_id) {
-    gtk_timeout_remove (process_time_id);
+    g_source_remove (process_time_id);
     process_time_id = 0;
   }
   gc_bonus_display(gamewon, GC_BONUS_RANDOM);
+  return(FALSE);
 }
 /* ==================================== */
 static int oper_char_to_pixmap_index(char oper) {
@@ -587,7 +588,7 @@ static gboolean item_event_oper (GooCanvasItem  *item,
 				     NULL);
     token_count++;
     g_signal_connect(tmp_item, "button_press_event",
-		     (GtkSignalFunc) item_event_oper_moved,
+		     (GCallback) item_event_oper_moved,
 		     GINT_TO_POINTER(token_count));
     break;
   default : break;
@@ -669,7 +670,7 @@ static gboolean item_event_num (GooCanvasItem  *item,
 
 	gamewon = (result_to_find == token_result());
 	if(gamewon)
-	  process_time_id = gtk_timeout_add (2000, (GtkFunction) process_time, NULL);
+	  process_time_id = g_timeout_add (2000, process_time, NULL);
 
 
       }
diff --git a/src/awele-activity/awele.c b/src/awele-activity/awele.c
index 101c374..eb8002a 100644
--- a/src/awele-activity/awele.c
+++ b/src/awele-activity/awele.c
@@ -447,7 +447,7 @@ awele_create_item (GooCanvasItem * parent)
 
       g_signal_connect (graphsElt->button[i],
 			"button_press_event",
-			GTK_SIGNAL_FUNC (buttonClick),
+			(GCallback) buttonClick,
 			GINT_TO_POINTER(i));
       gc_item_focus_init(graphsElt->button[i], NULL);
 
diff --git a/src/babymatch-activity/shapegame.c b/src/babymatch-activity/shapegame.c
index c386579..5553a2c 100644
--- a/src/babymatch-activity/shapegame.c
+++ b/src/babymatch-activity/shapegame.c
@@ -592,17 +592,17 @@ static void shapegame_init_canvas(GooCanvasItem *parent)
 
   g_signal_connect(continue_root_item,
 		   "button_press_event",
-		   (GtkSignalFunc) item_event_ok,
+		   (GCallback) item_event_ok,
 		   "continue_click");
 
   g_signal_connect(continue_root_item,
 		   "enter_notify_event",
-		   (GtkSignalFunc) item_event_ok,
+		   (GCallback) item_event_ok,
 		   "title_raise");
 
   g_signal_connect(continue_root_item,
 		   "leave_notify_event",
-		   (GtkSignalFunc) item_event_ok,
+		   (GCallback) item_event_ok,
 		   "title_lower");
 
   /* Hide the continue */
@@ -644,7 +644,7 @@ add_shape_to_list_of_shapes(Shape *shape)
 
       g_signal_connect(previous_shapelist_item,
 		       "button_press_event",
-		       (GtkSignalFunc) item_event_ok,
+		       (GCallback) item_event_ok,
 		       "previous_shapelist");
       gc_item_focus_init(previous_shapelist_item, NULL);
 
@@ -659,7 +659,7 @@ add_shape_to_list_of_shapes(Shape *shape)
 			shapeBox.h);
 
       g_signal_connect(next_shapelist_item, "button_press_event",
-		       (GtkSignalFunc) item_event_ok,
+		       (GCallback) item_event_ok,
 		       "next_shapelist");
       gc_item_focus_init(next_shapelist_item, NULL);
 
@@ -1305,18 +1305,18 @@ static void
 setup_item(GooCanvasItem *item, Shape *shape)
 {
   g_signal_connect(item, "enter_notify_event",
-		   (GtkSignalFunc) item_event,
+		   (GCallback) item_event,
 		   shape);
   g_signal_connect(item, "leave_notify_event",
-		   (GtkSignalFunc) item_event,
+		   (GCallback) item_event,
 		   shape);
   g_signal_connect(item, "button_press_event",
-		   (GtkSignalFunc) item_event,
+		   (GCallback) item_event,
 		   shape);
   g_signal_connect(item, "button_press_event",
-		   (GtkSignalFunc) gc_drag_event, shape);
+		   (GCallback) gc_drag_event, shape);
   g_signal_connect(item, "button_release_event",
-		   (GtkSignalFunc) gc_drag_event, shape);
+		   (GCallback) gc_drag_event, shape);
 }
 
 /*
diff --git a/src/billard-activity/billard.c b/src/billard-activity/billard.c
index d42192a..3b923a5 100644
--- a/src/billard-activity/billard.c
+++ b/src/billard-activity/billard.c
@@ -68,7 +68,7 @@ static gboolean		 item_event (GooCanvasItem  *item,
 				     GooCanvasItem  *target,
 				     GdkEventButton *event,
 				     MachItem *machItem);
-static void		 minigolf_move(GList *item_list);
+static gboolean		 minigolf_move(GList *item_list);
 
 static MachItem		*create_machine_item(MachItemType machItemType, double x, double y);
 
@@ -206,7 +206,7 @@ static void minigolf_next_level()
   /* Try the next level */
   minigolf_create_item(goo_canvas_get_root_item(gcomprisBoard->canvas));
 
-  move_id = gtk_timeout_add (40, (GtkFunction) minigolf_move, item_list);
+  move_id = g_timeout_add (40, (GSourceFunc)minigolf_move, item_list);
 
 }
 /* ==================================== */
@@ -217,7 +217,7 @@ static void minigolf_destroy_all_items()
     goo_canvas_item_remove(boardRootItem);
 
   if (move_id) {
-    gtk_timeout_remove (move_id);
+    g_source_remove (move_id);
     move_id = 0;
   }
 
@@ -360,7 +360,7 @@ static MachItem *create_machine_item(MachItemType machItemType, double x, double
 
       g_signal_connect(machItem->item,
 		       "button_press_event",
-		       (GtkSignalFunc) item_event,
+		       (GCallback) item_event,
 		       machItem);
       break;
     case MACH_VERT_WALL:
@@ -430,7 +430,7 @@ static MachItem *create_machine_item(MachItemType machItemType, double x, double
 					      NULL);
 
       g_signal_connect(machItem->item, "button_press_event",
-		       (GtkSignalFunc) item_event,
+		       (GCallback) item_event,
 		       machItem);
 
       break;
@@ -465,7 +465,7 @@ static MachItem *create_machine_item(MachItemType machItemType, double x, double
 					      NULL);
 
       g_signal_connect(machItem->item, "enter_notify_event",
-		       (GtkSignalFunc) item_event,
+		       (GCallback) item_event,
 		       machItem);
       break;
     }
@@ -503,7 +503,7 @@ static gint rectangle_in(double sx1, double sy1, double sx2, double sy2,
 }
 
 /* Move */
-static void minigolf_move(GList *item_list)
+static gboolean minigolf_move(GList *item_list)
 {
   GooCanvasBounds bounds;
   MachItem		*machItem;
@@ -550,7 +550,7 @@ static void minigolf_move(GList *item_list)
 		    gamewon = TRUE;
 		    minigolf_destroy_all_items();
 		    gc_bonus_display(gamewon, GC_BONUS_SMILEY);
-		    return;
+		    return(FALSE);
 		  }
 	      }
 	    }
@@ -659,6 +659,6 @@ static void minigolf_move(GList *item_list)
 	}
 
     }
-
+  return(TRUE);
 }
 
diff --git a/src/boards/menu2.c b/src/boards/menu2.c
index 2105942..5e4ab2b 100644
--- a/src/boards/menu2.c
+++ b/src/boards/menu2.c
@@ -343,12 +343,12 @@ create_panel(GooCanvasItem *parent)
       g_object_set_data (G_OBJECT (item), "board", board);
 
       g_signal_connect(item, "button_press_event",
-		       (GtkSignalFunc) item_event,
+		       (GCallback) item_event,
 		       menuitems);
       g_signal_connect (item, "enter_notify_event",
-			(GtkSignalFunc) on_enter_notify, menuitems);
+			(GCallback) on_enter_notify, menuitems);
       g_signal_connect (item, "leave_notify_event",
-			(GtkSignalFunc) on_leave_notify, menuitems);
+			(GCallback) on_leave_notify, menuitems);
 
       gc_item_focus_init(item, NULL);
     }
@@ -559,12 +559,12 @@ static void menu_create_item(GooCanvasItem *parent, MenuItems *menuitems, Gcompr
   g_object_set_data (G_OBJECT (menu_button), "board", board);
 
   g_signal_connect(menu_button, "button_press_event",
-		   (GtkSignalFunc) item_event,
+		   (GCallback) item_event,
 		   menuitems);
   g_signal_connect (menu_button, "enter_notify_event",
-		    (GtkSignalFunc) on_enter_notify, menuitems);
+		    (GCallback) on_enter_notify, menuitems);
   g_signal_connect (menu_button, "leave_notify_event",
-		    (GtkSignalFunc) on_leave_notify, menuitems);
+		    (GCallback) on_leave_notify, menuitems);
 
   gc_item_focus_init(menu_button, NULL);
 
@@ -832,7 +832,7 @@ create_top(GooCanvasItem *parent, gchar *path)
       g_object_set_data (G_OBJECT (item), "board", board);
 
       g_signal_connect(item, "button_press_event",
-		       (GtkSignalFunc) item_event,
+		       (GCallback) item_event,
 		       menuitems);
 
       gc_item_focus_init(item, NULL);
@@ -897,9 +897,9 @@ display_welcome (MenuItems *menuitems)
 
 
   g_signal_connect (item, "enter_notify_event",
-		    (GtkSignalFunc) display_welcome_event, menuitems);
+		    (GCallback) display_welcome_event, menuitems);
   g_signal_connect (item, "leave_notify_event",
-		    (GtkSignalFunc) on_leave_notify, menuitems);
+		    (GCallback) on_leave_notify, menuitems);
 
   menu_displayed = TRUE;
 }
diff --git a/src/canal_lock-activity/canal_lock.c b/src/canal_lock-activity/canal_lock.c
index dc47fb0..f6d5716 100644
--- a/src/canal_lock-activity/canal_lock.c
+++ b/src/canal_lock-activity/canal_lock.c
@@ -105,7 +105,7 @@ static gboolean          hightlight(GooCanvasItem *item,
                                     GooCanvasItem  *target,
                                     GdkEventButton *event,
                                     gpointer status);
-static gboolean		 animate_step();
+static gboolean		 animate_step(gpointer data);
 static void		 update_water();
 static void		 toggle_lock(GooCanvasItem *item);
 static void		 update_lights();
@@ -190,7 +190,7 @@ static void end_board ()
 {
   // If we don't stop animation, there may be a segfault if leaving while the animation is running
   if (timer_id) {
-    gtk_timeout_remove (timer_id);
+    g_source_remove (timer_id);
     timer_id = 0;
   }
   animation = FALSE;
@@ -265,13 +265,13 @@ static void
 set_lock_event(GooCanvasItem *item)
 {
   g_signal_connect(item, "button-press-event",
-		   (GtkSignalFunc) item_event,
+		   (GCallback) item_event,
 		   NULL);
   g_signal_connect(item, "enter_notify_event",
-		   (GtkSignalFunc) hightlight,
+		   (GCallback) hightlight,
 		   GINT_TO_POINTER(TRUE));
   g_signal_connect(item, "leave_notify_event",
-		   (GtkSignalFunc) hightlight,
+		   (GCallback) hightlight,
 		   GINT_TO_POINTER(FALSE));
 }
 
@@ -293,7 +293,7 @@ static GooCanvasItem *canal_lock_create_item(GooCanvasItem *boardRootItem)
 				     "svg-id", "#BOAT_NO_SAIL", NULL);
 
   g_signal_connect(tuxboat_item, "button-press-event",
-                   (GtkSignalFunc) item_event,
+                   (GCallback) item_event,
                    NULL);
   gc_item_focus_init(tuxboat_item, NULL);
 
@@ -485,7 +485,7 @@ move_boat()
   timer_item = tuxboat_item;
   timer_step_y1 = 0;
 
-  timer_id = gtk_timeout_add (ANIMATE_SPEED, (GtkFunction) animate_step, NULL);
+  timer_id = g_timeout_add (ANIMATE_SPEED, animate_step, NULL);
 }
 
 /* ==================================== */
@@ -524,7 +524,7 @@ static void update_water()
 
   gc_item_focus_remove(tuxboat_item, NULL);
 
-  timer_id = gtk_timeout_add (ANIMATE_SPEED, (GtkFunction) animate_step, NULL);
+  timer_id = g_timeout_add (ANIMATE_SPEED, animate_step, NULL);
 }
 
 /* ==================================== */
@@ -585,7 +585,7 @@ toggle_lock(GooCanvasItem *item)
 
   gc_item_focus_remove(tuxboat_item, NULL);
 
-  timer_id = gtk_timeout_add (animate_speed, (GtkFunction) animate_step,
+  timer_id = g_timeout_add (animate_speed, animate_step,
 			      NULL);
 
 }
@@ -593,7 +593,7 @@ toggle_lock(GooCanvasItem *item)
 
 /* ==================================== */
 static gboolean
-animate_step()
+animate_step(gpointer data)
 {
 
   if(!gcomprisBoard)
@@ -621,7 +621,7 @@ animate_step()
   if((bounds.y1 >= timer_item_limit_y && timer_step_y1 > 0) ||
      (bounds.y1 <= timer_item_limit_y && timer_step_y1 < 0))
     {
-      gtk_timeout_remove (timer_id);
+      g_source_remove (timer_id);
       timer_id = 0;
       animation = FALSE;
       update_water();
@@ -632,7 +632,7 @@ animate_step()
   else if((bounds.x1 >= timer_item_limit_x && timer_step_x1 > 0) ||
      (bounds.x1 <= timer_item_limit_x && timer_step_x1 < 0))
     {
-      gtk_timeout_remove (timer_id);
+      g_source_remove (timer_id);
       timer_id = 0;
       animation = FALSE;
       update_water();
diff --git a/src/chess_computer-activity/chess.c b/src/chess_computer-activity/chess.c
index 4ff4be0..31690ee 100644
--- a/src/chess_computer-activity/chess.c
+++ b/src/chess_computer-activity/chess.c
@@ -445,7 +445,7 @@ static void chess_destroy_all_items()
   info_item     = NULL;
 
   if(position!=NULL)
-    gtk_object_destroy (GTK_OBJECT (position));
+    g_object_unref (G_OBJECT (position));
 
   position = NULL;
 
@@ -588,16 +588,16 @@ chess_create_item(GooCanvasItem *parent)
 	    if(WPIECE(piece))
 	      {
 		g_signal_connect (item, "motion_notify_event",
-				  (GtkSignalFunc) on_motion_notify, NULL);
+				  (GCallback) on_motion_notify, NULL);
 		g_signal_connect (item, "button_press_event",
-				  (GtkSignalFunc) on_button_press, NULL);
+				  (GCallback) on_button_press, NULL);
 		g_signal_connect (item, "button_release_event",
-				  (GtkSignalFunc) on_button_release, NULL);
+				  (GCallback) on_button_release, NULL);
 
 	      }
 	    else
 	      g_signal_connect(item, "button_press_event",
-			       (GtkSignalFunc) item_event_black, NULL);
+			       (GCallback) item_event_black, NULL);
 
 	    gdk_pixbuf_unref(pixmap);
 	  }
diff --git a/src/chess_computer-activity/chess_position.c b/src/chess_computer-activity/chess_position.c
index 5f3063d..25cfb29 100644
--- a/src/chess_computer-activity/chess_position.c
+++ b/src/chess_computer-activity/chess_position.c
@@ -44,70 +44,52 @@ static const int jump [] = { 8, 12,19, 21,-8,-12,-19,-21,
 			     -9,-11, 1,-10,-1     };
 static Square *nindex, *sindex;
 
-/* Prototypes */
-static void class_init (PositionClass *class);
-static void init (Position *pos);
+G_DEFINE_TYPE(Position, position, G_TYPE_OBJECT);
 
+/* Prototypes */
 static void position_set_empty (Position *pos);
 
-GtkType
-position_get_type ()
-{
-	static guint position_type = 0;
-
-	if (!position_type) {
-		GtkTypeInfo position_info = {
-			"Position",
-			sizeof (Position),
-			sizeof (PositionClass),
-			(GtkClassInitFunc) class_init,
-			(GtkObjectInitFunc) init,
-			(gpointer) NULL,
-			(gpointer) NULL,
-			(GtkClassInitFunc) NULL
-		};
-		position_type = gtk_type_unique (gtk_object_get_type (),
-						 &position_info);
-	}
-
-	return position_type;
-}
-
-static void
-finalize (GtkObject *object)
+static GObject *
+position_constructor (GType                  gtype,
+		      guint                  n_properties,
+                      GObjectConstructParam *properties)
 {
-	Position *pos = (Position *) object;
+  GObject *obj;
+
+  {
+    /* Always chain up to the parent constructor */
+    obj = G_OBJECT_CLASS (position_parent_class)->constructor (gtype, n_properties, properties);
+  }
 
-	g_free (pos->priv);
+  /* update the object state depending on constructor properties */
 
-	pos->priv = NULL;
+  return obj;
 }
 
+
 static void
-class_init (PositionClass *class)
+position_class_init (PositionClass *klass)
 {
-	GtkObjectClass *object_class;
-
-	object_class = (GtkObjectClass*) class;
+        g_type_class_add_private (klass, sizeof (PositionPrivate));
+	GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+	gobject_class->constructor = position_constructor;
 
-	object_class->destroy = finalize;
 }
 
 static void
-init (Position *pos)
+position_init (Position *self)
 {
-	pos->priv = g_new0 (PositionPrivate, 1);
-
-	position_set_empty (pos);
+	self->priv = POSITION_GET_PRIVATE (self);
+	position_set_empty (self);
 }
 
-GtkObject *
+GObject *
 position_new ()
 {
-	return GTK_OBJECT (gtk_type_new (position_get_type ()));
+  return G_OBJECT (g_object_new (position_get_type (), NULL));
 }
 
-GtkObject *
+GObject *
 position_new_initial ()
 {
 	Position *pos;
@@ -115,7 +97,7 @@ position_new_initial ()
 	pos = POSITION (position_new ());
 	position_set_initial (pos);
 
-	return GTK_OBJECT (pos);
+	return G_OBJECT (pos);
 }
 
 Position *
diff --git a/src/chess_computer-activity/chess_position.h b/src/chess_computer-activity/chess_position.h
index 9793d60..401b130 100644
--- a/src/chess_computer-activity/chess_position.h
+++ b/src/chess_computer-activity/chess_position.h
@@ -31,20 +31,20 @@ extern "C" {
 #endif /* __cplusplus */
 
 #define TYPE_POSITION	       (position_get_type ())
-#define POSITION(obj)          GTK_CHECK_CAST (obj, TYPE_POSITION, Position)
-#define POSITION_CLASS(klass)  GTK_CHECK_CLASS_CAST (klass, TYPE_POSITION, PositionClass)
-#define IS_POSITION(obj)       GTK_CHECK_TYPE (obj, TYPE_POSITION)
+#define POSITION(obj)          G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_POSITION, Position)
+#define POSITION_CLASS(klass)  G_TYPE_CHECK_CLASS_CAST (klass, TYPE_POSITION, PositionClass)
+#define IS_POSITION(obj)       G_TYPE_CHECK_INSTANCE_TYPE (obj, TYPE_POSITION)
 
 typedef struct _Position        Position;
 typedef struct _PositionClass   PositionClass;
 typedef struct _PositionPrivate PositionPrivate;
 
 struct _PositionClass {
-	GtkObjectClass parent_class;
+	GObjectClass parent_class;
 };
 
 struct _Position {
-	GtkObject        object;
+	GObject          parent_instance;
 
 	/* 10x10 board - extra for move generation */
 	Piece            square[120];
@@ -52,9 +52,13 @@ struct _Position {
 	PositionPrivate *priv;
 };
 
-GtkType    position_get_type             (void);
-GtkObject *position_new                   (void);
-GtkObject *position_new_initial           (void);
+#define POSITION_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TYPE_POSITION, \
+								PositionPrivate))
+
+
+GType      position_get_type             (void);
+GObject   *position_new                  (void);
+GObject   *position_new_initial          (void);
 Position  *position_copy                 (Position *pos);
 void       position_set_initial          (Position *pos);
 void       position_set_initial_partyend (Position *pos, int level);
diff --git a/src/click_on_letter-activity/click_on_letter.c b/src/click_on_letter-activity/click_on_letter.c
index f81fdd9..d197019 100644
--- a/src/click_on_letter-activity/click_on_letter.c
+++ b/src/click_on_letter-activity/click_on_letter.c
@@ -487,9 +487,9 @@ static GooCanvasItem *click_on_letter_create_item(GooCanvasItem *parent)
     xOffset +=HORIZONTAL_SEPARATION +gdk_pixbuf_get_width(button_pixmap);
 
     g_signal_connect(l_items[i], "button_press_event",
-		     (GtkSignalFunc) item_event, GINT_TO_POINTER(i));
+		     (GCallback) item_event, GINT_TO_POINTER(i));
     g_signal_connect(buttons[i], "button_press_event",
-		     (GtkSignalFunc) item_event, GINT_TO_POINTER(i));
+		     (GCallback) item_event, GINT_TO_POINTER(i));
     gc_item_focus_init(l_items[i], buttons[i]);
     gc_item_focus_init(buttons[i], NULL);
   }
diff --git a/src/clickgame-activity/clickgame.c b/src/clickgame-activity/clickgame.c
index 445f94d..5c474b2 100644
--- a/src/clickgame-activity/clickgame.c
+++ b/src/clickgame-activity/clickgame.c
@@ -56,9 +56,9 @@ static void	 clickgame_set_level (guint level);
 static void	 clickgame_config(void);
 
 static FishItem *clickgame_create_item();
-static gint	 clickgame_drop_items (GtkWidget *widget, gpointer data);
-static gint	 clickgame_move_items (GtkWidget *widget, gpointer data);
-static gint	 clickgame_animate_items (GtkWidget *widget, gpointer data);
+static gboolean	 clickgame_drop_items (gpointer data);
+static gboolean	 clickgame_move_items (gpointer data);
+static gboolean  clickgame_animate_items (gpointer data);
 static void	 clickgame_destroy_item(FishItem *fishitem);
 static void	 clickgame_destroy_items(void);
 static void	 clickgame_destroy_all_items(void);
@@ -165,29 +165,29 @@ static void clickgame_pause (gboolean pause)
   if(pause)
     {
       if (move_items_id) {
-	gtk_timeout_remove (move_items_id);
+	g_source_remove (move_items_id);
 	move_items_id = 0;
       }
       if (animate_id) {
-	gtk_timeout_remove (animate_id);
+	g_source_remove (animate_id);
 	animate_id = 0;
       }
       if (drop_items_id) {
-	gtk_timeout_remove (drop_items_id);
+	g_source_remove (drop_items_id);
 	drop_items_id = 0;
       }
     }
   else
     {
       if(!drop_items_id) {
-	drop_items_id = gtk_timeout_add (200,
-					 (GtkFunction) clickgame_drop_items, NULL);
+	drop_items_id = g_timeout_add (200,
+				       clickgame_drop_items, NULL);
       }
       if(!move_items_id) {
-	move_items_id = gtk_timeout_add (200, (GtkFunction) clickgame_move_items, NULL);
+	move_items_id = g_timeout_add (200, clickgame_move_items, NULL);
       }
       if(!animate_id) {
-	animate_id = gtk_timeout_add (200, (GtkFunction) clickgame_animate_items, NULL);
+	animate_id = g_timeout_add (200, clickgame_animate_items, NULL);
       }
     }
 
@@ -231,9 +231,9 @@ fish_gobble (FishItem *fishitem)
     {
       /* Remove any pending new item creation to sync the falls */
       if (drop_items_id)
-	gtk_timeout_remove (drop_items_id);
+	g_source_remove (drop_items_id);
       drop_items_id =
-	gtk_timeout_add (0, (GtkFunction) clickgame_drop_items, NULL);
+	g_timeout_add (0, clickgame_drop_items, NULL);
     }
 }
 
@@ -367,7 +367,7 @@ static void clickgame_start (GcomprisBoard *agcomprisBoard)
 
   g_signal_connect(goo_canvas_get_root_item(gcomprisBoard->canvas),
 		   "enter_notify_event",
-		   (GtkSignalFunc) canvas_event, NULL);
+		   (GCallback) canvas_event, NULL);
   clickgame_next_level();
 
   clickgame_pause(FALSE);
@@ -382,7 +382,7 @@ clickgame_end ()
       gc_score_end();
       clickgame_destroy_all_items();
       g_signal_handlers_disconnect_by_func(goo_canvas_get_root_item(gcomprisBoard->canvas),
-					   (GtkSignalFunc) canvas_event, NULL);
+					   (GCallback) canvas_event, NULL);
       gcomprisBoard->level = 1;       // Restart this game to zero
     }
   gcomprisBoard = NULL;
@@ -580,15 +580,15 @@ static void clickgame_destroy_all_items()
  * This does the moves of the game items on the play canvas
  *
  */
-static gint clickgame_move_items (GtkWidget *widget, gpointer data)
+static gboolean clickgame_move_items (gpointer data)
 {
   g_list_foreach (item_list, (GFunc) clickgame_move_item, NULL);
 
   /* Destroy items that falls out of the canvas */
   clickgame_destroy_items();
 
-  move_items_id = gtk_timeout_add (moveSpeed,
-				   (GtkFunction) clickgame_move_items, NULL);
+  move_items_id = g_timeout_add (moveSpeed,
+				 clickgame_move_items, NULL);
 
   return(FALSE);
 }
@@ -597,12 +597,12 @@ static gint clickgame_move_items (GtkWidget *widget, gpointer data)
  * This does the icon animation
  *
  */
-static gint clickgame_animate_items (GtkWidget *widget, gpointer data)
+static gboolean clickgame_animate_items (gpointer data)
 {
   g_list_foreach (item_list, (GFunc) clickgame_animate_item, NULL);
 
-  animate_id = gtk_timeout_add (1000,
-			      (GtkFunction) clickgame_animate_items, NULL);
+  animate_id = g_timeout_add (1000,
+			      clickgame_animate_items, NULL);
 
   return(FALSE);
 }
@@ -709,7 +709,7 @@ clickgame_create_item()
 			   NULL);
 
   g_signal_connect(rootitem, "button_press_event",
-		   (GtkSignalFunc) item_event, fishitem);
+		   (GCallback) item_event, fishitem);
 
   fishitem->rootitem = rootitem;
 
@@ -775,12 +775,12 @@ clickgame_create_item()
  * This is called on a low frequency and is used to drop new items
  *
  */
-static gint clickgame_drop_items (GtkWidget *widget, gpointer data)
+static gboolean clickgame_drop_items (gpointer data)
 {
   clickgame_create_item();
 
-  drop_items_id = gtk_timeout_add (fallSpeed,
-				   (GtkFunction) clickgame_drop_items, NULL);
+  drop_items_id = g_timeout_add (fallSpeed,
+				 clickgame_drop_items, NULL);
   return (FALSE);
 }
 
diff --git a/src/clockgame-activity/clockgame.c b/src/clockgame-activity/clockgame.c
index c637783..b3bb2ec 100644
--- a/src/clockgame-activity/clockgame.c
+++ b/src/clockgame-activity/clockgame.c
@@ -488,11 +488,11 @@ clockgame_create_item(GooCanvasItem *parent)
   hour_item = goo_canvas_polyline_new (boardRootItem, FALSE, 0,
 				       NULL);
   g_signal_connect (hour_item, "motion_notify_event",
-		    (GtkSignalFunc) on_motion_notify, NULL);
+		    (GCallback) on_motion_notify, NULL);
   g_signal_connect (hour_item, "button_press_event",
-		    (GtkSignalFunc) on_button_press, NULL);
+		    (GCallback) on_button_press, NULL);
   g_signal_connect (hour_item, "button_release_event",
-		    (GtkSignalFunc) on_button_release, NULL);
+		    (GCallback) on_button_release, NULL);
   display_hour(currentTime.hour);
 
   /* Create the minute needle */
@@ -500,11 +500,11 @@ clockgame_create_item(GooCanvasItem *parent)
   minute_item = goo_canvas_polyline_new (boardRootItem, FALSE, 0,
 					 NULL);
   g_signal_connect (minute_item, "motion_notify_event",
-		    (GtkSignalFunc) on_motion_notify, NULL);
+		    (GCallback) on_motion_notify, NULL);
   g_signal_connect (minute_item, "button_press_event",
-		    (GtkSignalFunc) on_button_press, NULL);
+		    (GCallback) on_button_press, NULL);
   g_signal_connect (minute_item, "button_release_event",
-		    (GtkSignalFunc) on_button_release, NULL);
+		    (GCallback) on_button_release, NULL);
   display_minute(currentTime.minute);
 
   /* Create the second needle */
@@ -512,11 +512,11 @@ clockgame_create_item(GooCanvasItem *parent)
   second_item = goo_canvas_polyline_new (boardRootItem, FALSE, 0,
 					 NULL);
   g_signal_connect (second_item, "motion_notify_event",
-		    (GtkSignalFunc) on_motion_notify, NULL);
+		    (GCallback) on_motion_notify, NULL);
   g_signal_connect (second_item, "button_press_event",
-		    (GtkSignalFunc) on_button_press, NULL);
+		    (GCallback) on_button_press, NULL);
   g_signal_connect (second_item, "button_release_event",
-		    (GtkSignalFunc) on_button_release, NULL);
+		    (GCallback) on_button_release, NULL);
   display_second(currentTime.second);
 
   /* Create the text area for the time to find display */
diff --git a/src/colors-activity/colors.c b/src/colors-activity/colors.c
index 62a8cf2..b3bf6fe 100644
--- a/src/colors-activity/colors.c
+++ b/src/colors-activity/colors.c
@@ -203,7 +203,7 @@ static void pause_board (gboolean pause)
     return;
 
   if (timer_id) {
-    gtk_timeout_remove (timer_id);
+    g_source_remove (timer_id);
     timer_id = 0;
   }
 
@@ -249,7 +249,7 @@ static void start_board (GcomprisBoard *agcomprisBoard)
     gamewon = FALSE;
 
     g_signal_connect(goo_canvas_get_root_item(gcomprisBoard->canvas),
-		     "button_press_event", (GtkSignalFunc) item_event, NULL);
+		     "button_press_event", (GCallback) item_event, NULL);
 
     colors_next_level();
     pause_board(FALSE);
@@ -266,7 +266,7 @@ static void end_board ()
     GcomprisProperties	*properties = gc_prop_get();
 
     g_signal_handlers_disconnect_by_func(goo_canvas_get_root_item(gcomprisBoard->canvas),
-					 (GtkSignalFunc) item_event, NULL);
+					 (GCallback) item_event, NULL);
 
     pause_board(TRUE);
     gc_score_end();
@@ -370,7 +370,7 @@ static void repeat ()
 static void colors_destroy_all_items()
 {
   if (timer_id) {
-    gtk_timeout_remove (timer_id);
+    g_source_remove (timer_id);
     timer_id = 0;
   }
 
diff --git a/src/crane-activity/crane.c b/src/crane-activity/crane.c
index c51a550..98f1e74 100644
--- a/src/crane-activity/crane.c
+++ b/src/crane-activity/crane.c
@@ -462,7 +462,7 @@ move_target(int direction)
 
       // Do a smooth move
       my_move.nb = 52;
-      timer_id = g_timeout_add(10, (GtkFunction) smooth_move, &my_move);
+      timer_id = g_timeout_add(10, (GSourceFunc) smooth_move, &my_move);
       list_game[new_index] = list_game[index];
       list_game[index] = -1;
     }
@@ -476,7 +476,7 @@ move_target(int direction)
 
   if (success) {
       gamewon = TRUE;
-      timer_id = g_timeout_add (1200, (GtkFunction) bonus, NULL);
+      timer_id = g_timeout_add (1200, (GSourceFunc) bonus, NULL);
   }
 
 }
@@ -533,7 +533,7 @@ static void draw_arrow() {
 					   arrow[i].y,
 					   NULL);
   	g_signal_connect(item_arrow, "button_press_event",
-			 (GtkSignalFunc) arrow_event, GINT_TO_POINTER(i));
+			 (GCallback) arrow_event, GINT_TO_POINTER(i));
 	gc_item_focus_init(item_arrow, NULL);
 	gdk_pixbuf_unref( arrow[i].pixmap);
 
@@ -651,7 +651,7 @@ static void place_item(int x, int y, int active) {
 	if (active)
 	  {
 	    g_signal_connect(item_image, "button_press_event",
-			       (GtkSignalFunc) item_event, NULL);
+			       (GCallback) item_event, NULL);
 
 	    if(previous_item_image)
 	      g_object_set_data(G_OBJECT(item_image), "previous_item",
diff --git a/src/enumerate-activity/enumerate.c b/src/enumerate-activity/enumerate.c
index bc88372..a9e5d8d 100644
--- a/src/enumerate-activity/enumerate.c
+++ b/src/enumerate-activity/enumerate.c
@@ -416,11 +416,11 @@ static GooCanvasItem *enumerate_create_item(GooCanvasItem *parent)
 				       NULL);
 
 	  g_signal_connect (item, "motion_notify_event",
-			    (GtkSignalFunc) on_motion_notify, NULL);
+			    (GCallback) on_motion_notify, NULL);
 	  g_signal_connect (item, "button_press_event",
-			    (GtkSignalFunc) on_button_press, NULL);
+			    (GCallback) on_button_press, NULL);
 	  g_signal_connect (item, "button_release_event",
-			    (GtkSignalFunc) on_button_release, NULL);
+			    (GCallback) on_button_release, NULL);
 	}
 
       /* Display the answer area */
@@ -436,7 +436,7 @@ static GooCanvasItem *enumerate_create_item(GooCanvasItem *parent)
 			      NULL);
 
       g_signal_connect(item, "button-press-event",
-		       (GtkSignalFunc) item_event_focus, GINT_TO_POINTER(i));
+		       (GCallback) item_event_focus, GINT_TO_POINTER(i));
 
       gdk_pixbuf_unref(pixmap_answer);
 
@@ -466,7 +466,7 @@ static GooCanvasItem *enumerate_create_item(GooCanvasItem *parent)
       gdk_pixbuf_unref(pixmap);
 
       g_signal_connect(item, "button-press-event",
-		       (GtkSignalFunc) item_event_focus, GINT_TO_POINTER(i));
+		       (GCallback) item_event_focus, GINT_TO_POINTER(i));
       gc_item_focus_init(item, NULL);
 
 
@@ -482,7 +482,7 @@ static GooCanvasItem *enumerate_create_item(GooCanvasItem *parent)
 			     NULL);
       g_signal_connect(answer_item[i],
 		       "button-press-event",
-		       (GtkSignalFunc) item_event_focus, GINT_TO_POINTER(i));
+		       (GCallback) item_event_focus, GINT_TO_POINTER(i));
 
     }
 
diff --git a/src/erase-activity/erase.c b/src/erase-activity/erase.c
index 8ad69fb..f08098c 100644
--- a/src/erase-activity/erase.c
+++ b/src/erase-activity/erase.c
@@ -159,7 +159,7 @@ static void start_board (GcomprisBoard *agcomprisBoard)
       event_handle_id =
 	g_signal_connect(goo_canvas_get_root_item(gcomprisBoard->canvas),
 			 "button_press_event",
-			 (GtkSignalFunc) canvas_event, NULL);
+			 (GCallback) canvas_event, NULL);
 
       if (strcmp(gcomprisBoard->mode,"clic")==0)
 	board_mode = CLIC;
diff --git a/src/gcompris/about.c b/src/gcompris/about.c
index e678067..9c08c12 100644
--- a/src/gcompris/about.c
+++ b/src/gcompris/about.c
@@ -220,7 +220,7 @@ void gc_about_start ()
 			  y,
 			  "#BUTTON_TEXT",
 			  _("OK"),
-			  (GtkSignalFunc) item_event_ok,
+			  (GCallback) item_event_ok,
 			  "ok");
 
   is_displayed = TRUE;
diff --git a/src/gcompris/bar.c b/src/gcompris/bar.c
index 7f9428d..022c897 100644
--- a/src/gcompris/bar.c
+++ b/src/gcompris/bar.c
@@ -133,13 +133,13 @@ new_button(GooCanvasItem *rootitem,
   g_object_set_data (G_OBJECT(item), "flag",
 		     GUINT_TO_POINTER(flag));
   g_signal_connect (item, "enter_notify_event",
-		    (GtkSignalFunc) on_enter_notify,
+		    (GCallback) on_enter_notify,
                     GUINT_TO_POINTER(flag));
   g_signal_connect (item, "leave_notify_event",
-		    (GtkSignalFunc) on_leave_notify,
+		    (GCallback) on_leave_notify,
                     GUINT_TO_POINTER(flag));
   g_signal_connect(item, "button_press_event",
-		   (GtkSignalFunc) item_event_bar,
+		   (GCallback) item_event_bar,
 		   GUINT_TO_POINTER(flag));
   return item;
 }
@@ -560,7 +560,7 @@ on_enter_notify (GooCanvasItem  *item,
     return FALSE;
 
   sound_play_id =
-    g_timeout_add (1000, (GtkFunction) bar_play_sound, item);
+    g_timeout_add (1000, (GSourceFunc) bar_play_sound, item);
 
   return FALSE;
 }
diff --git a/src/gcompris/board.c b/src/gcompris/board.c
index 074a6d1..21df9d5 100644
--- a/src/gcompris/board.c
+++ b/src/gcompris/board.c
@@ -405,7 +405,7 @@ void gc_board_run_next(GcomprisBoard *board)
   next_board = board;
 
   next_board_callback_id = g_timeout_add (NEXT_TIME_DELAY,
-					  (GtkFunction) board_run_next_end,
+					  (GSourceFunc) board_run_next_end,
 					  NULL);
 
 }
diff --git a/src/gcompris/board_config_combo.c b/src/gcompris/board_config_combo.c
index d73c3f9..1531197 100644
--- a/src/gcompris/board_config_combo.c
+++ b/src/gcompris/board_config_combo.c
@@ -156,7 +156,7 @@ gc_board_config_combo_locales(GcomprisBoardConf *config, gchar *init)
   gtk_label_set_markup (GTK_LABEL(label_combo),
                         _("Select the language\n to use in the board"));
 
-  combobox = gtk_combo_box_new_text();
+  combobox = GTK_WIDGET(gtk_combo_box_new_text());
 
   gtk_widget_show(combobox);
 
@@ -257,7 +257,7 @@ gc_board_config_combo_drag(GcomprisBoardConf *config, gint init)
   gtk_label_set_markup (GTK_LABEL(label_combo),
                         _("Select the drag and drop mode\n to use in the board"));
 
-  combobox = gtk_combo_box_new_text();
+  combobox = GTK_WIDGET(gtk_combo_box_new_text());
 
   gtk_widget_show(combobox);
 
@@ -431,7 +431,7 @@ GtkComboBox *gc_board_config_combo_locales_asset(GcomprisBoardConf *config, cons
   gtk_label_set_markup (GTK_LABEL(label_combo),
                         label);
 
-  combobox = gtk_combo_box_new_text();
+  combobox = GTK_WIDGET(gtk_combo_box_new_text());
 
   gtk_widget_show(combobox);
 
@@ -522,7 +522,7 @@ GtkComboBox *gc_board_config_combo_box(GcomprisBoardConf *config, const gchar *l
                         (const gchar *)label);
 
 
-  combobox = gtk_combo_box_new_text();
+  combobox = GTK_WIDGET(gtk_combo_box_new_text());
 
   gtk_widget_show(combobox);
 
diff --git a/src/gcompris/bonus.c b/src/gcompris/bonus.c
index d3ab15e..db3ab21 100644
--- a/src/gcompris/bonus.c
+++ b/src/gcompris/bonus.c
@@ -210,7 +210,7 @@ bonus_image(char *image, GCBonusStatusList gamewon)
   gdk_pixbuf_unref(pixmap);
 
   g_free(str);
-  end_bonus_id = g_timeout_add (GC_BONUS_DURATION, (GtkFunction) end_bonus, NULL);
+  end_bonus_id = g_timeout_add (GC_BONUS_DURATION, (GSourceFunc) end_bonus, NULL);
 }
 
 /* ==================================== */
diff --git a/src/gcompris/config.c b/src/gcompris/config.c
index 8431e1e..87a7414 100644
--- a/src/gcompris/config.c
+++ b/src/gcompris/config.c
@@ -232,7 +232,7 @@ gc_config_start ()
 			      (-1 * bounds.x1 + x_flag_start - 340) * zoom,
 			      (-1 * bounds.y1 + y_start - 120) * zoom);
   g_signal_connect(item, "button_press_event",
-		   (GtkSignalFunc) item_event_ok,
+		   (GCallback) item_event_ok,
 		   "locale_reset");
   gc_item_focus_init(item, NULL);
 
@@ -262,7 +262,7 @@ gc_config_start ()
   SET_ITEM_LOCATION(item, x_start, y_start - pixmap_width/2);
 
   g_signal_connect(item, "button_press_event",
-		   (GtkSignalFunc) item_event_ok,
+		   (GCallback) item_event_ok,
 		   "fullscreen");
   gc_item_focus_init(item, NULL);
 
@@ -287,7 +287,7 @@ gc_config_start ()
   SET_ITEM_LOCATION(item, x_start, y_start - pixmap_width/2);
 
   g_signal_connect(item, "button_press_event",
-		   (GtkSignalFunc) item_event_ok,
+		   (GCallback) item_event_ok,
 		   "music");
   gc_item_focus_init(item, NULL);
 
@@ -312,7 +312,7 @@ gc_config_start ()
   SET_ITEM_LOCATION(item, x_start, y_start - pixmap_width/2);
 
   g_signal_connect(item, "button_press_event",
-		   (GtkSignalFunc) item_event_ok,
+		   (GCallback) item_event_ok,
 		   "effect");
   gc_item_focus_init(item, NULL);
 
@@ -337,7 +337,7 @@ gc_config_start ()
   SET_ITEM_LOCATION(item, x_start, y_start - pixmap_width/2);
 
   g_signal_connect(item, "button_press_event",
-		   (GtkSignalFunc) item_event_ok,
+		   (GCallback) item_event_ok,
 		   "zoom");
   gc_item_focus_init(item, NULL);
 
@@ -454,7 +454,7 @@ gc_config_start ()
 			  y,
 			  "#BUTTON_TEXT",
 			  _("OK"),
-			  (GtkSignalFunc) item_event_ok,
+			  (GCallback) item_event_ok,
 			  "ok");
 
   is_displayed = TRUE;
@@ -528,7 +528,7 @@ display_previous_next(guint x_start, guint y_start,
 		    y_start - pixmap_width/2);
 
   g_signal_connect(item, "button_press_event",
-		   (GtkSignalFunc) item_event_ok,
+		   (GCallback) item_event_ok,
 		   eventname_previous);
   gc_item_focus_init(item, NULL);
 
@@ -542,7 +542,7 @@ display_previous_next(guint x_start, guint y_start,
 		    y_start - pixmap_width/2);
 
   g_signal_connect(item, "button_press_event",
-		   (GtkSignalFunc) item_event_ok,
+		   (GCallback) item_event_ok,
 		   eventname_next);
   gc_item_focus_init(item, NULL);
 }
diff --git a/src/gcompris/dialog.c b/src/gcompris/dialog.c
index d036614..e53211b 100644
--- a/src/gcompris/dialog.c
+++ b/src/gcompris/dialog.c
@@ -74,7 +74,7 @@ void gc_dialog(gchar *str, DialogBoxCallBack dbcb)
 				       "svg-id", "#DIALOG",
 				       NULL);
   g_signal_connect(itemDialogText, "button_press_event",
-		   (GtkSignalFunc) item_event_ok,
+		   (GCallback) item_event_ok,
 		   dbcb);
 
   GooCanvasBounds bounds;
@@ -97,7 +97,7 @@ void gc_dialog(gchar *str, DialogBoxCallBack dbcb)
 			  bounds.y2 - 30,
 			  "#BUTTON_TEXT",
 			  _("OK"),
-			  (GtkSignalFunc) item_event_ok,
+			  (GCallback) item_event_ok,
 			  dbcb);
 }
 
diff --git a/src/gcompris/drag.c b/src/gcompris/drag.c
index 4003c20..785dfbe 100644
--- a/src/gcompris/drag.c
+++ b/src/gcompris/drag.c
@@ -189,7 +189,7 @@ gc_drag_start(GooCanvasItem *root_item,
 	      gc_drag_mode_type mode)
 {
   g_signal_connect(root_item, "motion_notify_event",
-  		   (GtkSignalFunc) gc_drag_event_root, NULL);
+  		   (GCallback) gc_drag_event_root, NULL);
   gc_drag_func = function;
   gc_drag_user_data = NULL;
   gc_drag_status = 0;
@@ -214,7 +214,7 @@ gc_drag_stop(GooCanvasItem *root_item)
       gc_drag_func(gc_drag_item, NULL, &event, gc_drag_user_data);
     }
   g_signal_handlers_disconnect_by_func(root_item,
-				       (GtkSignalFunc) gc_drag_event_root,
+				       (GCallback) gc_drag_event_root,
 				       NULL);
   gc_drag_func = NULL;
   gc_drag_user_data = NULL;
diff --git a/src/gcompris/file_selector.c b/src/gcompris/file_selector.c
index beda7cf..0cf5a89 100644
--- a/src/gcompris/file_selector.c
+++ b/src/gcompris/file_selector.c
@@ -202,9 +202,9 @@ display_file_selector(int the_mode,
 				30.0,
 				NULL);
 
-  gtk_signal_connect(GTK_OBJECT(widget_entry), "activate",
-		     GTK_SIGNAL_FUNC(entry_enter_callback),
-		     widget_entry);
+  g_signal_connect(GTK_OBJECT(widget_entry), "activate",
+		   G_CALLBACK(entry_enter_callback),
+		   widget_entry);
 
   gtk_widget_show(widget_entry);
 
@@ -217,7 +217,7 @@ display_file_selector(int the_mode,
     gchar **all_type = g_strsplit(file_exts, " ", 0);
     guint i = 0;
 
-    gtk_combo_filetypes = gtk_combo_box_new_text();
+    gtk_combo_filetypes = GTK_WIDGET(gtk_combo_box_new_text());
 
     /* Extract first string */
     while (all_type[i])
@@ -249,7 +249,7 @@ display_file_selector(int the_mode,
 			  BOARDHEIGHT - 32,
 			  "#BUTTON_TEXT",
 			  _("CANCEL"),
-			  (GtkSignalFunc) item_event_file_selector,
+			  (GCallback) item_event_file_selector,
 			  "/cancel/");
   // OK
   gc_util_button_text_svg(rootitem,
@@ -257,7 +257,7 @@ display_file_selector(int the_mode,
 			  BOARDHEIGHT - 32,
 			  "#BUTTON_TEXT",
 			  (mode==MODE_LOAD ? _("LOAD") : _("SAVE")),
-			  (GtkSignalFunc) item_event_file_selector,
+			  (GCallback) item_event_file_selector,
 			  "/ok/");
 
   file_selector_displayed = TRUE;
@@ -361,7 +361,7 @@ display_files(GooCanvasItem *root_item, gchar *rootdir)
 
   /* Set the scrollwheel event */
   g_signal_connect (adj, "value_changed",
-		    (GtkSignalFunc) item_event_scroll,
+		    (GCallback) item_event_scroll,
 		    canvas);
 
   /* Display the directory name
@@ -441,13 +441,13 @@ display_files(GooCanvasItem *root_item, gchar *rootdir)
       if(g_file_test(allfilename, G_FILE_TEST_IS_DIR))
 	{
 	  g_signal_connect(item, "button_press_event",
-			   (GtkSignalFunc) item_event_directory,
+			   (GCallback) item_event_directory,
 			   allfilename);
 	}
       else
 	{
 	  g_signal_connect(item, "button_press_event",
-			   (GtkSignalFunc) item_event_file_selector,
+			   (GCallback) item_event_file_selector,
 			   allfilename);
 	}
       gc_item_focus_init(item, NULL);
@@ -469,7 +469,7 @@ display_files(GooCanvasItem *root_item, gchar *rootdir)
 				 gc_skin_get_color("gcompris/fileselectcol"),
 				 NULL);
 	  g_signal_connect(_item, "button_press_event",
-			   (GtkSignalFunc) item_event_file_selector,
+			   (GCallback) item_event_file_selector,
 			   allfilename);
 	  gc_item_focus_init(_item, item);
 	}
@@ -491,13 +491,13 @@ display_files(GooCanvasItem *root_item, gchar *rootdir)
       if(g_file_test(allfilename, G_FILE_TEST_IS_DIR))
 	{
 	  g_signal_connect(name_item, "button_press_event",
-			   (GtkSignalFunc) item_event_directory,
+			   (GCallback) item_event_directory,
 			   allfilename);
 	}
       else
 	{
 	  g_signal_connect(name_item, "button_press_event",
-			   (GtkSignalFunc) item_event_file_selector,
+			   (GCallback) item_event_file_selector,
 			   allfilename);
 	}
       gc_item_focus_init(name_item, item);
diff --git a/src/gcompris/gameutil.c b/src/gcompris/gameutil.c
index cd376d4..2c3bf02 100644
--- a/src/gcompris/gameutil.c
+++ b/src/gcompris/gameutil.c
@@ -327,15 +327,15 @@ void gc_item_focus_init(GooCanvasItem *source_item,
 
   /* Avoid double connection */
   g_signal_handlers_disconnect_by_func(source_item,
-				       (GtkSignalFunc) gc_item_focus_event,
+				       (GCallback) gc_item_focus_event,
 				       target_item);
 
   /* connect source to target */
   g_signal_connect(source_item, "enter_notify_event",
-		   (GtkSignalFunc) gc_item_focus_event,
+		   (GCallback) gc_item_focus_event,
 		   target_item);
   g_signal_connect(source_item, "leave_notify_event",
-		   (GtkSignalFunc) gc_item_focus_event,
+		   (GCallback) gc_item_focus_event,
 		   target_item);
 }
 
@@ -358,7 +358,7 @@ void gc_item_focus_remove(GooCanvasItem *source_item,
     target_item = source_item;
 
   g_signal_handlers_disconnect_by_func(source_item,
-				       (GtkSignalFunc) gc_item_focus_event,
+				       (GCallback) gc_item_focus_event,
 				       target_item);
 
   highlight_item = g_object_get_data (G_OBJECT(target_item),
@@ -736,7 +736,7 @@ gc_util_button_text(GooCanvasItem *rootitem,
 		    guint x, guint y,
 		    char *button_file,
 		    char *text,
-		    GtkSignalFunc process,
+		    GCallback process,
 		    gpointer data)
 {
   GdkPixbuf *pixmap;
@@ -752,7 +752,7 @@ gc_util_button_text(GooCanvasItem *rootitem,
 			       NULL);
   g_signal_connect(item,
 		   "button_press_event",
-		   (GtkSignalFunc) process, data);
+		   (GCallback) process, data);
   gc_item_focus_init(item, NULL);
 
   /* The Text */
@@ -789,7 +789,7 @@ gc_util_button_text_svg(GooCanvasItem *rootitem,
 			guint x, guint y,
 			char *button_id,
 			char *text,
-			GtkSignalFunc process,
+			GCallback process,
 			gpointer data)
 {
   GooCanvasItem *item;
@@ -804,7 +804,7 @@ gc_util_button_text_svg(GooCanvasItem *rootitem,
 
   g_signal_connect(item,
 		   "button_press_event",
-		   (GtkSignalFunc) process, data);
+		   (GCallback) process, data);
   gc_item_focus_init(item, NULL);
 
   /* The Text */
diff --git a/src/gcompris/gameutil.h b/src/gcompris/gameutil.h
index d062c22..23719d5 100644
--- a/src/gcompris/gameutil.h
+++ b/src/gcompris/gameutil.h
@@ -93,12 +93,12 @@ void		 gc_util_button_text(GooCanvasItem *rootitem,
 				     guint x, guint y,
 				     char *button_file,
 				     char *text,
-				     GtkSignalFunc process,
+				     GCallback process,
 				     gpointer data);
 void		 gc_util_button_text_svg(GooCanvasItem *rootitem,
 					 guint x, guint y,
 					 char *button_id,
 					 char *text,
-					 GtkSignalFunc process,
+					 GCallback process,
 					 gpointer data);
 #endif
diff --git a/src/gcompris/gcompris.c b/src/gcompris/gcompris.c
index 6e98f96..88b1c12 100644
--- a/src/gcompris/gcompris.c
+++ b/src/gcompris/gcompris.c
@@ -493,12 +493,44 @@ void gc_cursor_hide()
 
   bp = gdk_bitmap_create_from_data(NULL , in_cursor , 1, 1);
   cursor = gdk_cursor_new_from_pixmap(bp , bp ,
-				      &color , &color ,
-				      1 , 1);
+                                      &color , &color ,
+                                      1 , 1);
   gdk_window_set_cursor(window->window , cursor);
   gdk_cursor_unref(cursor);
 }
 
+
+#if 0
+  // READY FOR GTK 3
+void gc_cursor_hide()
+{
+
+  GdkCursor *cursor;
+  cairo_surface_t *s;
+  GdkPixbuf *pixbuf;
+  cairo_t *cr;
+
+  s = cairo_image_surface_create (CAIRO_FORMAT_A1, 1, 1);
+  cr = cairo_create (s);
+  cairo_set_source_rgba(cr, 0.0, 0.0, 0.0, 1.0);
+  cairo_rectangle(cr, 0, 0, 1, 1);
+  cairo_fill(cr);
+  cairo_destroy(cr);
+
+  pixbuf = gdk_pixbuf_get_from_surface (s,
+					0, 0,
+					1, 1);
+  cairo_surface_destroy (s);
+
+  cursor = gdk_cursor_new_from_pixbuf (NULL, pixbuf, 0, 0);
+
+  g_object_unref (pixbuf);
+
+  gdk_window_set_cursor(window->window , cursor);
+  gdk_cursor_unref(cursor);
+}
+#endif
+
 void gc_cursor_set(guint gdk_cursor_type)
 {
   GdkCursor *cursor = NULL;
@@ -514,7 +546,7 @@ void gc_cursor_set(guint gdk_cursor_type)
   if (gdk_cursor_type < GCOMPRIS_FIRST_CUSTOM_CURSOR) {
     cursor = gdk_cursor_new(gdk_cursor_type);
     gdk_window_set_cursor (window->window, cursor);
-    gdk_cursor_destroy(cursor);
+    gdk_cursor_unref(cursor);
   } else { // we use a custom cursor
     GdkPixbuf *cursor_pixbuf = NULL;
 
@@ -754,8 +786,8 @@ init_workspace()
   GtkWidget *quit_item;
   quit_item = gtk_menu_item_new();
   ige_mac_menu_set_quit_menu_item(GTK_MENU_ITEM (quit_item));
-  gtk_signal_connect(GTK_OBJECT (quit_item),
-		     "activate", GTK_SIGNAL_FUNC (quit_cb), NULL);
+  g_signal_connect(GTK_OBJECT (quit_item),
+		   "activate", G_CALLBACK (quit_cb), NULL);
   gtk_widget_show (quit_item);
 
 #endif
@@ -851,11 +883,11 @@ static void setup_window ()
 		    G_CALLBACK (_realize_callback), NULL);
   gtk_widget_realize (window);
 
-  gtk_signal_connect (GTK_OBJECT (window), "delete_event",
-		      GTK_SIGNAL_FUNC (quit_cb), NULL);
+  g_signal_connect (GTK_OBJECT (window), "delete_event",
+		    G_CALLBACK (quit_cb), NULL);
 
-  gtk_signal_connect (GTK_OBJECT (window), "map_event",
-		      GTK_SIGNAL_FUNC (map_cb), NULL);
+  g_signal_connect (GTK_OBJECT (window), "map_event",
+		    G_CALLBACK (map_cb), NULL);
 
   // Set the cursor
   if (properties->nocursor)
@@ -874,17 +906,17 @@ static void setup_window ()
 		NULL);
 
 
-  gtk_signal_connect_after (GTK_OBJECT (window), "key_press_event",
-			    GTK_SIGNAL_FUNC (board_widget_key_press_callback), 0);
+  g_signal_connect_after (GTK_OBJECT (window), "key_press_event",
+			  (GCallback) board_widget_key_press_callback, 0);
   g_signal_connect_after (canvas,
 			  "key_press_event",
-			  GTK_SIGNAL_FUNC (board_widget_key_press_callback), 0);
+			  (GCallback) board_widget_key_press_callback, 0);
 
   gc_im_init(window);
 
   init_workspace();
 
-  GTK_WIDGET_SET_FLAGS (canvas, GTK_CAN_FOCUS);
+  gtk_widget_set_can_focus(canvas, TRUE);
   gtk_widget_grab_focus (canvas);
 
 }
@@ -936,9 +968,9 @@ display_activation_dialog()
 			   100.0,
 			   30.0,
 			   NULL);
-  gtk_signal_connect(GTK_OBJECT(widget_activation_entry), "activate",
-		     GTK_SIGNAL_FUNC(activation_enter_callback),
-		     NULL);
+  g_signal_connect(GTK_OBJECT(widget_activation_entry), "activate",
+		   GTK_SIGNAL_FUNC(activation_enter_callback),
+		   NULL);
 
   char *msg = g_strdup_printf( \
       _("GCompris is free software released under the GPL License. "
diff --git a/src/gcompris/gcompris_confirm.c b/src/gcompris/gcompris_confirm.c
index ab1a584..805d987 100644
--- a/src/gcompris/gcompris_confirm.c
+++ b/src/gcompris/gcompris_confirm.c
@@ -232,7 +232,7 @@ display_confirm(gchar *title,
 			   button_y + 2*button_h/3);
 
   g_signal_connect(no_button, "button_press_event",
-		     (GtkSignalFunc) button_event,
+		     (GCallback) button_event,
 		     "/no/");
 
   gc_item_focus_init(no_button, NULL);
@@ -247,7 +247,7 @@ display_confirm(gchar *title,
 			   button_y + 2*button_h/3);
 
   g_signal_connect(no_cross, "button_press_event",
-		     (GtkSignalFunc) button_event,
+		     (GCallback) button_event,
 		     "/no/");
   gc_item_focus_init(no_cross, no_button);
 
@@ -273,7 +273,7 @@ display_confirm(gchar *title,
 			   button_y + button_h/3);
 
   g_signal_connect(yes_button, "button_press_event",
-		     (GtkSignalFunc) button_event,
+		     (GCallback) button_event,
 		     "/yes/");
 
   gc_item_focus_init(yes_button, NULL);
@@ -289,7 +289,7 @@ display_confirm(gchar *title,
 
 
   g_signal_connect(yes_stick, "button_press_event",
-		     (GtkSignalFunc) button_event,
+		     (GCallback) button_event,
 		     "/yes/");
   gc_item_focus_init(yes_stick, yes_button);
 
diff --git a/src/gcompris/help.c b/src/gcompris/help.c
index a016827..d33441c 100644
--- a/src/gcompris/help.c
+++ b/src/gcompris/help.c
@@ -171,7 +171,7 @@ void gc_help_start (GcomprisBoard *gcomprisBoard)
 			y_start  - 10)
 
       g_signal_connect(item_prerequisite, "button_press_event",
-			 (GtkSignalFunc) item_event_help,
+			 (GCallback) item_event_help,
 			 "prerequisite");
       gc_item_focus_init(item_prerequisite, NULL);
 
@@ -186,7 +186,7 @@ void gc_help_start (GcomprisBoard *gcomprisBoard)
 			     "fill-color-rgba", gc_skin_get_color("gcompris/helpunselect"),
 			     NULL);
       g_signal_connect(item_prerequisite_text, "button_press_event",
-			 (GtkSignalFunc) item_event_help,
+			 (GCallback) item_event_help,
 			 "prerequisite");
     }
 
@@ -202,7 +202,7 @@ void gc_help_start (GcomprisBoard *gcomprisBoard)
 			y_start  - 10);
 
       g_signal_connect(item_goal, "button_press_event",
-			 (GtkSignalFunc) item_event_help,
+			 (GCallback) item_event_help,
 			 "goal");
       gc_item_focus_init(item_goal, NULL);
 
@@ -216,7 +216,7 @@ void gc_help_start (GcomprisBoard *gcomprisBoard)
 					    "fill-color-rgba", gc_skin_get_color("gcompris/helpunselect"),
 					    NULL);
       g_signal_connect(item_goal_text, "button_press_event",
-			 (GtkSignalFunc) item_event_help,
+			 (GCallback) item_event_help,
 			 "goal");
     }
 
@@ -232,7 +232,7 @@ void gc_help_start (GcomprisBoard *gcomprisBoard)
 			y_start  - 10);
 
       g_signal_connect(item_manual, "button_press_event",
-			 (GtkSignalFunc) item_event_help,
+			 (GCallback) item_event_help,
 			 "manual");
       gc_item_focus_init(item_manual, NULL);
 
@@ -246,7 +246,7 @@ void gc_help_start (GcomprisBoard *gcomprisBoard)
 					      "fill-color-rgba", gc_skin_get_color("gcompris/helpunselect"),
 					      NULL);
       g_signal_connect(item_manual_text, "button_press_event",
-			 (GtkSignalFunc) item_event_help,
+			 (GCallback) item_event_help,
 			 "manual");
     }
 
@@ -262,7 +262,7 @@ void gc_help_start (GcomprisBoard *gcomprisBoard)
 			y_start  - 10);
 
       g_signal_connect(item_credit, "button_press_event",
-			 (GtkSignalFunc) item_event_help,
+			 (GCallback) item_event_help,
 			 "credit");
       gc_item_focus_init(item_credit, NULL);
 
@@ -276,7 +276,7 @@ void gc_help_start (GcomprisBoard *gcomprisBoard)
 					      "fill-color-rgba", gc_skin_get_color("gcompris/helpunselect"),
 					      NULL);
       g_signal_connect(item_credit_text, "button_press_event",
-			 (GtkSignalFunc) item_event_help,
+			 (GCallback) item_event_help,
 			 "credit");
     }
 
@@ -315,8 +315,8 @@ void gc_help_start (GcomprisBoard *gcomprisBoard)
   gtk_text_view_set_editable(GTK_TEXT_VIEW (view), FALSE);
   gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW (view), FALSE);
 
-  gtk_signal_connect(GTK_OBJECT(view), "button-press-event",
-		     (GtkSignalFunc) event_disable_right_click_popup, NULL);
+  g_signal_connect(GTK_OBJECT(view), "button-press-event",
+		   (GCallback) event_disable_right_click_popup, NULL);
 
   PangoFontDescription *font_desc;
   font_desc = pango_font_description_from_string (gc_skin_font_content);
@@ -353,7 +353,7 @@ void gc_help_start (GcomprisBoard *gcomprisBoard)
 			  y,
 			  "#BUTTON_TEXT",
 			  _("OK"),
-			  (GtkSignalFunc) item_event_help,
+			  (GCallback) item_event_help,
 			  "ok");
 
   gc_bar_hide(TRUE);
diff --git a/src/gcompris/images_selector.c b/src/gcompris/images_selector.c
index 8c38007..bc5a157 100644
--- a/src/gcompris/images_selector.c
+++ b/src/gcompris/images_selector.c
@@ -186,7 +186,7 @@ gc_selector_images_start (GcomprisBoard *gcomprisBoard, gchar *dataset,
 
   /* Set the scrollwheel event */
   g_signal_connect (list_adj, "value_changed",
-		    (GtkSignalFunc) item_event_scroll,
+		    (GCallback) item_event_scroll,
 		    canvas_list_selector);
 
   /*
@@ -240,7 +240,7 @@ gc_selector_images_start (GcomprisBoard *gcomprisBoard, gchar *dataset,
 
   /* Set the scrollwheel event */
   g_signal_connect (image_adj, "value_changed",
-		    (GtkSignalFunc) item_event_scroll,
+		    (GCallback) item_event_scroll,
 		    canvas_image_selector);
 
   /*
@@ -304,7 +304,7 @@ gc_selector_images_start (GcomprisBoard *gcomprisBoard, gchar *dataset,
 			  BOARDHEIGHT - 32,
 			  "#BUTTON_TEXT",
 			  _("OK"),
-			  (GtkSignalFunc) item_event_images_selector,
+			  (GCallback) item_event_images_selector,
 			  "/ok/");
 }
 
@@ -374,7 +374,7 @@ display_image(gchar *imagename, GooCanvasItem *root_item)
   gdk_pixbuf_unref(pixmap);
 
   g_signal_connect(item, "button_press_event",
-		   (GtkSignalFunc) item_event_images_selector,
+		   (GCallback) item_event_images_selector,
 		   imagename);
   gc_item_focus_init(item, NULL);
 
@@ -430,7 +430,7 @@ display_image_set(gchar *imagename, GSList *imagelist)
   g_object_set_data (G_OBJECT (item), "imagelist", imagelist);
 
   g_signal_connect(item, "button_press_event",
-		     (GtkSignalFunc) item_event_imageset_selector,
+		     (GCallback) item_event_imageset_selector,
 		     imagename);
   gc_item_focus_init(item, NULL);
 
diff --git a/src/gcompris/timer.c b/src/gcompris/timer.c
index 5082a30..b6d44ed 100644
--- a/src/gcompris/timer.c
+++ b/src/gcompris/timer.c
@@ -219,13 +219,13 @@ start_animation()
       /* Perform under second animation */
       subratio = 5;
       subanimate_id = g_timeout_add (1000/subratio,
-				     (GtkFunction) subtimer_increment,
+				     (GSourceFunc) subtimer_increment,
 				     gc_timer_item);
       break;
     }
 
   animate_id = g_timeout_add (1000,
-			      (GtkFunction) timer_increment,
+			      (GSourceFunc) timer_increment,
 			      gc_timer_item);
 }
 
diff --git a/src/gletters-activity/gletters.c b/src/gletters-activity/gletters.c
index 5c2892d..e5db45c 100644
--- a/src/gletters-activity/gletters.c
+++ b/src/gletters-activity/gletters.c
@@ -105,8 +105,8 @@ static void gletter_config_start(GcomprisBoard *agcomprisBoard,
 static void gletter_config_stop(void);
 
 static GooCanvasItem *gletters_create_item(GooCanvasItem *parent);
-static gint gletters_drop_items (GtkWidget *widget, gpointer data);
-static gint gletters_move_items (GtkWidget *widget, gpointer data);
+static gboolean gletters_drop_items (gpointer data);
+static gboolean gletters_move_items (gpointer data);
 static void gletters_destroy_item(GooCanvasItem *item);
 static void gletters_destroy_items(void);
 static void gletters_destroy_all_items(void);
@@ -186,11 +186,11 @@ static void pause_board (gboolean pause)
   if(pause)
     {
       if (dummy_id) {
-	gtk_timeout_remove (dummy_id);
+	g_source_remove (dummy_id);
 	dummy_id = 0;
       }
       if (drop_items_id) {
-	gtk_timeout_remove (drop_items_id);
+	g_source_remove (drop_items_id);
 	drop_items_id = 0;
       }
     }
@@ -203,11 +203,11 @@ static void pause_board (gboolean pause)
 	}
 
       if(!drop_items_id) {
-	drop_items_id = gtk_timeout_add (1000,
-					 (GtkFunction) gletters_drop_items, NULL);
+	drop_items_id = g_timeout_add (1000,
+				       gletters_drop_items, NULL);
       }
       if(!dummy_id) {
-	dummy_id = gtk_timeout_add (1000, (GtkFunction) gletters_move_items, NULL);
+	dummy_id = g_timeout_add (1000, gletters_move_items, NULL);
       }
     }
 }
@@ -561,15 +561,15 @@ static void gletters_destroy_all_items()
  * This does the moves of the game items on the play canvas
  *
  */
-static gint gletters_move_items (GtkWidget *widget, gpointer data)
+static gboolean gletters_move_items (gpointer data)
 {
   g_list_foreach (item_list, (GFunc) gletters_move_item, NULL);
 
   /* Destroy items that falls out of the canvas */
   gletters_destroy_items();
 
-  dummy_id = gtk_timeout_add (gc_timing (speed, actors_count),
-			      (GtkFunction) gletters_move_items, NULL);
+  dummy_id = g_timeout_add (gc_timing (speed, actors_count),
+			    gletters_move_items, NULL);
 
   return(FALSE);
 }
@@ -691,13 +691,13 @@ static void gletters_add_new_item()
  * This is called on a low frequency and is used to drop new items
  *
  */
-static gint gletters_drop_items (GtkWidget *widget, gpointer data)
+static gboolean gletters_drop_items (gpointer data)
 {
   gc_sound_play_ogg ("sounds/level.wav", NULL);
   gletters_add_new_item();
 
-  drop_items_id = gtk_timeout_add (fallSpeed,
-				   (GtkFunction) gletters_drop_items, NULL);
+  drop_items_id = g_timeout_add (fallSpeed,
+				 gletters_drop_items, NULL);
   return (FALSE);
 }
 
@@ -728,12 +728,12 @@ static void player_win(GooCanvasItem *item)
 	{
 	  if (drop_items_id) {
 	    /* Remove pending new item creation to sync the falls */
-	    gtk_timeout_remove (drop_items_id);
+	    g_source_remove (drop_items_id);
 	    drop_items_id = 0;
 	  }
 	  if(!drop_items_id) {
-	    drop_items_id = gtk_timeout_add (0,
-					     (GtkFunction) gletters_drop_items, NULL);
+	    drop_items_id = g_timeout_add (0,
+					   gletters_drop_items, NULL);
 	  }
 	}
     }
diff --git a/src/hanoi-activity/hanoi.c b/src/hanoi-activity/hanoi.c
index 4a02a98..f054b5c 100644
--- a/src/hanoi-activity/hanoi.c
+++ b/src/hanoi-activity/hanoi.c
@@ -544,17 +544,17 @@ hanoi_create_item(GooCanvasItem *parent)
 	      if(i != number_of_item_x+1)
 		{
 		  g_signal_connect(item, "button_press_event",
-				   (GtkSignalFunc)gc_drag_event,
+				   (GCallback)gc_drag_event,
 				   position[i][j]);
 		  g_signal_connect(item, "button_release_event",
-				   (GtkSignalFunc)gc_drag_event,
+				   (GCallback)gc_drag_event,
 				   position[i][j]);
 
 		  g_signal_connect(item, "enter_notify_event",
-				   (GtkSignalFunc) item_event,
+				   (GCallback) item_event,
 				   position[i][j]);
 		  g_signal_connect(item, "leave_notify_event",
-				   (GtkSignalFunc) item_event,
+				   (GCallback) item_event,
 				   position[i][j]);
 		}
 	    }
diff --git a/src/hanoi_real-activity/hanoi_real.c b/src/hanoi_real-activity/hanoi_real.c
index 47e81bc..3cb9fe0 100644
--- a/src/hanoi_real-activity/hanoi_real.c
+++ b/src/hanoi_real-activity/hanoi_real.c
@@ -367,10 +367,10 @@ hanoi_create_item(GooCanvasItem *parent)
 
 	      g_signal_connect(item,
 			       "button_press_event",
-			       (GtkSignalFunc) gc_drag_event,  position[i][j]);
+			       (GCallback) gc_drag_event,  position[i][j]);
 	      g_signal_connect(item,
 			       "button_release_event",
-			       (GtkSignalFunc) gc_drag_event,  position[i][j]);
+			       (GCallback) gc_drag_event,  position[i][j]);
 	    }
 	}
     }
diff --git a/src/imageid-activity/imageid.c b/src/imageid-activity/imageid.c
index 3dcc6bd..c7724aa 100644
--- a/src/imageid-activity/imageid.c
+++ b/src/imageid-activity/imageid.c
@@ -349,7 +349,7 @@ imageid_create_item(GooCanvasItem *parent)
 		      "button", button);
 
       g_signal_connect(button, "button_press_event",
-		       (GtkSignalFunc) item_event,
+		       (GCallback) item_event,
 		       GINT_TO_POINTER(i));
 
       item = goo_canvas_text_new (group,
@@ -363,7 +363,7 @@ imageid_create_item(GooCanvasItem *parent)
 				  NULL);
 
       g_signal_connect(item, "button_press_event",
-		       (GtkSignalFunc) item_event,
+		       (GCallback) item_event,
 		       GINT_TO_POINTER(i));
 
       item = goo_canvas_text_new (group,
@@ -377,7 +377,7 @@ imageid_create_item(GooCanvasItem *parent)
 				  NULL);
 
       g_signal_connect(item, "button_press_event",
-		       (GtkSignalFunc) item_event,
+		       (GCallback) item_event,
 		       GINT_TO_POINTER(i));
 
       yp +=  button_pixmap_height + vertical_separation;
diff --git a/src/leftright-activity/leftright.c b/src/leftright-activity/leftright.c
index 3a7c72c..82e7c83 100644
--- a/src/leftright-activity/leftright.c
+++ b/src/leftright-activity/leftright.c
@@ -228,13 +228,13 @@ static GooCanvasItem *leftright_create_item(GooCanvasItem *parent) {
 			  BOARDWIDTH/3, BOARDHEIGHT*2/3 + 50,
 			  "#BUTTON_TEXT",
 			  _("left"),
-			  (GtkSignalFunc) clicked_left, NULL);
+			  (GCallback) clicked_left, NULL);
 
   gc_util_button_text_svg(boardRootItem,
 			  BOARDWIDTH*2/3, BOARDHEIGHT*2/3 + 50,
 			  "#BUTTON_TEXT",
 			  _("right"),
-			  (GtkSignalFunc) clicked_right, NULL);
+			  (GCallback) clicked_right, NULL);
 
   // make sure that next hand is not the same as previous
   do {
diff --git a/src/magic_hat_minus-activity/magic_hat.c b/src/magic_hat_minus-activity/magic_hat.c
index 1721591..68add83 100644
--- a/src/magic_hat_minus-activity/magic_hat.c
+++ b/src/magic_hat_minus-activity/magic_hat.c
@@ -154,7 +154,7 @@ static void pause_board (gboolean pause)
     return;
 
   if (timer_id) {
-    gtk_timeout_remove (timer_id);
+    g_source_remove (timer_id);
     timer_id = 0;
   }
 
@@ -197,7 +197,7 @@ static void start_board (GcomprisBoard *agcomprisBoard)
 static void end_board () {
 
   if (timer_id) {
-	gtk_timeout_remove (timer_id);
+	g_source_remove (timer_id);
 	timer_id = 0;
   }
 
@@ -281,7 +281,7 @@ static void magic_hat_next_level() {
 static void magic_hat_destroy_all_items()
 {
   if (timer_id) {
-    gtk_timeout_remove (timer_id);
+    g_source_remove (timer_id);
     timer_id = 0;
   }
 
@@ -512,7 +512,7 @@ static void draw_hat(GooCanvasItem *item,
   if (type == STARS) {
 	 hat_event_id = g_signal_connect(item,
 					 "button_press_event",
-					 (GtkSignalFunc) hat_event,
+					 (GCallback) hat_event,
 					 NULL);
 	 gc_item_focus_init(item, NULL);
   }
@@ -580,7 +580,7 @@ static void place_item(frame * my_frame, int type)
 
       if (type == DYNAMIC)
 	g_signal_connect(item, "button_press_event",
-			 (GtkSignalFunc) item_event,
+			 (GCallback) item_event,
 			 GINT_TO_POINTER(MAX_ITEM * i + j));
 
       if (type == UNDERHAT || type == NORMAL)
@@ -686,10 +686,10 @@ static gboolean hat_event (GooCanvasItem  *item,
     // Make the items move from/out the hat, depending on the mode
     // Wait a few seconds between the two frames
     move_stars(&frame1);
-    timer_id = g_timeout_add(1200, (GtkFunction) move_stars, &frame2);
+    timer_id = g_timeout_add(1200, (GSourceFunc) move_stars, &frame2);
 
     // Wait again a few seconds before closing the hat. Then the game is ready to start
-    timer_id = g_timeout_add(2600, (GtkFunction) close_hat, NULL);
+    timer_id = g_timeout_add(2600, (GSourceFunc) close_hat, NULL);
   }
 
   return FALSE;
@@ -735,7 +735,7 @@ static gint move_stars(frame *my_frame) {
 		}
 
 		my_move->frame = my_frame->id;
-		timer_id = g_timeout_add(50, (GtkFunction) smooth_move, my_move);
+		timer_id = g_timeout_add(50, (GSourceFunc) smooth_move, my_move);
 	}
   }
   return FALSE;
diff --git a/src/maze-activity/maze.c b/src/maze-activity/maze.c
index 8f4033d..184915a 100644
--- a/src/maze-activity/maze.c
+++ b/src/maze-activity/maze.c
@@ -300,7 +300,7 @@ static void maze_next_level() {
 
   g_signal_connect(tuxitem,
 		   "button_press_event",
-		   (GtkSignalFunc) tux_event, NULL);
+		   (GCallback) tux_event, NULL);
 
   /* Draw the target */
   pixmap = gc_pixmap_load("maze/door.png");
diff --git a/src/memory-activity/memory.c b/src/memory-activity/memory.c
index 295a1b2..744d36c 100644
--- a/src/memory-activity/memory.c
+++ b/src/memory-activity/memory.c
@@ -1475,7 +1475,7 @@ static void create_item(GooCanvasItem *parent)
 
 	  g_object_set (memoryItem->frontcardItem, "visibility", GOO_CANVAS_ITEM_INVISIBLE, NULL);
 	  g_signal_connect(memoryItem->rootItem, "button_press_event",
-			     (GtkSignalFunc) item_event,
+			     (GCallback) item_event,
 			     memoryItem);
 
 	}
diff --git a/src/missing_letter-activity/missingletter.c b/src/missing_letter-activity/missingletter.c
index 2ffac91..bc0c9a1 100644
--- a/src/missing_letter-activity/missingletter.c
+++ b/src/missing_letter-activity/missingletter.c
@@ -366,7 +366,7 @@ missing_letter_create_item(GooCanvasItem *parent)
 			"solution", GINT_TO_POINTER(board->solution));
 
       g_signal_connect(button, "button_press_event",
-		       (GtkSignalFunc) item_event,
+		       (GCallback) item_event,
 		       GINT_TO_POINTER(i));
 
       item = goo_canvas_text_new (group,
@@ -380,7 +380,7 @@ missing_letter_create_item(GooCanvasItem *parent)
 				  NULL);
 
       g_signal_connect(item, "button_press_event",
-		       (GtkSignalFunc) item_event,
+		       (GCallback) item_event,
 		       GINT_TO_POINTER(i));
 
       item = goo_canvas_text_new (group,
@@ -394,7 +394,7 @@ missing_letter_create_item(GooCanvasItem *parent)
 				  NULL);
 
       g_signal_connect(item, "button_press_event",
-		       (GtkSignalFunc) item_event,
+		       (GCallback) item_event,
 		       GINT_TO_POINTER(i));
 
       yOffset += gdk_pixbuf_get_height(button_pixmap) + vertical_separation;
diff --git a/src/money-activity/money.c b/src/money-activity/money.c
index 30a5524..b5909ab 100644
--- a/src/money-activity/money.c
+++ b/src/money-activity/money.c
@@ -39,8 +39,8 @@ static void	 money_next_level(void);
 void		 moneyactivity_process_ok(void);
 static void	 display_paying_tux(guint note);
 
-Money_Widget    *tux_money    = NULL;
-Money_Widget    *seller_money = NULL;
+MoneyWidget     *tux_money    = NULL;
+MoneyWidget     *seller_money = NULL;
 
 static float	 price_target = 0;
 
@@ -255,7 +255,7 @@ static void money_next_level()
 					    NULL);
   SET_ITEM_LOCATION(item, 725, 230);
   g_signal_connect(item, "button_press_event",
-		   (GtkSignalFunc) moneyactivity_process_ok, NULL);
+		   (GCallback) moneyactivity_process_ok, NULL);
   gc_item_focus_init(item, NULL);
 
   tux_money = MONEY_WIDGET(money_widget_new());
@@ -840,11 +840,11 @@ static void money_destroy_all_items()
     goo_canvas_item_remove(boardRootItem);
 
   if(tux_money!=NULL)
-    gtk_object_destroy (GTK_OBJECT (tux_money));
+    g_object_unref (G_OBJECT (tux_money));
   tux_money = NULL;
 
   if(seller_money!=NULL)
-    gtk_object_destroy (GTK_OBJECT (seller_money));
+    g_object_unref (G_OBJECT (seller_money));
   seller_money = NULL;
 
   boardRootItem = NULL;
diff --git a/src/money-activity/money_widget.c b/src/money-activity/money_widget.c
index 21e73f5..ca10a89 100644
--- a/src/money-activity/money_widget.c
+++ b/src/money-activity/money_widget.c
@@ -27,7 +27,7 @@
 /* From money.c */
 void	 moneyactivity_process_ok(void);
 
-struct _Money_WidgetPrivate {
+struct _MoneyWidgetPrivate {
   GooCanvasItem	*rootItem;	/* The canvas to display our euros in             */
   double		 x1;		/* Coordinate of the widget                       */
   double		 y1;
@@ -37,7 +37,7 @@ struct _Money_WidgetPrivate {
   guint			 lines;		/* Number of lines				  */
   guint			 next_spot;	/* Next spot to display a money item		  */
   float			 total;		/* The number of euro in this pocket              */
-  Money_Widget		*targetWidget;	/* Target money widget to add when remove here	  */
+  MoneyWidget		*targetWidget;	/* Target money widget to add when remove here	  */
   gboolean		 display_total;	/* Display or not the total of this pocket        */
 
   GooCanvasItem		*item_total;	/* Item to display the total                      */
@@ -71,7 +71,7 @@ static const MoneyList euroList[] =
 };
 
 typedef struct {
-  Money_Widget		*moneyWidget;
+  MoneyWidget		*moneyWidget;
   GooCanvasItem		*item;
   MoneyEuroType		 value;
   gboolean		 inPocket;
@@ -80,44 +80,24 @@ typedef struct {
 #define BORDER_GAP	6
 
 /* Prototypes */
-static void class_init (Money_WidgetClass *class);
-static void init (Money_Widget *pos);
-static void money_display_total(Money_Widget *moneyWidget);
+static void money_display_total(MoneyWidget *moneyWidget);
 static gboolean item_event (GooCanvasItem  *item,
 			    GooCanvasItem  *target,
 			    GdkEventButton *event,
 			    MoneyItem *moneyItem);
 
-GtkType
-money_widget_get_type ()
-{
-	static guint money_widget_type = 0;
-
-	if (!money_widget_type) {
-		GtkTypeInfo money_widget_info = {
-			"Money_Widget",
-			sizeof (Money_Widget),
-			sizeof (Money_WidgetClass),
-			(GtkClassInitFunc) class_init,
-			(GtkObjectInitFunc) init,
-			(gpointer) NULL,
-			(gpointer) NULL,
-			(GtkClassInitFunc) NULL
-		};
-		money_widget_type = gtk_type_unique (gtk_object_get_type (),
-						 &money_widget_info);
-	}
+#define MONEY_WIDGET_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TYPE_MONEY_WIDGET, MoneyWidgetPrivate))
 
-	return money_widget_type;
-}
+
+G_DEFINE_TYPE(MoneyWidget, money_widget, G_TYPE_OBJECT);
 
 #if 0
 static void
-finalize (GtkObject *object)
+finalize (GObject *object)
 {
   MoneyItem	  *moneyitem;
 
-  Money_Widget *moneyWidget = (Money_Widget *) object;
+  MoneyWidget *moneyWidget = (MoneyWidget *) object;
 
   printf("ERROR : Finalize is NEVER CALLED\n");
   /* FIXME: CLEANUP CODE UNTESTED */
@@ -136,53 +116,69 @@ finalize (GtkObject *object)
 }
 #endif
 
-static void
-class_init (Money_WidgetClass *class)
+static GObject *
+money_widget_constructor (GType                  gtype,
+			  guint                  n_properties,
+			  GObjectConstructParam *properties)
 {
-#if 0
-  GtkObjectClass *object_class;
+  GObject *obj;
 
-  object_class = (GtkObjectClass*) class;
+  {
+    /* Always chain up to the parent constructor */
+    obj = G_OBJECT_CLASS (money_widget_parent_class)->constructor (gtype, n_properties, properties);
+  }
 
-  object_class->destroy = finalize;
-#endif
+  /* update the object state depending on constructor properties */
+
+  return obj;
 }
 
 static void
-init (Money_Widget *pos)
+money_widget_class_init (MoneyWidgetClass *klass)
 {
-  pos->priv = g_new0 (Money_WidgetPrivate, 1);
-  pos->priv->total = 0;
+  g_type_class_add_private (klass, sizeof (MoneyWidgetPrivate));
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+  gobject_class->constructor = money_widget_constructor;
+
+}
+
+static void
+money_widget_init (MoneyWidget *self)
+{
+  MoneyWidgetPrivate *priv;
+  self->priv = priv = MONEY_WIDGET_GET_PRIVATE (self);
+
+  priv->total = 0;
 
 }
 
-GtkObject *
+GObject *
 money_widget_new ()
 {
-	return GTK_OBJECT (gtk_type_new (money_widget_get_type ()));
+  return G_OBJECT (g_object_new (money_widget_get_type (), NULL));
 }
 
-Money_Widget *
-money_widget_copy (Money_Widget *pos)
+MoneyWidget *
+money_widget_copy (MoneyWidget *pos)
 {
-	Money_Widget *cpPos;
+	MoneyWidget *cpPos;
 
 	cpPos = MONEY_WIDGET (money_widget_new ());
 
-	memcpy (cpPos->priv, pos->priv, sizeof (Money_WidgetPrivate));
+	memcpy (cpPos->priv, pos->priv, sizeof (MoneyWidgetPrivate));
 
 	return cpPos;
 }
 
 void
-money_widget_set_target (Money_Widget *moneyWidget,
-			 Money_Widget *targetWidget)
+money_widget_set_target (MoneyWidget *moneyWidget,
+			 MoneyWidget *targetWidget)
 {
   moneyWidget->priv->targetWidget = targetWidget;
 }
 
 void
-money_widget_set_position (Money_Widget *moneyWidget,
+money_widget_set_position (MoneyWidget *moneyWidget,
 			   GooCanvasItem *rootItem,
 			   double x1,
 			   double y1,
@@ -229,7 +225,7 @@ money_widget_set_position (Money_Widget *moneyWidget,
 
 }
 
-static void money_display_total(Money_Widget *moneyWidget)
+static void money_display_total(MoneyWidget *moneyWidget)
 {
   gchar *tmpstr;
   g_return_if_fail (moneyWidget != NULL);
@@ -244,7 +240,7 @@ static void money_display_total(Money_Widget *moneyWidget)
 }
 
 void
-money_widget_add (Money_Widget *moneyWidget, MoneyEuroType value)
+money_widget_add (MoneyWidget *moneyWidget, MoneyEuroType value)
 {
   GooCanvasItem *item;
   RsvgHandle    *svg_handle;
@@ -322,7 +318,7 @@ money_widget_add (Money_Widget *moneyWidget, MoneyEuroType value)
 		   moneyitem);
 
   g_signal_connect(item,
-		   "button_press_event", (GtkSignalFunc) item_event,
+		   "button_press_event", (GCallback) item_event,
 		   moneyitem);
 
   g_object_unref(svg_handle);
@@ -335,7 +331,7 @@ money_widget_add (Money_Widget *moneyWidget, MoneyEuroType value)
 }
 
 void
-money_widget_remove(Money_Widget *moneyWidget, MoneyEuroType value)
+money_widget_remove(MoneyWidget *moneyWidget, MoneyEuroType value)
 {
   g_return_if_fail (moneyWidget != NULL);
 
@@ -345,7 +341,7 @@ money_widget_remove(Money_Widget *moneyWidget, MoneyEuroType value)
 }
 
 float
-money_widget_get_total (Money_Widget *moneyWidget)
+money_widget_get_total (MoneyWidget *moneyWidget)
 {
   if(moneyWidget == NULL)
     return 0;
diff --git a/src/money-activity/money_widget.h b/src/money-activity/money_widget.h
index c6f47a1..e33769b 100644
--- a/src/money-activity/money_widget.h
+++ b/src/money-activity/money_widget.h
@@ -32,22 +32,22 @@ extern "C" {
 #endif /* __cplusplus */
 
 #define TYPE_MONEY_WIDGET	   (money_widget_get_type ())
-#define MONEY_WIDGET(obj)          GTK_CHECK_CAST (obj, TYPE_MONEY_WIDGET, Money_Widget)
-#define MONEY_WIDGET_CLASS(klass)  GTK_CHECK_CLASS_CAST (klass, TYPE_MONEY_WIDGET, Money_WidgetClass)
-#define IS_MONEY_WIDGET(obj)       GTK_CHECK_TYPE (obj, TYPE_MONEY_WIDGET)
+#define MONEY_WIDGET(obj)          (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MONEY_WIDGET, MoneyWidget))
+#define MONEY_WIDGET_CLASS(klass)  (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MONEY_WIDGET, MoneyWidgetClass))
+#define IS_MONEY_WIDGET(obj)       (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MONEY_WIDGET))
 
-typedef struct _Money_Widget        Money_Widget;
-typedef struct _Money_WidgetClass   Money_WidgetClass;
-typedef struct _Money_WidgetPrivate Money_WidgetPrivate;
+typedef struct _MoneyWidget        MoneyWidget;
+typedef struct _MoneyWidgetClass   MoneyWidgetClass;
+typedef struct _MoneyWidgetPrivate MoneyWidgetPrivate;
 
-struct _Money_WidgetClass {
-	GtkObjectClass parent_class;
+struct _MoneyWidgetClass {
+	GObjectClass parent_class;
 };
 
-struct _Money_Widget {
-	GtkObject        object;
+struct _MoneyWidget {
+	GObject        parent_instance;
 
-	Money_WidgetPrivate *priv;
+	MoneyWidgetPrivate *priv;
 };
 
 typedef enum {
@@ -66,13 +66,13 @@ typedef enum {
 } MoneyEuroType;
 
 
-GtkType        money_widget_get_type             (void);
-GtkObject     *money_widget_new                  (void);
-Money_Widget  *money_widget_copy                 (Money_Widget *moneyWidget);
+GType          money_widget_get_type             (void);
+GObject       *money_widget_new                  (void);
+MoneyWidget   *money_widget_copy                 (MoneyWidget *moneyWidget);
 
-void	       money_widget_set_target		 (Money_Widget *moneyWidget,
-					          Money_Widget *targetWidget);
-void           money_widget_set_position         (Money_Widget *moneyWidget,
+void	       money_widget_set_target		 (MoneyWidget *moneyWidget,
+					          MoneyWidget *targetWidget);
+void           money_widget_set_position         (MoneyWidget *moneyWidget,
 						  GooCanvasItem *rootItem,
 						  double x1,
 						  double y1,
@@ -81,11 +81,11 @@ void           money_widget_set_position         (Money_Widget *moneyWidget,
 						  guint  colomns,
 						  guint  lines,
 						  gboolean display_total);
-void           money_widget_add		        (Money_Widget *moneyWidget, MoneyEuroType value);
-void           money_widget_remove	        (Money_Widget *moneyWidget, MoneyEuroType value);
+void           money_widget_add		        (MoneyWidget *moneyWidget, MoneyEuroType value);
+void           money_widget_remove	        (MoneyWidget *moneyWidget, MoneyEuroType value);
 
 /* Misc. accessors */
-float          money_widget_get_total           (Money_Widget *moneyWidget);
+float          money_widget_get_total           (MoneyWidget *moneyWidget);
 
 #ifdef __cplusplus
 }
diff --git a/src/paratrooper-activity/paratrooper.c b/src/paratrooper-activity/paratrooper.c
index 40ea9a3..118ddbf 100644
--- a/src/paratrooper-activity/paratrooper.c
+++ b/src/paratrooper-activity/paratrooper.c
@@ -66,8 +66,8 @@ static void	 	 set_level (guint level);
 static gint	 	 key_press(guint keyval, gchar *commit_str, gchar *preedit_str);
 
 static void		 paratrooper_create_cloud(GooCanvasItem *parent);
-static gint		 paratrooper_drop_clouds (GtkWidget *widget, gpointer data);
-static gint		 paratrooper_move_tux (GtkWidget *widget, gpointer data);
+static gboolean		 paratrooper_drop_clouds (gpointer data);
+static gboolean		 paratrooper_move_tux (gpointer data);
 static void		 paratrooper_destroy_all_items(void);
 static void		 paratrooper_next_level(void);
 static gboolean		 item_event (GooCanvasItem  *item,
@@ -125,7 +125,7 @@ static void pause_board (gboolean pause)
   if(pause)
     {
       if (drop_tux_id) {
-	gtk_timeout_remove (drop_tux_id);
+	g_source_remove (drop_tux_id);
 	drop_tux_id = 0;
       }
     }
@@ -140,7 +140,7 @@ static void pause_board (gboolean pause)
 
       // Unpause code
       if(paratrooperItem.status!=TUX_INPLANE && paratrooperItem.status!=TUX_LANDED) {
-	drop_tux_id = gtk_timeout_add (1000, (GtkFunction) paratrooper_move_tux, NULL);
+	drop_tux_id = g_timeout_add (1000, paratrooper_move_tux, NULL);
       }
 
       if(gamewon == TRUE) /* the game is won */
@@ -334,7 +334,7 @@ static void paratrooper_next_level()
 			  GOO_CANVAS_ANIMATE_RESTART);
 
   g_signal_connect(planeitem, "button-press-event",
-		     (GtkSignalFunc) item_event,
+		     (GCallback) item_event,
 		     NULL);
   gc_item_focus_init(planeitem, NULL);
   g_object_unref(svg_handle);
@@ -346,8 +346,8 @@ static void paratrooper_next_level()
     windspeed *= 2;
 
   /* Drop a cloud */
-  gtk_timeout_add (200,
-		   (GtkFunction) paratrooper_drop_clouds, NULL);
+  g_timeout_add (200,
+		 paratrooper_drop_clouds, NULL);
 
   /* Display the target */
   svg_handle = gc_rsvg_load("paratrooper/fishingboat.svgz");
@@ -380,7 +380,7 @@ static void paratrooper_next_level()
 
   /* Prepare the parachute */
   if (drop_tux_id) {
-    gtk_timeout_remove (drop_tux_id);
+    g_source_remove (drop_tux_id);
     drop_tux_id = 0;
   }
 
@@ -400,7 +400,7 @@ static void paratrooper_next_level()
 		GOO_CANVAS_ITEM_INVISIBLE, NULL);
 
   g_signal_connect(paratrooperItem.paratrooper, "button-press-event",
-		     (GtkSignalFunc) item_event,
+		     (GCallback) item_event,
 		     NULL);
 
   paratrooperItem.instruct = \
@@ -429,8 +429,8 @@ static void paratrooper_destroy_all_items()
  * This does the moves of the game's paratropper
  *
  */
-static gint
-paratrooper_move_tux (GtkWidget *widget, gpointer data)
+static gboolean
+paratrooper_move_tux (gpointer data)
 {
   double offset;
   GooCanvasBounds bounds;
@@ -478,9 +478,9 @@ paratrooper_move_tux (GtkWidget *widget, gpointer data)
       else
 	{
 	  if(bounds.y2 < BOARDHEIGHT - 20)
-	    drop_tux_id = gtk_timeout_add (150,
-					   (GtkFunction) paratrooper_move_tux,
-					   NULL);
+	    drop_tux_id = g_timeout_add (150,
+					 paratrooper_move_tux,
+					 NULL);
 	  else
 	    {
 	      paratrooperItem.status = TUX_CRASHED;
@@ -490,8 +490,8 @@ paratrooper_move_tux (GtkWidget *widget, gpointer data)
     }
   else
     {
-      drop_tux_id = gtk_timeout_add (150,
-				     (GtkFunction) paratrooper_move_tux, NULL);
+      drop_tux_id = g_timeout_add (150,
+				   paratrooper_move_tux, NULL);
     }
 
   return(FALSE);
@@ -555,7 +555,7 @@ paratrooper_create_cloud(GooCanvasItem *parent)
  * This is called on a low frequency and is used to drop new items
  *
  */
-static gint paratrooper_drop_clouds (GtkWidget *widget, gpointer data)
+static gboolean paratrooper_drop_clouds (gpointer data)
 {
   paratrooper_create_cloud(boardRootItem);
 
@@ -597,8 +597,8 @@ void next_state()
 				  (bounds.x1 > 0 ? bounds.x1 : 0),
 				  bounds.y2);
 	drop_tux_id = \
-	  gtk_timeout_add (gc_timing (10, 4),
-              (GtkFunction) paratrooper_move_tux, NULL);
+	  g_timeout_add (gc_timing (10, 4),
+              paratrooper_move_tux, NULL);
 
         gc_item_focus_remove(planeitem, NULL);
       }
diff --git a/src/photohunter-activity/photohunter.c b/src/photohunter-activity/photohunter.c
index 33bdd59..baac76e 100644
--- a/src/photohunter-activity/photohunter.c
+++ b/src/photohunter-activity/photohunter.c
@@ -145,7 +145,7 @@ static void start_board (GcomprisBoard *agcomprisBoard)
 
       g_signal_connect(goo_canvas_get_root_item(gcomprisBoard->canvas),
 		       "button_press_event",
-		       (GtkSignalFunc) MouseClick, NULL);
+		       (GCallback) MouseClick, NULL);
 
       boardRootItem = NULL;
       gDiffCoorArray = g_array_new( FALSE, FALSE, sizeof(GooCanvasBounds) );
@@ -169,7 +169,7 @@ static void end_board ()
   CleanLevelDatas( );
 
   g_signal_handlers_disconnect_by_func(goo_canvas_get_root_item(gcomprisBoard->canvas),
-				       (GtkSignalFunc) MouseClick, NULL);
+				       (GCallback) MouseClick, NULL);
 
   gcomprisBoard = NULL;
   if(boardRootItem!=NULL)
diff --git a/src/planegame-activity/planegame.c b/src/planegame-activity/planegame.c
index d733fa6..351b7fd 100644
--- a/src/planegame-activity/planegame.c
+++ b/src/planegame-activity/planegame.c
@@ -111,12 +111,12 @@ static void pause_board (gboolean pause)
     {
       if(!drop_items_id) {
 	drop_items_id = g_timeout_add (1000,
-				       (GtkFunction) planegame_drop_items,
+				       (GSourceFunc) planegame_drop_items,
 				       NULL);
       }
       if(!planemove_id) {
 	planemove_id = g_timeout_add (1000,
-				      (GtkFunction) planegame_move_items,
+				      (GSourceFunc) planegame_move_items,
 				      NULL);
       }
     }
@@ -420,7 +420,7 @@ static gint planegame_move_items (GtkWidget *widget, gpointer data)
   /* move the plane */
   planegame_move_plane(planeitem);
   planemove_id = g_timeout_add (speed,
-				(GtkFunction) planegame_move_items, NULL);
+				(GSourceFunc) planegame_move_items, NULL);
 
   return(FALSE);
 }
@@ -519,7 +519,7 @@ static gint planegame_drop_items (GtkWidget *widget, gpointer data)
   planegame_add_new_item();
 
   drop_items_id = g_timeout_add (fallSpeed,
-				 (GtkFunction) planegame_drop_items, NULL);
+				 (GSourceFunc) planegame_drop_items, NULL);
   return (FALSE);
 }
 
diff --git a/src/railroad-activity/railroad.c b/src/railroad-activity/railroad.c
index 6d33956..56f7017 100644
--- a/src/railroad-activity/railroad.c
+++ b/src/railroad-activity/railroad.c
@@ -33,7 +33,7 @@ static void		 process_ok(void);
 static void		 game_won(void);
 static void		 repeat(void);
 static void		 animate_model(void);
-static gboolean		 animate_step(void);
+static gboolean		 animate_step(gpointer data);
 static void		 stop_animation();
 
 #define ENGINES 9
@@ -192,7 +192,7 @@ static void end_board ()
   GdkPixbuf * pixmap = NULL;
   // If we don't end animation, there may be a segfault if leaving while the animation is pending
   if (timer_id) {
-    gtk_timeout_remove (timer_id);
+    g_source_remove (timer_id);
     timer_id = 0;
   }
 
@@ -322,7 +322,7 @@ static GooCanvasItem *railroad_create_item(GooCanvasItem *boardRootItem)
     xOffset += gdk_pixbuf_get_width(pixmap);
 
     g_signal_connect(item,
-		     "button_press_event", (GtkSignalFunc) item_event,
+		     "button_press_event", (GCallback) item_event,
 		     GINT_TO_POINTER(i));
 
   }
@@ -349,7 +349,7 @@ static GooCanvasItem *railroad_create_item(GooCanvasItem *boardRootItem)
 					  yOffset - gdk_pixbuf_get_height(pixmap),
 					  NULL);
     g_signal_connect(item_model[i],
-		     "button_press_event", (GtkSignalFunc) stop_animation,
+		     "button_press_event", (GCallback) stop_animation,
 		     NULL);
     xOffset  += gdk_pixbuf_get_width(pixmap);
   }
@@ -367,7 +367,7 @@ static GooCanvasItem *railroad_create_item(GooCanvasItem *boardRootItem)
 						  NULL);
 
   g_signal_connect(item_model[model_size-1],
-		   "button_press_event", (GtkSignalFunc) stop_animation,
+		   "button_press_event", (GCallback) stop_animation,
 		   NULL);
   animate_model();
 
@@ -460,7 +460,7 @@ static gint item_event(GooCanvasItem *item,
       int_answer_list = g_list_append(int_answer_list,GINT_TO_POINTER(item_number));
       //	printf("added %d to int_answer_list\n", item_number);
       g_signal_connect(local_item,
-		       "button_press_event", (GtkSignalFunc) answer_event,
+		       "button_press_event", (GCallback) answer_event,
 		       GINT_TO_POINTER( g_list_length(item_answer_list)-1 ));
       process_ok();
       break;
@@ -508,11 +508,11 @@ static gint answer_event(GooCanvasItem *item,
 	{
 	  local_item = g_list_nth_data(item_answer_list, i);
 	  g_signal_handlers_disconnect_by_func(G_OBJECT(local_item),
-				      (GtkSignalFunc) answer_event,
+				      (GCallback) answer_event,
 				      GINT_TO_POINTER( i+1 ));
 	  g_signal_connect(local_item,
 			   "button_press_event",
-			   (GtkSignalFunc) answer_event,
+			   (GCallback) answer_event,
 			   GINT_TO_POINTER( i ));
 	}
       break;
@@ -561,7 +561,7 @@ static void reposition_model() {
 static void stop_animation()
 {
   if (timer_id) {
-    gtk_timeout_remove (timer_id);
+    g_source_remove (timer_id);
     timer_id = 0;
   }
   animation_pending = FALSE;
@@ -574,7 +574,7 @@ static void stop_animation()
 }
 
 /* ==================================== */
-static gboolean animate_step() {
+static gboolean animate_step(gpointer data) {
   double step = 0;
 
   // this defines how the train waits before start
@@ -612,7 +612,7 @@ static void animate_model() {
   gc_sound_play_ogg( "sounds/train.wav", NULL );
 
   // warning : if timeout is too low, the model will not be displayed
-  timer_id = gtk_timeout_add (100, (GtkFunction) animate_step, NULL);
+  timer_id = g_timeout_add (100, animate_step, NULL);
 }
 /* ==================================== */
 static void reset_all_lists(void) {
diff --git a/src/readingh-activity/reading.c b/src/readingh-activity/reading.c
index 41eee6f..b4457a5 100644
--- a/src/readingh-activity/reading.c
+++ b/src/readingh-activity/reading.c
@@ -83,7 +83,7 @@ static int		 wait_for_ready;
 static int		 gamewon;
 
 static gboolean		 reading_create_item(GooCanvasItem *parent);
-static gint		 reading_drop_items (void);
+static gboolean		 reading_drop_items (gpointer data);
 static void		 reading_destroy_all_items(void);
 static gint		 reading_next_level(void);
 static void		 reading_config_start(GcomprisBoard *agcomprisBoard,
@@ -153,14 +153,14 @@ static void pause_board (gboolean pause)
   if(pause)
     {
       if (drop_items_id) {
-	gtk_timeout_remove (drop_items_id);
+	g_source_remove (drop_items_id);
 	drop_items_id = 0;
       }
     }
   else
     {
       if(!drop_items_id) {
-	reading_drop_items();
+	reading_drop_items(NULL);
       }
     }
 }
@@ -342,12 +342,12 @@ reading_destroy_all_items()
 {
 
   if (drop_items_id) {
-    gtk_timeout_remove (drop_items_id);
+    g_source_remove (drop_items_id);
     drop_items_id = 0;
   }
 
   if (next_level_timer) {
-    gtk_timeout_remove (next_level_timer);
+    g_source_remove (next_level_timer);
     drop_items_id = 0;
   }
 
@@ -566,13 +566,13 @@ reading_create_item(GooCanvasItem *parent)
  * This is called on a low frequency and is used to display new items
  *
  */
-static gint
-reading_drop_items ()
+static gboolean
+reading_drop_items (gpointer data)
 {
 
   if(reading_create_item(boardRootItem))
-    drop_items_id = gtk_timeout_add (fallSpeed,
-				     (GtkFunction) reading_drop_items, NULL);
+    drop_items_id = g_timeout_add (fallSpeed,
+				   reading_drop_items, NULL);
   return (FALSE);
 }
 
@@ -637,13 +637,13 @@ ask_ready(gboolean status)
 				NULL);
 
   g_signal_connect(item2, "button-press-event",
-		   (GtkSignalFunc) item_event_valid,
+		   (GCallback) item_event_valid,
 		   "R");
 
   item1 = addBackground(boardRootItem, item2);
 
   g_signal_connect(item1, "button-press-event",
-		   (GtkSignalFunc) item_event_valid,
+		   (GCallback) item_event_valid,
 		   "R");
   gc_item_focus_init(item1, NULL);
   gc_item_focus_init(item2, item1);
@@ -677,10 +677,10 @@ ask_yes_no()
   item1 = addBackground(boardRootItem, item2);
 
   g_signal_connect(item2, "button-press-event",
-		   (GtkSignalFunc) item_event_valid,
+		   (GCallback) item_event_valid,
 		   "Y");
   g_signal_connect(item1, "button-press-event",
-		   (GtkSignalFunc) item_event_valid,
+		   (GCallback) item_event_valid,
 		   "Y");
 
   gc_item_focus_init(item1, NULL);
@@ -704,10 +704,10 @@ ask_yes_no()
   item1 = addBackground(boardRootItem, item2);
 
   g_signal_connect(item2, "button-press-event",
-		   (GtkSignalFunc) item_event_valid,
+		   (GCallback) item_event_valid,
 		   "N");
   g_signal_connect(item1, "button-press-event",
-		   (GtkSignalFunc) item_event_valid,
+		   (GCallback) item_event_valid,
 		   "N");
 
   gc_item_focus_init(item1, NULL);
@@ -727,7 +727,7 @@ player_win()
   if(gcomprisBoard->level>gcomprisBoard->maxlevel)
     gcomprisBoard->level = gcomprisBoard->maxlevel;
 
-  next_level_timer = g_timeout_add(3000, (GtkFunction)reading_next_level, NULL);
+  next_level_timer = g_timeout_add(3000, (GSourceFunc)reading_next_level, NULL);
 }
 
 static void
@@ -753,7 +753,7 @@ player_loose()
 
   gc_bonus_display(gamewon, GC_BONUS_FLOWER);
 
-  next_level_timer = g_timeout_add(3000, (GtkFunction)reading_next_level, NULL);
+  next_level_timer = g_timeout_add(3000, (GSourceFunc)reading_next_level, NULL);
 }
 
 /* Callback for the yes and no buttons */
diff --git a/src/reversecount-activity/reversecount.c b/src/reversecount-activity/reversecount.c
index 0d3061d..d468304 100644
--- a/src/reversecount-activity/reversecount.c
+++ b/src/reversecount-activity/reversecount.c
@@ -55,7 +55,7 @@ static GooCanvasItem	*display_item_at(gchar *imagename, int block);
 static void		 display_random_fish();
 static void		 create_clock(double x, double y, int value);
 static void		 update_clock(int value);
-static gint		 animate_tux();
+static gboolean		 animate_tux(gpointer data);
 static void		 rotate_tux(GooCanvasItem *tuxitem, gint direction,
 				    gdouble scale);
 static void		 move_item_at(GooCanvasItem *item,
@@ -325,8 +325,8 @@ static void process_ok()
     }
 
   if(!animate_id) {
-    animate_id = gtk_timeout_add (animate_speed,
-				  (GtkFunction) animate_tux, NULL);
+    animate_id = g_timeout_add (animate_speed,
+				animate_tux, NULL);
   }
 
 }
@@ -528,7 +528,7 @@ static GooCanvasItem *reversecount_create_item(GooCanvasItem *parent)
       *val = d;
 
       g_signal_connect(item, "button_press_event",
-		       (GtkSignalFunc) item_event,
+		       (GCallback) item_event,
 		       val);
       gc_item_focus_init(item, NULL);
     }
@@ -543,7 +543,7 @@ static GooCanvasItem *reversecount_create_item(GooCanvasItem *parent)
 		    dice_area_x - 60,
 		    block_height + 20);
   g_signal_connect(item, "button_press_event",
-		   (GtkSignalFunc) process_ok, NULL);
+		   (GCallback) process_ok, NULL);
   gc_item_focus_init(item, NULL);
 
   // Tux
@@ -834,7 +834,7 @@ static void update_clock(int value)
   g_free(str);
 }
 
-static gint animate_tux()
+static gboolean animate_tux(gpointer data)
 {
   // Move tux
   tux_index++;
@@ -861,8 +861,8 @@ static gint animate_tux()
   /* Rearm the timer to go to the next spot */
   if(tux_index != tux_destination)
     {
-      animate_id = gtk_timeout_add (animate_speed,
-      				    (GtkFunction) animate_tux, NULL);
+      animate_id = g_timeout_add (animate_speed,
+				  animate_tux, NULL);
     }
   else
     {
diff --git a/src/scalesboard-activity/scale.c b/src/scalesboard-activity/scale.c
index b41a21a..8a96b87 100644
--- a/src/scalesboard-activity/scale.c
+++ b/src/scalesboard-activity/scale.c
@@ -641,11 +641,11 @@ scale_list_add_weight(GooCanvasItem *group,
 
   gc_item_focus_init(new_item->item, NULL);
   g_signal_connect(new_item->item, "button_press_event",
-		   (GtkSignalFunc)gc_drag_event, new_item);
+		   (GCallback)gc_drag_event, new_item);
   g_signal_connect(new_item->item, "button_release_event",
-		   (GtkSignalFunc)gc_drag_event, new_item);
+		   (GCallback)gc_drag_event, new_item);
   g_signal_connect(new_item->item, "button_press_event",
-  		   (GtkSignalFunc) scale_item_event, new_item);
+  		   (GCallback) scale_item_event, new_item);
 
   item_list = g_list_append(item_list, new_item);
   return new_item;
diff --git a/src/smallnumbers-activity/smallnumbers.c b/src/smallnumbers-activity/smallnumbers.c
index aa012f9..5cb1d56 100644
--- a/src/smallnumbers-activity/smallnumbers.c
+++ b/src/smallnumbers-activity/smallnumbers.c
@@ -40,8 +40,8 @@ static void set_level (guint level);
 static gint key_press(guint keyval, gchar *commit_str, gchar *preedit_str);
 
 static void smallnumbers_create_item(GooCanvasItem *parent);
-static gint smallnumbers_drop_items (GtkWidget *widget, gpointer data);
-static gint smallnumbers_move_items (GtkWidget *widget, gpointer data);
+static gboolean smallnumbers_drop_items (gpointer data);
+static gboolean smallnumbers_move_items (gpointer data);
 static void smallnumbers_destroy_all_items(void);
 static void smallnumbers_next_level(void);
 static gboolean smallnumbers_gotkey_item(GooCanvasItem *item, guint key);
@@ -107,11 +107,11 @@ static void pause_board (gboolean pause)
   if(pause)
     {
       if (dummy_id) {
-	gtk_timeout_remove (dummy_id);
+	g_source_remove (dummy_id);
 	dummy_id = 0;
       }
       if (drop_items_id) {
-	gtk_timeout_remove (drop_items_id);
+	g_source_remove (drop_items_id);
 	drop_items_id = 0;
       }
     }
@@ -123,11 +123,11 @@ static void pause_board (gboolean pause)
 	}
 
       if(!drop_items_id) {
-	drop_items_id = gtk_timeout_add (1000,
-					 (GtkFunction) smallnumbers_drop_items, NULL);
+	drop_items_id = g_timeout_add (1000,
+				       smallnumbers_drop_items, NULL);
       }
       if(!dummy_id) {
-	dummy_id = gtk_timeout_add (1000, (GtkFunction) smallnumbers_move_items, NULL);
+	dummy_id = g_timeout_add (1000, smallnumbers_move_items, NULL);
       }
     }
 }
@@ -346,7 +346,7 @@ static void smallnumbers_move_item(GooCanvasItem *item)
  * This does the moves of the game items on the play canvas
  *
  */
-static gint smallnumbers_move_items (GtkWidget *widget, gpointer data)
+static gboolean smallnumbers_move_items (gpointer data)
 {
   int i;
   int count = goo_canvas_item_get_n_children(boardRootItem);
@@ -355,8 +355,8 @@ static gint smallnumbers_move_items (GtkWidget *widget, gpointer data)
   for(i=0; i<count; i++)
     smallnumbers_move_item(goo_canvas_item_get_child(boardRootItem, i));
 
-  dummy_id = gtk_timeout_add (gc_timing (speed, count),
-			      (GtkFunction) smallnumbers_move_items, NULL);
+  dummy_id = g_timeout_add (gc_timing (speed, count),
+			    smallnumbers_move_items, NULL);
 
   return(FALSE);
 }
@@ -470,13 +470,13 @@ static void smallnumbers_create_item(GooCanvasItem *parent)
  * This is called on a low frequency and is used to drop new items
  *
  */
-static gint smallnumbers_drop_items (GtkWidget *widget, gpointer data)
+static gboolean smallnumbers_drop_items (gpointer data)
 {
   gc_sound_play_ogg ("sounds/level.wav", NULL);
   smallnumbers_create_item(boardRootItem);
 
-  drop_items_id = gtk_timeout_add (fallSpeed,
-				   (GtkFunction) smallnumbers_drop_items, NULL);
+  drop_items_id = g_timeout_add (fallSpeed,
+				 smallnumbers_drop_items, NULL);
   return (FALSE);
 }
 
diff --git a/src/submarine-activity/submarine.c b/src/submarine-activity/submarine.c
index 616f84c..114a394 100644
--- a/src/submarine-activity/submarine.c
+++ b/src/submarine-activity/submarine.c
@@ -409,7 +409,7 @@ static GooCanvasItem *submarine_drawbackground(GooCanvasItem *parent) {
 			       schema_y + BARRE_AV_Y - COMMAND_OFFSET,
 			       NULL);
   g_signal_connect(item, "button-press-event",
-		     (GtkSignalFunc) barre_av_event, GINT_TO_POINTER(UP));
+		     (GCallback) barre_av_event, GINT_TO_POINTER(UP));
 
   item = goo_canvas_image_new (backgroundRootItem,
 			       pixmap,
@@ -417,7 +417,7 @@ static GooCanvasItem *submarine_drawbackground(GooCanvasItem *parent) {
 			       schema_y + BARRE_AR_Y - COMMAND_OFFSET,
 			       NULL);
   g_signal_connect(item, "button-press-event",
-		   (GtkSignalFunc) barre_ar_event, GINT_TO_POINTER(UP));
+		   (GCallback) barre_ar_event, GINT_TO_POINTER(UP));
 
   item = goo_canvas_image_new (backgroundRootItem,
 			       pixmap,
@@ -425,7 +425,7 @@ static GooCanvasItem *submarine_drawbackground(GooCanvasItem *parent) {
 			       schema_y + ENGINE_UP_Y,
 			       NULL);
   g_signal_connect(item, "button-press-event",
-		   (GtkSignalFunc) engine_event, GINT_TO_POINTER(UP));
+		   (GCallback) engine_event, GINT_TO_POINTER(UP));
 
   gdk_pixbuf_unref(pixmap);
 
@@ -436,7 +436,7 @@ static GooCanvasItem *submarine_drawbackground(GooCanvasItem *parent) {
 			       schema_y + BARRE_AV_Y + COMMAND_OFFSET,
 			       NULL);
   g_signal_connect(item, "button-press-event",
-		   (GtkSignalFunc) barre_av_event, GINT_TO_POINTER(DOWN));
+		   (GCallback) barre_av_event, GINT_TO_POINTER(DOWN));
 
   item = goo_canvas_image_new (backgroundRootItem,
 			       pixmap,
@@ -444,7 +444,7 @@ static GooCanvasItem *submarine_drawbackground(GooCanvasItem *parent) {
 			       schema_y + BARRE_AR_Y + COMMAND_OFFSET,
 			       NULL);
   g_signal_connect(item, "button-press-event",
-		   (GtkSignalFunc) barre_ar_event, GINT_TO_POINTER(DOWN));
+		   (GCallback) barre_ar_event, GINT_TO_POINTER(DOWN));
 
   item = goo_canvas_image_new (backgroundRootItem,
 			       pixmap,
@@ -452,7 +452,7 @@ static GooCanvasItem *submarine_drawbackground(GooCanvasItem *parent) {
 			       schema_y + ENGINE_DOWN_Y,
 			       NULL);
   g_signal_connect(item, "button-press-event",
-		     (GtkSignalFunc) engine_event, GINT_TO_POINTER(DOWN));
+		     (GCallback) engine_event, GINT_TO_POINTER(DOWN));
 
   gdk_pixbuf_unref(pixmap);
 
@@ -489,7 +489,7 @@ static GooCanvasItem *submarine_create_item(GooCanvasItem *parent) {
 						schema_y -1.0,
 						 NULL);
   g_signal_connect(ballast_ar_purge_item, "button-press-event",
-		   (GtkSignalFunc) ballast_ar_purge_event, NULL);
+		   (GCallback) ballast_ar_purge_event, NULL);
 
   ballast_av_purge_item = goo_canvas_image_new (rootItem,
 						pixmap,
@@ -497,7 +497,7 @@ static GooCanvasItem *submarine_create_item(GooCanvasItem *parent) {
 						schema_y -1.0,
 						NULL);
   g_signal_connect(ballast_av_purge_item, "button-press-event",
-		   (GtkSignalFunc) ballast_av_purge_event, NULL);
+		   (GCallback) ballast_av_purge_event, NULL);
 
   regleur_purge_item = goo_canvas_image_new (rootItem,
 					     pixmap,
@@ -505,7 +505,7 @@ static GooCanvasItem *submarine_create_item(GooCanvasItem *parent) {
 					     schema_y -2.0,
 					     NULL);
   g_signal_connect(regleur_purge_item, "button-press-event",
-		   (GtkSignalFunc) regleur_purge_event, NULL);
+		   (GCallback) regleur_purge_event, NULL);
 
   item = goo_canvas_image_new (rootItem,
 			       pixmap,
@@ -513,7 +513,7 @@ static GooCanvasItem *submarine_create_item(GooCanvasItem *parent) {
 			       schema_y +  CHASSE_BALLAST_AV_Y,
 			       NULL);
   g_signal_connect(item, "button-press-event",
-		   (GtkSignalFunc) ballast_av_chasse_event, NULL);
+		   (GCallback) ballast_av_chasse_event, NULL);
 
   item = goo_canvas_image_new (rootItem,
 			       pixmap,
@@ -521,7 +521,7 @@ static GooCanvasItem *submarine_create_item(GooCanvasItem *parent) {
 			       schema_y +  CHASSE_BALLAST_AR_Y,
 			       NULL);
   g_signal_connect(item, "button-press-event",
-		   (GtkSignalFunc) ballast_ar_chasse_event, NULL);
+		   (GCallback) ballast_ar_chasse_event, NULL);
 
   regleur_chasse_item = goo_canvas_image_new (rootItem,
 					      pixmap,
@@ -529,7 +529,7 @@ static GooCanvasItem *submarine_create_item(GooCanvasItem *parent) {
 					      schema_y + CHASSE_REGLEUR_Y,
 					      NULL);
   g_signal_connect(regleur_chasse_item, "button-press-event",
-		   (GtkSignalFunc) regleur_chasse_event, NULL);
+		   (GCallback) regleur_chasse_event, NULL);
 
   gdk_pixbuf_unref(pixmap);
 
@@ -814,9 +814,9 @@ static GooCanvasItem *submarine_create_item(GooCanvasItem *parent) {
   gdk_pixbuf_unref(pixmap);
 
   g_signal_connect(air_compressor_item, "button-press-event",
-		   (GtkSignalFunc) air_compressor_event, NULL);
+		   (GCallback) air_compressor_event, NULL);
   g_signal_connect(battery_charger_item, "button-press-event",
-		   (GtkSignalFunc) battery_charger_event, NULL);
+		   (GCallback) battery_charger_event, NULL);
 
   /*
    * Set the right wall
diff --git a/src/superbrain-activity/superbrain.c b/src/superbrain-activity/superbrain.c
index b436883..296f18e 100644
--- a/src/superbrain-activity/superbrain.c
+++ b/src/superbrain-activity/superbrain.c
@@ -285,7 +285,7 @@ static void superbrain_next_level()
 					    NULL);
   SET_ITEM_LOCATION(item, 270, 50);
   g_signal_connect(item, "button_press_event",
-		   (GtkSignalFunc) process_ok, NULL);
+		   (GCallback) process_ok, NULL);
   gc_item_focus_init(item, NULL);
 
   /* The list of the pieces */
@@ -434,7 +434,7 @@ static GooCanvasItem *superbrain_create_item(GooCanvasItem *parent)
 	  piece->listitem = g_list_append(piece->listitem, item);
 
 	  g_signal_connect(item, "button-press-event",
-			   (GtkSignalFunc) item_event, piece);
+			   (GCallback) item_event, piece);
 	}
 
       piece->selecteditem = 0;
@@ -619,7 +619,7 @@ void listPiecesClear()
 	{
 	  GooCanvasItem *item = g_list_nth_data(piece->listitem, j);
 	  g_signal_handlers_disconnect_by_func(item,
-					       (GtkSignalFunc) item_event, piece);
+					       (GCallback) item_event, piece);
 	  gc_item_focus_remove(item, NULL);
 	}
       g_free(piece);
diff --git a/src/tangram-activity/gtans_interface.c b/src/tangram-activity/gtans_interface.c
index 00bc165..d29dd65 100644
--- a/src/tangram-activity/gtans_interface.c
+++ b/src/tangram-activity/gtans_interface.c
@@ -111,13 +111,13 @@ void create_mainwindow (GooCanvasItem *rootitem)
 
 
   g_signal_connect(previous_figure, "button_press_event",
-		     (GtkSignalFunc) on_arrow_clicked,
+		     (GCallback) on_arrow_clicked,
 		     (gpointer) FALSE);
 
   gc_item_focus_init(previous_figure, NULL);
 
   g_signal_connect(next_figure, "button_press_event",
-		     (GtkSignalFunc) on_arrow_clicked,
+		     (GCallback) on_arrow_clicked,
 		     (gpointer) TRUE);
 
   gc_item_focus_init(next_figure, NULL);
@@ -139,11 +139,11 @@ void create_mainwindow (GooCanvasItem *rootitem)
 					 NULL);
 
   g_signal_connect(outline_figure, "button_press_event",
-		     (GtkSignalFunc) on_outline_clicked,
+		     (GCallback) on_outline_clicked,
 		     NULL);
 
   g_signal_connect(show_figure, "button_press_event",
-		     (GtkSignalFunc) on_show_clicked,
+		     (GCallback) on_show_clicked,
 		     NULL);
 
   gc_item_focus_init(outline_figure, NULL);
@@ -160,7 +160,7 @@ void create_mainwindow (GooCanvasItem *rootitem)
 				  NULL);
 
   g_signal_connect(symetry, "button_press_event",
-		     (GtkSignalFunc) on_symetry_clicked,
+		     (GCallback) on_symetry_clicked,
 		     NULL);
 
   gc_item_focus_init(symetry, NULL);
@@ -214,25 +214,25 @@ void create_mainwindow (GooCanvasItem *rootitem)
 
 
   g_signal_connect(r_rot_s, "button_press_event",
-		     (GtkSignalFunc) on_rotation_clicked,
+		     (GCallback) on_rotation_clicked,
 		     (gpointer) 0);
 
   gc_item_focus_init(r_rot_s, NULL);
 
   g_signal_connect(l_rot_s, "button_press_event",
-		     (GtkSignalFunc) on_rotation_clicked,
+		     (GCallback) on_rotation_clicked,
 		     (gpointer) 1);
 
   gc_item_focus_init(l_rot_s, NULL);
 
   g_signal_connect(r_rot_b, "button_press_event",
-		     (GtkSignalFunc) on_rotation_clicked,
+		     (GCallback) on_rotation_clicked,
 		     (gpointer) 2);
 
   gc_item_focus_init(r_rot_b, NULL);
 
   g_signal_connect(l_rot_b, "button_press_event",
-		     (GtkSignalFunc) on_rotation_clicked,
+		     (GCallback) on_rotation_clicked,
 		     (gpointer) 3);
 
   gc_item_focus_init(l_rot_b, NULL);
diff --git a/src/target-activity/target.c b/src/target-activity/target.c
index 5858f09..a21dddc 100644
--- a/src/target-activity/target.c
+++ b/src/target-activity/target.c
@@ -74,7 +74,7 @@ static gboolean		tooltip_event (GooCanvasItem  *item,
 				       GooCanvasItem  *target,
 				       GdkEventButton *event,
 				       gpointer gpoint);
-static void		animate_items(void);
+static gboolean		animate_items(gpointer data);
 static void		launch_dart(double item_x, double item_y);
 
 /*
@@ -171,14 +171,14 @@ static void pause_board (gboolean pause)
   if(pause)
     {
       if (animate_id) {
-	gtk_timeout_remove (animate_id);
+	g_source_remove (animate_id);
 	animate_id = 0;
       }
     }
   else
     {
       if(animate_item) {
-	animate_id = gtk_timeout_add (200, (GtkFunction) animate_items, NULL);
+	animate_id = g_timeout_add (200, animate_items, NULL);
       }
     }
 
@@ -456,7 +456,7 @@ static GooCanvasItem *target_create_item(GooCanvasItem *parent)
 				    NULL);
 
 	  goo_canvas_item_lower(item, NULL);
-	  g_signal_connect(item, "button-press-event", (GtkSignalFunc) item_event, NULL);
+	  g_signal_connect(item, "button-press-event", (GCallback) item_event, NULL);
 
 	  /* Display the value for this target */
 	  tmpstr = g_strdup_printf("%d",
@@ -472,7 +472,7 @@ static GooCanvasItem *target_create_item(GooCanvasItem *parent)
 				      NULL);
 	  g_free(tmpstr);
 
-	  g_signal_connect(item, "button-press-event", (GtkSignalFunc) item_event, NULL);
+	  g_signal_connect(item, "button-press-event", (GCallback) item_event, NULL);
 	}
     }
 
@@ -524,10 +524,11 @@ static void game_won()
   target_next_level();
 }
 
-static void bonus()
+static gboolean bonus(gpointer data)
 {
   gc_bonus_display(gamewon, GC_BONUS_SMILEY);
   animate_id = 0;
+  return(FALSE);
 }
 
 static void process_ok()
@@ -539,7 +540,7 @@ static void process_ok()
     if(answer_points == user_points)
       {
 	gamewon = TRUE;
-	animate_id = gtk_timeout_add (200, (GtkFunction) bonus, NULL);
+	animate_id = g_timeout_add (200, bonus, NULL);
       }
   }
 
@@ -627,13 +628,13 @@ static guint add_points(double x, double y)
  * Dart animation
  *
  */
-static void animate_items()
+static gboolean animate_items(gpointer data)
 {
   if(board_paused)
-    return;
+    return(FALSE);
 
   if(!animate_item)
-    return;
+    return(FALSE);
 
   // Apply the wind move
   animate_item_x = animate_item_x + wind_speed * sin(ang);
@@ -659,20 +660,20 @@ static void animate_items()
       // Add a tooltip on this dart to let the children
       // see how we count it
       g_signal_connect(animate_item,
-		       "enter_notify_event", (GtkSignalFunc) tooltip_event,
+		       "enter_notify_event", (GCallback) tooltip_event,
 		       GINT_TO_POINTER(points));
       g_signal_connect(animate_item,
-		       "leave_notify_event", (GtkSignalFunc) tooltip_event,
+		       "leave_notify_event", (GCallback) tooltip_event,
 		       GINT_TO_POINTER(-1));
 
-      gtk_timeout_remove (animate_id);
+      g_source_remove (animate_id);
       animate_id = 0;
       animate_item = NULL;
 
       // Change the wind for the next target
       display_windspeed();
     }
-
+  return(TRUE);
 }
 
 /*
@@ -699,7 +700,7 @@ static void launch_dart(double item_x, double item_y)
 					NULL);
   /* Make sure the target values stay on top */
   goo_canvas_item_lower(animate_item, valueRootItem);
-  animate_id = gtk_timeout_add (200, (GtkFunction) animate_items, NULL);
+  animate_id = g_timeout_add (200, animate_items, NULL);
 
   if(--number_of_arrow == 0)
     {
diff --git a/src/traffic-activity/traffic.c b/src/traffic-activity/traffic.c
index 0501c98..35a64d9 100644
--- a/src/traffic-activity/traffic.c
+++ b/src/traffic-activity/traffic.c
@@ -373,9 +373,9 @@ draw_car(car *thiscar)
   g_signal_connect(car_group,"button_press_event",
 		   GTK_SIGNAL_FUNC(on_button_press), (gpointer)thiscar);
   g_signal_connect (car_group, "button_release_event",
-		    (GtkSignalFunc) on_button_release, (gpointer)thiscar);
+		    (GCallback) on_button_release, (gpointer)thiscar);
   g_signal_connect (car_group, "motion_notify_event",
-		    (GtkSignalFunc) on_motion_notify, (gpointer)thiscar);
+		    (GCallback) on_motion_notify, (gpointer)thiscar);
 
   g_object_set_data(G_OBJECT(car_group), "car", (gpointer)thiscar);
   g_object_set_data(G_OBJECT(car_group), "whatami", (gpointer)"car_group");
diff --git a/src/wordprocessor-activity/wordprocessor.c b/src/wordprocessor-activity/wordprocessor.c
index 621db66..5f8958c 100644
--- a/src/wordprocessor-activity/wordprocessor.c
+++ b/src/wordprocessor-activity/wordprocessor.c
@@ -366,7 +366,7 @@ static GooCanvasItem *wordprocessor_create()
 			  NULL);
   gdk_pixbuf_unref(pixmap);
   g_signal_connect(item, "button_press_event",
-		   (GtkSignalFunc) save_event, buffer);
+		   (GCallback) save_event, buffer);
   gc_item_focus_init(item, NULL);
 
 
@@ -382,7 +382,7 @@ static GooCanvasItem *wordprocessor_create()
 			  NULL);
   gdk_pixbuf_unref(pixmap);
   g_signal_connect(item, "button_press_event",
-		   (GtkSignalFunc) load_event, buffer);
+		   (GCallback) load_event, buffer);
   gc_item_focus_init(item, NULL);
 
 
@@ -440,7 +440,7 @@ display_style_buttons(GooCanvasItem *boardRootItem,
 			     NULL);
 
       g_signal_connect(GTK_OBJECT(gtk_button_style[i]), "pressed",
-			 (GtkSignalFunc)item_event, styles_tab[i*2+1] );
+			 (GCallback)item_event, styles_tab[i*2+1] );
 
       y += offset_y;
 
diff --git a/src/wordsgame-activity/wordsgame.c b/src/wordsgame-activity/wordsgame.c
index 856658a..d46c0d5 100644
--- a/src/wordsgame-activity/wordsgame.c
+++ b/src/wordsgame-activity/wordsgame.c
@@ -162,10 +162,10 @@ static void pause_board (gboolean pause)
     {
       if(!drop_items_id) {
 	drop_items_id = g_timeout_add (0,
-				       (GtkFunction) wordsgame_drop_items, NULL);
+				       (GSourceFunc) wordsgame_drop_items, NULL);
       }
       if(!dummy_id) {
-	dummy_id = g_timeout_add (10, (GtkFunction) wordsgame_move_items, NULL);
+	dummy_id = g_timeout_add (10, (GSourceFunc) wordsgame_move_items, NULL);
       }
     }
 }
@@ -511,7 +511,7 @@ static void wordsgame_move_item(LettersItem *item)
     g_ptr_array_add (items2del, item);
     g_static_rw_lock_writer_unlock (&items2del_lock);
 
-    g_timeout_add (100,(GtkFunction) wordsgame_destroy_items, items2del);
+    g_timeout_add (100,(GSourceFunc) wordsgame_destroy_items, items2del);
 
     player_loose();
   }
@@ -536,7 +536,7 @@ static gint wordsgame_move_items (GtkWidget *widget, gpointer data)
       wordsgame_move_item(item);
     }
   dummy_id = g_timeout_add (gc_timing (speed, items->len),
-          (GtkFunction) wordsgame_move_items, NULL);
+          (GSourceFunc) wordsgame_move_items, NULL);
   return (FALSE);
 }
 
@@ -711,7 +711,7 @@ static gint wordsgame_drop_items (GtkWidget *widget, gpointer data)
   gc_sound_play_ogg ("sounds/level.wav", NULL);
   wordsgame_add_new_item();
   g_source_remove(drop_items_id);
-  drop_items_id = g_timeout_add (fallSpeed,(GtkFunction) wordsgame_drop_items, NULL);
+  drop_items_id = g_timeout_add (fallSpeed,(GSourceFunc) wordsgame_drop_items, NULL);
 
   return (FALSE);
 }
@@ -736,7 +736,7 @@ static void player_win(LettersItem *item)
   g_static_rw_lock_writer_unlock (&items2del_lock);
 
   g_object_set (item->rootitem, "visibility", GOO_CANVAS_ITEM_INVISIBLE, NULL);
-  g_timeout_add (500,(GtkFunction) wordsgame_destroy_items, items2del);
+  g_timeout_add (500,(GSourceFunc) wordsgame_destroy_items, items2del);
 
 
   if(gcomprisBoard->sublevel > gcomprisBoard->number_of_sublevel)
@@ -774,7 +774,7 @@ static void player_win(LettersItem *item)
 
           if(!drop_items_id) {
             drop_items_id = g_timeout_add (0,
-					   (GtkFunction) wordsgame_drop_items,
+					   (GSourceFunc) wordsgame_drop_items,
 					   NULL);
           }
 



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