[gcompris/gcomprixogoo] Fixed a segfault in the GCompris dialog box.



commit 91bd1e5fd4c1201f495dc389838f94f09fb6e768
Author: Bruno Coudoin <bruno coudoin free fr>
Date:   Wed Mar 24 01:10:12 2010 +0100

    Fixed a segfault in the GCompris dialog box.

 src/gcompris/gcompris_confirm.c |   30 ++++++------------------------
 1 files changed, 6 insertions(+), 24 deletions(-)
---
diff --git a/src/gcompris/gcompris_confirm.c b/src/gcompris/gcompris_confirm.c
index 404f42c..878a8be 100644
--- a/src/gcompris/gcompris_confirm.c
+++ b/src/gcompris/gcompris_confirm.c
@@ -37,9 +37,6 @@ static gboolean button_event (GooCanvasItem  *item,
 			      GdkEventButton *event,
 			      gchar *answer);
 
-static void              set_content(GooCanvasText *item_content,
-				     gchar *text);
-
 static gboolean		 confirm_displayed = FALSE;
 
 static GooCanvasItem	*rootitem = NULL;
@@ -209,14 +206,14 @@ display_confirm(gchar *title,
 		       NULL);
 
   text = goo_canvas_text_new (rootitem,
-			      "",
+			      question_text,
 			      text_zone_x,
 			      text_zone_y,
-			      text_zone_w,
-			      GTK_JUSTIFY_CENTER);
-
-  set_content (GOO_CANVAS_TEXT(text), question_text);
-
+			      500,
+			      GTK_JUSTIFY_CENTER,
+			      "font", gc_skin_font_title,
+			      "fill-color-rgba",  gc_skin_color_title,
+			      NULL);
 
   /*
    * Buttons
@@ -312,21 +309,6 @@ display_confirm(gchar *title,
 
 }
 
-/* Apply the style to the given Text item  */
-static void
-set_content(GooCanvasText *item_content,
-	    gchar *text) {
-
-
-  /*
-   * Set the new text in the 2 items
-   */
-  g_object_set(GOO_CANVAS_ITEM(item_content),
-	       "text", text,
-	       NULL);
-
-}
-
 static gboolean
 button_event (GooCanvasItem  *item,
 	      GooCanvasItem  *target,



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