Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog20
-rw-r--r--TODO2
-rw-r--r--configure.in2
-rw-r--r--src/boards/draw.c20
-rw-r--r--src/boards/menu.c4
-rw-r--r--src/gcompris/gcompris.c18
-rw-r--r--src/gcompris/oggplayer.c4
-rw-r--r--src/gcompris/properties.c8
-rw-r--r--src/gcompris/properties.h3
-rw-r--r--src/gcompris/soundutil.c7
10 files changed, 59 insertions, 29 deletions
diff --git a/ChangeLog b/ChangeLog
index 0a90bae..760d4be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,24 @@
+2003-11-05 Bruno coudoin <bruno.coudoin@free.fr>
+
+ * TODO: updated
+ * src/boards/draw.c: (get_tool_cursor), (item_event_move): changed drawing tools order.
+ * fixed raise/lower button.
+ * src/boards/menu.c: (menu_create_item): put in red sound icon if sound is not working
+ * src/gcompris/oggplayer.c: (decode_ogg_file): disable the sounds in gcompris if cannot open it
+ * src/gcompris/properties.h: added a boolean to check if the sounds is working
+ * src/gcompris/soundutil.c: (scheduler_bgnd): check in the background loop if sounds is enabled
+ * now if you disable music, next song will quit the
+ * background loop
+ * src/gcompris/gcompris.c: (gcompris_set_cursor): Patch from PUYDT Julien (from debian)
+ * solves the cursor random color.
+ * src/gcompris/properties.c: (gcompris_properties_new): now esd no more used by default
+ * as the sound output but the default libao output. this
+ * maybe changed using gcompris -A or editing /etc/libao.conf
+ * added a boolean to check if the sounds is working
+
2003-10-30 Bruno coudoin <bruno.coudoin@free.fr>
- * src/boards/draw.c: chaged to rotate only item not group and recalc anchors
+ * src/boards/draw.c: changed to rotate only item not group and recalc anchors
resizing an image works fine but it is not easy to resize it after
2003-10-30 Bruno coudoin <bruno.coudoin@free.fr>
diff --git a/TODO b/TODO
index f02fe53..1a4d499 100644
--- a/TODO
+++ b/TODO
@@ -21,8 +21,6 @@
* Add a board for child identification.
-* use gnome-vfs to package boards in a unique file
-
* change the scale board to be more realistic and flexible.
* Dynamic screen resolution change (using Xrender)
diff --git a/configure.in b/configure.in
index c5458a7..53e5b30 100644
--- a/configure.in
+++ b/configure.in
@@ -1,7 +1,7 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/gcompris/gcompris.c)
-AM_INIT_AUTOMAKE(gcompris, 4.1)
+AM_INIT_AUTOMAKE(gcompris, 4.2)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
diff --git a/src/boards/draw.c b/src/boards/draw.c
index 8c54425..1d91820 100644
--- a/src/boards/draw.c
+++ b/src/boards/draw.c
@@ -58,7 +58,7 @@ typedef enum
TOOL_CIRCLE = 2,
TOOL_FILLED_CIRCLE = 3,
TOOL_LINE = 4,
- TOOL_FLIP = 5,
+ TOOL_IMAGE = 5,
TOOL_TEXT = 6,
TOOL_GRID = 7,
TOOL_DELETE = 8,
@@ -66,7 +66,7 @@ typedef enum
TOOL_RAISE = 10,
TOOL_LOWER = 11,
TOOL_SELECT = 12,
- TOOL_IMAGE = 13,
+ TOOL_FLIP = 13,
TOOL_ROTATE_CCW = 14,
TOOL_ROTATE_CW = 15,
} ToolList;
@@ -85,7 +85,7 @@ static char *tool_pixmap_name[] =
"draw/tool-circle.png", "draw/tool-circle_on.png",
"draw/tool-filledcircle.png", "draw/tool-filledcircle_on.png",
"draw/tool-line.png", "draw/tool-line_on.png",
- "draw/tool-flip.png", "draw/tool-flip_on.png",
+ "draw/tool-image.png", "draw/tool-image_on.png",
"draw/tool-text.png", "draw/tool-text_on.png",
"draw/tool-grid.png", "draw/tool-grid_on.png",
"draw/tool-del.png", "draw/tool-del_on.png",
@@ -93,7 +93,7 @@ static char *tool_pixmap_name[] =
"draw/tool-up.png", "draw/tool-up_on.png",
"draw/tool-down.png", "draw/tool-down_on.png",
"draw/tool-select.png", "draw/tool-select_on.png",
- "draw/tool-image.png", "draw/tool-image_on.png",
+ "draw/tool-flip.png", "draw/tool-flip_on.png",
"draw/tool-rotation-ccw.png", "draw/tool-rotation-ccw_on.png",
"draw/tool-rotation-cw.png", "draw/tool-rotation-cw_on.png"
};
@@ -825,6 +825,8 @@ static guint get_tool_cursor(ToolList tool)
case TOOL_FILLED_CIRCLE:
return(GCOMPRIS_FILLCIRCLE_CURSOR);
break;
+ case TOOL_RAISE:
+ case TOOL_LOWER:
case TOOL_IMAGE:
case TOOL_LINE:
case TOOL_TEXT:
@@ -2066,11 +2068,11 @@ item_event_move(GnomeCanvasItem *item, GdkEvent *event, AnchorsItem *anchorsItem
break;
case TOOL_RAISE:
- gnome_canvas_item_raise(anchorsItem->item, 1);
+ gnome_canvas_item_raise(anchorsItem->rootitem, 1);
break;
case TOOL_LOWER:
- gnome_canvas_item_lower(anchorsItem->item, 1);
+ gnome_canvas_item_lower(anchorsItem->rootitem, 1);
break;
case TOOL_ROTATE_CW:
@@ -2127,12 +2129,10 @@ item_event_move(GnomeCanvasItem *item, GdkEvent *event, AnchorsItem *anchorsItem
reset_anchors_bounded(anchorsItem);
break;
case TOOL_RAISE:
- gnome_canvas_item_lower(anchorsItem->item, 1);
- reset_anchors_bounded(anchorsItem);
+ gnome_canvas_item_lower(anchorsItem->rootitem, 1);
break;
case TOOL_LOWER:
- gnome_canvas_item_raise(anchorsItem->item, 1);
- reset_anchors_bounded(anchorsItem);
+ gnome_canvas_item_raise(anchorsItem->rootitem, 1);
break;
default:
diff --git a/src/boards/menu.c b/src/boards/menu.c
index 5b0426e..4bd9bf5 100644
--- a/src/boards/menu.c
+++ b/src/boards/menu.c
@@ -1,6 +1,6 @@
/* gcompris - menu.c
*
- * Time-stamp: <2003/10/23 00:49:46 bcoudoin>
+ * Time-stamp: <2003/11/04 22:22:04 bcoudoin>
*
* Copyright (C) 2000 Bruno Coudoin
*
@@ -356,7 +356,7 @@ static GnomeCanvasItem *menu_create_item(GnomeCanvasGroup *parent, GcomprisBoard
g_warning("Checking mandatory_sound_file %s\n", soundfile);
}
- if (!g_file_exists (soundfile))
+ if (!g_file_exists (soundfile) || !gcompris_get_properties()->audio_works)
{
pixmap = gcompris_load_skin_pixmap("voice_bad.png");
}
diff --git a/src/gcompris/gcompris.c b/src/gcompris/gcompris.c
index 2d63fd3..a19d825 100644
--- a/src/gcompris/gcompris.c
+++ b/src/gcompris/gcompris.c
@@ -1,8 +1,8 @@
/* gcompris - gcompris.c
*
- * Time-stamp: <2003/10/29 01:00:20 bcoudoin>
+ * Time-stamp: <2003/11/03 16:20:31 bcoudoin>
*
- * Copyright (C) 2000,2001 Bruno Coudoin
+ * Copyright (C) 2000-2003 Bruno Coudoin
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -297,16 +297,22 @@ void gcompris_set_cursor(guint gdk_cursor_type)
// I suppose there is less than GCOMPRIS_FIRST_CUSTOM_CURSOR cursors defined in gdkcursors.h !
if (gdk_cursor_type < GCOMPRIS_FIRST_CUSTOM_CURSOR) {
cursor = gdk_cursor_new(gdk_cursor_type);
- gdk_window_set_cursor (window->window, cursor);
+ gdk_window_set_cursor (window->window, cursor);
gdk_cursor_destroy(cursor);
} else { // we use a custom cursor
GdkColor fg, bg;
// static const gchar * cursor;
static const gchar ** bits;
-
+
+ gdk_color_parse("rgb:FFFF/FFFF/FFFF",&fg);
+ gdk_color_parse("rgb:FFFF/3FFF/0000",&bg);
+
+ gdk_color_parse("black",&fg);
+ gdk_color_parse("red",&bg);
+
switch (gdk_cursor_type) {
case GCOMPRIS_BIG_RED_ARROW_CURSOR :
- bits = big_red_arrow_cursor_bits;
+ bits = big_red_arrow_cursor_bits;
break;
case GCOMPRIS_BIRD_CURSOR :
bits = bird_cursor_bits;
@@ -338,8 +344,6 @@ void gcompris_set_cursor(guint gdk_cursor_type)
default : bits = big_red_arrow_cursor_bits;
}
- gdk_color_parse("rgb:FFFF/FFFF/FFFF",&fg);
- gdk_color_parse("rgb:FFFF/3FFF/0000",&bg);
cursor = gdk_cursor_new_from_data(bits, 40 , 40, &fg, &bg, 0, 0);
gdk_window_set_cursor(window->window, cursor);
gdk_cursor_destroy(cursor);
diff --git a/src/gcompris/oggplayer.c b/src/gcompris/oggplayer.c
index 7a343a1..e580701 100644
--- a/src/gcompris/oggplayer.c
+++ b/src/gcompris/oggplayer.c
@@ -97,6 +97,10 @@ int decode_ogg_file(char *infile)
if ( driver_id < 0 ){
fprintf(stderr, "Error unable to find a usable audio output device (%d)\nTry gcompris -A to select an alternative audio output", driver_id);
+ /* Disable sounds in gcompris */
+ properties->music = FALSE;
+ properties->fx = FALSE;
+ properties->audio_works = FALSE;
return 0;
}
diff --git a/src/gcompris/properties.c b/src/gcompris/properties.c
index 13bea75..5230c28 100644
--- a/src/gcompris/properties.c
+++ b/src/gcompris/properties.c
@@ -1,6 +1,6 @@
/* gcompris - properties.c
*
- * Time-stamp: <2003/10/29 00:45:38 bcoudoin>
+ * Time-stamp: <2003/11/04 22:25:17 bcoudoin>
*
* Copyright (C) 2000,2003 Bruno Coudoin
*
@@ -43,7 +43,10 @@ GcomprisProperties *gcompris_properties_new ()
tmp->fullscreen = gnome_config_get_int ("/gcompris/Preferences/fullscreen=1");
tmp->timer = gnome_config_get_int ("/gcompris/Preferences/timer=1");
tmp->skin = gnome_config_get_string ("/gcompris/Preferences/skin=default");
- tmp->audio_output = gnome_config_get_string ("/gcompris/Preferences/audio_output=esd");
+ tmp->audio_output = gnome_config_get_string ("/gcompris/Preferences/audio_output=");
+
+ /* By default audio is said to work until libao fails to load it */
+ tmp->audio_works = TRUE;
/* Non persistant value */
tmp->difficulty_filter = -1; /* No difficulty filter by default */
@@ -87,6 +90,7 @@ GcomprisProperties *gcompris_properties_copy (GcomprisProperties *props)
tmp->music = props->music;
tmp->fx = props->fx;
+ tmp->audio_works = props->audio_works;
tmp->screensize = props->screensize;
tmp->timer = props->timer;
tmp->fullscreen = props->fullscreen;
diff --git a/src/gcompris/properties.h b/src/gcompris/properties.h
index c9729d1..f7a6f55 100644
--- a/src/gcompris/properties.h
+++ b/src/gcompris/properties.h
@@ -1,6 +1,6 @@
/* gcompris - properties.h
*
- * Time-stamp: <2003/10/29 00:44:27 bcoudoin>
+ * Time-stamp: <2003/11/04 22:22:37 bcoudoin>
*
* Copyright (C) 2000 Bruno Coudoin
*
@@ -25,6 +25,7 @@
typedef struct {
gint music;
gint fx;
+ gint audio_works;
gint fullscreen;
gint screensize;
gint defaultcursor;
diff --git a/src/gcompris/soundutil.c b/src/gcompris/soundutil.c
index e42de7a..9d1a898 100644
--- a/src/gcompris/soundutil.c
+++ b/src/gcompris/soundutil.c
@@ -101,9 +101,6 @@ static void* scheduler_bgnd ()
int namelistlength = 0;
GList *musiclist = NULL;
- if ( !gcompris_get_properties()->music )
- return;
-
/* Sleep to let gcompris intialisation and intro music to complete */
sleep(20);
@@ -136,6 +133,10 @@ static void* scheduler_bgnd ()
/* Now loop over all our music files */
while (TRUE)
{
+ /* Music can be disabled at any time */
+ if ( !gcompris_get_properties()->music )
+ return;
+
for(i=0; i<g_list_length(musiclist); i++)
{
/* WARNING Displaying stuff in a thread seems to make gcompris unstable */