diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2002-11-04 07:22:00 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2002-11-04 07:22:00 +0800 |
commit | f3608fedd844044cd739c11b7da9791d68372eb0 (patch) | |
tree | 80cc300a1e188bc99d96040580596925a7a4409f /e-util/e-config-listener.c | |
parent | 10e1916bafe73cc9a232499d566786f7c412c271 (diff) | |
download | gsoc2013-evolution-f3608fedd844044cd739c11b7da9791d68372eb0.tar.gz gsoc2013-evolution-f3608fedd844044cd739c11b7da9791d68372eb0.tar.zst gsoc2013-evolution-f3608fedd844044cd739c11b7da9791d68372eb0.zip |
new simpler functions, without a default value.
2002-11-03 Rodrigo Moya <rodrigo@ximian.com>
* e-config-listener.[ch] (e_config_listener_get_boolean,
e_config_listener_get_float, e_config_listener_get_long,
e_config_listener_get_string): new simpler functions, without
a default value.
svn path=/trunk/; revision=18516
Diffstat (limited to 'e-util/e-config-listener.c')
-rw-r--r-- | e-util/e-config-listener.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/e-util/e-config-listener.c b/e-util/e-config-listener.c index cf8c1f69cf..3ffe5012a9 100644 --- a/e-util/e-config-listener.c +++ b/e-util/e-config-listener.c @@ -241,6 +241,12 @@ add_key (EConfigListener *cl, const char *key, GConfValueType type, } gboolean +e_config_listener_get_boolean (EConfigListener *cl, const char *key) +{ + return e_config_listener_get_boolean_with_default (cl, key, FALSE, NULL); +} + +gboolean e_config_listener_get_boolean_with_default (EConfigListener *cl, const char *key, gboolean def, @@ -288,6 +294,12 @@ e_config_listener_get_boolean_with_default (EConfigListener *cl, } float +e_config_listener_get_float (EConfigListener *cl, const char *key) +{ + return e_config_listener_get_float_with_default (cl, key, 0.0, NULL); +} + +float e_config_listener_get_float_with_default (EConfigListener *cl, const char *key, float def, @@ -335,6 +347,12 @@ e_config_listener_get_float_with_default (EConfigListener *cl, } long +e_config_listener_get_long (EConfigListener *cl, const char *key) +{ + return e_config_listener_get_long_with_default (cl, key, 0, NULL); +} + +long e_config_listener_get_long_with_default (EConfigListener *cl, const char *key, long def, @@ -382,6 +400,12 @@ e_config_listener_get_long_with_default (EConfigListener *cl, } char * +e_config_listener_get_string (EConfigListener *cl, const char *key) +{ + return e_config_listener_get_string_with_default (cl, key, NULL, NULL); +} + +char * e_config_listener_get_string_with_default (EConfigListener *cl, const char *key, const char *def, |