Commit 059eb34b authored by Bruno Coudoin's avatar Bruno Coudoin

TODO: updated src/boards/draw.c: (get_tool_cursor), (item_event_move):

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
parent 99f260fd
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>
......
......@@ -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)
......
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
......
......@@ -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:
......
/* 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");
}
......
/* 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);
......
......@@ -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;
}
......
/* 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;
......
/* 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;
......
......@@ -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 */
......
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