Commit 0bee89d3 authored by Bruno Coudoin's avatar Bruno Coudoin Committed by Bruno Coudoin

Miguel DE IZARRA implemented the wordlist selector.

	We need some improvement to save data in the ~/My GCompris
	instead of the system datadir directory.

svn path=/trunk/; revision=3700
parent 17fa6254
2009-03-26 Wolfram Sang <wolfram@iswi.org>
2009-06-20 Wolfram Sang <wolfram@iswi.org>
- From trunk
* src/board/shapegame.c:
......@@ -14,6 +14,44 @@
Fix this by ensuring that the object to move or drop is the
same one that got dragged.
2009-06-20 Bruno coudoin <bruno.coudoin@free.fr>
- From trunk
Miguel DE IZARRA implemented the wordlist selector.
We need some improvement to save data in the ~/My GCompris
instead of the system datadir directory.
* src/boards/advanced_colors.c: (add_xml_data):
* src/boards/click_on_letter.c: (config_start):
* src/boards/colors.c: (colors_config_start):
* src/boards/gletters.c: (gletter_config_start):
* src/boards/imageid.c: (add_xml_data), (config_start):
* src/boards/missingletter.c: (config_start):
* src/boards/py-mod-gcompris.c: (py_gc_board_config_boolean_box),
(py_gc_board_config_combo_box), (py_gc_board_config_radio_buttons),
(py_gc_board_config_spin_int), (py_gc_board_conf_separator),
(py_gc_board_config_combo_locales),
(py_gc_board_config_combo_locales_asset),
(py_gc_board_config_textview):
* src/boards/reading.c: (reading_config_start):
* src/boards/scale.c: (config_start):
* src/boards/shapegame.c: (config_start):
* src/boards/smallnumbers.c: (smallnumber_config_start):
* src/boards/wordsgame.c: (start_board), (conf_ok),
(wordsgame_config_start), (wordsgame_config_stop):
* src/gcompris/Makefile.am:
* src/gcompris/board_config.c: (gc_board_conf_close),
(_response_board_conf), (_conf_window_configured),
(gc_board_config_window_display),
(gc_board_conf_boolean_box_toggled), (gc_board_config_boolean_box),
(spin_changed), (gc_board_config_spin_int),
(gc_board_conf_separator):
* src/gcompris/board_config.h:
* src/gcompris/wordlist.c: (gc_wordlist_get_from_file),
(gc_wordlist_dump), (gc_wordlist_get_levelwordlist),
(gc_wordlist_random_word_get), (gc_wordlist_free_level),
(gc_wordlist_free), (gc_wordlist_set_wordlist), (gc_wordlist_save):
* src/gcompris/wordlist.h:
2009-04-14 Bruno coudoin <bruno.coudoin@free.fr>
......
......@@ -476,7 +476,13 @@ static void add_xml_data(xmlDocPtr doc, xmlNodePtr xmlnode, GNode * child)
sColor = g_strdup_printf("color%d", i+1);
if (!strcmp((char *)xmlnode->name, sColor))
{
colors[i] = gettext((char *)xmlNodeListGetString(doc, xmlnode->xmlChildrenNode, 1));
text = (char*)xmlNodeListGetString(doc, xmlnode->xmlChildrenNode, 1);
if(text)
{
colors[i] = gettext((char *)text);
g_free(text);
}
text = NULL;
g_free(sColor);
break;
}
......
......@@ -1846,8 +1846,10 @@ config_start(GcomprisBoard *agcomprisBoard,
agcomprisBoard->name,
aProfile? aProfile->name : "");
gc_board_config_window_display( label,
(GcomprisConfCallback )conf_ok);
GcomprisBoardConf *bconf;
bconf = \
gc_board_config_window_display( label,
(GcomprisConfCallback )conf_ok);
g_free(label);
......@@ -1857,7 +1859,7 @@ config_start(GcomprisBoard *agcomprisBoard,
if (strcmp(agcomprisBoard->name, "imagename")==0){
gchar *locale = g_hash_table_lookup( config, "locale");
gc_board_config_combo_locales( locale);
gc_board_config_combo_locales( bconf, locale);
}
gchar *drag_mode_str = g_hash_table_lookup( config, "drag_mode");
......@@ -1868,7 +1870,7 @@ config_start(GcomprisBoard *agcomprisBoard,
else
drag_previous = 0;
gc_board_config_combo_drag( drag_mode);
gc_board_config_combo_drag(bconf, drag_mode);
}
......
......@@ -1136,7 +1136,7 @@ py_gc_board_config_boolean_box(PyObject* self, PyObject* args)
/* Call the corresponding C function */
return (PyObject *)pygobject_new((GObject*) \
gc_board_config_boolean_box((const gchar *)label, key, PyObject_IsTrue(py_bool)));
gc_board_config_boolean_box(NULL,(const gchar *)label, key, PyObject_IsTrue(py_bool)));
}
......@@ -1171,7 +1171,7 @@ py_gc_board_config_combo_box(PyObject* self, PyObject* args)
/* Call the corresponding C function */
return (PyObject *)pygobject_new((GObject*) \
gc_board_config_combo_box((const gchar *)label,
gc_board_config_combo_box(NULL, (const gchar *)label,
list,
key,
init));
......@@ -1256,7 +1256,7 @@ py_gc_board_config_radio_buttons(PyObject* self, PyObject* args)
g_strdup(PyString_AsString(pyvalue)));
}
result = gc_board_config_radio_buttons(label,
result = gc_board_config_radio_buttons(NULL,label,
key,
buttons_label,
init);
......@@ -1278,7 +1278,7 @@ py_gc_board_config_spin_int(PyObject* self, PyObject* args)
return NULL;
return (PyObject *)pygobject_new((GObject*) \
gc_board_config_spin_int((const gchar *)label,
gc_board_config_spin_int(NULL, (const gchar *)label,
key,
min,
max,
......@@ -1297,7 +1297,7 @@ py_gc_board_conf_separator(PyObject* self, PyObject* args)
return NULL;
/* Create and return the result */
return (PyObject *)pygobject_new((GObject*) gc_board_conf_separator());
return (PyObject *)pygobject_new((GObject*) gc_board_conf_separator(NULL));
}
......@@ -1312,7 +1312,7 @@ py_gc_board_config_combo_locales(PyObject* self, PyObject* args)
return NULL;
return (PyObject *)pygobject_new((GObject*) \
gc_board_config_combo_locales( init));
gc_board_config_combo_locales(NULL, init));
}
......@@ -1355,7 +1355,7 @@ py_gc_board_config_combo_locales_asset(PyObject* self, PyObject* args)
return NULL;
return (PyObject *)pygobject_new((GObject*) \
gc_board_config_combo_locales_asset( label, init, file ));
gc_board_config_combo_locales_asset(NULL, label, init, file ));
}
......@@ -1506,7 +1506,7 @@ py_gc_board_config_textview(PyObject* self, PyObject* args){
return (PyObject *) \
pygobject_new((GObject*) \
gc_board_config_textview( label,
gc_board_config_textview(NULL, label,
key,
desc,
init_text,
......
......@@ -625,8 +625,8 @@ config_start(GcomprisBoard *agcomprisBoard,
gchar *label = g_strdup_printf(_("<b>%s</b> configuration\n for profile <b>%s</b>"),
agcomprisBoard->name,
aProfile ? aProfile->name : "");
gc_board_config_window_display(label, conf_ok);
GcomprisBoardConf *bconf;
bconf = gc_board_config_window_display(label, conf_ok);
g_free(label);
......@@ -635,7 +635,7 @@ config_start(GcomprisBoard *agcomprisBoard,
gchar *saved_locale_sound = g_hash_table_lookup( config, "locale_sound");
gc_board_config_combo_locales_asset( "Select sound locale", saved_locale_sound,
gc_board_config_combo_locales_asset(bconf, "Select sound locale", saved_locale_sound,
"voices/$LOCALE/colors/purple.ogg");
gboolean up_init = FALSE;
......@@ -645,7 +645,7 @@ config_start(GcomprisBoard *agcomprisBoard,
if (up_init_str && (strcmp(up_init_str, "True")==0))
up_init = TRUE;
gc_board_config_boolean_box(_("Uppercase only text"),
gc_board_config_boolean_box(bconf, _("Uppercase only text"),
"uppercase_only",
up_init);
......
......@@ -169,7 +169,7 @@ colors_config_start(GcomprisBoard *agcomprisBoard,
label = g_strdup_printf(_("<b>%s</b> configuration\n for profile <b>%s</b>"),
agcomprisBoard->name, aProfile ? aProfile->name : "");
gc_board_config_window_display(label, conf_ok);
GcomprisBoardConf *bconf = gc_board_config_window_display(label, conf_ok);
g_free(label);
......@@ -178,7 +178,7 @@ colors_config_start(GcomprisBoard *agcomprisBoard,
gchar *saved_locale_sound = g_hash_table_lookup( config, "locale_sound");
gc_board_config_combo_locales_asset( _("Select sound locale"), saved_locale_sound,
gc_board_config_combo_locales_asset(bconf, _("Select sound locale"), saved_locale_sound,
"voices/$LOCALE/colors/purple.ogg");
g_hash_table_destroy(config);
......
......@@ -61,7 +61,9 @@ gcompris_SOURCES = \
binreloc.c \
binreloc.h \
board.h board.c \
board_config.h \
board_config_common.c board_config_common.h \
board_config_combo.c board_config_radio.c\
board_config_textview.c board_config_wordlist.c \
board_config.h board_config.c \
bonus.c \
bonus.h \
......
This diff is collapsed.
......@@ -18,6 +18,18 @@
#ifndef BOARD_CONFIG_H
#define BOARD_CONFIG_H
#include "gcompris.h"
/* the callback type */
typedef void (*GcomprisConfCallback) (GHashTable *table);
typedef struct
{
GtkWindow *conf_window;
GtkVBox *main_conf_box;
GHashTable *hash_conf;
GcomprisConfCallback Confcallback;
} GcomprisBoardConf;
void gc_board_config_start(GcomprisBoard *aBoard,
GcomprisProfile *aProfile);
......@@ -29,14 +41,11 @@ void gc_board_config_stop();
/* You can add your own widget if you need */
/* the callback is called wish the hash key, value when the apply button is clicked */
/* the callback type */
typedef void (*GcomprisConfCallback) (GHashTable *table);
GtkVBox *gc_board_config_window_display(gchar *label, GcomprisConfCallback callback);
GcomprisBoardConf *gc_board_config_window_display(gchar *label, GcomprisConfCallback callback);
GtkCheckButton *gc_board_config_boolean_box(const gchar *label, gchar *key, gboolean initial_value);
GtkCheckButton *gc_board_config_boolean_box(GcomprisBoardConf *config, const gchar *label, gchar *key, gboolean initial_value);
GtkComboBox *gc_board_config_combo_box(const gchar *label, GList *strings, gchar *key, gchar *init);
GtkComboBox *gc_board_config_combo_box(GcomprisBoardConf *config, const gchar *label, GList *strings, gchar *key, gchar *init);
/* Params: */
/* - Label */
......@@ -45,25 +54,25 @@ GtkComboBox *gc_board_config_combo_box(const gchar *label, GList *strings, gchar
/* Returns */
/* - g_hash_table (gchar *values, GtkWidget *pointer) */
GHashTable *gc_board_config_radio_buttons(const gchar *label,
GHashTable *gc_board_config_radio_buttons(GcomprisBoardConf *config, const gchar *label,
gchar *key,
GHashTable *buttons_label,
gchar *init);
GtkSpinButton *gc_board_config_spin_int(const gchar *label,
GtkSpinButton *gc_board_config_spin_int(GcomprisBoardConf *config, const gchar *label,
gchar *key,
gint min,
gint max,
gint step,
gint init);
GtkHSeparator *gc_board_conf_separator();
GtkHSeparator *gc_board_conf_separator(GcomprisBoardConf *config);
GList *gc_locale_gets_list();
GtkComboBox *gc_board_config_combo_locales( gchar *init);
GtkComboBox *gc_board_config_combo_locales(GcomprisBoardConf *config, gchar *init);
GtkComboBox *gc_board_config_combo_drag( gint init);
GtkComboBox *gc_board_config_combo_drag( GcomprisBoardConf *config, gint init);
void gc_locale_change(gchar *locale);
......@@ -71,10 +80,8 @@ void gc_locale_reset();
GList *gc_locale_gets_asset_list(const gchar *file);
GtkComboBox *gc_board_config_combo_locales_asset(const gchar *label, gchar *init,
const gchar *file);
#endif
GtkComboBox *gc_board_config_combo_locales_asset(GcomprisBoardConf *config,
const gchar *label, gchar *init, const gchar *file);
/***********************************/
/* TextView facility */
/* Callback is text vaidating function */
......@@ -83,8 +90,13 @@ GtkComboBox *gc_board_config_combo_locales_asset(const gchar *label, gchar *init
typedef gboolean (*GcomprisTextCallback) (gchar *key, gchar *text, GtkLabel *label);
GtkTextView *gc_board_config_textview(const gchar *label,
GtkTextView *gc_board_config_textview(GcomprisBoardConf *config, const gchar *label,
gchar *key,
const gchar*description,
gchar *init_text,
GcomprisTextCallback validate);
GtkWidget *gc_board_config_wordlist(GcomprisBoardConf *config, const gchar *files);
#endif
......@@ -22,6 +22,8 @@
#include "gcompris.h"
void gc_wordlist_dump(GcomprisWordlist *wl);
/** Load a wordlist formatted xml file. It contains a list of words.
*
* The xml file format must be like this:
......@@ -62,13 +64,11 @@ GcomprisWordlist
xmlNodePtr wlNode;
xmlNodePtr node;
xmlNodePtr wordsNode;
int i;
guint number_of_level = 0;
guint level;
GcomprisWordlist *wordlist;
xmlChar *text;
gchar **wordsArray;
GSList *words = NULL;
if (!format)
......@@ -84,19 +84,21 @@ GcomprisWordlist
if(!xmlfilename)
{
g_warning("Couldn't find file %s !", filename);
g_free(xmlfilename);
g_free(filename);
return NULL;
}
g_warning("Wordlist found %s\n", xmlfilename);
xmldoc = xmlParseFile(xmlfilename);
g_free(xmlfilename);
if(!xmldoc){
g_warning("Couldn't parse file %s !", xmlfilename);
g_free(filename);
g_free(xmlfilename);
return NULL;
}
g_free(xmlfilename);
if(/* if there is no root element */
!xmldoc->children ||
......@@ -106,6 +108,7 @@ GcomprisWordlist
g_strcasecmp((gchar *)xmldoc->children->name,(gchar *)"GCompris")!=0) {
g_warning("No Gcompris node");
xmlFreeDoc(xmldoc);
g_free(filename);
return NULL;
}
......@@ -118,6 +121,7 @@ GcomprisWordlist
g_strcasecmp((gchar *)wlNode->name,"Wordlist")!=0) {
g_warning("No wordlist node %s", (wlNode == NULL) ? (gchar *)wlNode->name : "NULL node");
xmlFreeDoc(xmldoc);
g_free(filename);
return NULL;
}
......@@ -174,48 +178,60 @@ GcomprisWordlist
break;
}
text = xmlNodeGetContent ( wordsNode);
wordsArray = g_strsplit_set ((const gchar *) text,
(const gchar *) " \n\t",
0);
g_warning("Wordlist read : %s", text);
xmlFree (text);
i=0;
while (wordsArray[i] != NULL) {
if (wordsArray[i][0]!='\0')
words = g_slist_append( words, g_strdup( wordsArray[i]));
i++;
level=-1;
text = xmlGetProp ( node,
(const xmlChar *) "value");
if (text) {
level = atoi((gchar *) text);
xmlFree (text);
}
text = xmlNodeGetContent ( wordsNode);
gc_wordlist_set_wordlist(wordlist, level, (const gchar*)text);
xmlFree(text);
g_strfreev ( wordsArray);
/* initialise LevelWordlist struct */
LevelWordlist *level_words = g_malloc0(sizeof(LevelWordlist));
node = node->next;
}
xmlFreeDoc(xmldoc);
return wordlist;
}
number_of_level++;
void gc_wordlist_dump(GcomprisWordlist *wl)
{
GSList *level, *words;
text = xmlGetProp ( node,
(const xmlChar *) "value");
if (text) {
level_words->level = atoi((gchar *) text);
xmlFree (text);
}
printf("Wordlist dump\n");
printf("filename:%s\n",wl->filename);
printf("number of level:%d\n",wl->number_of_level);
level_words->words = words;
for(level = wl->levels_words; level; level = level->next)
{
printf("Level %d\n", ((LevelWordlist*)level->data)->level);
printf("Words :");
for(words=((LevelWordlist*)level->data)->words; words; words=words->next)
{
printf(" %s", (char*)words->data);
}
puts("");
}
}
wordlist->levels_words = g_slist_append( wordlist->levels_words, level_words);
LevelWordlist*gc_wordlist_get_levelwordlist(GcomprisWordlist *wordlist, guint level)
{
GSList *lev_list, *list;
LevelWordlist *lw;
node = node->next;
}
if(!wordlist)
return NULL;
wordlist->number_of_level = number_of_level;
lev_list = wordlist->levels_words;
return wordlist;
for (list = lev_list; list != NULL; list = list->next)
{
lw = list->data;
if(lw->level == level)
return lw;
}
return NULL;
}
/** get a random word from the wordlist in the given level
......@@ -228,36 +244,37 @@ GcomprisWordlist
gchar *
gc_wordlist_random_word_get(GcomprisWordlist *wordlist, guint level)
{
GSList *lev_list, *list;
LevelWordlist *lw;
gchar *word;
if(!wordlist)
return NULL;
if(level>wordlist->number_of_level)
level = wordlist->number_of_level;
lev_list = wordlist->levels_words;
lw = gc_wordlist_get_levelwordlist(wordlist, level);
if(!lw)
return NULL;
/* cap to the number_of_level */
if(level > wordlist->number_of_level)
level = wordlist->number_of_level;
g_warning("Level : %d", lw->level);
for (list = lev_list; list != NULL; list = list->next)
{
LevelWordlist *lw = list->data;
/* We got the proper level, find a random word */
word = (gchar *)g_slist_nth_data(lw->words,
RAND(0, g_slist_length(lw->words))
);
g_warning("returning random word '%s'", word);
return(g_strdup(word));
}
if(lw->level == level)
{
gchar *word;
g_warning("Level : %d", lw->level);
/* We got the proper level, find a random word */
word = (gchar *)g_slist_nth_data(lw->words,
RAND(0, g_slist_length(lw->words)-1)
);
g_warning("returning random word '%s'", word);
return(g_strdup(word));
}
}
static void gc_wordlist_free_level(LevelWordlist *lw)
{
GSList *words;
return NULL;
if(!lw)
return;
for (words = lw->words; words !=NULL; words = words->next)
g_free(words->data);
g_slist_free(lw->words);
g_free(lw);
}
/** call it to free a GcomprisWordlist as returned by gc_wordlist_get_from_file
......@@ -268,7 +285,7 @@ gc_wordlist_random_word_get(GcomprisWordlist *wordlist, guint level)
void
gc_wordlist_free(GcomprisWordlist *wordlist)
{
GSList *list, *words;
GSList *list;
if(!wordlist)
return;
......@@ -280,11 +297,103 @@ gc_wordlist_free(GcomprisWordlist *wordlist)
for ( list = wordlist->levels_words; list !=NULL; list=list->next){
LevelWordlist *lw = (LevelWordlist *)list->data;
for ( words = lw->words; words !=NULL; words = words->next)
g_free(words->data);
g_slist_free(lw->words);
g_free(lw);
gc_wordlist_free_level(lw);
}
g_slist_free ( wordlist->levels_words);
g_free (wordlist);
}
void gc_wordlist_set_wordlist(GcomprisWordlist *wordlist, guint level, const gchar*text)
{
LevelWordlist *lw;
GSList *words=NULL;
gchar **wordsArray;
int i;
g_warning("wordlist : add level=%d text=%s\n", level, text);
/* remove level */
if((lw = gc_wordlist_get_levelwordlist(wordlist, level)))
{
g_warning("remove level %d", lw->level);
wordlist->levels_words = g_slist_remove(wordlist->levels_words, lw);
gc_wordlist_free_level(lw);
wordlist->number_of_level--;
}
/* add new level */
wordsArray = g_strsplit_set (text, " \n\t", 0);
i=0;
for(i=0;wordsArray[i] != NULL; i++)
if (wordsArray[i][0]!='\0' &&
!g_slist_find_custom(words, wordsArray[i], (GCompareFunc)strcmp))
words = g_slist_append( words, g_strdup(wordsArray[i]));
g_strfreev ( wordsArray);
if(words==NULL)
return;
/* initialise LevelWordlist struct */
LevelWordlist *level_words = g_malloc0(sizeof(LevelWordlist));
level_words->words = words;
level_words->level = level;
wordlist->number_of_level++;
wordlist->levels_words = g_slist_append( wordlist->levels_words, level_words);
}
void gc_wordlist_save(GcomprisWordlist *wordlist)
{
GSList *listlevel,*listword;
LevelWordlist *level;
gchar *filename, *tmp;
xmlNodePtr wlnode, levelnode, node;
xmlDocPtr doc;
if(!wordlist)
return;
doc = xmlNewDoc(BAD_CAST XML_DEFAULT_VERSION);
if(!doc)
return;
node = xmlNewNode(NULL, BAD_CAST "GCompris");
xmlDocSetRootElement(doc,node);
wlnode = xmlNewChild(node, NULL, BAD_CAST "Wordlist", NULL);
if(wordlist->name)
xmlSetProp(wlnode, BAD_CAST "name", BAD_CAST wordlist->name);
if(wordlist->description)
xmlSetProp(wlnode, BAD_CAST "description", BAD_CAST wordlist->description);
if(wordlist->locale)
xmlSetProp(wlnode, BAD_CAST "locale", BAD_CAST wordlist->locale);
for(listlevel = wordlist->levels_words; listlevel; listlevel = listlevel->next)
{
level = (LevelWordlist*)listlevel->data;
levelnode = xmlNewChild(wlnode, NULL, BAD_CAST "level", NULL);
if((tmp = g_strdup_printf("%d", level->level)))
{
xmlSetProp(levelnode, BAD_CAST "value", BAD_CAST tmp);
g_free(tmp);
}
for(listword = level->words; listword; listword=listword->next)
{
xmlNodeAddContent(levelnode, BAD_CAST listword->data);
xmlNodeAddContent(levelnode, BAD_CAST " ");
}
}
filename = gc_file_find_absolute(wordlist->filename);
if(filename)
{
if(xmlSaveFormatFileEnc(filename, doc, NULL, 1)<0)
{
g_warning("Fail to write %s", filename);
g_free(filename);
}
g_free(filename);
}
xmlFreeDoc(doc);
}
......@@ -35,7 +35,9 @@ typedef struct {
} GcomprisWordlist;
GcomprisWordlist *gc_wordlist_get_from_file(const gchar *fileformat, ...);
LevelWordlist *gc_wordlist_get_levelwordlist(GcomprisWordlist *wordlist, guint level);
void gc_wordlist_free(GcomprisWordlist *wordlist);
gchar *gc_wordlist_random_word_get(GcomprisWordlist *wordlist, guint level);
void gc_wordlist_set_wordlist(GcomprisWordlist *wordlist, guint level, const gchar*words);
void gc_wordlist_save(GcomprisWordlist *wordlist);
#endif
......@@ -847,7 +847,7 @@ gletter_config_start(GcomprisBoard *agcomprisBoard,
label = g_strdup_printf(_("<b>%s</b> configuration\n for profile <b>%s</b>"),
agcomprisBoard->name, aProfile ? aProfile->name : "");
gc_board_config_window_display(label, (GcomprisConfCallback )conf_ok);
GcomprisBoardConf *bconf = gc_board_config_window_display(label, (GcomprisConfCallback )conf_ok);
g_free(label);
......@@ -856,7 +856,7 @@ gletter_config_start(GcomprisBoard *agcomprisBoard,
gchar *locale = g_hash_table_lookup( config, "locale");
gc_board_config_combo_locales( locale);
gc_board_config_combo_locales( bconf, locale);
gboolean up_init = FALSE;
......@@ -865,7 +865,7 @@ gletter_config_start(GcomprisBoard *agcomprisBoard,
if (up_init_str && (strcmp(up_init_str, "True")==0))
up_init = TRUE;
gc_board_conf_separator();
gc_board_conf_separator(bconf);
gchar *control_sound = g_hash_table_lookup( config, "with_sound");
if (control_sound && strcmp(g_hash_table_lookup( config, "with_sound"),"True")==0)
......@@ -873,11 +873,11 @@ gletter_config_start(GcomprisBoard *agcomprisBoard,
else
with_sound = FALSE;
gc_board_config_boolean_box(_("Enable sounds"), "with_sound", with_sound);
gc_board_config_boolean_box(bconf, _("Enable sounds"), "with_sound", with_sound);
gc_board_conf_separator();
gc_board_conf_separator(bconf);
gc_board_config_boolean_box(_("Uppercase only text"),
gc_board_config_boolean_box(bconf, _("Uppercase only text"),
"uppercase_only",
up_init);
......
......@@ -52,7 +52,6 @@ typedef struct {
} Board;
/* XML */
static gboolean read_xml_file(char *fname);
static void init_xml(guint level);
static void add_xml_data(xmlDocPtr doc,xmlNodePtr xmlnode, GNode * child);
static void parse_doc(xmlDocPtr doc);
......@@ -715,8 +714,8 @@ config_start(GcomprisBoard *agcomprisBoard,
gchar *label = g_strdup_printf(_("<b>%s</b> configuration\n for profile <b>%s</b>"),
agcomprisBoard->name,
aProfile ? aProfile->name : "");
gc_board_config_window_display( label,
GcomprisBoardConf *bconf;
bconf = gc_board_config_window_display( label,
(GcomprisConfCallback )conf_ok);
g_free(label);
......@@ -726,7 +725,7 @@ config_start(GcomprisBoard *agcomprisBoard,
gchar *locale = g_hash_table_lookup( config, "locale");