summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2012-03-16 18:00:16 -0400
committerCosimo Cecchi <cosimoc@gnome.org>2012-03-16 18:00:16 -0400
commit8e43d841355b6cd82af730bc2357f9ac1ed7c638 (patch)
tree51af1719967f996ce68e39e94f6f199a406b31b2
parent0832acdb4371fc7de957303e220e899c8fdcdf5c (diff)
downloadnautilus-8e43d841355b6cd82af730bc2357f9ac1ed7c638.tar.gz
icon-container: avoid using EelDPoint
It's going away.
-rw-r--r--libnautilus-private/nautilus-icon-canvas-item.c25
-rw-r--r--libnautilus-private/nautilus-icon-canvas-item.h3
-rw-r--r--libnautilus-private/nautilus-icon-container.c7
3 files changed, 18 insertions, 17 deletions
diff --git a/libnautilus-private/nautilus-icon-canvas-item.c b/libnautilus-private/nautilus-icon-canvas-item.c
index eee8b3f80..2faff83c6 100644
--- a/libnautilus-private/nautilus-icon-canvas-item.c
+++ b/libnautilus-private/nautilus-icon-canvas-item.c
@@ -583,23 +583,23 @@ recompute_bounding_box (NautilusIconCanvasItem *icon_item,
*/
EelCanvasItem *item;
- EelDPoint top_left, bottom_right;
+ EelDRect bounds_rect;
item = EEL_CANVAS_ITEM (icon_item);
eel_canvas_item_get_bounds (item,
- &top_left.x, &top_left.y,
- &bottom_right.x, &bottom_right.y);
+ &bounds_rect.x0, &bounds_rect.y0,
+ &bounds_rect.x1, &bounds_rect.y1);
- top_left.x += i2w_dx;
- top_left.y += i2w_dy;
- bottom_right.x += i2w_dx;
- bottom_right.y += i2w_dy;
+ bounds_rect.x0 += i2w_dx;
+ bounds_rect.y0 += i2w_dy;
+ bounds_rect.x1 += i2w_dx;
+ bounds_rect.y1 += i2w_dy;
eel_canvas_w2c_d (item->canvas,
- top_left.x, top_left.y,
+ bounds_rect.x0, bounds_rect.y0,
&item->x1, &item->y1);
eel_canvas_w2c_d (item->canvas,
- bottom_right.x, bottom_right.y,
+ bounds_rect.x1, bounds_rect.y1,
&item->x2, &item->y2);
}
@@ -1990,7 +1990,8 @@ hit_test_stretch_handle (NautilusIconCanvasItem *item,
gboolean
nautilus_icon_canvas_item_hit_test_stretch_handles (NautilusIconCanvasItem *item,
- EelDPoint world_point,
+ gdouble world_x,
+ gdouble world_y,
GtkCornerType *corner)
{
EelIRect canvas_rect;
@@ -1998,8 +1999,8 @@ nautilus_icon_canvas_item_hit_test_stretch_handles (NautilusIconCanvasItem *item
g_return_val_if_fail (NAUTILUS_IS_ICON_CANVAS_ITEM (item), FALSE);
eel_canvas_w2c (EEL_CANVAS_ITEM (item)->canvas,
- world_point.x,
- world_point.y,
+ world_x,
+ world_y,
&canvas_rect.x0,
&canvas_rect.y0);
canvas_rect.x1 = canvas_rect.x0 + 1;
diff --git a/libnautilus-private/nautilus-icon-canvas-item.h b/libnautilus-private/nautilus-icon-canvas-item.h
index c6ba6f1e4..4e84983e8 100644
--- a/libnautilus-private/nautilus-icon-canvas-item.h
+++ b/libnautilus-private/nautilus-icon-canvas-item.h
@@ -90,7 +90,8 @@ void nautilus_icon_canvas_item_set_renaming (NautilusIconCanv
gboolean nautilus_icon_canvas_item_hit_test_rectangle (NautilusIconCanvasItem *item,
EelIRect canvas_rect);
gboolean nautilus_icon_canvas_item_hit_test_stretch_handles (NautilusIconCanvasItem *item,
- EelDPoint world_point,
+ gdouble world_x,
+ gdouble world_y,
GtkCornerType *corner);
void nautilus_icon_canvas_item_invalidate_label (NautilusIconCanvasItem *item);
void nautilus_icon_canvas_item_invalidate_label_size (NautilusIconCanvasItem *item);
diff --git a/libnautilus-private/nautilus-icon-container.c b/libnautilus-private/nautilus-icon-container.c
index 781dac7f9..9f99dc8ec 100644
--- a/libnautilus-private/nautilus-icon-container.c
+++ b/libnautilus-private/nautilus-icon-container.c
@@ -4428,7 +4428,6 @@ start_stretching (NautilusIconContainer *container)
{
NautilusIconContainerDetails *details;
NautilusIcon *icon;
- EelDPoint world_point;
GtkWidget *toplevel;
GtkCornerType corner;
GdkCursor *cursor;
@@ -4437,9 +4436,9 @@ start_stretching (NautilusIconContainer *container)
icon = details->stretch_icon;
/* Check if we hit the stretch handles. */
- world_point.x = details->drag_x;
- world_point.y = details->drag_y;
- if (!nautilus_icon_canvas_item_hit_test_stretch_handles (icon->item, world_point, &corner)) {
+ if (!nautilus_icon_canvas_item_hit_test_stretch_handles (icon->item,
+ details->drag_x, details->drag_y,
+ &corner)) {
return FALSE;
}