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

end of previous commit stopped unexpetedly

parent f946147a
/* gcompris - gameutil.c
*
* Time-stamp: <2005/09/13 23:02:09 yves>
* Time-stamp: <2005/09/24 22:50:37 yves>
*
* Copyright (C) 2000 Bruno Coudoin
*
......@@ -1195,6 +1195,7 @@ item_event_ok(GnomeCanvasItem *item, GdkEvent *event, DialogBoxCallBack dbcb)
default:
break;
}
return TRUE;
}
/**
......
......@@ -327,6 +327,7 @@ static void init_background()
screen_width = gdk_screen_width();
#ifdef XRANDR
gint i;
/* Search the 800x600 Resolution */
if(properties->fullscreen && !properties->noxrandr) {
g_warning("XRANDR Is compiled in. Searching a good resolution");
......
......@@ -372,6 +372,38 @@ void gcompris_play_ogg_list( GList* files )
}
/* get alphabet sound file name from gunichar */
gchar *gcompris_alphabet_sound(gchar *chars)
{
gchar *next, *str, *prev, *result;
gint i;
gint length;
gunichar next_unichar;
length = g_utf8_strlen(chars, -1);
next = chars;
result = NULL;
str = g_new0(gchar, 6);
for (i=0; i < length; i++) {
next_unichar = g_utf8_get_char(next);
str = g_strdup_printf("U%.4X",(gint32) g_unichar_tolower(next_unichar));
prev = result;
if (prev)
result = g_strconcat( prev, str, NULL);
else
result = g_strdup(str);
g_free(str);
g_free(prev);
next = g_utf8_next_char(next);
}
return g_strdup_printf("%s.ogg",result);
}
/* Local Variables: */
/* mode:c */
/* eval:(load-library "time-stamp") */
......
......@@ -44,4 +44,6 @@ void gcompris_close_sound(void);
int decode_ogg_file(char *infile);
void display_ao_devices();
gchar *gcompris_alphabet_sound(gchar *chars);
#endif
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