Re: [PATCH] Fixup File Operation Error Dialogs



Am Montag, den 16.05.2005, 17:50 +0200 schrieb Alexander Larsson:
> On Mon, 2005-05-16 at 00:03 +0200, Christian Neumair wrote:
> > There seem to be various complaints about the file operation error
> > dialogs. The attached patch tries to fix two issues. In some cases we
> > don't provide the "Retry" action where we should [1] and on the other
> > hand, we provide the "Skip" action where it doesn't make sense at all,
> > i.e. when we deal with the last file to be copied.
> > 
> > [1] http://bugzilla.gnome.org/show_bug.cgi?id=94843

Thanks for your feedback!

> I don't think this is right. Its not obvious to the user why there is
> suddenly no skip button, because you might not realize its the last file
> in the operation. So, I think we should have skip even if its the last
> file. 
> However, we should not display "Skip" if we're only copying/moving one
> file.

Yeah, you're totally right about this. When hacking on other
file-operation related dialogs I've come to the same conclusion.

> For the other change I'm somewhat uncertain. Someone took extra time to
> figure out exactly in what case not to display the Retry case. I'm not
> sure why this was done. Maybe there is an technical reason why retry
> doesn't work in these cases? Can anyone think of the reason this was
> done? (The code was written by Pavel Cisler.)

I think Darin is right [1] when stating that "Pavel was thinking that if
the problem is one with permissions, a retry is useless ... . This does
overlook the possibility of using going to correct the error while the
dialog is up, ... .".

I've attached another patch which makes nautilus display "cancel, retry"
if we copy exactly one file and otherwise "skip, cancel, retry".

[1] http://mail.gnome.org/archives/nautilus-list/2005-May/msg00065.html

-- 
Christian Neumair <chris gnome-de org>
Index: libnautilus-private/nautilus-file-operations.c
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-file-operations.c,v
retrieving revision 1.187
diff -u -r1.187 nautilus-file-operations.c
--- libnautilus-private/nautilus-file-operations.c	30 Mar 2005 01:54:41 -0000	1.187
+++ libnautilus-private/nautilus-file-operations.c	16 May 2005 20:40:13 -0000
@@ -932,36 +936,25 @@
 				TRUE, GTK_MESSAGE_ERROR, text, detail, dialog_title, GTK_STOCK_OK, NULL);
 			error_dialog_result = GNOME_VFS_XFER_ERROR_ACTION_ABORT;
 
-		} else if ((error_location == ERROR_LOCATION_SOURCE
-				|| error_location == ERROR_LOCATION_SOURCE_PARENT
-				|| error_location == ERROR_LOCATION_SOURCE_OR_PARENT)
-			&& (error_kind == ERROR_NOT_ENOUGH_PERMISSIONS
-				|| error_kind == ERROR_NOT_READABLE)) {
-			/* The error could have happened on any of the files
-			 * in the moved/copied/deleted hierarchy, we can probably
-			 * continue. Allow the user to skip.
-			 */
+		} else if (progress_info->files_total == 1) {
 			error_dialog_button_pressed = eel_run_simple_dialog
 				(parent_for_error_dialog (transfer_info), TRUE, 
 				 GTK_MESSAGE_ERROR, text, 
 				 detail, dialog_title,
-				 GTK_STOCK_CANCEL, _("_Skip"), NULL);
-				 
+				 GTK_STOCK_CANCEL, _("_Retry"), NULL);
+
 			switch (error_dialog_button_pressed) {
 			case 0:
-			case GTK_RESPONSE_DELETE_EVENT:
 				error_dialog_result = GNOME_VFS_XFER_ERROR_ACTION_ABORT;
 				break;
 			case 1:
-				error_dialog_result = GNOME_VFS_XFER_ERROR_ACTION_SKIP;
+				error_dialog_result = GNOME_VFS_XFER_ERROR_ACTION_RETRY;
 				break;
 			default:
 				g_assert_not_reached ();
 				error_dialog_result = GNOME_VFS_XFER_ERROR_ACTION_ABORT;
 			}
-								
 		} else {
-			/* Generic error, offer to retry and skip. */
 			error_dialog_button_pressed = eel_run_simple_dialog
 				(parent_for_error_dialog (transfer_info), TRUE, 
 				 GTK_MESSAGE_ERROR, text, 
@@ -983,7 +976,7 @@
 				error_dialog_result = GNOME_VFS_XFER_ERROR_ACTION_ABORT;
 			}
 		}
-			
+
 		g_free (text);
 		g_free (detail);
 		g_free (formatted_source_name);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]