aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2002-11-04 07:22:00 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2002-11-04 07:22:00 +0800
commitf3608fedd844044cd739c11b7da9791d68372eb0 (patch)
tree80cc300a1e188bc99d96040580596925a7a4409f
parent10e1916bafe73cc9a232499d566786f7c412c271 (diff)
downloadgsoc2013-evolution-f3608fedd844044cd739c11b7da9791d68372eb0.tar
gsoc2013-evolution-f3608fedd844044cd739c11b7da9791d68372eb0.tar.gz
gsoc2013-evolution-f3608fedd844044cd739c11b7da9791d68372eb0.tar.bz2
gsoc2013-evolution-f3608fedd844044cd739c11b7da9791d68372eb0.tar.lz
gsoc2013-evolution-f3608fedd844044cd739c11b7da9791d68372eb0.tar.xz
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
-rw-r--r--e-util/ChangeLog7
-rw-r--r--e-util/e-config-listener.c24
-rw-r--r--e-util/e-config-listener.h4
3 files changed, 35 insertions, 0 deletions
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 <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.
+
2002-11-03 Ettore Perazzoli <ettore@ximian.com>
* 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
@@ -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,
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,