b381e86
--- nautilus-2.16.2/libnautilus-private/nautilus-icon-container.c.icons	2006-11-07 10:22:42.000000000 +0100
b381e86
+++ nautilus-2.16.2/libnautilus-private/nautilus-icon-container.c	2006-11-08 11:23:30.000000000 +0100
b381e86
@@ -287,8 +287,6 @@
b381e86
 	int x1, y1, x2, y2;
b381e86
 	int container_x, container_y, container_width, container_height;
b381e86
 
b381e86
-	icon->has_lazy_position = FALSE;
b381e86
-
b381e86
 	if (icon->x == x && icon->y == y) {
b381e86
 		return;
b381e86
 	}
b381e86
@@ -349,7 +347,7 @@
b381e86
 	if (icon->y == ICON_UNPOSITIONED_VALUE) {
b381e86
 		icon->y = 0;
b381e86
 	}
b381e86
-
b381e86
+	
b381e86
 	eel_canvas_item_move (EEL_CANVAS_ITEM (icon->item),
b381e86
 				x - icon->x,
b381e86
 				y - icon->y);
b381e86
@@ -5735,13 +5733,9 @@
b381e86
 	new_icons = g_list_reverse (new_icons);
b381e86
 	no_position_icons = semi_position_icons = NULL;
b381e86
 	for (p = new_icons; p != NULL; p = p->next) {
b381e86
-		gboolean has_lazy_position;
b381e86
-
b381e86
 		icon = p->data;
b381e86
-		has_lazy_position = icon->has_lazy_position;
b381e86
-
b381e86
                 if (assign_icon_position (container, icon)) {
b381e86
-			if (!container->details->is_reloading && !container->details->auto_layout && has_lazy_position) {
b381e86
+                        if (!container->details->auto_layout && icon->has_lazy_position) {
b381e86
                                 semi_position_icons = g_list_prepend (semi_position_icons, icon);
b381e86
                         }
b381e86
                 } else {
b381e86
@@ -5774,7 +5768,6 @@
b381e86
 		for (p = semi_position_icons; p != NULL; p = p->next) {
b381e86
 			NautilusIcon *icon;
b381e86
 			int x, y;
b381e86
-			NautilusIconPosition position;
b381e86
 
b381e86
 			icon = p->data;
b381e86
 			x = icon->x;
b381e86
@@ -5787,10 +5780,9 @@
b381e86
 
b381e86
 			placement_grid_mark_icon (grid, icon);
b381e86
 
b381e86
-			position.x = icon->x;
b381e86
-			position.y = icon->y;
b381e86
-			g_signal_emit (container, signals[ICON_POSITION_CHANGED], 0,
b381e86
-				       icon->data, &position);
b381e86
+			/* ensure that next time we run this code, the formerly semi-positioned
b381e86
+			 * icons are treated as being positioned. */
b381e86
+			icon->has_lazy_position = FALSE;
b381e86
 		}
b381e86
 
b381e86
 		placement_grid_free (grid);
b381e86
@@ -6690,15 +6682,6 @@
b381e86
 	}
b381e86
 }
b381e86
 
b381e86
-void
b381e86
-nautilus_icon_container_set_is_reloading (NautilusIconContainer *container,
b381e86
-					  gboolean               is_reloading)
b381e86
-{
b381e86
-	g_return_if_fail (NAUTILUS_IS_ICON_CONTAINER (container));
b381e86
-
b381e86
-	container->details->is_reloading = is_reloading;
b381e86
-}
b381e86
-
b381e86
 gboolean
b381e86
 nautilus_icon_container_is_auto_layout (NautilusIconContainer *container)
b381e86
 {
b381e86
--- nautilus-2.16.2/src/file-manager/fm-icon-view.c.icons	2006-11-07 10:22:42.000000000 +0100
b381e86
+++ nautilus-2.16.2/src/file-manager/fm-icon-view.c	2006-11-08 11:23:29.000000000 +0100
b381e86
@@ -531,12 +531,22 @@
b381e86
 file_has_lazy_position (FMDirectoryView *view,
b381e86
 			NautilusFile *file)
b381e86
 {
b381e86
+	gboolean lazy_position;
b381e86
+
b381e86
 	/* For volumes (i.e. cdrom icon) we use lazy positioning so that when
b381e86
 	 * an old cdrom gets re-mounted in a place that now has another
b381e86
-	 * icon we don't overlap that one.
b381e86
+	 * icon we don't overlap that one. We don't do this in general though,
b381e86
+	 * as it can cause icons moving around.
b381e86
 	 */
b381e86
+	lazy_position = nautilus_file_has_volume (file);
b381e86
+	if (lazy_position && fm_directory_view_get_loading (view)) {
b381e86
+		/* if volumes are loaded during directory load, don't mark them
b381e86
+		 * as lazy. This is wrong for files that were mounted during user
b381e86
+		 * log-off, but it is right for files that were mounted during login. */
b381e86
+		lazy_position = FALSE;
b381e86
+	}
b381e86
 
b381e86
-	return NAUTILUS_IS_DESKTOP_ICON_FILE (file);
b381e86
+	return lazy_position;
b381e86
 }
b381e86
 
b381e86
 static void
b381e86
@@ -1082,8 +1092,6 @@
b381e86
 	file = fm_directory_view_get_directory_as_file (view);
b381e86
 	icon_container = GTK_WIDGET (get_icon_container (icon_view));
b381e86
 
b381e86
-	nautilus_icon_container_set_is_reloading (NAUTILUS_ICON_CONTAINER (icon_container), TRUE);
b381e86
-
b381e86
 	nautilus_icon_container_set_allow_moves (NAUTILUS_ICON_CONTAINER (icon_container),
b381e86
 						 fm_directory_view_get_allow_moves (view));
b381e86
 
b381e86
@@ -1158,7 +1166,6 @@
b381e86
 	FMIconView *icon_view;
b381e86
 
b381e86
 	icon_view = FM_ICON_VIEW (view);
b381e86
-	nautilus_icon_container_set_is_reloading (get_icon_container (icon_view), FALSE);
b381e86
 }
b381e86
 
b381e86
 static NautilusZoomLevel