projects
/
modest
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6e28d8e
)
* fix for modest_conf_key_exists, which did not work correctly on leaf nodes
author
Dirk-Jan C. Binnema
<dirk-jan.binnema@nokia.com>
Mon, 24 Jul 2006 14:35:37 +0000
(14:35 +0000)
committer
Dirk-Jan C. Binnema
<dirk-jan.binnema@nokia.com>
Mon, 24 Jul 2006 14:35:37 +0000
(14:35 +0000)
pmo-trunk-r413
src/modest-conf.c
patch
|
blob
|
history
diff --git
a/src/modest-conf.c
b/src/modest-conf.c
index
1d92571
..
3bffdfb
100644
(file)
--- a/
src/modest-conf.c
+++ b/
src/modest-conf.c
@@
-359,19
+359,30
@@
modest_conf_remove_key (ModestConf* self, const gchar* key, GError **err)
}
}
-
-
gboolean
modest_conf_key_exists (ModestConf* self, const gchar* key, GError **err)
{
ModestConfPrivate *priv;
gboolean
modest_conf_key_exists (ModestConf* self, const gchar* key, GError **err)
{
ModestConfPrivate *priv;
-
+ gboolean dir_exists;
+ GConfValue *val;
+ const gchar *str;
+
g_return_val_if_fail (self,FALSE);
g_return_val_if_fail (key, FALSE);
priv = MODEST_CONF_GET_PRIVATE(self);
g_return_val_if_fail (self,FALSE);
g_return_val_if_fail (key, FALSE);
priv = MODEST_CONF_GET_PRIVATE(self);
-
- return gconf_client_dir_exists (priv->gconf_client,key,err);
+
+ /* the fast way... */
+ if (gconf_client_dir_exists (priv->gconf_client,key,err))
+ return TRUE;
+
+ val = gconf_client_get (priv->gconf_client, key, NULL);
+ if (!val)
+ return FALSE;
+ else {
+ gconf_value_free (val);
+ return TRUE;
+ }
}
}