app/xcf/xcf-load.c (xcf_load_channel_props) store the channel's "linked"

2003-05-13  Michael Natterer  <mitch@gimp.org>

	* app/xcf/xcf-load.c (xcf_load_channel_props)
	* app/xcf/xcf-save.c (xcf_save_channel_props): store the channel's
	"linked" state in the XCF. Older GIMPs will complain, but still
	load the file as if the new property was not there.
This commit is contained in:
Michael Natterer 2003-05-13 18:30:15 +00:00 committed by Michael Natterer
parent 0f9124272d
commit 85f5206d59
3 changed files with 22 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2003-05-13 Michael Natterer <mitch@gimp.org>
* app/xcf/xcf-load.c (xcf_load_channel_props)
* app/xcf/xcf-save.c (xcf_save_channel_props): store the channel's
"linked" state in the XCF. Older GIMPs will complain, but still
load the file as if the new property was not there.
2003-05-13 Adam D. Moss <adam@gimp.org>
* plug-ins/common/gif.c

View File

@ -673,7 +673,8 @@ xcf_load_layer_props (XcfInfo *info,
gboolean linked;
info->cp += xcf_read_int32 (info->fp, (guint32 *) &linked, 1);
gimp_item_set_linked (GIMP_ITEM (layer), linked, FALSE);
gimp_item_set_linked (GIMP_ITEM (layer),
linked ? TRUE : FALSE, FALSE);
}
break;
case PROP_PRESERVE_TRANSPARENCY:
@ -785,6 +786,15 @@ xcf_load_channel_props (XcfInfo *info,
visible ? TRUE : FALSE, FALSE);
}
break;
case PROP_LINKED:
{
gboolean linked;
info->cp += xcf_read_int32 (info->fp, (guint32 *) &linked, 1);
gimp_item_set_linked (GIMP_ITEM (channel),
linked ? TRUE : FALSE, FALSE);
}
break;
case PROP_SHOW_MASKED:
info->cp +=
xcf_read_int32 (info->fp, (guint32 *) &channel->show_masked, 1);

View File

@ -439,8 +439,8 @@ xcf_save_layer_props (XcfInfo *info,
layer->opacity));
xcf_check_error (xcf_save_prop (info, gimage, PROP_VISIBLE, error,
gimp_drawable_get_visible (GIMP_DRAWABLE (layer))));
xcf_check_error (xcf_save_prop (info, gimage, PROP_LINKED,
error, GIMP_ITEM (layer)->linked));
xcf_check_error (xcf_save_prop (info, gimage, PROP_LINKED, error,
gimp_item_get_linked (GIMP_ITEM (layer))));
xcf_check_error (xcf_save_prop (info, gimage, PROP_PRESERVE_TRANSPARENCY,
error, layer->preserve_trans));
@ -498,6 +498,8 @@ xcf_save_channel_props (XcfInfo *info,
channel->color.a));
xcf_check_error (xcf_save_prop (info, gimage, PROP_VISIBLE, error,
gimp_drawable_get_visible (GIMP_DRAWABLE (channel))));
xcf_check_error (xcf_save_prop (info, gimage, PROP_LINKED, error,
gimp_item_get_linked (GIMP_ITEM (channel))));
xcf_check_error (xcf_save_prop (info, gimage, PROP_SHOW_MASKED, error,
channel->show_masked));