Patch to cancel loading of file attributes when moving



The following patch should fix 86152, 87280, and 86165.  I'm pretty sure
it's the right fix, but since the async stuff can be kinda hairy, I'd
like someone to verify it before I commit. 

Thanks,
-dave

-- 
Dave Camp <dave ximian com>
? nautilus-cancel-loading.patch
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/nautilus/ChangeLog,v
retrieving revision 1.5430
diff -u -r1.5430 ChangeLog
--- ChangeLog	11 Jul 2002 08:16:14 -0000	1.5430
+++ ChangeLog	11 Jul 2002 10:11:40 -0000
@@ -1,5 +1,11 @@
 2002-07-11  Dave Camp  <dave ximian com>
 
+	* libnautilus-private/nautilus-directory.c
+	(nautilus_directory_notify_files_moved): Cancel loading of
+	attributes in the old directory before moving to the new directory.
+
+2002-07-11  Dave Camp  <dave ximian com>
+
 	* src/nautilus-location-bar.c: (nautilus_location_bar_init): Added
 	a relation between the label and entry.
 	* src/nautilus-preferences-dialog.c: Changed "file names" to
Index: libnautilus-private/nautilus-directory.c
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-directory.c,v
retrieving revision 1.237
diff -u -r1.237 nautilus-directory.c
--- libnautilus-private/nautilus-directory.c	28 Jun 2002 14:28:27 -0000	1.237
+++ libnautilus-private/nautilus-directory.c	11 Jul 2002 10:11:45 -0000
@@ -1230,7 +1230,8 @@
 	GList *new_files_list, *unref_list;
 	GHashTable *added_lists, *changed_lists;
 	char *name;
-
+	GList *cancel_attributes;
+	
 	/* Make a list of added and changed files in each directory. */
 	new_files_list = NULL;
 	added_lists = g_hash_table_new (NULL, NULL);
@@ -1240,6 +1241,8 @@
 	/* Make a list of parent directories that will need their counts updated. */
 	parent_directories = g_hash_table_new (NULL, NULL);
 
+	cancel_attributes = nautilus_file_get_all_attributes ();
+
 	for (p = uri_pairs; p != NULL; p = p->next) {
 		pair = p->data;
 
@@ -1278,6 +1281,10 @@
 			old_directory = file->details->directory;
 			collect_parent_directories (parent_directories, old_directory);
 
+			/* Cancel loading of attributes in the old directory */
+			nautilus_directory_cancel_loading_file_attributes
+				(old_directory, file, cancel_attributes);
+
 			/* Locate the new directory. */
 			new_directory = get_parent_directory (pair->to_uri);
 			collect_parent_directories (parent_directories, new_directory);
@@ -1326,6 +1333,8 @@
 	/* Separate handling for brand new file objects. */
 	nautilus_directory_notify_files_added (new_files_list);
 	g_list_free (new_files_list);
+
+	g_list_free (cancel_attributes);
 }
 
 void 


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