? libgossip/.deps
? libgossip/.libs
? libgossip/gossip-account-manager.lo
? libgossip/gossip-account.lo
? libgossip/gossip-chatroom-manager.lo
? libgossip/gossip-chatroom-provider.lo
? libgossip/gossip-chatroom.lo
? libgossip/gossip-contact.lo
? libgossip/gossip-debug.lo
? libgossip/gossip-event-manager.lo
? libgossip/gossip-event.lo
? libgossip/gossip-ft-provider.lo
? libgossip/gossip-ft.lo
? libgossip/gossip-message.lo
? libgossip/gossip-presence.lo
? libgossip/gossip-protocol.lo
? libgossip/gossip-session.lo
? libgossip/gossip-time.lo
? libgossip/gossip-utils.lo
? libgossip/gossip-vcard.lo
? libgossip/gossip-version-info.lo
? libgossip/libgossip-marshal-main.lo
? libgossip/libgossip.la
? po/.intltool-merge-cache
? protocols/jabber/.deps
? protocols/jabber/.libs
? protocols/jabber/gossip-jabber-chatrooms.lo
? protocols/jabber/gossip-jabber-ft-utils.lo
? protocols/jabber/gossip-jabber-ft.lo
? protocols/jabber/gossip-jabber-services.lo
? protocols/jabber/gossip-jabber-utils.lo
? protocols/jabber/gossip-jabber-vcard.lo
? protocols/jabber/gossip-jabber.lo
? protocols/jabber/gossip-jid.lo
? protocols/jabber/gossip-transport-accounts.lo
? protocols/jabber/gossip-transport-discover.lo
? protocols/jabber/gossip-transport-protocol.lo
? protocols/jabber/gossip-transport-register.lo
? protocols/jabber/libgossip-jabber.la
Index: configure.ac
===================================================================
RCS file: /cvs/gnome/gossip/configure.ac,v
retrieving revision 1.43
diff -p -u -r1.43 configure.ac
--- configure.ac	29 May 2006 20:33:30 -0000	1.43
+++ configure.ac	31 May 2006 15:12:06 -0000
@@ -162,6 +162,7 @@ PKG_CHECK_MODULES(LIBGOSSIP, [
 	gobject-2.0
 	gnome-vfs-2.0 >= $LIBGNOMEVFS_REQUIRED
 	gconf-2.0 >= $GCONF_REQUIRED
+	gnome-keyring-1
 ])
 
 PKG_CHECK_MODULES(GOSSIP,
Index: libgossip/gossip-account-manager.c
===================================================================
RCS file: /cvs/gnome/gossip/libgossip/gossip-account-manager.c,v
retrieving revision 1.20
diff -p -u -r1.20 gossip-account-manager.c
--- libgossip/gossip-account-manager.c	25 May 2006 14:50:28 -0000	1.20
+++ libgossip/gossip-account-manager.c	31 May 2006 15:12:07 -0000
@@ -439,7 +439,7 @@ account_manager_parse_account (GossipAcc
 	xmlNodePtr         child;
 	gchar             *str;
 	GossipAccountType  type;
-	gchar             *name, *id, *password;
+	gchar             *name, *id;
 	gchar             *server, *resource;
 	guint16            port;
 	gboolean           auto_connect, use_ssl, use_proxy;
@@ -448,7 +448,6 @@ account_manager_parse_account (GossipAcc
 	type = GOSSIP_ACCOUNT_TYPE_JABBER;
 	name = NULL;
 	id = NULL;
-	password = NULL;
 	resource = NULL;
 	server = NULL;
 	port = 5222;
@@ -474,9 +473,6 @@ account_manager_parse_account (GossipAcc
 		else if (strcmp (tag, "id") == 0) {
 			id = g_strdup (str);
 		}
-		else if (strcmp (tag, "password") == 0) {
-			password = g_strdup (str);
-		}
 		else if (strcmp (tag, "server") == 0) {
 			server = g_strdup (str);
 		}
@@ -537,10 +533,6 @@ account_manager_parse_account (GossipAcc
 			gossip_account_set_server (account, server);
 		}
 		
-		if (password) {
-			gossip_account_set_password (account, password);
-		}
-		
 #ifdef RESOURCE_HACK
 		const gchar *resource_found = NULL;
 
@@ -575,7 +567,6 @@ account_manager_parse_account (GossipAcc
 	
 	g_free (name);
 	g_free (id);
-	g_free (password);
 	g_free (resource);
 	g_free (server);
 }
@@ -720,7 +711,6 @@ account_manager_file_save (GossipAccount
 		xmlNewTextChild (node, NULL, "id", gossip_account_get_id (account));
 
 		xmlNewTextChild (node, NULL, "resource", gossip_account_get_resource (account));
-		xmlNewTextChild (node, NULL, "password", gossip_account_get_password (account));
 		xmlNewTextChild (node, NULL, "server", gossip_account_get_server (account));
 		xmlNewChild (node, NULL, "port", port);
 
Index: libgossip/gossip-account.c
===================================================================
RCS file: /cvs/gnome/gossip/libgossip/gossip-account.c,v
retrieving revision 1.38
diff -p -u -r1.38 gossip-account.c
--- libgossip/gossip-account.c	23 Apr 2006 15:28:10 -0000	1.38
+++ libgossip/gossip-account.c	31 May 2006 15:12:07 -0000
@@ -24,6 +24,8 @@
 #include <glib.h>
 #include <glib/gi18n.h>
 
+#include <gnome-keyring.h>
+
 #include "libgossip-marshal.h"
 
 #include "gossip-account.h"
@@ -45,7 +47,6 @@ struct _GossipAccountPriv {
 	gchar             *name;
 	gchar             *id;
 	gchar             *host;
-	gchar             *password;
 	gchar             *resource;
 	gchar             *server;
 	guint16            port;
@@ -168,14 +169,6 @@ account_class_init (GossipAccountClass *
 							      G_PARAM_READWRITE));
 
 	g_object_class_install_property (object_class,
-					 PROP_PASSWORD,
-					 g_param_spec_string ("password",
-							      "Account Password",
-							      "Authentication token",
-							      NULL,
-							      G_PARAM_READWRITE));
-
-	g_object_class_install_property (object_class,
 					 PROP_SERVER,
 					 g_param_spec_string ("server",
 							      "Account Server",
@@ -257,7 +250,6 @@ account_init (GossipAccount *account)
 	priv->type         = 0;
 	priv->name         = NULL;
 	priv->id           = NULL;
-	priv->password     = NULL;
 	priv->resource     = NULL;
 	priv->server       = NULL;
 	priv->port         = 0;
@@ -276,7 +268,6 @@ account_finalize (GObject *object)
 	
 	g_free (priv->name);
 	g_free (priv->id);
-	g_free (priv->password);
 	g_free (priv->resource);
 	g_free (priv->server);
 
@@ -303,9 +294,6 @@ account_get_property (GObject    *object
 	case PROP_ID:
 		g_value_set_string (value, priv->id);
 		break;
-	case PROP_PASSWORD:
-		g_value_set_string (value, priv->password);
-		break;
 	case PROP_RESOURCE:
 		g_value_set_string (value, priv->resource);
 		break;
@@ -353,10 +341,6 @@ account_set_property (GObject      *obje
 		gossip_account_set_id (GOSSIP_ACCOUNT (object),
 				       g_value_get_string (value));
 		break;
-	case PROP_PASSWORD:
-		gossip_account_set_password (GOSSIP_ACCOUNT (object),
-					     g_value_get_string (value));
-		break;
 	case PROP_RESOURCE:
 		gossip_account_set_resource (GOSSIP_ACCOUNT (object),
 					     g_value_get_string (value));
@@ -437,12 +421,32 @@ gossip_account_get_id (GossipAccount *ac
 const gchar *
 gossip_account_get_password (GossipAccount *account)
 {
-	GossipAccountPriv *priv;
+	GList *l;
+	GnomeKeyringResult r;
+	gchar **jid;
+	gchar *password = NULL;
 
 	g_return_val_if_fail (GOSSIP_IS_ACCOUNT (account), NULL);
 
-	priv = GET_PRIV (account);
-	return priv->password;
+	jid = g_strsplit (gossip_account_get_id (account), "@", 2);
+	g_assert (jid[0] != NULL);
+	g_assert (jid[1] != NULL);
+
+	r = gnome_keyring_find_network_password_sync (jid[0],
+		NULL, jid[1], NULL,
+		"jabber", NULL, 0,
+		&l);
+	g_strfreev (jid);
+	
+	if (r == GNOME_KEYRING_RESULT_OK) {
+		password = g_strdup (((GnomeKeyringNetworkPasswordData *)l->data)->password);
+		g_list_foreach (l, (GFunc) g_free, NULL);
+		g_list_free (l);
+	} else {
+		g_warning ("%s (%d)\n", "Could not retrieve password from keyring", r);
+	}
+	
+	return password;
 }
 
 const gchar *
@@ -552,18 +556,28 @@ void
 gossip_account_set_password (GossipAccount *account,
 			     const gchar   *password)
 {
-	GossipAccountPriv *priv;
+	gchar **jid;
+	GnomeKeyringResult r;
+	guint32 id;
 
 	g_return_if_fail (GOSSIP_IS_ACCOUNT (account));
 	g_return_if_fail (password != NULL);
-	
-	priv = GET_PRIV (account);
-	
-	g_free (priv->password);
-	priv->password = g_strdup (password);
 
-	g_object_notify (G_OBJECT (account), "password");
-	g_signal_emit (account, signals[CHANGED], 0);
+	jid = g_strsplit (gossip_account_get_id (account), "@", 2);
+	g_assert (jid[0] != NULL);
+	g_assert (jid[1] != NULL);
+	
+	r = gnome_keyring_set_network_password_sync (NULL,
+		jid[0], NULL, jid[1], NULL,
+		"jabber",
+		NULL, 0,
+		password,
+		&id);
+	g_strfreev (jid);
+	
+	if (r != GNOME_KEYRING_RESULT_OK) {
+		g_warning ("%s (%d)\n", "Could not save password to keyring", r);
+	}
 }
 
 void
