+ key, event, conn_id);
+}
+
+static GConfValueType
+modest_conf_type_to_gconf_type (ModestConfValueType value_type, GError **err)
+{
+ GConfValueType gconf_type;
+
+ switch (value_type) {
+ case MODEST_CONF_VALUE_INT:
+ gconf_type = GCONF_VALUE_INT;
+ break;
+ case MODEST_CONF_VALUE_BOOL:
+ gconf_type = GCONF_VALUE_BOOL;
+ break;
+ case MODEST_CONF_VALUE_FLOAT:
+ gconf_type = GCONF_VALUE_FLOAT;
+ break;
+ case MODEST_CONF_VALUE_STRING:
+ gconf_type = GCONF_VALUE_STRING;
+ break;
+ default:
+ gconf_type = GCONF_VALUE_INVALID;
+ g_printerr ("modest: invalid list value type %d\n", value_type);
+ *err = g_error_new_literal (MODEST_CONF_ERROR,
+ MODEST_CONF_ERROR_INVALID_VALUE,
+ "invalid list value type");
+ }
+ return gconf_type;
+}
+
+void
+modest_conf_listen_to_namespace (ModestConf *self,
+ const gchar *namespace)
+{
+ ModestConfPrivate *priv;
+ GError *error = NULL;
+
+ g_return_if_fail (MODEST_IS_CONF (self));
+ g_return_if_fail (namespace);
+
+ priv = MODEST_CONF_GET_PRIVATE(self);
+
+ /* Add the namespace to the list of the namespaces that will
+ be observed */
+ gconf_client_add_dir (priv->gconf_client,
+ namespace,
+ GCONF_CLIENT_PRELOAD_NONE,
+ &error);
+}
+
+void
+modest_conf_forget_namespace (ModestConf *self,
+ const gchar *namespace)
+{
+ ModestConfPrivate *priv;
+
+ g_return_if_fail (MODEST_IS_CONF (self));
+ g_return_if_fail (namespace);
+
+ priv = MODEST_CONF_GET_PRIVATE(self);
+
+ /* Remove the namespace to the list of the namespaces that will
+ be observed */
+ gconf_client_remove_dir (priv->gconf_client, namespace, NULL);