Commit b2f1fe4e authored by Yves Combe's avatar Yves Combe
Browse files

change colors letters in memory.

clean code and add trace in reading (strange crash).
parent e8a606a7
2005-08-30 Yves Combe,,, <set EMAIL_ADDRESS environment variable>
change colors letters in memory.
clean code and add trace in reading (strange crash).
* src/boards/memory.c: (create_item):
* src/boards/reading.c: (reading_next_level),
(reading_destroy_all_items), (reading_create_item):
2005-08-30 Yves Combe <yves@ycombe.net>
huftis has remade railroad background from frack svg, because the jpg had awful artifacts.
......
/* gcompris - memory.c
*
* Time-stamp: <2005/08/30 08:48:16 yves>
* Time-stamp: <2005/08/30 23:35:10 yves>
*
* Copyright (C) 2000 Bruno Coudoin
*
......@@ -32,6 +32,7 @@
//#define TEXT_FONT gcompris_skin_font_board_huge_bold
#define TEXT_FONT "Serif bold 28"
#define LETTER_BLUE 0x0000FFFF
static GcomprisBoard *gcomprisBoard = NULL;
......@@ -511,7 +512,7 @@ static GnomeCanvasItem *create_item(GnomeCanvasGroup *parent)
"x", (double) (width*0.8)/2,
"y", (double) (height*0.8)/2,
"anchor", GTK_ANCHOR_CENTER,
"fill_color_rgba", 0x99CDFFFF,
"fill_color_rgba", LETTER_BLUE,
NULL);
}
......
/* gcompris - reading.c
*
* Time-stamp: <2005/08/30 08:35:56 yves>
* Time-stamp: <2005/08/30 23:51:50 yves>
*
* Copyright (C) 2000 Bruno Coudoin
*
......@@ -269,7 +269,9 @@ static gint reading_next_level()
gamewon = FALSE;
g_warning("destroying_all...");
reading_destroy_all_items();
g_warning("destroying_all... done ");
boardRootItem = GNOME_CANVAS_GROUP(
gnome_canvas_item_new (gnome_canvas_root(gcomprisBoard->canvas),
......@@ -317,9 +319,12 @@ static void reading_destroy_all_items()
drop_items_id = 0;
}
g_warning("destroying boardRootItem ...");
if(boardRootItem!=NULL)
gtk_object_destroy (GTK_OBJECT(boardRootItem));
g_warning("destroying boardRootItem ... done");
boardRootItem = NULL;
previousFocus.rootItem = NULL;
toDeleteFocus.rootItem = NULL;
......@@ -329,12 +334,16 @@ static void reading_destroy_all_items()
g_free(textToFind);
textToFind=NULL;
}
g_warning("destroying words ...");
if (words!=NULL)
{
g_ptr_array_free (words, TRUE);
words=NULL;
}
g_warning("destroying words ... done");
......@@ -460,9 +469,6 @@ static gboolean reading_create_item(GnomeCanvasGroup *parent)
"fill_color", "black",
NULL);
double x1, y1, x2, y2;
gnome_canvas_item_get_bounds(GNOME_CANVAS_ITEM(previousFocus.item), &x1, &y1, &x2, &y2);
gchar *oldword = g_strdup_printf("<span foreground=\"black\" background=\"black\">%s</span>", word);
previousFocus.overwriteItem = \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment