From f3608fedd844044cd739c11b7da9791d68372eb0 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Sun, 3 Nov 2002 23:22:00 +0000 Subject: new simpler functions, without a default value. 2002-11-03 Rodrigo Moya * 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 --- e-util/ChangeLog | 7 +++++++ e-util/e-config-listener.c | 24 ++++++++++++++++++++++++ e-util/e-config-listener.h | 4 ++++ 3 files changed, 35 insertions(+) (limited to 'e-util') diff --git a/e-util/ChangeLog b/e-util/ChangeLog index eff2a90004..acf6cbeee6 100644 --- a/e-util/ChangeLog +++ b/e-util/ChangeLog @@ -1,3 +1,10 @@ +2002-11-03 Rodrigo Moya + + * 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. + 2002-11-03 Ettore Perazzoli * e-config-listener.c (e_config_listener_get_float_with_default): 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 @@ -240,6 +240,12 @@ add_key (EConfigListener *cl, const char *key, GConfValueType type, return kd; } +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, @@ -287,6 +293,12 @@ e_config_listener_get_boolean_with_default (EConfigListener *cl, return value; } +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, @@ -334,6 +346,12 @@ e_config_listener_get_float_with_default (EConfigListener *cl, return value; } +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, @@ -381,6 +399,12 @@ e_config_listener_get_long_with_default (EConfigListener *cl, return value; } +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, diff --git a/e-util/e-config-listener.h b/e-util/e-config-listener.h index f14a9211b3..efae269c36 100644 --- a/e-util/e-config-listener.h +++ b/e-util/e-config-listener.h @@ -37,18 +37,22 @@ typedef struct { GType e_config_listener_get_type (void); EConfigListener *e_config_listener_new (void); +gboolean e_config_listener_get_boolean (EConfigListener *cl, const char *key); gboolean e_config_listener_get_boolean_with_default (EConfigListener *cl, const char *key, gboolean def, gboolean *used_default); +float e_config_listener_get_float (EConfigListener *cl, const char *key); float e_config_listener_get_float_with_default (EConfigListener *cl, const char *key, float def, gboolean *used_default); +long e_config_listener_get_long (EConfigListener *cl, const char *key); long e_config_listener_get_long_with_default (EConfigListener *cl, const char *key, long def, gboolean *used_default); +char *e_config_listener_get_string (EConfigListener *cl, const char *key); char *e_config_listener_get_string_with_default (EConfigListener *cl, const char *key, const char *def, -- cgit