Commit 90fde407 authored by Bruno Coudoin's avatar Bruno Coudoin

- Last iteration over API cleanup. Some fine tune will be needed later

	  but most of the clenup is done now.
parent 26bc2ba7
2006-08-29 Bruno coudoin <bruno.coudoin@free.fr>
- Last iteration over API cleanup. Some fine tune will be needed later
but most of the clenup is done now.
* src/boards/click_on_letter.c: (start_board), (end_board),
(sounds_are_fine), (save_table), (conf_ok), (config_start):
* src/boards/colors.c: (save_table), (conf_ok),
(colors_config_start), (start_board), (end_board):
* src/boards/gletters.c: (start_board), (end_board), (save_table),
(conf_ok), (gletter_config_start):
* src/boards/gtans.c: (taninitstart):
* src/boards/imageid.c: (start_board), (end_board), (save_table),
(conf_ok), (config_start):
* src/boards/missingletter.c: (start_board), (end_board),
(save_table), (conf_ok), (config_start):
* src/boards/py-mod-admin.c: (py_gc_db_get_profile_from_id),
(py_gc_db_get_board_from_id), (py_gc_db_get_group_from_id),
(py_gc_db_get_user_from_id), (py_gc_db_get_class_from_id),
(py_gc_db_get_users_list), (py_gc_db_get_groups_list),
(py_gc_db_get_classes_list):
* src/boards/py-mod-gcompris.c: (py_gc_db_get_board_conf),
(py_gc_db_get_conf), (py_gc_db_set_board_conf),
(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_locale_change),
(py_gc_locale_reset), (py_gc_board_config_textview),
(py_gc_prop_user_dirname_get), (py_gc_prop_board_dirname_get),
(py_gc_prop_current_user_dirname_get),
(py_gc_prop_current_board_dirname_get):
* src/boards/py-mod-timer.c: (python_gc_timer_module_init):
* src/boards/python/anim.py:
* src/boards/python/bargame.py:
* src/boards/reading.c: (start_board), (end_board), (save_table),
(conf_ok), (reading_config_start):
* src/boards/shapegame.c: (start_board), (end_board), (save_table),
(conf_ok), (config_start):
* src/boards/smallnumbers.c: (start_board), (save_table),
(conf_ok), (smallnumber_config_start):
* src/gcompris/Makefile.am:
* src/gcompris/board_config.c: (_conf_window_configured),
(gc_board_config_window_display), (gc_board_config_boolean_box),
(_get_active_text), (_combo_box_changed),
(gc_board_config_combo_box), (gc_board_config_radio_buttons),
(gc_board_config_spin_int), (gc_board_conf_separator),
(gc_board_config_combo_locales_changed),
(gc_board_config_combo_locales), (gc_locale_change),
(gc_locale_reset), (gc_board_config_combo_locales_asset),
(_textview_destroy), (_textbuffer_changed), (_textview_yes),
(gc_board_config_textview):
* src/gcompris/board_config.h:
* src/gcompris/file_selector.c: (display_file_selector):
* src/gcompris/gcompris.c: (gc_locale_set):
* src/gcompris/gcompris.h:
* src/gcompris/gcompris_db.c: (gc_db_get_profile_from_id),
(gc_db_profile_from_name_get), (gc_db_get_profile),
(gc_db_get_user_from_id), (gc_db_get_class_from_id),
(gc_db_set_board_conf), (gc_db_get_conf), (gc_db_get_board_conf),
(gc_db_get_group_from_id), (gc_db_get_groups_list),
(gc_db_get_board_from_id), (gc_db_get_users_list),
(gc_db_get_classes_list):
* src/gcompris/gcompris_db.h:
* src/gcompris/gcompris_files.c:
* src/gcompris/gcompris_files.h:
* src/gcompris/profile.c:
* src/gcompris/profile.h:
* src/gcompris/properties.c: (gc_prop_user_dirname_get),
(gc_prop_current_user_dirname_get), (gc_prop_board_dirname_get),
(gc_prop_current_board_dirname_get):
* src/gcompris/properties.h:
2006-08-29 Bruno coudoin <bruno.coudoin@free.fr>
Continued the rework of the API.
......
......@@ -139,12 +139,12 @@ GET_BPLUGIN_INFO(click_on_letter)
*/
static void start_board (GcomprisBoard *agcomprisBoard)
{
GHashTable *config = gcompris_get_board_conf();
GHashTable *config = gc_db_get_board_conf();
int ready;
board_paused = TRUE;
gcompris_change_locale(g_hash_table_lookup( config, "locale_sound"));
gc_locale_set(g_hash_table_lookup( config, "locale_sound"));
gchar *up_init_str = g_hash_table_lookup( config, "uppercase_only");
......@@ -198,7 +198,7 @@ static void end_board ()
gc_score_end();
click_on_letter_destroy_all_items();
}
gcompris_reset_locale();
gc_locale_reset();
gcomprisBoard = NULL;
gc_sound_resume();
}
......@@ -279,8 +279,8 @@ static gboolean sounds_are_fine()
gchar *locale = NULL;
locale = g_strndup(gc_locale_get(), 2);
gcompris_reset_locale();
gcompris_change_locale("en_US");
gc_locale_reset();
gc_locale_set("en_US");
str2 = gc_file_find_absolute("sounds/en/alphabet/%s", letter_str);
......@@ -554,7 +554,7 @@ static GHFunc save_table (gpointer key,
gpointer value,
gpointer user_data)
{
gcompris_set_board_conf ( profile_conf,
gc_db_set_board_conf ( profile_conf,
board_conf,
(gchar *) key,
(gchar *) value);
......@@ -581,12 +581,12 @@ conf_ok(GHashTable *table)
if (gcomprisBoard){
GHashTable *config;
if (profile_conf)
config = gcompris_get_board_conf();
config = gc_db_get_board_conf();
else
config = table;
gcompris_reset_locale();
gcompris_change_locale(g_hash_table_lookup(config, "locale_sound"));
gc_locale_reset();
gc_locale_set(g_hash_table_lookup(config, "locale_sound"));
gchar *up_init_str = g_hash_table_lookup( config, "uppercase_only");
if (up_init_str)
......@@ -632,11 +632,11 @@ config_start(GcomprisBoard *agcomprisBoard,
g_free(label);
/* init the combo to previously saved value */
GHashTable *config = gcompris_get_conf( profile_conf, board_conf);
GHashTable *config = gc_db_get_conf( profile_conf, board_conf);
gchar *saved_locale_sound = g_hash_table_lookup( config, "locale_sound");
gcompris_combo_locales_asset( "Select sound locale", saved_locale_sound,
gc_board_config_combo_locales_asset( "Select sound locale", saved_locale_sound,
"sounds/$LOCALE/colors/purple.ogg");
gboolean up_init = FALSE;
......@@ -646,7 +646,7 @@ config_start(GcomprisBoard *agcomprisBoard,
if (up_init_str && (strcmp(up_init_str, "True")==0))
up_init = TRUE;
gcompris_boolean_box(_("Uppercase only text"),
gc_board_config_boolean_box(_("Uppercase only text"),
"uppercase_only",
up_init);
......
......@@ -111,7 +111,7 @@ static void save_table (gpointer key,
gpointer value,
gpointer user_data)
{
gcompris_set_board_conf ( profile_conf,
gc_db_set_board_conf ( profile_conf,
board_conf,
(gchar *) key,
(gchar *) value);
......@@ -129,15 +129,15 @@ conf_ok(GHashTable *table)
g_hash_table_foreach(table, (GHFunc) save_table, NULL);
if (gcomprisBoard){
GHashTable *config = gcompris_get_board_conf();
GHashTable *config = gc_db_get_board_conf();
if (profile_conf)
config = gcompris_get_board_conf();
config = gc_db_get_board_conf();
else
config = table;
gcompris_reset_locale();
gcompris_change_locale(g_hash_table_lookup(config, "locale_sound"));
gc_locale_reset();
gc_locale_set(g_hash_table_lookup(config, "locale_sound"));
if (profile_conf)
g_hash_table_destroy(config);
......@@ -171,11 +171,11 @@ colors_config_start(GcomprisBoard *agcomprisBoard,
g_free(label);
/* init the combo to previously saved value */
GHashTable *config = gcompris_get_conf( profile_conf, board_conf);
GHashTable *config = gc_db_get_conf( profile_conf, board_conf);
gchar *saved_locale_sound = g_hash_table_lookup( config, "locale_sound");
gcompris_combo_locales_asset( "Select sound locale", saved_locale_sound,
gc_board_config_combo_locales_asset( "Select sound locale", saved_locale_sound,
"sounds/$LOCALE/colors/purple.ogg");
g_hash_table_destroy(config);
......@@ -216,9 +216,9 @@ static void start_board (GcomprisBoard *agcomprisBoard) {
int * item;
int i;
GHashTable *config = gcompris_get_board_conf();
GHashTable *config = gc_db_get_board_conf();
gcompris_change_locale(g_hash_table_lookup(config, "locale_sound"));
gc_locale_set(g_hash_table_lookup(config, "locale_sound"));
g_hash_table_destroy(config);
......@@ -271,7 +271,7 @@ static void end_board () {
g_list_free(listColors);
listColors=NULL;
}
gcompris_reset_locale();
gc_locale_reset();
gcomprisBoard = NULL;
gc_sound_resume();
}
......
......@@ -290,9 +290,9 @@ int whitespace(char *buffer) {
*/
static void start_board (GcomprisBoard *agcomprisBoard)
{
GHashTable *config = gcompris_get_board_conf();
GHashTable *config = gc_db_get_board_conf();
gcompris_change_locale(g_hash_table_lookup( config, "locale"));
gc_locale_set(g_hash_table_lookup( config, "locale"));
gchar *up_init_str = g_hash_table_lookup( config, "uppercase_only");
......@@ -345,7 +345,7 @@ end_board ()
g_free(keyMap);
}
gcompris_reset_locale();
gc_locale_reset();
gcomprisBoard = NULL;
}
......@@ -790,7 +790,7 @@ static void save_table (gpointer key,
gpointer value,
gpointer user_data)
{
gcompris_set_board_conf ( profile_conf,
gc_db_set_board_conf ( profile_conf,
board_conf,
(gchar *) key,
(gchar *) value);
......@@ -809,16 +809,16 @@ static void conf_ok(GHashTable *table)
g_hash_table_foreach(table, save_table, NULL);
if (gcomprisBoard){
gcompris_reset_locale();
gc_locale_reset();
GHashTable *config;
if (profile_conf)
config = gcompris_get_board_conf();
config = gc_db_get_board_conf();
else
config = table;
gcompris_change_locale(g_hash_table_lookup( config, "locale"));
gc_locale_set(g_hash_table_lookup( config, "locale"));
gchar *up_init_str = g_hash_table_lookup( config, "uppercase_only");
......@@ -871,11 +871,11 @@ gletter_config_start(GcomprisBoard *agcomprisBoard,
g_free(label);
/* init the combo to previously saved value */
GHashTable *config = gcompris_get_conf( profile_conf, board_conf);
GHashTable *config = gc_db_get_conf( profile_conf, board_conf);
gchar *locale = g_hash_table_lookup( config, "locale");
gcompris_combo_locales( locale);
gc_board_config_combo_locales( locale);
gboolean up_init = FALSE;
......@@ -884,7 +884,7 @@ gletter_config_start(GcomprisBoard *agcomprisBoard,
if (up_init_str && (strcmp(up_init_str, "True")==0))
up_init = TRUE;
gcompris_separator();
gc_board_conf_separator();
gchar *control_sound = g_hash_table_lookup( config, "with_sound");
if (control_sound && strcmp(g_hash_table_lookup( config, "with_sound"),"True")==0)
......@@ -892,11 +892,11 @@ gletter_config_start(GcomprisBoard *agcomprisBoard,
else
with_sound = FALSE;
gcompris_boolean_box("Enable sounds", "with_sound", with_sound);
gc_board_config_boolean_box("Enable sounds", "with_sound", with_sound);
gcompris_separator();
gc_board_conf_separator();
gcompris_boolean_box(_("Uppercase only text"),
gc_board_config_boolean_box(_("Uppercase only text"),
"uppercase_only",
up_init);
......
......@@ -1828,7 +1828,7 @@ void taninitstart(void){
int i;
char* accurstr;
usergtdir = gcompris_get_current_board_dirname();
usergtdir = gc_prop_current_board_dirname_get();
for (i = PXSTART; i<PXNBR+PXSTART; i++){
tabpxnam[i] = NULL;
......
......@@ -154,9 +154,9 @@ GET_BPLUGIN_INFO(imageid)
*/
static void start_board (GcomprisBoard *agcomprisBoard)
{
GHashTable *config = gcompris_get_board_conf();
GHashTable *config = gc_db_get_board_conf();
gcompris_change_locale(g_hash_table_lookup( config, "locale"));
gc_locale_set(g_hash_table_lookup( config, "locale"));
g_hash_table_destroy(config);
......@@ -197,7 +197,7 @@ end_board ()
destroy_board_list();
}
gcompris_reset_locale();
gc_locale_reset();
gcomprisBoard = NULL;
}
......@@ -697,7 +697,7 @@ static void save_table (gpointer key,
gpointer value,
gpointer user_data)
{
gcompris_set_board_conf ( profile_conf,
gc_db_set_board_conf ( profile_conf,
board_conf,
(gchar *) key,
(gchar *) value);
......@@ -714,16 +714,16 @@ static GcomprisConfCallback conf_ok(GHashTable *table)
g_hash_table_foreach(table, (GHFunc) save_table, NULL);
if (gcomprisBoard) {
gcompris_reset_locale();
gc_locale_reset();
GHashTable *config;
if (profile_conf)
config = gcompris_get_board_conf();
config = gc_db_get_board_conf();
else
config = table;
gcompris_change_locale(g_hash_table_lookup( config, "locale"));
gc_locale_set(g_hash_table_lookup( config, "locale"));
if (profile_conf)
g_hash_table_destroy(config);
......@@ -763,11 +763,11 @@ config_start(GcomprisBoard *agcomprisBoard,
g_free(label);
/* init the combo to previously saved value */
GHashTable *config = gcompris_get_conf( profile_conf, board_conf);
GHashTable *config = gc_db_get_conf( profile_conf, board_conf);
gchar *locale = g_hash_table_lookup( config, "locale");
gcompris_combo_locales( locale);
gc_board_config_combo_locales( locale);
}
......
......@@ -152,9 +152,9 @@ static void pause_board (gboolean pause)
*/
static void start_board (GcomprisBoard *agcomprisBoard)
{
GHashTable *config = gcompris_get_board_conf();
GHashTable *config = gc_db_get_board_conf();
gcompris_change_locale(g_hash_table_lookup( config, "locale"));
gc_locale_set(g_hash_table_lookup( config, "locale"));
g_hash_table_destroy(config);
......@@ -196,7 +196,7 @@ static void end_board ()
destroy_board_list();
}
gcompris_reset_locale();
gc_locale_reset();
gcomprisBoard = NULL;
}
......@@ -721,7 +721,7 @@ static void save_table (gpointer key,
gpointer value,
gpointer user_data)
{
gcompris_set_board_conf ( profile_conf,
gc_db_set_board_conf ( profile_conf,
board_conf,
(gchar *) key,
(gchar *) value);
......@@ -738,16 +738,16 @@ static GcomprisConfCallback conf_ok(GHashTable *table)
g_hash_table_foreach(table, (GHFunc) save_table, NULL);
if (gcomprisBoard){
gcompris_reset_locale();
gc_locale_reset();
GHashTable *config;
if (profile_conf)
config = gcompris_get_board_conf();
config = gc_db_get_board_conf();
else
config = table;
gcompris_change_locale(g_hash_table_lookup( config, "locale"));
gc_locale_set(g_hash_table_lookup( config, "locale"));
if (profile_conf)
g_hash_table_destroy(config);
......@@ -786,11 +786,11 @@ config_start(GcomprisBoard *agcomprisBoard,
g_free(label);
/* init the combo to previously saved value */
GHashTable *config = gcompris_get_conf( profile_conf, board_conf);
GHashTable *config = gc_db_get_conf( profile_conf, board_conf);
gchar *locale = g_hash_table_lookup( config, "locale");
gcompris_combo_locales( locale);
gc_board_config_combo_locales( locale);
}
......
......@@ -100,7 +100,7 @@ py_gc_menu_get_boards (PyObject* self, PyObject* args)
}
static PyObject*
py_gcompris_get_profile_from_id (PyObject* self, PyObject* args)
py_gc_db_get_profile_from_id (PyObject* self, PyObject* args)
{
GcomprisProfile *profile;
int profile_id;
......@@ -110,14 +110,14 @@ py_gcompris_get_profile_from_id (PyObject* self, PyObject* args)
return NULL;
/* Call the corresponding C function */
profile = gcompris_get_profile_from_id (profile_id);
profile = gc_db_get_profile_from_id (profile_id);
/* Create and return the result */
return gcompris_new_pyGcomprisProfileObject(profile) ;
}
static PyObject*
py_gcompris_get_board_from_id (PyObject* self, PyObject* args)
py_gc_db_get_board_from_id (PyObject* self, PyObject* args)
{
GcomprisBoard *board;
int board_id;
......@@ -127,14 +127,14 @@ py_gcompris_get_board_from_id (PyObject* self, PyObject* args)
return NULL;
/* Call the corresponding C function */
board = gcompris_get_board_from_id (board_id);
board = gc_db_get_board_from_id (board_id);
/* Create and return the result */
return gcompris_new_pyGcomprisBoardObject(board) ;
}
static PyObject*
py_gcompris_get_group_from_id (PyObject* self, PyObject* args)
py_gc_db_get_group_from_id (PyObject* self, PyObject* args)
{
GcomprisGroup *group;
int group_id;
......@@ -144,14 +144,14 @@ py_gcompris_get_group_from_id (PyObject* self, PyObject* args)
return NULL;
/* Call the corresponding C function */
group = gcompris_get_group_from_id (group_id);
group = gc_db_get_group_from_id (group_id);
/* Create and return the result */
return gcompris_new_pyGcomprisGroupObject(group) ;
}
static PyObject*
py_gcompris_get_user_from_id (PyObject* self, PyObject* args)
py_gc_db_get_user_from_id (PyObject* self, PyObject* args)
{
GcomprisUser *user;
int user_id;
......@@ -161,14 +161,14 @@ py_gcompris_get_user_from_id (PyObject* self, PyObject* args)
return NULL;
/* Call the corresponding C function */
user = gcompris_get_user_from_id (user_id);
user = gc_db_get_user_from_id (user_id);
/* Create and return the result */
return gcompris_new_pyGcomprisUserObject(user) ;
}
static PyObject*
py_gcompris_get_class_from_id (PyObject* self, PyObject* args)
py_gc_db_get_class_from_id (PyObject* self, PyObject* args)
{
GcomprisClass *class;
int class_id;
......@@ -178,7 +178,7 @@ py_gcompris_get_class_from_id (PyObject* self, PyObject* args)
return NULL;
/* Call the corresponding C function */
class = gcompris_get_class_from_id (class_id);
class = gc_db_get_class_from_id (class_id);
/* Create and return the result */
return gcompris_new_pyGcomprisClassObject(class) ;
......@@ -207,7 +207,7 @@ py_gc_db_profiles_list_get (PyObject* self, PyObject* args)
}
static PyObject*
py_gcompris_get_users_list (PyObject* self, PyObject* args)
py_gc_db_get_users_list (PyObject* self, PyObject* args)
{
GList *users_list;
GList *list;
......@@ -218,7 +218,7 @@ py_gcompris_get_users_list (PyObject* self, PyObject* args)
return NULL;
/* Call the corresponding C function */
users_list = gcompris_get_users_list();
users_list = gc_db_get_users_list();
pylist = PyList_New(0);
for (list = users_list; list != NULL; list = list->next){
......@@ -229,7 +229,7 @@ py_gcompris_get_users_list (PyObject* self, PyObject* args)
}
static PyObject*
py_gcompris_get_groups_list (PyObject* self, PyObject* args)
py_gc_db_get_groups_list (PyObject* self, PyObject* args)
{
GList *groups_list;
GList *list;
......@@ -240,7 +240,7 @@ py_gcompris_get_groups_list (PyObject* self, PyObject* args)
return NULL;
/* Call the corresponding C function */
groups_list = gcompris_get_groups_list();
groups_list = gc_db_get_groups_list();
pylist = PyList_New(0);
for (list = groups_list; list != NULL; list = list->next){
......@@ -251,7 +251,7 @@ py_gcompris_get_groups_list (PyObject* self, PyObject* args)
}
static PyObject*
py_gcompris_get_classes_list (PyObject* self, PyObject* args)
py_gc_db_get_classes_list (PyObject* self, PyObject* args)
{
GList *classes_list;
GList *list;
......@@ -262,7 +262,7 @@ py_gcompris_get_classes_list (PyObject* self, PyObject* args)
return NULL;
/* Call the corresponding C function */
classes_list = gcompris_get_classes_list();
classes_list = gc_db_get_classes_list();
pylist = PyList_New(0);
for (list = classes_list; list != NULL; list = list->next){
......@@ -346,15 +346,15 @@ static PyMethodDef PythonGcomprisAdminModule[] = {
{ "board_run_next", py_board_run_next, METH_VARARGS, "board_run_next" },
{ "gc_board_config_start", py_gc_board_config_start, METH_VARARGS, "gc_board_config_start" },
{ "gc_board_config_stop", py_gc_board_config_stop, METH_VARARGS, "gc_board_config_stop" },
{ "get_profile_from_id", py_gcompris_get_profile_from_id, METH_VARARGS, "gcompris_get_profile_from_id" },
{ "get_profile_from_id", py_gc_db_get_profile_from_id, METH_VARARGS, "gc_db_get_profile_from_id" },
{ "get_profiles_list", py_gc_db_profiles_list_get, METH_VARARGS, "gc_db_profiles_list_get" },
{ "get_user_from_id", py_gcompris_get_user_from_id, METH_VARARGS, "gcompris_get_user_from_id" },
{ "get_users_list", py_gcompris_get_users_list, METH_VARARGS, "gcompris_get_users_list" },
{ "get_group_from_id", py_gcompris_get_group_from_id, METH_VARARGS, "gcompris_get_group_from_id" },
{ "get_groups_list", py_gcompris_get_groups_list, METH_VARARGS, "gcompris_get_groups_list" },
{ "get_class_from_id", py_gcompris_get_class_from_id, METH_VARARGS, "gcompris_get_class_from_id" },
{ "get_classes_list", py_gcompris_get_classes_list, METH_VARARGS, "gcompris_get_classes_list" },
{ "get_board_from_id", py_gcompris_get_board_from_id, METH_VARARGS, "gcompris_get_board_from_id" },
{ "get_user_from_id", py_gc_db_get_user_from_id, METH_VARARGS, "gc_db_get_user_from_id" },
{ "get_users_list", py_gc_db_get_users_list, METH_VARARGS, "gc_db_get_users_list" },
{ "get_group_from_id", py_gc_db_get_group_from_id, METH_VARARGS, "gc_db_get_group_from_id" },
{ "get_groups_list", py_gc_db_get_groups_list, METH_VARARGS, "gc_db_get_groups_list" },
{ "get_class_from_id", py_gc_db_get_class_from_id, METH_VARARGS, "gc_db_get_class_from_id" },
{ "get_classes_list", py_gc_db_get_classes_list, METH_VARARGS, "gc_db_get_classes_list" },
{ "get_board_from_id", py_gc_db_get_board_from_id, METH_VARARGS, "gc_db_get_board_from_id" },
{ "get_boards_list", py_gc_menu_get_boards, METH_VARARGS, "gc_menu_get_boards" },
{ "get_users_from_group", py_gc_db_users_from_group_get, METH_VARARGS, "gc_db_users_from_group_get" },
{ "get_users_from_group", py_gc_db_users_from_group_get, METH_VARARGS, "gc_db_users_from_group_get" },
......
......@@ -868,7 +868,7 @@ py_gcompris_spawn_async(PyObject *unused, PyObject *args, PyObject *kwargs)
static PyObject*
py_gcompris_get_board_conf(PyObject* self, PyObject* args)
py_gc_db_get_board_conf(PyObject* self, PyObject* args)
{
PyObject *pydict;
GHashTable *table;
......@@ -879,7 +879,7 @@ py_gcompris_get_board_conf(PyObject* self, PyObject* args)
/* Call the corresponding C function */
table = gcompris_get_board_conf();
table = gc_db_get_board_conf();
pydict = hash_to_dict(table);
......@@ -889,7 +889,7 @@ py_gcompris_get_board_conf(PyObject* self, PyObject* args)
}
static PyObject*
py_gcompris_get_conf(PyObject* self, PyObject* args)
py_gc_db_get_conf(PyObject* self, PyObject* args)
{
PyObject *pydict;
GHashTable *table;
......@@ -912,7 +912,7 @@ py_gcompris_get_conf(PyObject* self, PyObject* args)
cGcomprisBoard = pyGcomprisBoard->cdata;
/* Call the corresponding C function */
table = gcompris_get_conf(cGcomprisProfile, cGcomprisBoard);
table = gc_db_get_conf(cGcomprisProfile, cGcomprisBoard);
pydict = hash_to_dict(table);
......@@ -957,7 +957,7 @@ py_gc_profile_get_current_user(PyObject* self, PyObject* args)
static PyObject*
py_gcompris_set_board_conf (PyObject* self, PyObject* args)
py_gc_db_set_board_conf (PyObject* self, PyObject* args)
{
PyObject* pyBoard;
PyObject* pyProfile;
......@@ -981,7 +981,7 @@ py_gcompris_set_board_conf (PyObject* self, PyObject* args)
cGcomprisBoard = pyGcomprisBoard->cdata;
/* Call the corresponding C function */
gcompris_set_board_conf(cGcomprisProfile, cGcomprisBoard, key, value);
gc_db_set_board_conf(cGcomprisProfile, cGcomprisBoard, key, value);
/* Create and return the result */
Py_INCREF(Py_None);
......@@ -1056,27 +1056,27 @@ py_gc_board_config_window_display(PyObject* self, PyObject* args){
}
/* GtkCheckButton *gcompris_boolean_box (label, key, init);*/
/* GtkCheckButton *gc_board_config_boolean_box (label, key, init);*/
static PyObject*
py_gcompris_boolean_box(PyObject* self, PyObject* args)
py_gc_board_config_boolean_box(PyObject* self, PyObject* args)
{
PyObject *py_bool;
gchar *label;
gchar *key;
/* Parse arguments */
if(!PyArg_ParseTuple(args, "ssO:gcompris_boolean_box", &label, &key, &py_bool))
if(!PyArg_ParseTuple(args, "ssO:gc_board_config_boolean_box", &label, &key, &py_bool))
return NULL;
/* Call the corresponding C function */
return (PyObject *)pygobject_new((GObject*) \
gcompris_boolean_box((const gchar *)label, key, PyObject_IsTrue(py_bool)));
gc_board_config_boolean_box((const gchar *)label, key, PyObject_IsTrue(py_bool)));
}
/* GtkComboBox *gcompris_combo_box(const gchar *label, GList *strings, gchar *key, gint index); */
/* GtkComboBox *gc_board_config_combo_box(const gchar *label, GList *strings, gchar *key, gint index); */
static PyObject*
py_gcompris_combo_box(PyObject* self, PyObject* args)
py_gc_board_config_combo_box(PyObject* self, PyObject* args)
{
PyObject *py_list;
gchar *label;
......@@ -1088,12 +1088,12 @@ py_gcompris_combo_box(PyObject* self, PyObject* args)
int i, size;
/* Parse arguments */
if(!PyArg_ParseTuple(args, "sOss:gcompris_combo_box", &label, &py_list, &key, &init))
if(!PyArg_ParseTuple(args, "sOss:gc_board_config_combo_box", &label, &py_list, &key, &init))
return NULL;
if (!PyList_Check(py_list)){
PyErr_SetString(PyExc_TypeError,
"gcompris_combo_box second argument must be a list");
"gc_board_config_combo_box second argument must be a list");
return NULL;
}
......@@ -1105,7 +1105,7 @@ py_gcompris_combo_box(PyObject* self, PyObject* args)
/* Call the corresponding C function */
return (PyObject *)pygobject_new((GObject*) \
gcompris_combo_box((const gchar *)label,
gc_board_config_combo_box((const gchar *)label,
list,
key,
init));
......@@ -1119,7 +1119,7 @@ py_gcompris_combo_box(PyObject* self, PyObject* args)
/* Returns */
/* - g_hash_table (gchar *values, GtkWidget *pointer) */
/* GHashTable *gcompris_radio_buttons(const gchar *label, */
/* GHashTable *gc_board_config_radio_buttons(const gchar *label, */
/* gchar *key, */
/* GHashTable *buttons_label, */
/* gchar *init); */
......@@ -1158,7 +1158,7 @@ PyObject* hash_object_to_dict(GHashTable *table)
static PyObject*
py_gcompris_radio_buttons(PyObject* self, PyObject* args)
py_gc_board_config_radio_buttons(PyObject* self, PyObject* args)
{
PyObject *py_dict;
GHashTable *buttons_label, *result;
......@@ -1167,12 +1167,12 @@ py_gcompris_radio_buttons(PyObject* self, PyObject* args)
gchar *init;
/* Parse arguments */
if(!PyArg_ParseTuple(args, "ssOs:gcompris_radio_buttons", &label, &key, &py_dict, &init))
if(!PyArg_ParseTuple(args, "ssOs:gc_board_config_radio_buttons", &label, &key, &py_dict, &init))
return NULL;
if (!PyDict_Check(py_dict)){
PyErr_SetString(PyExc_TypeError,
"gcompris_radio_buttons second argument must be a dict");
"gc_board_config_radio_buttons second argument must be a dict");
return NULL;
}
......@@ -1190,7 +1190,7 @@ py_gcompris_radio_buttons(PyObject* self, PyObject* args)
g_strdup(PyString_AsString(pyvalue)));
}
result = gcompris_radio_buttons(label,
result = gc_board_config_radio_buttons(label,
key,
buttons_label,