Index: libanjuta/anjuta-session.c
===================================================================
--- libanjuta/anjuta-session.c	(revision 4359)
+++ libanjuta/anjuta-session.c	(working copy)
@@ -29,13 +29,14 @@
 
 #include <stdlib.h>
 #include <string.h>
-#include <libgnome/gnome-config.h>
+#include <glib.h>
 
 #include "anjuta-session.h"
 #include "anjuta-utils.h"
  
 struct _AnjutaSessionPriv {
 	gchar *dir_path;
+	GKeyFile *key_file;
 };
 
 static gpointer *parent_class = NULL;
@@ -47,6 +48,7 @@
 	cobj = ANJUTA_SESSION (object);
 	
 	g_free (cobj->priv->dir_path);
+	g_key_file_free (cobj->priv->key_file);
 	g_free (cobj->priv);
 
 	G_OBJECT_CLASS(parent_class)->finalize(object);
@@ -66,6 +68,7 @@
 {
 	obj->priv = g_new0 (AnjutaSessionPriv, 1);
 	obj->priv->dir_path = NULL;
+	obj->priv->key_file = NULL;
 }
 
 /**
@@ -88,6 +91,11 @@
 	
 	obj = ANJUTA_SESSION (g_object_new (ANJUTA_TYPE_SESSION, NULL));
 	obj->priv->dir_path = g_strdup (session_directory);
+	
+	obj->priv->key_file = g_key_file_new ();
+	g_key_file_load_from_file (obj->priv->key_file, 
+							   anjuta_session_get_session_filename (obj),
+							   G_KEY_FILE_NONE, NULL);
 	return obj;
 }
 
@@ -124,18 +132,6 @@
 							 "anjuta.session", NULL);
 }
 
-static gchar*
-anjuta_session_get_key_path (AnjutaSession *session, const gchar *section,
-							 const gchar *key)
-{
-	gchar *key_path, *filename;
-
-	filename = anjuta_session_get_session_filename (session);
-	key_path = g_strdup_printf ("=%s=/%s/%s", filename, section, key);
-	g_free (filename);
-	return key_path;
-}
-
 /**
  * anjuta_session_sync:
  * @session: an #AnjutaSession object
@@ -146,15 +142,27 @@
 anjuta_session_sync (AnjutaSession *session)
 {
 	gchar *filename;
-	gchar *path;
+	gchar *session_lines;
+	GFile *gfile;
+	GOutputStream *output;
+	gsize length;
+	GError *error = NULL;
 	
 	g_return_if_fail (ANJUTA_IS_SESSION (session));
 	
+	session_lines = g_key_file_to_data (session->priv->key_file, &length, NULL);
+
 	filename = anjuta_session_get_session_filename (session);
-	path = g_strdup_printf ("=%s=", filename);
-	gnome_config_sync_file (path);
+
+	gfile = g_file_new_for_path (filename);
+	g_file_delete (gfile, NULL, NULL);
+	output = G_OUTPUT_STREAM (g_file_replace (gfile, NULL, FALSE, 
+											  G_FILE_CREATE_NONE, NULL, NULL));
+	g_output_stream_write (output, session_lines,  length, NULL, NULL);
+
+	g_output_stream_close (output, NULL, NULL);
+	g_object_unref (gfile);
 	g_free (filename);
-	g_free (path);
 }
 
 /**
@@ -223,15 +231,11 @@
 anjuta_session_set_int (AnjutaSession *session, const gchar *section,
 						const gchar *key, gint value)
 {
-	gchar *key_path;
-	
 	g_return_if_fail (ANJUTA_IS_SESSION (session));
 	g_return_if_fail (section != NULL);
 	g_return_if_fail (key != NULL);
 	
-	key_path = anjuta_session_get_key_path (session, section, key);
-	gnome_config_set_int (key_path, value);
-	g_free (key_path);
+	g_key_file_set_integer (session->priv->key_file, section, key, value);
 }
 
 /**
@@ -241,21 +245,17 @@
  * @key: Key name.
  * @value: Key value
  * 
- * Set a float @value to @key in given @section.
+ * Set a double @value to @key in given @section.
  */
 void
