add new functions gimp_image_get_layer_by_index(), _channel_by_index() and

2008-10-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch]: add new functions
	gimp_image_get_layer_by_index(), _channel_by_index() and
	_vectors_by_index().

	* app/core/gimpprojection-construct.c
	* app/display/gimpdisplayshell-layer-select.c
	* app/xcf/xcf-load.c: use them instead of looking the items up
	in image->container and casting the return value.


svn path=/trunk/; revision=27206
This commit is contained in:
Michael Natterer
2008-10-10 11:45:00 +00:00
committed by Michael Natterer
parent f2a6b781e4
commit dba9e0c5e8
6 changed files with 56 additions and 15 deletions

View File

@ -101,8 +101,7 @@ gimp_projection_construct (GimpProjection *proj,
{
GimpDrawable *layer;
layer = GIMP_DRAWABLE (gimp_container_get_child_by_index (image->layers,
0));
layer = GIMP_DRAWABLE (gimp_image_get_layer_by_index (image, 0));
if (gimp_drawable_has_alpha (layer) &&
(gimp_item_get_visible (GIMP_ITEM (layer))) &&