diff options
author | Bruno Coudoin <bcoudoin@src.gnome.org> | 2009-02-24 23:30:48 (GMT) |
---|---|---|
committer | Bruno Coudoin <bcoudoin@src.gnome.org> | 2009-02-24 23:30:48 (GMT) |
commit | b5ae4f6620f2bb17f691cd2e979bf9b471d6aa6a (patch) | |
tree | 43b94c0a4428e0353c4fe8e212658c768508a666 /src/boards | |
parent | e0638919c49a681a9bf7a946a54921ff3351d9ab (diff) |
- Fixed strings:
* boards/babyshapes.xml.in:
* boards/babyshapes/board8_1.xml.in:
* boards/babyshapes/board8_4.xml.in:
* src/boards/reading.c: (reading_create_item):
* src/gcompris/board_config_wordlist.c: (gc_board_config_wordlist):
- Fixed bug, the configuration was crashing uppon startup from the admin mode
* src/boards/missingletter.c: (_init), (start_board),
(config_start):
* src/boards/missingletter_config.c:
* src/boards/python/admin/board_list.py:
svn path=/trunk/; revision=3741
Diffstat (limited to 'src/boards')
-rw-r--r-- | src/boards/missingletter.c | 43 | ||||
-rw-r--r-- | src/boards/missingletter_config.c | 4 | ||||
-rw-r--r-- | src/boards/python/admin/board_list.py | 2 | ||||
-rw-r--r-- | src/boards/reading.c | 2 |
4 files changed, 32 insertions, 19 deletions
diff --git a/src/boards/missingletter.c b/src/boards/missingletter.c index 476044a..51986a2 100644 --- a/src/boards/missingletter.c +++ b/src/boards/missingletter.c @@ -140,12 +140,31 @@ static void pause_board (gboolean pause) board_paused = pause; } +static void _init(GcomprisBoard *agcomprisBoard) +{ + gchar * filename; + gcomprisBoard_missing->level=1; + + /* Calculate the maxlevel based on the available data file for this board */ + gcomprisBoard_missing->maxlevel = 1; + while((filename = gc_file_find_absolute("%s/board%d.xml", + gcomprisBoard_missing->boarddir, + ++gcomprisBoard_missing->maxlevel))) + g_free(filename); + + gcomprisBoard_missing->maxlevel--; + + gcomprisBoard_missing->sublevel=1; + gcomprisBoard_missing->number_of_sublevel=G_MAXINT; + + init_xml(); +} + /* */ static void start_board (GcomprisBoard *agcomprisBoard) { GHashTable *config = gc_db_get_board_conf(); - gchar * filename; gc_locale_set(g_hash_table_lookup( config, "locale")); @@ -156,20 +175,7 @@ static void start_board (GcomprisBoard *agcomprisBoard) gcomprisBoard_missing=agcomprisBoard; gc_set_background(gnome_canvas_root(gcomprisBoard_missing->canvas), "opt/missingletter-bg.jpg"); - gcomprisBoard_missing->level=1; - - /* Calculate the maxlevel based on the available data file for this board */ - gcomprisBoard_missing->maxlevel = 1; - while((filename = gc_file_find_absolute("%s/board%d.xml", - gcomprisBoard_missing->boarddir, ++gcomprisBoard_missing->maxlevel))) - g_free(filename); - - gcomprisBoard_missing->maxlevel--; - - gcomprisBoard_missing->sublevel=1; - gcomprisBoard_missing->number_of_sublevel=G_MAXINT; - - init_xml(); + _init(agcomprisBoard); gc_bar_set(GC_BAR_CONFIG | GC_BAR_LEVEL); missing_letter_next_level(); @@ -760,13 +766,18 @@ static GcomprisConfCallback conf_ok(GHashTable *table) static void config_start(GcomprisBoard *agcomprisBoard, - GcomprisProfile *aProfile) + GcomprisProfile *aProfile) { board_conf = agcomprisBoard; profile_conf = aProfile; if (gcomprisBoard_missing) pause_board(TRUE); + else + { + gcomprisBoard_missing=agcomprisBoard; + _init(agcomprisBoard); + } gchar *label = g_strdup_printf(_("<b>%s</b> configuration\n for profile <b>%s</b>"), agcomprisBoard->name, diff --git a/src/boards/missingletter_config.c b/src/boards/missingletter_config.c index 2233b78..ea21a7b 100644 --- a/src/boards/missingletter_config.c +++ b/src/boards/missingletter_config.c @@ -443,7 +443,7 @@ static void configure_colummns(GtkTreeView *treeview) gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 8); /* combo level */ - label = gtk_label_new(_("Choice of the level")); + label = gtk_label_new(_("Level:")); gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 8); @@ -541,7 +541,7 @@ static void configure_colummns(GtkTreeView *treeview) gtk_widget_show(label); gtk_table_attach_defaults(GTK_TABLE(table), label, 2, 3, 0, 1); - pixmap = gtk_file_chooser_button_new(_("Choice of the filename"), + pixmap = gtk_file_chooser_button_new(_("Filename:"), GTK_FILE_CHOOSER_ACTION_OPEN); file_filter = gtk_file_filter_new(); diff --git a/src/boards/python/admin/board_list.py b/src/boards/python/admin/board_list.py index 5b24110..b96bb3d 100644 --- a/src/boards/python/admin/board_list.py +++ b/src/boards/python/admin/board_list.py @@ -382,6 +382,8 @@ class Board_list: print 'preference', board.title def row_selected(self, treeview, model): + if treeview.get_selection().count_selected_rows() != 1: + return path = model.get_path(treeview.get_selection().get_selected()[1]) print "Row selected:", model[path][3] diff --git a/src/boards/reading.c b/src/boards/reading.c index 9a64d7a..8e22a53 100644 --- a/src/boards/reading.c +++ b/src/boards/reading.c @@ -459,7 +459,7 @@ static gboolean reading_create_item(GnomeCanvasGroup *parent) if(word==NULL) { - gc_dialog(_("We skip this level because there are not enough words in the list !"), + gc_dialog(_("We skip this level because there are not enough words in the list!"), (DialogBoxCallBack)reading_next_level); gcomprisBoard->level++; if(gcomprisBoard->level>gcomprisBoard->maxlevel) // the current board is finished : bail out |