-anjuta_session_set_float (AnjutaSession *session, const gchar *section,
-						  const gchar *key, gfloat value)
+anjuta_session_set_double (AnjutaSession *session, const gchar *section,
+						  const gchar *key, gdouble value)
 {
-	gchar *key_path;
-	
 	g_return_if_fail (ANJUTA_IS_SESSION (session));
 	g_return_if_fail (section != NULL);
 	g_return_if_fail (key != NULL);
 	
-	key_path = anjuta_session_get_key_path (session, section, key);
-	gnome_config_set_float (key_path, value);
-	g_free (key_path);
+	g_key_file_set_double (session->priv->key_file, section, key, value);
 }
 
 /**
@@ -271,15 +271,14 @@
 anjuta_session_set_string (AnjutaSession *session, const gchar *section,
 						   const gchar *key, const gchar *value)
 {
-	gchar *key_path;
-	
 	g_return_if_fail (ANJUTA_IS_SESSION (session));
 	g_return_if_fail (section != NULL);
 	g_return_if_fail (key != NULL);
-	
-	key_path = anjuta_session_get_key_path (session, section, key);
-	gnome_config_set_string (key_path, value);
-	g_free (key_path);
+
+	if (value)
+	{
+		g_key_file_set_string (session->priv->key_file, section, key, value);
+	}
 }
 
 /**
@@ -296,36 +295,32 @@
 								const gchar *section,
 								const gchar *key, GList *value)
 {
-	gchar *key_path, *value_str;
-	GString *str;
 	GList *node;
-	gboolean first_item = TRUE;
+	gint length, i;
+	gchar **list;
 	
 	g_return_if_fail (ANJUTA_IS_SESSION (session));
 	g_return_if_fail (section != NULL);
 	g_return_if_fail (key != NULL);
 	
-	key_path = anjuta_session_get_key_path (session, section, key);
-	str = g_string_new ("");
-	node = value;
-	while (node)
+	length = g_list_length (value);
+	
+	if (length > 0)
 	{
-		if (node->data && strlen (node->data) > 0)
+		list = g_new (char *, length);
+		node = g_list_first (value);
+		i = 0;
+		while (node)
 		{
-			if (first_item)
-				first_item = FALSE;
-			else
-				g_string_append (str, "%%%");
-			g_string_append (str, node->data);
+			list[i] = (gchar *)node->data;
+			node = g_list_next (node);
+			i++;
 		}
-		node = g_list_next (node);
+
+		g_key_file_set_string_list (session->priv->key_file, section, key, list, 
+									length);
+		g_free (list);
 	}
-	
-	value_str = g_string_free (str, FALSE);
-	gnome_config_set_string (key_path, value_str);
-	
-	g_free (value_str);
-	g_free (key_path);
 }
 
 /**
@@ -342,17 +337,11 @@
 anjuta_session_get_int (AnjutaSession *session, const gchar *section,
 						const gchar *key)
 {
-	gchar *key_path;
-	gint value;
-	
 	g_return_val_if_fail (ANJUTA_IS_SESSION (session), 0);
 	g_return_val_if_fail (section != NULL, 0);
 	g_return_val_if_fail (key != NULL, 0);
 	
-	key_path = anjuta_session_get_key_path (session, section, key);
-	value = gnome_config_get_int (key_path);
-	g_free (key_path);
-	return value;
+	return g_key_file_get_integer (session->priv->key_file, section, key, NULL);
 }
 
 /**
@@ -361,25 +350,19 @@
  * @section: Section.
  * @key: Key name.
  * 
- * Get a float @value of @key in given @section.
+ * Get a double @value of @key in given @section.
  * 
  * Returns: Key value
  */
