Search
lxdream.org :: lxdream/src/config.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/config.c
changeset 475:49841795db97
prev470:e09a16196693
next480:d28c2992f5ee
author nkeynes
date Wed Oct 31 09:06:48 2007 +0000 (13 years ago)
permissions -rw-r--r--
last change Handle case of setting value to itself (ie don't change anything)
file annotate diff log raw
1.1 --- a/src/config.c Sun Oct 28 08:29:29 2007 +0000
1.2 +++ b/src/config.c Wed Oct 31 09:06:48 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: config.c,v 1.5 2007-10-28 08:29:29 nkeynes Exp $
1.6 + * $Id: config.c,v 1.6 2007-10-31 09:06:48 nkeynes Exp $
1.7 *
1.8 * User configuration support
1.9 *
1.10 @@ -112,10 +112,12 @@
1.11
1.12 void lxdream_set_config_value( lxdream_config_entry_t param, const gchar *value )
1.13 {
1.14 - if( param->value != param->default_value && param->value != NULL ) {
1.15 - free( param->value );
1.16 + if( param->value != value ) {
1.17 + if( param->value != param->default_value && param->value != NULL ) {
1.18 + free( param->value );
1.19 + }
1.20 + param->value = g_strdup(value);
1.21 }
1.22 - param->value = g_strdup(value);
1.23 }
1.24
1.25 void lxdream_set_global_config_value( int key, const gchar *value )
.