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