-gfloat
-anjuta_session_get_float (AnjutaSession *session, const gchar *section,
-						  const gchar *key)
+gdouble
+anjuta_session_get_double (AnjutaSession *session, const gchar *section,
+						   const gchar *key)
 {
-	gchar *key_path;
-	gfloat value;
-	
 	g_return_val_if_fail (ANJUTA_IS_SESSION (session), 0);
 	g_return_val_if_fail (section != NULL, 0);
 	g_return_val_if_fail (key != NULL, 0);
 	
-	key_path = anjuta_session_get_key_path (session, section, key);
-	value = gnome_config_get_float (key_path);
-	g_free (key_path);
-	return value;
+	return g_key_file_get_double (session->priv->key_file, section, key, NULL);
 }
 
 /**
@@ -396,17 +379,11 @@
 anjuta_session_get_string (AnjutaSession *session, const gchar *section,
 						   const gchar *key)
 {
-	gchar *key_path;
-	gchar *value;
-	
 	g_return_val_if_fail (ANJUTA_IS_SESSION (session), NULL);
 	g_return_val_if_fail (section != NULL, NULL);
 	g_return_val_if_fail (key != NULL, NULL);
 	
-	key_path = anjuta_session_get_key_path (session, section, key);
-	value = gnome_config_get_string (key_path);
-	g_free (key_path);
-	return value;
+	return g_key_file_get_string (session->priv->key_file, section, key, NULL);
 }
 
 /**
@@ -420,38 +397,25 @@
  * Returns: Key value
  */
 GList*
-anjuta_session_get_string_list (AnjutaSession *session,
-								const gchar *section,
+anjuta_session_get_string_list (AnjutaSession *session, const gchar *section,
 								const gchar *key)
 {
-	gchar *key_path, *val, **str, **ptr;
-	GList *value;
+	gchar **list;
+	GList *value = NULL;
+	gint i;
+	gsize length;
 	
 	g_return_val_if_fail (ANJUTA_IS_SESSION (session), NULL);
 	g_return_val_if_fail (section != NULL, NULL);
 	g_return_val_if_fail (key != NULL, NULL);
+
+	list = g_key_file_get_string_list (session->priv->key_file, section, key, 
+									   &length, NULL);
 	
-	key_path = anjuta_session_get_key_path (session, section, key);
-	val = gnome_config_get_string (key_path);
-	
-	value = NULL;
-	if (val)
+	for (i = 0; i < length; i++)	
 	{
-		str = g_strsplit (val, "%%%", -1);
-		if (str)
-		{
-			ptr = str;
-			while (*ptr)
-			{
-				if (strlen (*ptr) > 0)
-					value = g_list_prepend (value, g_strdup (*ptr));
-				ptr++;
-			}
-			g_strfreev (str);
-		}
-		g_free (val);
+		value = g_list_append (value, list[i]);
 	}
-	g_free (key_path);
 	
-	return g_list_reverse (value);
+	return value;
 }
Index: libanjuta/anjuta-session.h
===================================================================
--- libanjuta/anjuta-session.h	(revision 4359)
+++ libanjuta/anjuta-session.h	(working copy)
@@ -67,8 +67,8 @@
 
 void anjuta_session_set_int (AnjutaSession *session, const gchar *section,
 							 const gchar *key, gint value);
-void anjuta_session_set_float (AnjutaSession *session, const gchar *section,
-							   const gchar *key, gfloat value);
+void anjuta_session_set_double (AnjutaSession *session, const gchar *section,
+							   const gchar *key, gdouble value);
 void anjuta_session_set_string (AnjutaSession *session, const gchar *section,
 								const gchar *key, const gchar *value);
 void anjuta_session_set_string_list (AnjutaSession *session,
@@ -77,7 +77,7 @@
 
 gint anjuta_session_get_int (AnjutaSession *session, const gchar *section,
 							 const gchar *key);
-gfloat anjuta_session_get_float (AnjutaSession *session, const gchar *section,
+gdouble anjuta_session_get_double (AnjutaSession *session, const gchar *section,
 								 const gchar *key);
 gchar* anjuta_session_get_string (AnjutaSession *session, const gchar *section,
 								  const gchar *key);
