diff options
author | Thomas Vander Stichele <thomas@apestaart.org> | 2002-11-20 12:15:49 +0000 |
---|---|---|
committer | Thomas Vander Stichele <thomas@apestaart.org> | 2002-11-20 12:15:49 +0000 |
commit | 68c5ced3104ab11e0b387e35c0986ac5e94e486e (patch) | |
tree | 2e89ba329b6d8a3f65406a06e6909fc2eb5f992a /gst-libs/gst | |
parent | 5ac69b89c0d53d4938ccf39263826284d9f42adf (diff) | |
download | gst-plugins-bad-68c5ced3104ab11e0b387e35c0986ac5e94e486e.tar.gz gst-plugins-bad-68c5ced3104ab11e0b387e35c0986ac5e94e486e.tar.bz2 gst-plugins-bad-68c5ced3104ab11e0b387e35c0986ac5e94e486e.zip |
some fixes, suggestion by thaytan to make _get and _set work similar
Original commit message from CVS:
some fixes, suggestion by thaytan to make _get and _set work similar
Diffstat (limited to 'gst-libs/gst')
-rw-r--r-- | gst-libs/gst/gconf/gconf.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/gst-libs/gst/gconf/gconf.c b/gst-libs/gst/gconf/gconf.c index c3b0d4cf..39574032 100644 --- a/gst-libs/gst/gconf/gconf.c +++ b/gst-libs/gst/gconf/gconf.c @@ -62,23 +62,34 @@ gst_gconf_get_string (const gchar *key) { GError *error = NULL; gchar *value = NULL; - gchar *full_key = g_strdup_printf ("%s/%s", GST_GCONF_DIR, key); + gchar *full_key = g_strdup_printf ("%s/%s", GST_GCONF_DIR, key); value = gconf_client_get_string (gst_gconf_get_client (), full_key, &error); g_free (full_key); - if (value) - return value; - else - return NULL; - // this is a good idea: return g_strdup (default_val); + if (error) + { + g_warning ("gst_gconf_get_string: error: %s\n", error->message); + g_error_free (error); + } + /* FIXME: decide if we want to strdup this value; if we do, check for NULL */ + return value; } void gst_gconf_set_string (const gchar *key, const gchar *value) { - gconf_client_set_string (gst_gconf_get_client (), key, value, NULL); + GError *error = NULL; + gchar *full_key = g_strdup_printf ("%s/%s", GST_GCONF_DIR, key); + + gconf_client_set_string (gst_gconf_get_client (), full_key, value, &error); + if (error) + { + g_warning ("gst_gconf_set_string: error: %s\n", error->message); + g_error_free (error); + } + g_free (full_key); } /* this function renders the given description to a bin, |