[PATCH] Fixup File Operation Error Dialogs



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

-- 
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	15 May 2005 21:58:29 -0000
@@ -932,36 +932,30 @@
 				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.
-			 */
+		}
+		/* Allow the user to retry, cancel or skip if this is
+		 * not the last file to be copied. If it is the last one,
+		 * just offer retry and cancel.
+		 */
+		else if (progress_info->file_index == progress_info->files_total) {
 			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 +977,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]