diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2010-08-21 01:05:29 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2010-08-21 01:05:29 +0200 |
commit | f156f9a4f120a055b023ce8e60fac3012e0c185f (patch) | |
tree | 4c33ba7098bdc59cb0159ddcb42ce7f360e592bc | |
parent | 525f1de571b03276bd8b3c92aa2db1d4cf82feba (diff) |
Added conf_get_string_list() to conf.[ch].
-rw-r--r-- | conf.c | 12 | ||||
-rw-r--r-- | conf.h | 1 |
2 files changed, 13 insertions, 0 deletions
@@ -14,6 +14,18 @@ gchar *conf_get_string(const gchar *group, const gchar *key) { return s; } +gchar **conf_get_string_list(const gchar *group, const gchar *key, gsize *length) { + GError *error = NULL; + + gchar **s = g_key_file_get_string_list(kf, group, key, length, &error); + if(s == NULL) { + g_warning(error->message); + g_error_free(error); + } + + return s; +} + gint conf_get_int(const gchar *group, const gchar *key) { GError *error = NULL; @@ -4,6 +4,7 @@ #include <glib.h> gchar *conf_get_string(const gchar *group, const gchar *key); +gchar **conf_get_string_list(const gchar *group, const gchar *key, gsize *length); gint conf_get_int(const gchar *group, const gchar *key); gboolean conf_load(); void conf_free(); |