Mercurial > audlegacy
changeset 1759:c525c2b6a3d8 trunk
[svn] Interpret set_string for a NULL value as a key unset action, as gconf will not store NULL values.
author | chainsaw |
---|---|
date | Sun, 24 Sep 2006 12:08:30 -0700 |
parents | 6b9e1c2b2b32 |
children | 47dcc46bb091 |
files | ChangeLog libaudacious/configdb_gconf.c |
diffstat | 2 files changed, 17 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sun Sep 24 00:40:12 2006 -0700 +++ b/ChangeLog Sun Sep 24 12:08:30 2006 -0700 @@ -1,3 +1,12 @@ +2006-09-24 07:40:12 +0000 Yoshiki Yazawa <yaz@cc.rim.or.jp> + revision [2453] + - fix for gconf_value_get_string() does not accept null string. + + trunk/audacious/prefswin.c | 23 ++++++++++++++++------- + trunk/configure.ac | 2 +- + 2 files changed, 17 insertions(+), 8 deletions(-) + + 2006-09-23 20:53:46 +0000 Tony Vroon <chainsaw@gentoo.org> revision [2451] Revert botched workaround, the actual 3 NULL writes will have to be addressed.
--- a/libaudacious/configdb_gconf.c Sun Sep 24 00:40:12 2006 -0700 +++ b/libaudacious/configdb_gconf.c Sun Sep 24 12:08:30 2006 -0700 @@ -194,10 +194,14 @@ { GConfValue *cval; - cval = gconf_value_new(GCONF_VALUE_STRING); - gconf_value_set_string(cval, value); - bmp_cfg_db_set_value(db, section, key, cval); - gconf_value_free(cval); + if (value == NULL) { + bmp_cfg_db_unset_key(db, section, key); + } else { + cval = gconf_value_new(GCONF_VALUE_STRING); + gconf_value_set_string(cval, value); + bmp_cfg_db_set_value(db, section, key, cval); + gconf_value_free(cval); + } } void