gimp r26425 - in trunk: . app/actions app/core app/pdb tools/pdbgen/pdb



Author: neo
Date: Thu Aug  7 17:19:32 2008
New Revision: 26425
URL: http://svn.gnome.org/viewvc/gimp?rev=26425&view=rev

Log:
2008-08-07  Sven Neumann  <sven gimp org>

	* 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.



Modified:
   trunk/ChangeLog
   trunk/app/actions/edit-commands.c
   trunk/app/actions/layers-commands.c
   trunk/app/core/gimplayer.c
   trunk/app/pdb/layer-cmds.c
   trunk/tools/pdbgen/pdb/layer.pdb

Modified: trunk/app/actions/edit-commands.c
==============================================================================
--- trunk/app/actions/edit-commands.c	(original)
+++ trunk/app/actions/edit-commands.c	Thu Aug  7 17:19:32 2008
@@ -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 @@
 
   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);

Modified: trunk/app/actions/layers-commands.c
==============================================================================
--- trunk/app/actions/layers-commands.c	(original)
+++ trunk/app/actions/layers-commands.c	Thu Aug  7 17:19:32 2008
@@ -348,7 +348,7 @@
 
   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);

Modified: trunk/app/core/gimplayer.c
==============================================================================
--- trunk/app/core/gimplayer.c	(original)
+++ trunk/app/core/gimplayer.c	Thu Aug  7 17:19:32 2008
@@ -1003,12 +1003,12 @@
 
 /**
  * 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_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_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

Modified: trunk/app/pdb/layer-cmds.c
==============================================================================
--- trunk/app/pdb/layer-cmds.c	(original)
+++ trunk/app/pdb/layer-cmds.c	Thu Aug  7 17:19:32 2008
@@ -114,7 +114,7 @@
 
       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);
     }

Modified: trunk/tools/pdbgen/pdb/layer.pdb
==============================================================================
--- trunk/tools/pdbgen/pdb/layer.pdb	(original)
+++ trunk/tools/pdbgen/pdb/layer.pdb	Thu Aug  7 17:19:32 2008
@@ -99,7 +99,7 @@
 
   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);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]