Index: libnautilus-private/nautilus-desktop-link-monitor.c
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-desktop-link-monitor.c,v
retrieving revision 1.14
diff -u -p -r1.14 nautilus-desktop-link-monitor.c
--- libnautilus-private/nautilus-desktop-link-monitor.c	13 Jul 2005 12:46:56 -0000	1.14
+++ libnautilus-private/nautilus-desktop-link-monitor.c	31 Jul 2005 13:51:38 -0000
@@ -100,43 +100,46 @@ eject_for_type (GnomeVFSDeviceType type)
 }
 
 static void
+volume_or_drive_unmounted_callback (gboolean succeeded,
+				    char *error,
+				    char *detailed_error,
+				    gpointer data)
+{
+	if (!succeeded) {
+		eel_show_error_dialog_with_details (error, NULL, 
+		                                    _("Unmount Error"), detailed_error, NULL);
+	}
+}
+
+
+static void
+volume_or_drive_ejected_callback (gboolean succeeded,
+				    char *error,
+				    char *detailed_error,
+				    gpointer data)
+{
+	if (!succeeded) {
+		eel_show_error_dialog_with_details (error, NULL, 
+		                                    _("Eject Error"), detailed_error, NULL);
+	}
+}
+
+static void
 volume_delete_dialog (GtkWidget *parent_view,
                       NautilusDesktopLink *link)
 {
 	GnomeVFSVolume *volume;
-	char *dialog_str;
-	char *display_name;
 
 	volume = nautilus_desktop_link_get_volume (link);
 
 	if (volume != NULL) {
-		display_name = nautilus_desktop_link_get_display_name (link);
-		dialog_str = g_strdup_printf (_("You cannot move the volume \"%s\" to the trash."),
-					      display_name);
-		g_free (display_name);
-
 		if (eject_for_type (gnome_vfs_volume_get_device_type (volume))) {
-			eel_run_simple_dialog
-				(parent_view, 
-				 FALSE,
-				 GTK_MESSAGE_ERROR,
-				 dialog_str,
-				 _("If you want to eject the volume, please use \"Eject\" in the "
-				   "popup menu of the volume."),
-				 NULL, GTK_STOCK_OK, NULL);
+			gnome_vfs_volume_eject (volume, volume_or_drive_ejected_callback, NULL);
 		} else {
-			eel_run_simple_dialog
-				(parent_view, 
-				 FALSE,
-				 GTK_MESSAGE_ERROR,
-				 dialog_str,
-				 _("If you want to unmount the volume, please use \"Unmount Volume\" in the "
-				   "popup menu of the volume."),
-				 NULL, GTK_STOCK_OK, NULL);
+			gnome_vfs_volume_unmount (volume, volume_or_drive_unmounted_callback, NULL);
 		}
 
 		gnome_vfs_volume_unref (volume);
-		g_free (dialog_str);
 	}
 }
 
