* Added wpeditor dependency to configure.ac
[modest] / src / modest-conf.c
index 42f0759..d276082 100644 (file)
@@ -228,7 +228,6 @@ modest_conf_get_list (ModestConf* self, const gchar* key, ModestConfValueType li
 {
        ModestConfPrivate *priv;
        GConfValueType gconf_type;
-       GSList *retval = NULL;
        
        g_return_val_if_fail (self, NULL);
        g_return_val_if_fail (key,  NULL);
@@ -237,10 +236,7 @@ modest_conf_get_list (ModestConf* self, const gchar* key, ModestConfValueType li
 
        gconf_type = modest_conf_type_to_gconf_type (list_type, err);
 
-       if (!err)
-              retval = gconf_client_get_list (priv->gconf_client, key, gconf_type, err);
-
-       return retval;
+       return gconf_client_get_list (priv->gconf_client, key, gconf_type, err);
 }
 
 
@@ -306,7 +302,7 @@ modest_conf_set_bool (ModestConf* self, const gchar* key, gboolean val,
 }
 
 
-void 
+gboolean
 modest_conf_set_list (ModestConf* self, const gchar* key, 
                      GSList *val, ModestConfValueType list_type, 
                      GError **err)
@@ -314,15 +310,16 @@ modest_conf_set_list (ModestConf* self, const gchar* key,
        ModestConfPrivate *priv;
        GConfValueType gconf_type;
        
-       g_return_if_fail (self);
-       g_return_if_fail (key);
+       g_return_val_if_fail (self, FALSE);
+       g_return_val_if_fail (key, FALSE);
 
        priv = MODEST_CONF_GET_PRIVATE(self);
 
        gconf_type = modest_conf_type_to_gconf_type (list_type, err);
+       if (*err)
+              return FALSE;
 
-       if (!err)
-              gconf_client_set_list (priv->gconf_client, key, gconf_type, val, err);
+       return gconf_client_set_list (priv->gconf_client, key, gconf_type, val, err);
 }
 
 
@@ -407,8 +404,7 @@ modest_conf_key_is_valid (const gchar* key)
 }
 
 
-
-
+/* hmmm... might need to make specific callback for specific keys */
 static void
 modest_conf_on_change (GConfClient *client, guint conn_id, GConfEntry *entry,
                       gpointer data)
@@ -427,7 +423,7 @@ modest_conf_on_change (GConfClient *client, guint conn_id, GConfEntry *entry,
 static GConfValueType
 modest_conf_type_to_gconf_type (ModestConfValueType value_type, GError **err)
 {
-       GConfValueType gconf_type;
+       GConfValueType gconf_type = 0;
 
        switch (value_type) {
        case MODEST_CONF_VALUE_INT: