File nautilus-66073-update-progress-dialog.diff of Package nautilus

2006-05-08  Federico Mena Quintero  <federico@novell.com>

	* libnautilus-private/nautilus-file-operations.c
	(handle_transfer_ok): Don't special-case the first 0 bytes of the
	file in the case of reporting actual copy/move progress.  It is
	fine to update both the labels and the sizes every time.  Fixes
	http://bugzilla.gnome.org/show_bug.cgi?id=341064
	https://bugzilla.novell.com/show_bug.cgi?id=66073

--- nautilus/libnautilus-private/nautilus-file-operations.c~	2006-04-26 09:30:49.000000000 -0500
+++ nautilus/libnautilus-private/nautilus-file-operations.c	2006-05-08 13:36:08.000000000 -0500
@@ -483,22 +483,17 @@ handle_transfer_ok (const GnomeVFSXferPr
 		/* fall through */
 	case GNOME_VFS_XFER_PHASE_COPYING:
 		if (transfer_info->progress_dialog != NULL) {
-			if (progress_info->bytes_copied == 0) {
-				progress_dialog_set_to_from_item_text
-					(transfer_info->progress_dialog,
-					 transfer_info->progress_verb,
-					 progress_info->source_name,
-					 progress_info->target_name,
-					 progress_info->file_index,
-					 progress_info->file_size);
-			} else {
-				nautilus_file_operations_progress_update_sizes
-					(transfer_info->progress_dialog,
-					 MIN (progress_info->bytes_copied, 
-					      progress_info->bytes_total),
-					 MIN (progress_info->total_bytes_copied,
-					      progress_info->bytes_total));
-			}
+			progress_dialog_set_to_from_item_text (transfer_info->progress_dialog,
+							       transfer_info->progress_verb,
+							       progress_info->source_name,
+							       progress_info->target_name,
+							       progress_info->file_index,
+							       progress_info->file_size);
+			nautilus_file_operations_progress_update_sizes (transfer_info->progress_dialog,
+									MIN (progress_info->bytes_copied, 
+									     progress_info->bytes_total),
+									MIN (progress_info->total_bytes_copied,
+									     progress_info->bytes_total));
 		}
 		return 1;
 
openSUSE Build Service is sponsored by