diff options
author | Bruno Coudoin <bcoudoin@src.gnome.org> | 2006-10-05 23:31:36 (GMT) |
---|---|---|
committer | Bruno Coudoin <bcoudoin@src.gnome.org> | 2006-10-05 23:31:36 (GMT) |
commit | 0b19f58475c4dee1dd9254b9fd7dbea1f7aed3b5 (patch) | |
tree | faa992500039d9c3f37cdee594f12a37a118e706 | |
parent | 951e6a4f1ef6acb24977a5596ef7ce625e0ed19f (diff) |
changed text color to avoid blue on blue (in vnc) fixed a double free
* src/boards/python/login.py: changed text color to avoid blue on blue (in vnc)
* src/gcompris/config.c: (item_event_ok): fixed a double free creating a corrupted locale field
in the config file when default locale was selected and not changed.
* src/gcompris/properties.c: (gc_prop_new): fixed locale allocation to create a locale pointer in all case
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/boards/python/login.py | 4 | ||||
-rw-r--r-- | src/gcompris/config.c | 12 | ||||
-rw-r--r-- | src/gcompris/properties.c | 2 |
4 files changed, 16 insertions, 9 deletions
@@ -1,3 +1,10 @@ +2006-10-06 Bruno coudoin <bruno.coudoin@free.fr> + + * src/boards/python/login.py: changed text color to avoid blue on blue (in vnc) + * src/gcompris/config.c: (item_event_ok): fixed a double free creating a corrupted locale field + in the config file when default locale was selected and not changed. + * src/gcompris/properties.c: (gc_prop_new): fixed locale allocation to create a locale pointer in all case + 2006-10-05 Bruno coudoin <bruno.coudoin@free.fr> - fixed to work with shape game that provides a pixmap instead of the red dot. diff --git a/src/boards/python/login.py b/src/boards/python/login.py index 624ea6a..17a6e75 100644 --- a/src/boards/python/login.py +++ b/src/boards/python/login.py @@ -459,8 +459,8 @@ class Gcompris_login: self.entry = gtk.Entry() self.entry.modify_font(pango.FontDescription("sans bold 36")) - text_color = gtk.gdk.color_parse("blue") - text_color_selected = gtk.gdk.color_parse("green") + text_color = gtk.gdk.color_parse("brown") + text_color_selected = gtk.gdk.color_parse("brown") bg_color = gtk.gdk.color_parse("blue") self.entry.modify_text(gtk.STATE_NORMAL, text_color) diff --git a/src/gcompris/config.c b/src/gcompris/config.c index f95b560..9644562 100644 --- a/src/gcompris/config.c +++ b/src/gcompris/config.c @@ -722,6 +722,12 @@ item_event_ok(GnomeCanvasItem *item, GdkEvent *event, gpointer data) case GDK_BUTTON_PRESS: if(!strcmp((char *)data, "ok")) { + gchar *tmpptr = properties->locale; + /* Set the new locale in the properties */ + properties->locale = strdup(current_locale); + gc_prop_save(properties); + g_free(tmpptr); + if(current_locale[0] == '\0') { /* Set the locale to the default user's locale */ gc_locale_set(gc_locale_get_user_default()); @@ -732,12 +738,6 @@ item_event_ok(GnomeCanvasItem *item, GdkEvent *event, gpointer data) gc_skin_load(properties->skin); gc_config_stop(); - /* Set the new locale in the properties */ - g_free(properties->locale); - properties->locale = strdup(current_locale); - - gc_prop_save(properties); - if(properties->music || properties->fx) { gc_sound_init(); } diff --git a/src/gcompris/properties.c b/src/gcompris/properties.c index 12dc9b8..bfb82d6 100644 --- a/src/gcompris/properties.c +++ b/src/gcompris/properties.c @@ -311,7 +311,7 @@ gc_prop_new () if(!tmp->locale) { /* No user specified locale = '' */ - tmp->locale = ""; + tmp->locale = strdup(""); } return (tmp); |