Commit 10ec7199 authored by Bruno Coudoin's avatar Bruno Coudoin

- Patch from Miguel that:

	  - fixes the digital display in clockgame.
	  - remove a momory leak in memory
parent 81fbfe99
2006-11-03 Bruno coudoin <bruno.coudoin@free.fr>
- Patch from Miguel that:
- fixes the digital display in clockgame.
- remove a momory leak in memory
* TODO:
* src/boards/clockgame.c: (start_board), (display_digital_time),
(display_hour), (display_minute), (display_second), (item_event),
(get_random_hour):
* src/boards/memory.c: (end_board), (create_item):
2006-11-02 Bruno Coudoin
- new date system, untested.
......@@ -6,7 +18,7 @@
http://bugzilla.gnome.org/show_bug.cgi?id=368549
- In shapegame, the green dot is now resseted properly
when the item is no more in sight (reported by Joshua N Pritikin)
* configure.in:
* src/boards/clockgame.c: (display_hour), (item_event):
* src/boards/shapegame.c: (item_event):
......@@ -26,10 +38,10 @@
* src/gcompris/gcompris.c: (gc_locale_set): Fixed non relative call to bindtextdomain(). It was breaking translation with autopackage.
Need to be tested.
2006-10-28 Bruno coudoin <bruno.coudoin@free.fr>
2006-10-28 Bruno coudoin <bruno.coudoin@free.fr>
- Added support for Somali
* boards/flags/so.png:
* configure.in:
* docs/gcompris2spip.pl:
......
......@@ -8,7 +8,7 @@
* Boards idea:
- simple geometry: redo a symetrical drawing
* Use thepixbuf animation feature for fishes instead of my own
* Use thepixbuf animation feature for fishes instead of my own
animation implementation
* GCompris editor : It will let teachers/educators to create their
......@@ -17,7 +17,7 @@
* More feedback
* Add an independant server side software that can control gcompris
behaviour and record the student scoring. It must also include
behaviour and record the student scoring. It must also include
authentication. Already got a name for that : schoolbus
* Add a board to set the current date on a calendar with date/month/year
......@@ -31,7 +31,7 @@
* Dynamic skin change
* Remove the Gnome dependancy to use GTK only. The gnomecanvas itself do
* Remove the Gnome dependancy to use GTK only. The gnomecanvas itself do
not require gnome. Less dependancy less install issues. Also could
make porting easier.
......@@ -65,7 +65,7 @@ ou autre)
faire la construction par drag'n'drop. Si il prend la bonne loco mais
se trompe de wagon, il faut recommencer au début, c'est pas top.
- Aussi, il y a un cas ou malgres qu'on mettes la bonne solution,
- Aussi, il y a un cas ou malgres qu'on mettes la bonne solution,
il ne trouve pas que c'est OK.
- si on ajoute beaucoup de wagons, ils dépassent de l'écran et on ne les
......@@ -126,7 +126,7 @@ When a board is started it first check for a content
in .gcompris/activities_data/<activity_name>/<profile>/
if none avalaible here, then the default is usedhese new fatures are mandatory in gcompris is we want to go further,
especialy in reading activities. There is many ideas we could implement
easily in the reading area but we cannot until we have in place a goodowerfull and generic edition and profiling mecanism.
easily in the reading area but we cannot until we have in place a goodowerfull and generic edition and profiling mecanism.
Teachers want to have some edit capability to adapt gcompris to their
courses. We could make some dirty hack and go faster but in the end we
......@@ -140,9 +140,10 @@ Then make a new release for the windows version. This is most important
because it will make it easier to distribute updates (python activities
only) to all our users, whatever the platform they use.
This will allows us to make gcompris a complete, full featured
This will allows us to make gcompris a complete, full featured
educational software that rivals many proprietary ones.
If somebody want to work on the profile concept, we will be abble to
provide these features at least 6 monthes earlier than what I can do.
- Replace Soudan by Sudan in boards/geography/board4_2.xml.in
\ No newline at end of file
......@@ -134,7 +134,7 @@ static void start_board (GcomprisBoard *agcomprisBoard)
gcomprisBoard=agcomprisBoard;
img = gc_skin_image_get("clockgame-bg.jpg");
gc_set_background(gnome_canvas_root(gcomprisBoard->canvas),
gc_set_background(gnome_canvas_root(gcomprisBoard->canvas),
img);
g_free(img);
......@@ -248,6 +248,12 @@ destroy_all_items()
static void display_digital_time(GnomeCanvasItem *item, GcomprisTime *time)
{
gchar *text = NULL;
int temps;
temps = (time->hour+12)*3600 + time->minute*60 + time->second;
time->hour = (temps / 3600) % 12;
time->minute = (temps / 60) % 60;
time->second = temps % 60;
if(item==NULL)
return;
......@@ -269,7 +275,6 @@ static void display_hour(guint hour)
double needle_size = clock_size*0.70;
double ang;
GnomeCanvasPoints *canvasPoints;
canvasPoints = gnome_canvas_points_new (2);
if(hour_item==NULL)
return;
......@@ -279,6 +284,7 @@ static void display_hour(guint hour)
ang += currentTime.minute * M_PI / 360;
ang += currentTime.second * M_PI / 21600;
canvasPoints = gnome_canvas_points_new (2);
canvasPoints->coords[0]=cx;
canvasPoints->coords[1]=cy;
canvasPoints->coords[2]=cx + needle_size * sin(ang);
......@@ -300,13 +306,11 @@ static void display_hour(guint hour)
display_digital_time(digital_time_item_s, &currentTime);
}
static void display_minute(guint minute)
{
double needle_size = clock_size;
double ang;
GnomeCanvasPoints *canvasPoints;
canvasPoints = gnome_canvas_points_new (2);
if(minute_item==NULL)
return;
......@@ -314,6 +318,7 @@ static void display_minute(guint minute)
ang = minute * M_PI / 30;
ang += currentTime.second * M_PI / 1800;
canvasPoints = gnome_canvas_points_new (2);
canvasPoints->coords[0]=cx;
canvasPoints->coords[1]=cy;
canvasPoints->coords[2]=cx + needle_size * sin(ang);
......@@ -332,6 +337,7 @@ static void display_minute(guint minute)
currentTime.minute=minute;
display_digital_time(digital_time_item, &currentTime);
display_digital_time(digital_time_item_s, &currentTime);
}
static void display_second(guint second)
......@@ -339,7 +345,6 @@ static void display_second(guint second)
double needle_size = clock_size;
double ang;
GnomeCanvasPoints *canvasPoints;
canvasPoints = gnome_canvas_points_new (2);
/* No seconds at first levels */
if(second_item==NULL || gcomprisBoard->level<=2)
......@@ -347,6 +352,7 @@ static void display_second(guint second)
ang = second * M_PI / 30;
canvasPoints = gnome_canvas_points_new (2);
canvasPoints->coords[0]=cx;
canvasPoints->coords[1]=cy;
canvasPoints->coords[2]=cx + needle_size * sin(ang);
......@@ -365,6 +371,7 @@ static void display_second(guint second)
currentTime.second=second;
display_digital_time(digital_time_item, &currentTime);
display_digital_time(digital_time_item_s, &currentTime);
}
......@@ -692,7 +699,7 @@ item_event(GnomeCanvasItem *item, GdkEvent *event, gpointer data)
if(item==hour_item)
display_hour(angle * 6 / M_PI);
else if(item==minute_item)
{
{
if(currentTime.minute > 45 && angle * 30 / M_PI < 15)
currentTime.hour++;
......@@ -740,11 +747,11 @@ static void get_random_hour(GcomprisTime *time)
{
time->hour=rand()%12;
if(gcomprisBoard->level>3)
time->second=rand()%60;
else time->second=0;
time->minute=rand()%60;
switch(gcomprisBoard->level)
......
......@@ -910,6 +910,11 @@ end_board ()
tux_memory = NULL;
}
}
g_free(op_add);
g_free(op_minus);
g_free(op_mult);
g_free(op_div);
gcomprisBoard = NULL;
}
......@@ -1222,7 +1227,8 @@ static void create_item(GnomeCanvasGroup *parent)
"x", (double) 50,
"y", (double) 20,
NULL);
gdk_pixbuf_unref(pixmap_tux);
tux_score_s = gnome_canvas_item_new (GNOME_CANVAS_GROUP(parent),
gnome_canvas_text_get_type (),
"font", gc_skin_font_board_huge_bold,
......
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