Index: daemon/gnome-vfs-daemon.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/daemon/gnome-vfs-daemon.c,v
retrieving revision 1.14
diff -u -p -r1.14 gnome-vfs-daemon.c
--- daemon/gnome-vfs-daemon.c	18 Jan 2005 19:04:10 -0000	1.14
+++ daemon/gnome-vfs-daemon.c	6 Apr 2006 11:00:16 -0000
@@ -222,6 +222,37 @@ volume_mounted (GnomeVFSVolumeMonitor *v
 }
 
 static void
+volume_changed (GnomeVFSVolumeMonitor *volume_monitor,
+		GnomeVFSVolume	      *volume,
+		GNOME_VFS_Client       client)
+{
+	CORBA_Environment ev;
+	CORBA_char *display_name, *activation_uri, *icon;
+
+	CORBA_exception_init (&ev);
+
+	display_name = CORBA_string_dup (volume->priv->display_name);
+	activation_uri = CORBA_string_dup (volume->priv->activation_uri);
+	icon = CORBA_string_dup (volume->priv->icon);
+
+	GNOME_VFS_Client_VolumeChanged (client,
+				        volume->priv->id,
+					display_name,
+					activation_uri,
+					icon,
+					&ev);
+
+	CORBA_free (display_name);
+	CORBA_free (activation_uri);
+	CORBA_free (icon);
+
+	if (BONOBO_EX (&ev)) {
+		CORBA_exception_free (&ev);
+	}
+}
+
+
+static void
 volume_pre_unmount (GnomeVFSVolumeMonitor *volume_monitor,
 		    GnomeVFSVolume        *volume,
 		    GNOME_VFS_Client       client)
