diff --git a/ChangeLog b/ChangeLog index 0f8d611620..720fbe0373 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-05-13 Michael Natterer + + * 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 * plug-ins/common/gif.c diff --git a/app/xcf/xcf-load.c b/app/xcf/xcf-load.c index ebfbe4e036..3437770221 100644 --- a/app/xcf/xcf-load.c +++ b/app/xcf/xcf-load.c @@ -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); diff --git a/app/xcf/xcf-save.c b/app/xcf/xcf-save.c index c1de6519c9..99461ce403 100644 --- a/app/xcf/xcf-save.c +++ b/app/xcf/xcf-save.c @@ -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));