[nautilus/antonioffix-menus-and-popovers: 7/7] canvas-container: Drop get_selected_icons_bounding_box API
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/antonioffix-menus-and-popovers: 7/7] canvas-container: Drop get_selected_icons_bounding_box API
- Date: Tue, 30 Jan 2018 09:20:50 +0000 (UTC)
commit 42e86583753d1e4bcb57945fe955b1ad2686ad69
Author: António Fernandes <antoniof gnome org>
Date: Mon Jan 29 22:56:08 2018 +0000
canvas-container: Drop get_selected_icons_bounding_box API
This is not used anymore.
We only need one bounding box, which is provided by the new
nautilus_canvas_container_get_icon_bounding_box().
So remove unused API. We can always revert this if we need it.
src/nautilus-canvas-container.c | 43 -----------------------------------------
src/nautilus-canvas-container.h | 1 -
2 files changed, 44 deletions(-)
---
diff --git a/src/nautilus-canvas-container.c b/src/nautilus-canvas-container.c
index e12ef6d7c..1b91f4f87 100644
--- a/src/nautilus-canvas-container.c
+++ b/src/nautilus-canvas-container.c
@@ -5371,49 +5371,6 @@ nautilus_canvas_container_get_icon_bounding_box (NautilusCanvasContainer *contai
return bounding_box;
}
-/* Returns an array of GdkRectangles of the icons. The bounding box is adjusted
- * with the pixels_per_unit already, so they are the final positions on the canvas */
-static GArray *
-nautilus_canvas_container_get_icons_bounding_box (NautilusCanvasContainer *container,
- GList *icons)
-{
- GArray *result;
- GList *node;
- int index;
- int x1, x2, y1, y2;
-
- result = g_array_new (FALSE, TRUE, sizeof (GdkRectangle));
- result = g_array_set_size (result, g_list_length (icons));
-
- for (index = 0, node = icons; node != NULL; index++, node = node->next)
- {
- icon_get_bounding_box ((NautilusCanvasIcon *) node->data,
- &x1, &y1, &x2, &y2,
- BOUNDS_USAGE_FOR_DISPLAY);
- g_array_index (result, GdkRectangle, index).x = x1 * EEL_CANVAS (container)->pixels_per_unit;
- g_array_index (result, GdkRectangle, index).width = (x2 - x1) * EEL_CANVAS
(container)->pixels_per_unit;
- g_array_index (result, GdkRectangle, index).y = y1 * EEL_CANVAS (container)->pixels_per_unit;
- g_array_index (result, GdkRectangle, index).height = (y2 - y1) * EEL_CANVAS
(container)->pixels_per_unit;
- }
-
- return result;
-}
-
-GArray *
-nautilus_canvas_container_get_selected_icons_bounding_box (NautilusCanvasContainer *container)
-{
- GArray *result;
- GList *icons;
-
- g_return_val_if_fail (NAUTILUS_IS_CANVAS_CONTAINER (container), NULL);
-
- icons = nautilus_canvas_container_get_selected_icons (container);
- result = nautilus_canvas_container_get_icons_bounding_box (container, icons);
- g_list_free (icons);
-
- return result;
-}
-
/**
* nautilus_canvas_container_get_selected_icon_locations:
* @container: An canvas container widget.
diff --git a/src/nautilus-canvas-container.h b/src/nautilus-canvas-container.h
index 9da9fa61f..87f5338ec 100644
--- a/src/nautilus-canvas-container.h
+++ b/src/nautilus-canvas-container.h
@@ -259,7 +259,6 @@ void nautilus_canvas_container_invert_selection
(NautilusCanvasContainer
void nautilus_canvas_container_set_selection (NautilusCanvasContainer *view,
GList *selection);
GArray * nautilus_canvas_container_get_selected_icon_locations (NautilusCanvasContainer *view);
-GArray * nautilus_canvas_container_get_selected_icons_bounding_box (NautilusCanvasContainer
*container);
/* options */
NautilusCanvasZoomLevel nautilus_canvas_container_get_zoom_level (NautilusCanvasContainer
*view);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]