179
179
gcomprisBoard=agcomprisBoard;
181
GHashTable *config = gc_db_get_board_conf();
182
gc_locale_change(g_hash_table_lookup( config, "locale"));
183
g_hash_table_destroy(config);
181
185
/* disable im_context */
182
186
//gcomprisBoard->disable_im_context = TRUE;
755
760
gc_sound_play_ogg ("sounds/crash.wav", NULL);
758
static void conf_ok(gpointer data)
763
static void wordsgame_config_start(GcomprisBoard *agcomprisBoard, GcomprisProfile *aProfile)
768
gchar *label = g_strdup_printf(_("<b>%s</b> configuration\n for profile <b>%s</b>"),
769
agcomprisBoard->name,
770
aProfile? aProfile->name: "");
771
GcomprisBoardConf *bconf;
772
bconf = gc_board_config_window_display( label,
773
(GcomprisConfCallback )conf_ok);
777
gc_board_config_wordlist(bconf, "wordsgame/default-$LOCALE.xml");
763
/* ************************************* */
764
/* * Configuration * */
765
/* ************************************* */
768
/* ======================= */
769
/* = config_start = */
770
/* ======================= */
772
static GcomprisProfile *profile_conf;
773
static GcomprisBoard *board_conf;
774
static void save_table (gpointer key,
778
gc_db_set_board_conf ( profile_conf,
784
static void conf_ok(GHashTable *table)
792
g_hash_table_foreach(table, (GHFunc) save_table, NULL);
798
config = gc_db_get_board_conf();
802
gc_locale_set(g_hash_table_lookup( config, "locale"));
805
g_hash_table_destroy(config);
807
wordsgame_next_level();
817
wordsgame_config_start(GcomprisBoard *agcomprisBoard,
818
GcomprisProfile *aProfile)
820
GcomprisBoardConf *conf;
821
board_conf = agcomprisBoard;
822
profile_conf = aProfile;
827
gchar *label = g_strdup_printf(_("<b>%s</b> configuration\n for profile <b>%s</b>"),
828
agcomprisBoard->name,
829
aProfile? aProfile->name: "");
831
conf = gc_board_config_window_display( label,
832
(GcomprisConfCallback )conf_ok);
836
/* init the combo to previously saved value */
837
GHashTable *config = gc_db_get_conf( profile_conf, board_conf);
839
gchar *locale = g_hash_table_lookup( config, "locale");
841
gc_board_config_combo_locales(conf, locale);
842
gc_board_config_wordlist(conf, "wordsgame/default-$LOCALE.xml");
780
845
static void wordsgame_config_stop(void)