diff options
author | Gene Z. Ragan <gzr@eazel.com> | 2001-02-07 04:26:08 +0000 |
---|---|---|
committer | Gene Ragan <gzr@src.gnome.org> | 2001-02-07 04:26:08 +0000 |
commit | 16fe668329851f8ab755dbf53316ae862ac535fb (patch) | |
tree | 1846d477e1c173f8ec715027774c9daac9b8104f | |
parent | 2ac3f18b34bc1388ca5c4ce21f4303d3a2171bb8 (diff) | |
download | nautilus-16fe668329851f8ab755dbf53316ae862ac535fb.tar.gz |
Fixed bug 1736, if icons on desktop are offscreen, need to move them
2001-02-06 Gene Z. Ragan <gzr@eazel.com>
Fixed bug 1736, if icons on desktop are offscreen, need to
move them somewhre on screen.
* libnautilus-extensions/nautilus-icon-container.c:
(icon_set_position), (nautilus_icon_container_move_icon):
icon_set_position may modify the x and y location of the
icon. nautilus_icon_container_move_icon should use the
modified position instead of the original x and y postion
when writing the position out into the metafile.
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | libnautilus-extensions/nautilus-icon-container.c | 7 | ||||
-rw-r--r-- | libnautilus-private/nautilus-icon-container.c | 7 |
3 files changed, 18 insertions, 8 deletions
@@ -1,3 +1,15 @@ +2001-02-06 Gene Z. Ragan <gzr@eazel.com> + + Fixed bug 1736, if icons on desktop are offscreen, need to + move them somewhre on screen. + + * libnautilus-extensions/nautilus-icon-container.c: + (icon_set_position), (nautilus_icon_container_move_icon): + icon_set_position may modify the x and y location of the + icon. nautilus_icon_container_move_icon should use the + modified position instead of the original x and y postion + when writing the position out into the metafile. + 2001-02-06 Andy Hertzfeld <andy@eazel.com> * src/file-manager/fm-properties-window.c: diff --git a/libnautilus-extensions/nautilus-icon-container.c b/libnautilus-extensions/nautilus-icon-container.c index c93fa9f35..c7f32cb87 100644 --- a/libnautilus-extensions/nautilus-icon-container.c +++ b/libnautilus-extensions/nautilus-icon-container.c @@ -220,7 +220,6 @@ icon_set_position (NautilusIcon *icon, if (nautilus_icon_container_get_is_fixed_size (container)) { /* Clip the position of the icon within our desktop bounds */ - left = GTK_WIDGET (container)->allocation.x; top = GTK_WIDGET (container)->allocation.y; right = left + GTK_WIDGET (container)->allocation.width; @@ -241,7 +240,7 @@ icon_set_position (NautilusIcon *icon, } if (y < top) { y = top; - } + } } gnome_canvas_item_move (GNOME_CANVAS_ITEM (icon->item), @@ -1333,8 +1332,8 @@ nautilus_icon_container_move_icon (NautilusIconContainer *container, } if (emit_signal) { - position.x = x; - position.y = y; + position.x = icon->x; + position.y = icon->y; position.scale_x = scale_x; position.scale_y = scale_y; gtk_signal_emit (GTK_OBJECT (container), diff --git a/libnautilus-private/nautilus-icon-container.c b/libnautilus-private/nautilus-icon-container.c index c93fa9f35..c7f32cb87 100644 --- a/libnautilus-private/nautilus-icon-container.c +++ b/libnautilus-private/nautilus-icon-container.c @@ -220,7 +220,6 @@ icon_set_position (NautilusIcon *icon, if (nautilus_icon_container_get_is_fixed_size (container)) { /* Clip the position of the icon within our desktop bounds */ - left = GTK_WIDGET (container)->allocation.x; top = GTK_WIDGET (container)->allocation.y; right = left + GTK_WIDGET (container)->allocation.width; @@ -241,7 +240,7 @@ icon_set_position (NautilusIcon *icon, } if (y < top) { y = top; - } + } } gnome_canvas_item_move (GNOME_CANVAS_ITEM (icon->item), @@ -1333,8 +1332,8 @@ nautilus_icon_container_move_icon (NautilusIconContainer *container, } if (emit_signal) { - position.x = x; - position.y = y; + position.x = icon->x; + position.y = icon->y; position.scale_x = scale_x; position.scale_y = scale_y; gtk_signal_emit (GTK_OBJECT (container), |