From 0ccb79c8cacc55b0df777b02be241c72e6c3d227 Mon Sep 17 00:00:00 2001
From: Ettore Perazzoli <ettore@ximian.com>
Date: Mon, 4 Mar 2002 16:53:45 +0000
Subject: [Fix #20234, Deleting Folder gratuitiously causes /local to open.]

2002-03-04  Ettore Perazzoli  <ettore@ximian.com>

	[Fix #20234, Deleting Folder gratuitiously causes /local to open.]

	* e-shell-view.c (find_inbox_in_storage): New helper function to
	heuristically find an Inbox folder.
	(handle_current_folder_removed): New function to handle the
	removal of the currently displayed folder in a slightly smarter
	way than before.  It tries to display the parent folder of the
	folder that got deleted and, if not possible, the Inbox in the
	same storage.  If neither of this is possible, it displays the
	default local Inbox.  [It still doesn't handle the case where you
	have no Inbox gracefully, but that can come later.]
	(storage_set_removed_folder_callback): Call
	`handle_current_folder_removed'.

2002-03-04  Ettore Perazzoli  <ettore@ximian.com>

	[Fix #20237, Shell silently drops xfer_folder errors.]

	* e-shell-folder-commands.c (xfer_result_callback): Display an
	error message if the operation failed.

svn path=/trunk/; revision=15898
---
 shell/e-shell-folder-commands.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

(limited to 'shell/e-shell-folder-commands.c')

diff --git a/shell/e-shell-folder-commands.c b/shell/e-shell-folder-commands.c
index 73ca33829f..4a2bbe7e4f 100644
--- a/shell/e-shell-folder-commands.c
+++ b/shell/e-shell-folder-commands.c
@@ -133,7 +133,21 @@ xfer_result_callback (EStorageSet *storage_set,
 
 	folder_command_data = (FolderCommandData *) data;
 
-	/* FIXME: do something.  */
+	if (result != E_STORAGE_OK) {
+		char *msg;
+
+		if (folder_command_data->command == FOLDER_COMMAND_COPY)
+			msg = g_strdup_printf (_("Cannot copy folder: %s"),
+					       e_storage_result_to_string (result));
+		else
+			msg = g_strdup_printf (_("Cannot move folder: %s"),
+					       e_storage_result_to_string (result));
+
+		e_notice (GTK_WINDOW (folder_command_data->shell_view),
+			  GNOME_MESSAGE_BOX_ERROR, msg);
+
+		g_free (msg);
+	}
 
 	folder_command_data_free (folder_command_data);
 }
-- 
cgit