diff --git a/ChangeLog b/ChangeLog index 09d531348e..c6d9ec3b45 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-08-07 Sven Neumann + + * app/core/gimplayer.c + * app/actions/edit-commands.c + * app/actions/layers-commands.c + * tools/pdbgen/pdb/layer.pdb: corrected the GimpImageType passed + to gimp_layer_new_from_tiles(). + + * app/pdb/layer-cmds.c: regenerated. + 2008-08-07 Sven Neumann * app/actions/edit-commands.[ch] diff --git a/app/actions/edit-commands.c b/app/actions/edit-commands.c index f7393306b7..193d12a944 100644 --- a/app/actions/edit-commands.c +++ b/app/actions/edit-commands.c @@ -32,9 +32,9 @@ #include "core/gimpbuffer.h" #include "core/gimpcontainer.h" #include "core/gimpdrawable.h" +#include "core/gimplayer.h" #include "core/gimpimage.h" #include "core/gimpimage-undo.h" -#include "core/gimpprojection.h" #include "vectors/gimpvectors-import.h" @@ -330,12 +330,11 @@ edit_paste_as_new_layer_cmd_callback (GtkAction *action, if (buffer) { - GimpProjection *projection = gimp_image_get_projection (image); - GimpImage *layer; + GimpLayer *layer; - layer = gimp_layer_new_from_tiles (gimp_projection_get_tiles (projection), + layer = gimp_layer_new_from_tiles (buffer->tiles, image, - gimp_projection_get_image_type (projection), + gimp_image_base_type_with_alpha (image), _("Clibboard"), GIMP_OPACITY_OPAQUE, GIMP_NORMAL_MODE); g_object_unref (buffer); diff --git a/app/actions/layers-commands.c b/app/actions/layers-commands.c index 8f9170c4ff..92936ca3e5 100644 --- a/app/actions/layers-commands.c +++ b/app/actions/layers-commands.c @@ -348,7 +348,7 @@ layers_new_from_visible_cmd_callback (GtkAction *action, layer = gimp_layer_new_from_tiles (gimp_projection_get_tiles (projection), image, - gimp_projection_get_image_type (projection), + gimp_image_base_type_with_alpha (image), _("Visible"), GIMP_OPACITY_OPAQUE, GIMP_NORMAL_MODE); gimp_image_add_layer (image, layer, -1); diff --git a/app/core/gimplayer.c b/app/core/gimplayer.c index 4f4264ab4e..458fb7d6b4 100644 --- a/app/core/gimplayer.c +++ b/app/core/gimplayer.c @@ -1003,12 +1003,12 @@ gimp_layer_new (GimpImage *image, /** * gimp_layer_new_from_tiles: - * @tiles: The buffer to make the new layer from. + * @tiles: The buffer to make the new layer from. * @dest_image: The image the new layer will be added to. - * @type: The #GimpImageType of the new layer. - * @name: The new layer's name. - * @opacity: The new layer's opacity. - * @mode: The new layer's mode. + * @type: The #GimpImageType of the new layer. + * @name: The new layer's name. + * @opacity: The new layer's opacity. + * @mode: The new layer's mode. * * Copies %tiles to a layer taking into consideration the * possibility of transforming the contents to meet the requirements @@ -1042,12 +1042,12 @@ gimp_layer_new_from_tiles (TileManager *tiles, /** * gimp_layer_new_from_pixbuf: - * @pixbuf: The pixbuf to make the new layer from. + * @pixbuf: The pixbuf to make the new layer from. * @dest_image: The image the new layer will be added to. - * @type: The #GimpImageType of the new layer. - * @name: The new layer's name. - * @opacity: The new layer's opacity. - * @mode: The new layer's mode. + * @type: The #GimpImageType of the new layer. + * @name: The new layer's name. + * @opacity: The new layer's opacity. + * @mode: The new layer's mode. * * Copies %pixbuf to a layer taking into consideration the * possibility of transforming the contents to meet the requirements @@ -1082,12 +1082,12 @@ gimp_layer_new_from_pixbuf (GdkPixbuf *pixbuf, /** * gimp_layer_new_from_region: - * @region: A readable pixel region. + * @region: A readable pixel region. * @dest_image: The image the new layer will be added to. - * @type: The #GimpImageType of the new layer. - * @name: The new layer's name. - * @opacity: The new layer's opacity. - * @mode: The new layer's mode. + * @type: The #GimpImageType of the new layer. + * @name: The new layer's name. + * @opacity: The new layer's opacity. + * @mode: The new layer's mode. * * Copies %region to a layer taking into consideration the * possibility of transforming the contents to meet the requirements diff --git a/app/pdb/layer-cmds.c b/app/pdb/layer-cmds.c index 413c586959..1342a0452e 100644 --- a/app/pdb/layer-cmds.c +++ b/app/pdb/layer-cmds.c @@ -114,7 +114,7 @@ layer_new_from_visible_invoker (GimpProcedure *procedure, layer = gimp_layer_new_from_tiles (gimp_projection_get_tiles (projection), dest_image, - gimp_projection_get_image_type (projection), + gimp_image_base_type_with_alpha (dest_image), name, GIMP_OPACITY_OPAQUE, GIMP_NORMAL_MODE); } diff --git a/tools/pdbgen/pdb/layer.pdb b/tools/pdbgen/pdb/layer.pdb index 33c3efa1a6..1608047a3a 100644 --- a/tools/pdbgen/pdb/layer.pdb +++ b/tools/pdbgen/pdb/layer.pdb @@ -99,7 +99,7 @@ HELP layer = gimp_layer_new_from_tiles (gimp_projection_get_tiles (projection), dest_image, - gimp_projection_get_image_type (projection), + gimp_image_base_type_with_alpha (dest_image), name, GIMP_OPACITY_OPAQUE, GIMP_NORMAL_MODE); }