Commit 5d9c4f1e authored by Bruno Coudoin's avatar Bruno Coudoin

Cleanup of the usage of gc_locale_set

In several places, call was done to gc_locale_set
instead of gc_locale_change.
The API is very confusing. In fact, gc_locale_change keep
the locale for the next call to gc_locale_reset.
parent f0cd8a59
......@@ -220,7 +220,7 @@ static void start_board (GcomprisBoard *agcomprisBoard)
GHashTable *config = gc_db_get_board_conf();
if (strcmp(agcomprisBoard->name, "imagename")==0){
gc_locale_set(g_hash_table_lookup( config, "locale"));
gc_locale_change(g_hash_table_lookup( config, "locale"));
}
gchar *drag_mode_str = g_hash_table_lookup( config, "drag_mode");
......@@ -1797,8 +1797,6 @@ static void conf_ok(GHashTable *table)
config = table;
if (strcmp(gcomprisBoard->name, "imagename")==0){
gc_locale_reset();
gc_locale_set(g_hash_table_lookup( config, "locale"));
}
......
......@@ -141,7 +141,7 @@ static void start_board (GcomprisBoard *agcomprisBoard)
board_paused = TRUE;
gc_locale_set(g_hash_table_lookup( config, "locale_sound"));
gc_locale_change(g_hash_table_lookup( config, "locale_sound"));
gchar *up_init_str = g_hash_table_lookup( config, "uppercase_only");
......@@ -584,7 +584,6 @@ conf_ok(GHashTable *table)
else
config = table;
gc_locale_reset();
gc_locale_set(g_hash_table_lookup(config, "locale_sound"));
gchar *up_init_str = g_hash_table_lookup( config, "uppercase_only");
......
......@@ -139,7 +139,6 @@ conf_ok(GHashTable *table)
else
config = table;
gc_locale_reset();
gc_locale_set(g_hash_table_lookup(config, "locale_sound"));
if (profile_conf)
......
......@@ -101,8 +101,6 @@ class Gcompris_electric:
def end(self):
gcompris.reset_locale()
gcompris.set_cursor(gcompris.CURSOR_DEFAULT);
# Remove the root item removes all the others inside it
......
......@@ -289,7 +289,7 @@ static void start_board (GcomprisBoard *agcomprisBoard)
{
GHashTable *config = gc_db_get_board_conf();
gc_locale_set(g_hash_table_lookup( config, "locale"));
gc_locale_change(g_hash_table_lookup( config, "locale"));
gchar *up_init_str = g_hash_table_lookup( config, "uppercase_only");
......@@ -795,8 +795,6 @@ static void conf_ok(GHashTable *table)
g_hash_table_foreach(table, save_table, NULL);
if (gcomprisBoard){
gc_locale_reset();
GHashTable *config;
if (profile_conf)
......
......@@ -96,8 +96,6 @@ class Gcompris_guessnumber:
def end(self):
gcompris.reset_locale()
# Remove the root item removes all the others inside it
self.cleanup_game()
......
......@@ -145,7 +145,7 @@ start_board (GcomprisBoard *agcomprisBoard)
gchar *filename = NULL;
GHashTable *config = gc_db_get_board_conf();
gc_locale_set(g_hash_table_lookup( config, "locale"));
gc_locale_change(g_hash_table_lookup( config, "locale"));
g_hash_table_destroy(config);
......@@ -673,8 +673,6 @@ static GcomprisConfCallback conf_ok(GHashTable *table)
g_hash_table_foreach(table, (GHFunc) save_table, NULL);
if (gcomprisBoard) {
gc_locale_reset();
GHashTable *config;
if (profile_conf)
......
......@@ -153,7 +153,7 @@ start_board (GcomprisBoard *agcomprisBoard)
{
GHashTable *config = gc_db_get_board_conf();
gc_locale_set(g_hash_table_lookup( config, "locale"));
gc_locale_change(g_hash_table_lookup( config, "locale"));
g_hash_table_destroy(config);
......@@ -702,8 +702,6 @@ conf_ok(GHashTable *table)
g_hash_table_foreach(table, (GHFunc) save_table, NULL);
if (gcomprisBoard_missing){
gc_locale_reset();
GHashTable *config;
if (profile_conf)
......
......@@ -102,8 +102,6 @@ class Gcompris_mosaic:
def end(self):
gcompris.reset_locale()
# Remove the root item removes all the others inside it
self.cleanup_game()
......
......@@ -169,7 +169,7 @@ static void start_board (GcomprisBoard *agcomprisBoard)
{
GHashTable *config = gc_db_get_board_conf();
gc_locale_set(g_hash_table_lookup( config, "locale"));
gc_locale_change(g_hash_table_lookup( config, "locale"));
g_hash_table_destroy(config);
......@@ -842,8 +842,6 @@ static void conf_ok(GHashTable *table)
g_hash_table_foreach(table, (GHFunc) save_table, NULL);
if (gcomprisBoard){
gc_locale_reset();
GHashTable *config;
if (profile_conf)
......
......@@ -792,8 +792,6 @@ static void conf_ok(GHashTable *table)
g_hash_table_foreach(table, (GHFunc) save_table, NULL);
if (gcomprisBoard){
gc_locale_reset();
GHashTable *config;
if (profile_conf)
......
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