@@ -307,6 +338,8 @@ register_volume_monitor (PortableServer_
 
 	g_signal_connect (monitor, "volume_mounted",
 			  G_CALLBACK (volume_mounted), client);
+	g_signal_connect (monitor, "volume_changed",
+			  G_CALLBACK (volume_changed), client);
 	g_signal_connect (monitor, "volume_pre_unmount",
 			  G_CALLBACK (volume_pre_unmount), client);
 	g_signal_connect (monitor, "volume_unmounted",
@@ -327,6 +360,7 @@ disconnect_client_from_volume_monitor (c
 	monitor = gnome_vfs_get_volume_monitor ();
 
 	g_signal_handlers_disconnect_by_func (monitor, G_CALLBACK (volume_mounted), client);
+	g_signal_handlers_disconnect_by_func (monitor, G_CALLBACK (volume_changed), client);
 	g_signal_handlers_disconnect_by_func (monitor, G_CALLBACK (volume_pre_unmount), client);
 	g_signal_handlers_disconnect_by_func (monitor, G_CALLBACK (volume_unmounted), client);
 	g_signal_handlers_disconnect_by_func (monitor, G_CALLBACK (drive_connected), client);
Index: libgnomevfs/GNOME_VFS_Daemon.idl
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/GNOME_VFS_Daemon.idl,v
retrieving revision 1.10
diff -u -p -r1.10 GNOME_VFS_Daemon.idl
--- libgnomevfs/GNOME_VFS_Daemon.idl	10 Dec 2004 21:33:53 -0000	1.10
+++ libgnomevfs/GNOME_VFS_Daemon.idl	6 Apr 2006 11:00:21 -0000
@@ -171,6 +171,10 @@ module GNOME {
 
 			/* For volume monitoring: */
 			oneway void VolumeMounted (in Volume volume);
+			oneway void VolumeChanged (in long id,
+						   in string new_display_name,
+						   in string new_activation_uri,
+						   in string new_icon);
 			oneway void VolumePreUnmount (in long id);
 			oneway void VolumeUnmounted (in long id);
 			oneway void DriveConnected (in Drive drive);
Index: libgnomevfs/gnome-vfs-client.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-client.c,v
retrieving revision 1.5
diff -u -p -r1.5 gnome-vfs-client.c
--- libgnomevfs/gnome-vfs-client.c	10 Dec 2003 12:00:43 -0000	1.5
+++ libgnomevfs/gnome-vfs-client.c	6 Apr 2006 11:00:27 -0000
@@ -5,6 +5,7 @@
 #include "gnome-vfs-cancellation-private.h"
 #include "gnome-vfs-volume-monitor-private.h"
 #include "gnome-vfs-volume-monitor-client.h"
+#include <string.h>
 
 BONOBO_CLASS_BOILERPLATE_FULL(
 	GnomeVFSClient,
@@ -83,6 +84,31 @@ gnome_vfs_client_volume_mounted (Portabl
 }
 
 static void
+gnome_vfs_client_volume_changed (PortableServer_Servant _servant,
+				 const CORBA_long id,
+				 const CORBA_char * new_display_name,
+				 const CORBA_char * new_activation_uri,
+				 const CORBA_char * new_icon,
+				 CORBA_Environment * ev)
+{
+	GnomeVFSVolume *volume;
+	GnomeVFSVolumeMonitor *volume_monitor;
+
+	volume_monitor = gnome_vfs_get_volume_monitor ();
+
+	volume = gnome_vfs_volume_monitor_get_volume_by_id (volume_monitor, id);
+	if (volume != NULL) {
+		_gnome_vfs_volume_monitor_changed (volume_monitor, volume,
+						   new_display_name,
+						   new_activation_uri,
+						   new_icon);
+		gnome_vfs_volume_unref (volume);
+	} else {
+		g_warning ("could not lookup changed volume id %u", id);
+	}
+}
+
+static void
 gnome_vfs_client_volume_unmounted (PortableServer_Servant _servant,
 				   const CORBA_long id, CORBA_Environment * ev)
 {
@@ -156,6 +182,7 @@ gnome_vfs_client_class_init (GnomeVFSCli
 
 	epv->MonitorCallback = gnome_vfs_client_monitor_callback;
 	epv->VolumeMounted = gnome_vfs_client_volume_mounted;
+	epv->VolumeChanged = gnome_vfs_client_volume_changed;
 	epv->VolumeUnmounted = gnome_vfs_client_volume_unmounted;
 	epv->VolumePreUnmount = gnome_vfs_client_volume_pre_unmount;
 	epv->DriveConnected = gnome_vfs_client_drive_connected;
Index: libgnomevfs/gnome-vfs-volume-monitor-daemon.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-volume-monitor-daemon.c,v
retrieving revision 1.21
diff -u -p -r1.21 gnome-vfs-volume-monitor-daemon.c
--- libgnomevfs/gnome-vfs-volume-monitor-daemon.c	22 Nov 2005 14:34:09 -0000	1.21
+++ libgnomevfs/gnome-vfs-volume-monitor-daemon.c	6 Apr 2006 11:00:43 -0000
@@ -505,17 +506,32 @@ get_icon_from_type (GnomeVFSDeviceType t
 }
 
 
+/* major_compare affects added and removed.
+ * If an item is neither added nor removed,
+ * and minor_compare does not return 0, it
+ * is added to changed.
+ */
 static void
-diff_sorted_lists (GList *list1, GList *list2, GCompareFunc compare,
-		   GList **added, GList **removed)
+diff_sorted_lists (GList *list1, GList *list2,
+		   GCompareFunc major_compare,
+		   GCompareFunc minor_compare,
+		   GList **added, GList **removed,
+		   GList **changed)
 {
 	int order;
-	
+
+	g_assert (!(minor_compare == NULL && changed != NULL));
+	g_assert (!(minor_compare != NULL && changed == NULL));
+
 	*added = *removed = NULL;
 
+	if (changed != NULL) {
+		*changed = NULL;
+	}
+
 	while (list1 != NULL &&
 	       list2 != NULL) {
-		order = (*compare) (list1->data, list2->data);
+		order = (*major_compare) (list1->data, list2->data);
 		if (order < 0) {
 			*removed = g_list_prepend (*removed, list1->data);
 			list1 = list1->next;
@@ -523,6 +539,10 @@ diff_sorted_lists (GList *list1, GList *
 			*added = g_list_prepend (*added, list2->data);
 			list2 = list2->next;
 		} else { /* same item */
+			if (minor_compare != NULL && (* minor_compare) (list1->data, list2->data)) {
+				*changed = g_list_prepend (*changed, list2->data);
+			}
+
 			list1 = list1->next;
 			list2 = list2->next;
 		}
@@ -729,7 +749,7 @@ update_fstab_drives (GnomeVFSVolumeMonit
 		
 		diff_sorted_lists (volume_monitor_daemon->last_fstab,
 				   new_fstab, (GCompareFunc) _gnome_vfs_unix_mount_point_compare,
-				   &added, &removed);
+				   NULL, &added, &removed, NULL);
 
 		for (l = removed; l != NULL; l = l->next) {
 			mount = l->data;
@@ -1013,7 +1033,7 @@ update_mtab_volumes (GnomeVFSVolumeMonit
 		
 		diff_sorted_lists (volume_monitor_daemon->last_mtab,
 				   new_mtab, (GCompareFunc) _gnome_vfs_unix_mount_compare,
-				   &added, &removed);
+				   NULL, &added, &removed, NULL);
 
 		for (l = removed; l != NULL; l = l->next) {
 			GnomeVFSUnixMount *mount = l->data;
@@ -1088,6 +1108,13 @@ connected_server_free (GnomeVFSConnected
 }
 
 static int
+connected_server_id_compare (GnomeVFSConnectedServer *a,
+			     GnomeVFSConnectedServer *b)
+{
+	return strcmp (a->id, b->id);
+}
+
+static int
 connected_server_compare (GnomeVFSConnectedServer *a,
 			  GnomeVFSConnectedServer *b)
 {
@@ -1201,7 +1226,7 @@ update_connected_servers (GnomeVFSVolume
 {
 	GList *new_servers;
 	GnomeVFSVolumeMonitor *volume_monitor;
-	GList *removed, *added;
+	GList *removed, *added, *changed;
 	GnomeVFSConnectedServer *server;
 	GnomeVFSVolume *volume;
 	GList *l;
@@ -1210,9 +1235,10 @@ update_connected_servers (GnomeVFSVolume
 
 	new_servers = get_connected_servers (volume_monitor_daemon);
 	new_servers = g_list_sort (new_servers, (GCompareFunc) connected_server_compare);
-	diff_sorted_lists (volume_monitor_daemon->last_connected_servers,
-			   new_servers, (GCompareFunc) connected_server_compare,
-			   &added, &removed);
+	diff_sorted_lists (volume_monitor_daemon->last_connected_servers, new_servers,
+			   (GCompareFunc) connected_server_id_compare,
+			   (GCompareFunc) connected_server_compare,
+			   &added, &removed, &changed);
 
 	for (l = removed; l != NULL; l = l->next) {
 		server = l->data;
@@ -1220,6 +1246,38 @@ update_connected_servers (GnomeVFSVolume
 		
 		if (volume != NULL) {
 			_gnome_vfs_volume_monitor_unmounted (volume_monitor, volume);
+		} else {
+			g_warning ("failed to look up removed server %s (%s), ID %s",
+				   server->display_name, server->uri, server->id);
+		}
+	}
+
+	for (l = changed; l != NULL; l = l->next) {
+		server = l->data;
+
+		volume = _gnome_vfs_volume_monitor_find_connected_server_by_gconf_id (volume_monitor, server->id);
+		if (volume != NULL) {
+			char *display_name;
+
+			if (server->display_name == NULL || volume->priv->display_name == NULL
+			    || strcmp (server->display_name, volume->priv->display_name)) {
+				display_name = _gnome_vfs_volume_monitor_uniquify_volume_name (volume_monitor, server->display_name);
+			} else {
+				/* don't uniquify name if it matches the old one */
+				display_name = g_strdup (volume->priv->display_name);
+			}
+
+			_gnome_vfs_volume_monitor_changed (volume_monitor, volume,
+							   display_name,
+							   server->uri,
+							   server->icon);
+			g_free (display_name);
+		} else {
+			g_warning ("failed to look up changed server %s (%s), ID %s",
+				   server->display_name, server->uri, server->id);
+			volume = create_volume_from_connected_server (volume_monitor, server);
+			_gnome_vfs_volume_monitor_mounted (volume_monitor, volume);
+			gnome_vfs_volume_unref (volume);
 		}
 	}
 	
@@ -1230,9 +1288,10 @@ update_connected_servers (GnomeVFSVolume
 		_gnome_vfs_volume_monitor_mounted (volume_monitor, volume);
 		gnome_vfs_volume_unref (volume);
 	}
-	
+
 	g_list_free (added);
 	g_list_free (removed);
+	g_list_free (changed);
 	g_list_foreach (volume_monitor_daemon->last_connected_servers,
 			(GFunc)connected_server_free, NULL);
 	g_list_free (volume_monitor_daemon->last_connected_servers);
Index: libgnomevfs/gnome-vfs-volume-monitor-private.h
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-volume-monitor-private.h,v
retrieving revision 1.11
diff -u -p -r1.11 gnome-vfs-volume-monitor-private.h
--- libgnomevfs/gnome-vfs-volume-monitor-private.h	19 Feb 2006 00:59:30 -0000	1.11
+++ libgnomevfs/gnome-vfs-volume-monitor-private.h	6 Apr 2006 11:00:43 -0000
@@ -102,6 +102,11 @@ void gnome_vfs_volume_unset_drive_privat
 						 GnomeVFSDrive         *drive);
 void _gnome_vfs_volume_monitor_mounted          (GnomeVFSVolumeMonitor *volume_monitor,
 						 GnomeVFSVolume        *volume);
+void _gnome_vfs_volume_monitor_changed          (GnomeVFSVolumeMonitor *volume_monitor,
+						 GnomeVFSVolume        *volume,
+						 const char            *new_display_name,
+						 const char            *new_activation_uri,
+						 const char            *new_icon);
 void _gnome_vfs_volume_monitor_unmounted        (GnomeVFSVolumeMonitor *volume_monitor,
 						 GnomeVFSVolume        *volume);
 void _gnome_vfs_volume_monitor_connected        (GnomeVFSVolumeMonitor *volume_monitor,
Index: libgnomevfs/gnome-vfs-volume-monitor.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-volume-monitor.c,v
retrieving revision 1.17
diff -u -p -r1.17 gnome-vfs-volume-monitor.c
--- libgnomevfs/gnome-vfs-volume-monitor.c	17 Feb 2006 13:33:52 -0000	1.17
+++ libgnomevfs/gnome-vfs-volume-monitor.c	6 Apr 2006 11:00:45 -0000
@@ -39,6 +39,7 @@ static void gnome_vfs_volume_monitor_fin
 enum
 {
 	VOLUME_MOUNTED,
+	VOLUME_CHANGED,
 	VOLUME_PRE_UNMOUNT,
 	VOLUME_UNMOUNTED,
 	DRIVE_CONNECTED,
@@ -97,6 +98,15 @@ gnome_vfs_volume_monitor_class_init (Gno
 			      G_TYPE_NONE, 1,
 			      GNOME_VFS_TYPE_VOLUME);
 
+	volume_monitor_signals[VOLUME_CHANGED] =
+		g_signal_new ("volume_changed",
+			      G_TYPE_FROM_CLASS (o_class),
+			      G_SIGNAL_RUN_FIRST,
+			      0, NULL, NULL,
+			      g_cclosure_marshal_VOID__OBJECT,
+			      G_TYPE_NONE, 1,
+			      GNOME_VFS_TYPE_VOLUME);
+
 	volume_monitor_signals[VOLUME_PRE_UNMOUNT] =
 		g_signal_new ("volume_pre_unmount",
 			      G_TYPE_FROM_CLASS (o_class),
@@ -703,6 +713,38 @@ _gnome_vfs_volume_monitor_mounted (Gnome
 	g_mutex_unlock (volume_monitor->priv->mutex);
 	
 	g_signal_emit (volume_monitor, volume_monitor_signals[VOLUME_MOUNTED], 0, volume);
+}
+
+void
+_gnome_vfs_volume_monitor_changed (GnomeVFSVolumeMonitor *volume_monitor,
+				   GnomeVFSVolume        *volume,
+				   const char            *new_display_name,
+				   const char            *new_activation_uri,
+				   const char            *new_icon)
+{
+	g_mutex_lock (volume_monitor->priv->mutex);
+
+	if (volume->priv->display_name == NULL || new_display_name == NULL ||
+	    strcmp (volume->priv->display_name, new_display_name)) {
+		g_free (volume->priv->display_name);
+		volume->priv->display_name = g_strdup (new_display_name);
+	}
+
+	if (volume->priv->activation_uri == NULL || new_activation_uri == NULL ||
+	    strcmp (volume->priv->activation_uri, new_activation_uri)) {
+		g_free (volume->priv->activation_uri);
+		volume->priv->activation_uri = g_strdup (new_activation_uri);
+	}
+
+	if (volume->priv->icon == NULL || new_icon == NULL ||
+	    strcmp (volume->priv->icon, new_icon)) {
+		g_free (volume->priv->icon);
+		volume->priv->icon = g_strdup (new_icon);
+	}
+
+	g_mutex_unlock (volume_monitor->priv->mutex);
+
+	g_signal_emit (volume_monitor, volume_monitor_signals[VOLUME_CHANGED], 0, volume);
 }
 
 void
Index: libgnomevfs/gnome-vfs-volume-ops.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-volume-ops.c,v
retrieving revision 1.30
diff -u -p -r1.30 gnome-vfs-volume-ops.c
--- libgnomevfs/gnome-vfs-volume-ops.c	6 Mar 2006 09:33:20 -0000	1.30
+++ libgnomevfs/gnome-vfs-volume-ops.c	6 Apr 2006 11:00:47 -0000
@@ -1276,6 +1276,80 @@ gnome_vfs_drive_eject (GnomeVFSDrive  *d
 	gnome_vfs_drive_volume_list_free (vol_list);
 }
 
+static void
+volume_set_gconf_string (GnomeVFSVolume *volume,
+			 const char     *key,
+			 const char     *value)
+{
+	GConfClient *client;
+	char *full_key;
+
+	client = gconf_client_get_default ();
+
+	full_key = g_strconcat (CONNECTED_SERVERS_DIR "/",
+				volume->priv->gconf_id,
+				"/", key, NULL);
+	gconf_client_set_string (client, full_key, value, NULL);
+	g_free (full_key);
+}
+
+/** 
+ * gnome_vfs_volume_connected_server_set_activation_uri
+ * @volume: a #GnomeVFSVolume for which to set the activation URI
+ * @activation_uri: the new activation URI to use for @volume.
+ *
+ * Since: 2.16
+ */
+void
+gnome_vfs_volume_connected_server_set_activation_uri (GnomeVFSVolume *volume,
+						      const char     *activation_uri)
+{
+	g_return_if_fail (volume != NULL);
+	g_return_if_fail (volume->priv->volume_type == GNOME_VFS_VOLUME_TYPE_CONNECTED_SERVER);
+	g_return_if_fail (activation_uri != NULL);
+
+	volume_set_gconf_string (volume, "uri", activation_uri);
+	force_probe ();
+}
+
+/** 
+ * gnome_vfs_volume_connected_server_set_display_name
+ * @volume: a #GnomeVFSVolume for which to set the display name
+ * @display_name: the new display name to use for @volume.
+ *
+ * Since: 2.16
+ */
+void
+gnome_vfs_volume_connected_server_set_display_name (GnomeVFSVolume *volume,
+						    const char     *display_name)
+{
+	g_return_if_fail (volume != NULL);
+	g_return_if_fail (volume->priv->volume_type == GNOME_VFS_VOLUME_TYPE_CONNECTED_SERVER);
+	g_return_if_fail (display_name != NULL);
+
+	volume_set_gconf_string (volume, "display_name", display_name);
+	force_probe ();
+}
+
+/** 
+ * gnome_vfs_volume_connected_server_set_icon
+ * @volume: a #GnomeVFSVolume for which to set the display name
+ * @icon: the new icon to use for @volume.
+ *
+ * Since: 2.16
+ */
+void
+gnome_vfs_volume_connected_server_set_icon (GnomeVFSVolume *volume,
+					    const char     *icon)
+{
+	g_return_if_fail (volume != NULL);
+	g_return_if_fail (volume->priv->volume_type == GNOME_VFS_VOLUME_TYPE_CONNECTED_SERVER);
+	g_return_if_fail (icon != NULL);
+
+	volume_set_gconf_string (volume, "icon", icon);
+	force_probe ();
+}
+
 
 /** 
  * gnome_vfs_connect_to_server:
Index: libgnomevfs/gnome-vfs-volume.h
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-volume.h,v
retrieving revision 1.9
diff -u -p -r1.9 gnome-vfs-volume.h
--- libgnomevfs/gnome-vfs-volume.h	30 Jan 2006 15:12:53 -0000	1.9
+++ libgnomevfs/gnome-vfs-volume.h	6 Apr 2006 11:00:49 -0000
@@ -129,6 +129,12 @@ gboolean           gnome_vfs_volume_hand
 gint               gnome_vfs_volume_compare             (GnomeVFSVolume *a,
 							 GnomeVFSVolume *b);
 
+void gnome_vfs_volume_connected_server_set_activation_uri (GnomeVFSVolume *volume,
+							   const char     *activation_uri);
+void gnome_vfs_volume_connected_server_set_display_name   (GnomeVFSVolume *volume,
+							   const char     *display_name);
+void gnome_vfs_volume_connected_server_set_icon           (GnomeVFSVolume *volume,
+							   const char     *icon);
 
 void gnome_vfs_volume_unmount    (GnomeVFSVolume           *volume,
 				  GnomeVFSVolumeOpCallback  callback,
Index: test/test-volumes.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/test/test-volumes.c,v
retrieving revision 1.3
diff -u -p -r1.3 test-volumes.c
--- test/test-volumes.c	10 Nov 2003 08:15:25 -0000	1.3
+++ test/test-volumes.c	6 Apr 2006 11:01:09 -0000
@@ -69,6 +69,14 @@ volume_mounted (GnomeVFSVolumeMonitor *v
 }
 
 static void
+volume_changed (GnomeVFSVolumeMonitor *volume_monitor,
+		GnomeVFSVolume	      *volume)
+{
+	g_print ("Volume changed: ");
+	print_volume (volume);
+}
+
+static void
 volume_unmounted (GnomeVFSVolumeMonitor *volume_monitor,
 		  GnomeVFSVolume	       *volume)
 {
@@ -104,6 +112,8 @@ main (int argc, char *argv[])
 
   g_signal_connect (monitor, "volume_mounted",
 		    G_CALLBACK (volume_mounted), NULL);
+  g_signal_connect (monitor, "volume_changed",
+		    G_CALLBACK (volume_changed), NULL);
   g_signal_connect (monitor, "volume_unmounted",
 		    G_CALLBACK (volume_unmounted), NULL);
   g_signal_connect (monitor, "drive_connected",
