Commit 66bc98d2 authored by Hartmut Kuhse's avatar Hartmut Kuhse

Revert "New GimpMetadata as subclass of GExiv2Metadata"

This reverts commit 3ab08c8b.
parent 3ab08c8b
......@@ -853,15 +853,14 @@ gimp_undo_type_get_type (void)
{ GIMP_UNDO_IMAGE_SIZE, "GIMP_UNDO_IMAGE_SIZE", "image-size" },
{ GIMP_UNDO_IMAGE_RESOLUTION, "GIMP_UNDO_IMAGE_RESOLUTION", "image-resolution" },
{ GIMP_UNDO_IMAGE_GRID, "GIMP_UNDO_IMAGE_GRID", "image-grid" },
{ GIMP_UNDO_IMAGE_METADATA, "GIMP_UNDO_IMAGE_METADATA", "image-metadata" },
{ GIMP_UNDO_IMAGE_COLORMAP, "GIMP_UNDO_IMAGE_COLORMAP", "image-colormap" },
{ GIMP_UNDO_IMAGE_COLOR_MANAGED, "GIMP_UNDO_IMAGE_COLOR_MANAGED", "image-color-managed" },
{ GIMP_UNDO_IMAGE_METADATA, "GIMP_UNDO_IMAGE_METADATA", "image-metadata" },
{ GIMP_UNDO_GUIDE, "GIMP_UNDO_GUIDE", "guide" },
{ GIMP_UNDO_SAMPLE_POINT, "GIMP_UNDO_SAMPLE_POINT", "sample-point" },
{ GIMP_UNDO_DRAWABLE, "GIMP_UNDO_DRAWABLE", "drawable" },
{ GIMP_UNDO_DRAWABLE_MOD, "GIMP_UNDO_DRAWABLE_MOD", "drawable-mod" },
{ GIMP_UNDO_MASK, "GIMP_UNDO_MASK", "mask" },
{ GIMP_UNDO_ITEM_METADATA, "GIMP_UNDO_ITEM_METADATA", "item-metadata" },
{ GIMP_UNDO_ITEM_REORDER, "GIMP_UNDO_ITEM_REORDER", "item-reorder" },
{ GIMP_UNDO_ITEM_RENAME, "GIMP_UNDO_ITEM_RENAME", "item-rename" },
{ GIMP_UNDO_ITEM_DISPLACE, "GIMP_UNDO_ITEM_DISPLACE", "item-displace" },
......@@ -947,15 +946,14 @@ gimp_undo_type_get_type (void)
{ GIMP_UNDO_IMAGE_SIZE, NC_("undo-type", "Image size"), NULL },
{ GIMP_UNDO_IMAGE_RESOLUTION, NC_("undo-type", "Image resolution change"), NULL },
{ GIMP_UNDO_IMAGE_GRID, NC_("undo-type", "Grid"), NULL },
{ GIMP_UNDO_IMAGE_METADATA, NC_("undo-type", "Change metadata"), NULL },
{ GIMP_UNDO_IMAGE_COLORMAP, NC_("undo-type", "Change indexed palette"), NULL },
{ GIMP_UNDO_IMAGE_COLOR_MANAGED, NC_("undo-type", "Change color managed state"), NULL },
{ GIMP_UNDO_IMAGE_METADATA, "GIMP_UNDO_IMAGE_METADATA", NULL },
{ GIMP_UNDO_GUIDE, NC_("undo-type", "Guide"), NULL },
{ GIMP_UNDO_SAMPLE_POINT, NC_("undo-type", "Sample Point"), NULL },
{ GIMP_UNDO_DRAWABLE, NC_("undo-type", "Layer/Channel"), NULL },
{ GIMP_UNDO_DRAWABLE_MOD, NC_("undo-type", "Layer/Channel modification"), NULL },
{ GIMP_UNDO_MASK, NC_("undo-type", "Selection mask"), NULL },
{ GIMP_UNDO_ITEM_METADATA, "GIMP_UNDO_ITEM_METADATA", NULL },
{ GIMP_UNDO_ITEM_REORDER, NC_("undo-type", "Reorder item"), NULL },
{ GIMP_UNDO_ITEM_RENAME, NC_("undo-type", "Rename item"), NULL },
{ GIMP_UNDO_ITEM_DISPLACE, NC_("undo-type", "Move item"), NULL },
......
......@@ -425,15 +425,14 @@ typedef enum /*< pdb-skip >*/
GIMP_UNDO_IMAGE_SIZE, /*< desc="Image size" >*/
GIMP_UNDO_IMAGE_RESOLUTION, /*< desc="Image resolution change" >*/
GIMP_UNDO_IMAGE_GRID, /*< desc="Grid" >*/
GIMP_UNDO_IMAGE_METADATA, /*< desc="Change metadata" >*/
GIMP_UNDO_IMAGE_COLORMAP, /*< desc="Change indexed palette" >*/
GIMP_UNDO_IMAGE_COLOR_MANAGED, /*< desc="Change color managed state" >*/
GIMP_UNDO_IMAGE_METADATA, /*< desc="Change metadata >*/
GIMP_UNDO_GUIDE, /*< desc="Guide" >*/
GIMP_UNDO_SAMPLE_POINT, /*< desc="Sample Point" >*/
GIMP_UNDO_DRAWABLE, /*< desc="Layer/Channel" >*/
GIMP_UNDO_DRAWABLE_MOD, /*< desc="Layer/Channel modification" >*/
GIMP_UNDO_MASK, /*< desc="Selection mask" >*/
GIMP_UNDO_ITEM_METADATA, /*< desc="Change metadata >*/
GIMP_UNDO_ITEM_REORDER, /*< desc="Reorder item" >*/
GIMP_UNDO_ITEM_RENAME, /*< desc="Rename item" >*/
GIMP_UNDO_ITEM_DISPLACE, /*< desc="Move item" >*/
......
......@@ -157,7 +157,6 @@ typedef struct _GimpGroupLayer GimpGroupLayer;
typedef struct _GimpUndo GimpUndo;
typedef struct _GimpUndoStack GimpUndoStack;
typedef struct _GimpUndoAccumulator GimpUndoAccumulator;
typedef struct _GimpViewableUndo GimpViewableUndo;
/* Symmetry transformations */
......
......@@ -38,8 +38,6 @@
#include "plug-in/gimppluginmanager.h"
#include "plug-in/gimppluginmanager-restore.h"
#include "gui/gimpdbusservice-generated.h"
#include "paint/gimp-paint.h"
#include "text/gimp-fonts.h"
......
......@@ -40,9 +40,7 @@
#include "gimpgrouplayer.h"
#include "gimpimage.h"
#include "gimpimage-merge.h"
#include "gimpimage-metadata.h"
#include "gimpimage-undo.h"
#include "gimpitem.h"
#include "gimpitemstack.h"
#include "gimplayer-floating-selection.h"
#include "gimplayer-new.h"
......@@ -430,7 +428,6 @@ gimp_image_merge_layers (GimpImage *image,
GimpLayer *layer;
GimpLayer *bottom_layer;
GimpParasiteList *parasites;
GimpMetadata *metadata;
gint count;
gint x1, y1, x2, y2;
gint off_x, off_y;
......@@ -525,8 +522,8 @@ gimp_image_merge_layers (GimpImage *image,
(gimp_drawable_is_indexed (GIMP_DRAWABLE (layer)) &&
! gimp_drawable_has_alpha (GIMP_DRAWABLE (layer))))
{
GeglColor *color;
GimpRGB bg;
GeglColor *color;
GimpRGB bg;
merge_layer = gimp_layer_new (image, (x2 - x1), (y2 - y1),
gimp_image_get_layer_format (image, FALSE),
......@@ -588,22 +585,6 @@ gimp_image_merge_layers (GimpImage *image,
bottom_layer = layer;
/* Copy the metadata of the bottom layer to the new layer */
metadata = gimp_item_get_metadata (GIMP_ITEM (bottom_layer));
if (!metadata)
metadata = gimp_image_get_metadata (image);
if (metadata)
{
GimpMetadata *new_metadata;
new_metadata = gimp_metadata_duplicate (metadata);
gimp_item_set_metadata (GIMP_ITEM (merge_layer), new_metadata, TRUE);
g_object_unref (new_metadata);
}
/* Copy the tattoo and parasites of the bottom layer to the new layer */
gimp_item_set_tattoo (GIMP_ITEM (merge_layer),
gimp_item_get_tattoo (GIMP_ITEM (bottom_layer)));
......
......@@ -49,7 +49,6 @@
#include "gimpsamplepoint.h"
#include "gimpsamplepointundo.h"
#include "gimpselection.h"
#include "gimpviewable.h"
#include "text/gimptextlayer.h"
#include "text/gimptextundo.h"
......@@ -173,21 +172,6 @@ gimp_image_undo_push_image_metadata (GimpImage *image,
NULL);
}
GimpUndo *
gimp_image_undo_push_item_metadata (GimpImage *image,
const gchar *undo_desc,
GimpItem *item)
{
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
return gimp_image_undo_push (image, GIMP_TYPE_ITEM_UNDO,
GIMP_UNDO_ITEM_METADATA, undo_desc,
GIMP_DIRTY_IMAGE_META,
"item", item,
NULL);
}
GimpUndo *
gimp_image_undo_push_image_parasite (GimpImage *image,
const gchar *undo_desc,
......
......@@ -118,9 +118,6 @@ GimpUndo * gimp_image_undo_push_item_parasite_remove(GimpImage *image,
const gchar *undo_desc,
GimpItem *item,
const gchar *name);
GimpUndo * gimp_image_undo_push_item_metadata (GimpImage *image,
const gchar *undo_desc,
GimpItem *item);
/* layer undos */
......@@ -237,4 +234,5 @@ GimpUndo * gimp_image_undo_push_fs_to_layer (GimpImage *image,
GimpUndo * gimp_image_undo_push_cantundo (GimpImage *image,
const gchar *undo_desc);
#endif /* __GIMP_IMAGE_UNDO_PUSH_H__ */
......@@ -99,7 +99,6 @@ struct _GimpItemPrivate
GimpColorTag color_tag; /* color tag */
GList *offset_nodes; /* offset nodes to manage */
GimpMetadata *metadata /* items metadata */
};
#define GET_PRIVATE(item) G_TYPE_INSTANCE_GET_PRIVATE (item, \
......@@ -332,7 +331,6 @@ gimp_item_init (GimpItem *item)
g_object_force_floating (G_OBJECT (item));
private->parasites = gimp_parasite_list_new ();
private->metadata = NULL;
}
static void
......@@ -2422,41 +2420,3 @@ gimp_item_is_in_set (GimpItem *item,
return FALSE;
}
void
gimp_item_set_metadata (GimpItem *item,
GimpMetadata *metadata,
gboolean push_undo)
{
GimpItemPrivate *private;
g_return_val_if_fail (GIMP_IS_ITEM (item), NULL);
private = GET_PRIVATE (item);
if (metadata != private->metadata)
{
if (push_undo)
gimp_image_undo_push_item_metadata (gimp_item_get_image (item),
NULL,
item);
if (private->metadata)
g_object_unref (private->metadata);
private->metadata = metadata;
g_object_ref (private->metadata);
}
}
GimpMetadata *
gimp_item_get_metadata (GimpItem *item)
{
GimpItemPrivate *private;
g_return_val_if_fail (GIMP_IS_ITEM (item), NULL);
private = GET_PRIVATE (item);
return private->metadata;
}
......@@ -364,9 +364,5 @@ gboolean gimp_item_mask_intersect (GimpItem *item,
gboolean gimp_item_is_in_set (GimpItem *item,
GimpItemSet set);
void gimp_item_set_metadata (GimpItem *item,
GimpMetadata *metadata,
gboolean push_undo);
GimpMetadata * gimp_item_get_metadata (GimpItem *item);
#endif /* __GIMP_ITEM_H__ */
......@@ -22,8 +22,6 @@
#include "core-types.h"
#include "libgimpbase/gimpbase.h"
#include "gimpimage.h"
#include "gimpitem.h"
#include "gimpitemundo.h"
......@@ -36,21 +34,18 @@ enum
};
static void gimp_item_undo_constructed (GObject *object);
static void gimp_item_undo_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_item_undo_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_item_undo_constructed (GObject *object);
static void gimp_item_undo_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_item_undo_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_item_undo_free (GimpUndo *undo,
GimpUndoMode undo_mode);
static void gimp_item_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
static void gimp_item_undo_free (GimpUndo *undo,
GimpUndoMode undo_mode);
G_DEFINE_TYPE (GimpItemUndo, gimp_item_undo, GIMP_TYPE_UNDO)
......@@ -68,7 +63,6 @@ gimp_item_undo_class_init (GimpItemUndoClass *klass)
object_class->set_property = gimp_item_undo_set_property;
object_class->get_property = gimp_item_undo_get_property;
undo_class->pop = gimp_item_undo_pop;
undo_class->free = gimp_item_undo_free;
g_object_class_install_property (object_class, PROP_ITEM,
......@@ -90,14 +84,7 @@ gimp_item_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
switch (GIMP_UNDO (object)->undo_type)
{
case GIMP_UNDO_ITEM_METADATA:
item_undo->metadata =
gimp_metadata_duplicate (gimp_item_get_metadata (item_undo->item));
break;
}
g_assert (GIMP_IS_ITEM (item_undo->item));
}
static void
......@@ -152,42 +139,5 @@ gimp_item_undo_free (GimpUndo *undo,
item_undo->item = NULL;
}
if (item_undo->metadata)
{
g_object_unref (item_undo->metadata);
item_undo->metadata = NULL;
}
GIMP_UNDO_CLASS (parent_class)->free (undo, undo_mode);
}
static void
gimp_item_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum)
{
GimpItemUndo *item_undo = GIMP_ITEM_UNDO (undo);
GimpItem *item = GIMP_ITEM_UNDO (undo)->item;
switch (undo->undo_type)
{
case GIMP_UNDO_ITEM_METADATA:
{
GimpMetadata *metadata;
metadata = gimp_metadata_duplicate (gimp_item_get_metadata (item));
gimp_item_set_metadata (item, item_undo->metadata, FALSE);
if (item_undo->metadata)
g_object_unref (item_undo->metadata);
item_undo->metadata = metadata;
}
break;
default:
// g_assert_not_reached ();
break;
}
}
......@@ -38,8 +38,6 @@ struct _GimpItemUndo
GimpUndo parent_instance;
GimpItem *item; /* the item this undo is for */
GimpMetadata *metadata;
};
struct _GimpItemUndoClass
......
......@@ -743,9 +743,7 @@ static GimpItem *
gimp_layer_duplicate (GimpItem *item,
GType new_type)
{
GimpItem *new_item;
GimpMetadata *metadata;
GimpMetadata *new_metadata;
GimpItem *new_item;
g_return_val_if_fail (g_type_is_a (new_type, GIMP_TYPE_DRAWABLE), NULL);
......@@ -776,14 +774,6 @@ gimp_layer_duplicate (GimpItem *item,
new_layer->edit_mask = layer->edit_mask;
new_layer->show_mask = layer->show_mask;
}
metadata = gimp_item_get_metadata (item);
if (metadata)
{
new_metadata = gimp_metadata_duplicate (metadata);
gimp_item_set_metadata (new_item, new_metadata, FALSE);
g_object_unref (new_metadata);
}
}
return new_item;
......
......@@ -28,7 +28,7 @@
#include "internal-procs.h"
/* 804 procedures registered total */
/* 802 procedures registered total */
void
internal_procs_init (GimpPDB *pdb)
......
......@@ -821,67 +821,6 @@ item_set_tattoo_invoker (GimpProcedure *procedure,
error ? *error : NULL);
}
static GimpValueArray *
item_get_metadata_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
GimpItem *item;
gchar *metadata_string = NULL;
item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
if (success)
{
GimpMetadata *metadata = gimp_item_get_metadata (item);
if (metadata)
metadata_string = gimp_metadata_serialize (metadata);
}
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_take_string (gimp_value_array_index (return_vals, 1), metadata_string);
return return_vals;
}
static GimpValueArray *
item_set_metadata_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpItem *item;
const gchar *metadata_string;
item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
metadata_string = g_value_get_string (gimp_value_array_index (args, 1));
if (success)
{
GimpMetadata *metadata = gimp_metadata_deserialize (metadata_string);
gimp_item_set_metadata (item, metadata, TRUE);
if (metadata)
g_object_unref (metadata);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
item_attach_parasite_invoker (GimpProcedure *procedure,
Gimp *gimp,
......@@ -1791,66 +1730,6 @@ register_item_procs (GimpPDB *pdb)
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-item-get-metadata
*/
procedure = gimp_procedure_new (item_get_metadata_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-item-get-metadata");
gimp_procedure_set_static_strings (procedure,
"gimp-item-get-metadata",
"Returns the item's metadata.",
"Returns metadata from the item.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
gimp_param_spec_item_id ("item",
"item",
"The item",
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("metadata-string",
"metadata string",
"The metadata as a xml string",
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-item-set-metadata
*/
procedure = gimp_procedure_new (item_set_metadata_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-item-set-metadata");
gimp_procedure_set_static_strings (procedure,
"gimp-item-set-metadata",
"Set the item's metadata.",
"Sets metadata on the item.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
gimp_param_spec_item_id ("item",
"item",
"The item",
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("metadata-string",
"metadata string",
"The metadata as a xml string",
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-item-attach-parasite
*/
......
......@@ -48,7 +48,6 @@
#include "core/gimpimage-undo.h"
#include "core/gimpitemstack.h"
#include "core/gimplayer-floating-selection.h"
#include "core/gimpitem.h"
#include "core/gimplayer-new.h"
#include "core/gimplayermask.h"
#include "core/gimpparasitelist.h"
......@@ -269,31 +268,6 @@ xcf_load_image (Gimp *gimp,
gimp_parasite_list_remove (private->parasites,
gimp_parasite_name (parasite));
}
else
{
/* check for an attributes parasite */
parasite = gimp_image_parasite_find (GIMP_IMAGE (image),
"gimp-image-attributes");
if (parasite)
{
GimpImagePrivate *private = GIMP_IMAGE_GET_PRIVATE (image);
GimpMetadata *metadata;
const gchar *attributes_string;
attributes_string = (gchar *) gimp_parasite_data (parasite);
metadata = gimp_metadata_deserialize (attributes_string);
if (metadata)
{
gimp_image_set_metadata (image, metadata, FALSE);
g_object_unref (metadata);
}
gimp_parasite_list_remove (private->parasites,
gimp_parasite_name (parasite));
}
}
/* migrate the old "exif-data" parasite */
parasite = gimp_image_parasite_find (GIMP_IMAGE (image),
......@@ -310,10 +284,13 @@ xcf_load_image (Gimp *gimp,
}
else
{
GimpMetadata *metadata = NULL;
GError *my_error = NULL;
GimpMetadata *metadata = gimp_image_get_metadata (image);
GError *my_error = NULL;
metadata = gimp_metadata_new ();
if (metadata)
g_object_ref (metadata);
else
metadata = gimp_metadata_new ();
if (! gimp_metadata_set_from_exif (metadata,
gimp_parasite_data (parasite),
......@@ -364,10 +341,13 @@ xcf_load_image (Gimp *gimp,
}
else
{
GimpMetadata *metadata = NULL;
GError *my_error = NULL;
GimpMetadata *metadata = gimp_image_get_metadata (image);
GError *my_error = NULL;
metadata = gimp_metadata_new ();
if (metadata)
g_object_ref (metadata);
else
metadata = gimp_metadata_new ();
if (! gimp_metadata_set_from_xmp (metadata,
(const guint8 *) xmp_data + 10,
......@@ -1463,26 +1443,25 @@ xcf_load_layer (XcfInfo *info,
GimpImage *image,
GList **item_path)
{
GimpLayer *layer;
GimpLayerMask *layer_mask;
const GimpParasite *parasite;
guint32 hierarchy_offset;
guint32 layer_mask_offset;
gboolean apply_mask = TRUE;
gboolean edit_mask = FALSE;
gboolean show_mask = FALSE;
gboolean active;
gboolean floating;
guint32 group_layer_flags = 0;
guint32 text_layer_flags = 0;
gint width;
gint height;
gint type;
GimpImageBaseType base_type;
gboolean has_alpha;
const Babl *format;
gboolean is_fs_drawable;
gchar *name;
GimpLayer *layer;
GimpLayerMask *layer_mask;
guint32 hierarchy_offset;
guint32 layer_mask_offset;
gboolean apply_mask = TRUE;
gboolean edit_mask = FALSE;
gboolean show_mask = FALSE;
gboolean active;
gboolean floating;
guint32 group_layer_flags = 0;
guint32 text_layer_flags = 0;
gint width;
gint height;
gint type;
GimpImageBaseType base_type;
gboolean has_alpha;
const Babl *format;
gboolean is_fs_drawable;
gchar *name;
/* check and see if this is the drawable the floating selection
* is attached to. if it is then we'll do the attachment in our caller.
......@@ -1559,29 +1538,6 @@ xcf_load_layer (XcfInfo *info,
GIMP_LOG (XCF, "layer props loaded");
parasite = gimp_item_parasite_find (GIMP_ITEM (layer),
"gimp-item-metadata");
if (parasite)
{
GimpMetadata *metadata;
const gchar *metadata_string;
metadata_string = (gchar *) gimp_parasite_data (parasite);
metadata = gimp_metadata_deserialize (metadata_string);
if (metadata)
{
gimp_item_set_metadata (GIMP_ITEM (layer), metadata, FALSE);
g_object_unref (metadata);
}
gimp_item_parasite_detach (GIMP_ITEM (layer),
"gimp-item-metadata",
FALSE);
}
GIMP_LOG (XCF, "layer metadata loaded");
xcf_progress_update (info);
/* call the evil text layer hack that might change our layer pointer */
......@@ -1671,14 +1627,13 @@ static GimpChannel *
xcf_load_channel (XcfInfo *info,
GimpImage *image)
{
GimpChannel *channel;
const GimpParasite *parasite;
guint32 hierarchy_offset;
gint width;
gint height;
gboolean is_fs_drawable;
gchar *name;
GimpRGB color = { 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE };
GimpChannel *channel;
guint32 hierarchy_offset;
gint width;
gint height;
gboolean is_fs_drawable;
gchar *name;
GimpRGB color = { 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE };
/* check and see if this is the drawable the floating selection
* is attached to. if it is then we'll do the attachment in our caller.
......@@ -1703,27 +1658,6 @@ xcf_load_channel (XcfInfo *info,
if (!xcf_load_channel_props (info, image, &channel))
goto error;
parasite = gimp_item_parasite_find (GIMP_ITEM (channel),
"gimp-item-metadata");
if (parasite)
{
GimpMetadata *metadata;
const gchar *metadata_string;
metadata_string = (gchar *) gimp_parasite_data (parasite);
metadata = gimp_metadata_deserialize (metadata_string);
if (metadata)
{
gimp_item_set_metadata (GIMP_ITEM (channel), metadata, FALSE);
g_object_unref (metadata);
}
gimp_item_parasite_detach (GIMP_ITEM (channel),
"gimp-item-metadata",
FALSE);
}
xcf_progress_update (info);