[PATCH] add file to work queue when recomputing deep count

nautilus_file_recompute_deep_counts didn't add the file to the work
queue of the enclosing directory. This caused the deep count to not be
reconsidered when it's deep count status was set to DONE before.

Scenario where this was relevant:

create two folders with a different number of items inside. Select one,
show properties. Close the window and select both, displaying their
properties. Now only the deep count of the file which was not previously
selected will be displayed, and no I/O is done for the previously
selected one.

I'm not sure why in the properties window
nautilus_file_recompute_deep_counts is used instead of an
invalidate_attributes call, but I don't want to break anything that late
in the cycle.

Christian Neumair <chris gnome-de org>
Index: libnautilus-private/nautilus-file.c
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-file.c,v
retrieving revision 1.383
diff -u -p -r1.383 nautilus-file.c
--- libnautilus-private/nautilus-file.c	28 Feb 2006 12:38:28 -0000	1.383
+++ libnautilus-private/nautilus-file.c	4 Mar 2006 15:13:54 -0000
@@ -3338,6 +3338,7 @@ nautilus_file_recompute_deep_counts (Nau
 	if (file->details->deep_counts_status != NAUTILUS_REQUEST_IN_PROGRESS) {
 		file->details->deep_counts_status = NAUTILUS_REQUEST_NOT_STARTED;
 		if (file->details->directory != NULL) {
+			nautilus_directory_add_file_to_work_queue (file->details->directory, file);
 			nautilus_directory_async_state_changed (file->details->directory);

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

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