Commit 4a2aced6 authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson
Browse files

Revert federicos patch from 2006-11-06, as it was causing problems.

2006-11-20  Alexander Larsson  <alexl@redhat.com>

	* libnautilus-private/nautilus-icon-container.c:
	* src/file-manager/fm-icon-view.c:
	Revert federicos patch from 2006-11-06, as it was causing problems.
parent 44f25ad6
2006-11-20 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-icon-container.c:
* src/file-manager/fm-icon-view.c:
Revert federicos patch from 2006-11-06, as it was causing problems.
2006-11-13 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-directory-async.c:
......
......@@ -287,8 +287,6 @@ icon_set_position (NautilusIcon *icon,
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 @@ icon_set_position (NautilusIcon *icon,
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 @@ finish_adding_new_icons (NautilusIconContainer *container)
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 @@ finish_adding_new_icons (NautilusIconContainer *container)
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 @@ finish_adding_new_icons (NautilusIconContainer *container)
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 @@ nautilus_icon_container_sort (NautilusIconContainer *container)
}
}
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)
{
......
......@@ -531,12 +531,22 @@ static gboolean
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 @@ fm_icon_view_begin_loading (FMDirectoryView *view)
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 @@ fm_icon_view_end_loading (FMDirectoryView *view)
FMIconView *icon_view;
icon_view = FM_ICON_VIEW (view);
nautilus_icon_container_set_is_reloading (get_icon_container (icon_view), FALSE);
}
static NautilusZoomLevel
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment