[gimp] app, devel-docs: bumping the XCF version to 17.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app, devel-docs: bumping the XCF version to 17.
- Date: Tue, 15 Feb 2022 21:08:36 +0000 (UTC)
commit aa3808addfe05bf34cad23309badc87912abd93d
Author: Jehan <jehan girinstud io>
Date: Tue Feb 15 21:58:47 2022 +0100
app, devel-docs: bumping the XCF version to 17.
XCF 17 includes the new visibility locks and the ability to add position
and alpha locks on layer groups.
I am going to push the various commits implementing these different
features together which is why we gather them as a single XCF version.
app/core/gimpimage.c | 44 ++++++++++++++++++++++++++++++++++-----
app/xcf/xcf.c | 3 ++-
devel-docs/specifications/xcf.txt | 11 ++++++++++
3 files changed, 52 insertions(+), 6 deletions(-)
---
diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c
index 487391bb98..a9126ab31f 100644
--- a/app/core/gimpimage.c
+++ b/app/core/gimpimage.c
@@ -2697,7 +2697,7 @@ gimp_image_get_xcf_version (GimpImage *image,
const gchar **version_string,
gchar **version_reason)
{
- GList *layers;
+ GList *items;
GList *list;
GList *reasons = NULL;
gint version = 0; /* default to oldest */
@@ -2715,9 +2715,8 @@ gimp_image_get_xcf_version (GimpImage *image,
if (gimp_image_get_colormap (image))
version = 1;
- layers = gimp_image_get_layer_list (image);
-
- for (list = layers; list; list = g_list_next (list))
+ items = gimp_image_get_layer_list (image);
+ for (list = items; list; list = g_list_next (list))
{
GimpLayer *layer = GIMP_LAYER (list->data);
@@ -2836,10 +2835,44 @@ gimp_image_get_xcf_version (GimpImage *image,
"added in %s"), "GIMP 2.10"));
version = MAX (13, version);
}
+
+ if (gimp_item_get_lock_position (GIMP_ITEM (layer)))
+ {
+ ADD_REASON (g_strdup_printf (_("Position locks on layer groups were added in %s"),
+ "GIMP 3.0"));
+ version = MAX (17, version);
+ }
+
+ if (gimp_layer_get_lock_alpha (layer))
+ {
+ ADD_REASON (g_strdup_printf (_("Alpha channel locks on layer groups were added in %s"),
+ "GIMP 3.0"));
+ version = MAX (17, version);
+ }
+ }
+
+ if (gimp_item_get_lock_visibility (GIMP_ITEM (layer)))
+ {
+ ADD_REASON (g_strdup_printf (_("Visibility locks were added in %s"),
+ "GIMP 3.0"));
+ version = MAX (17, version);
}
}
+ g_list_free (items);
- g_list_free (layers);
+ items = gimp_image_get_channel_list (image);
+ for (list = items; list; list = g_list_next (list))
+ {
+ GimpChannel *channel = GIMP_CHANNEL (list->data);
+
+ if (gimp_item_get_lock_visibility (GIMP_ITEM (channel)))
+ {
+ ADD_REASON (g_strdup_printf (_("Visibility locks were added in %s"),
+ "GIMP 3.0"));
+ version = MAX (17, version);
+ }
+ }
+ g_list_free (items);
/* version 6 for new metadata has been dropped since they are
* saved through parasites, which is compatible with older versions.
@@ -2960,6 +2993,7 @@ gimp_image_get_xcf_version (GimpImage *image,
case 14:
case 15:
case 16:
+ case 17:
if (gimp_version) *gimp_version = 300;
if (version_string) *version_string = "GIMP 3.0";
break;
diff --git a/app/xcf/xcf.c b/app/xcf/xcf.c
index 3db206c6f4..5509e54a8a 100644
--- a/app/xcf/xcf.c
+++ b/app/xcf/xcf.c
@@ -84,7 +84,8 @@ static GimpXcfLoaderFunc * const xcf_loaders[] =
xcf_load_image, /* version 13 */
xcf_load_image, /* version 14 */
xcf_load_image, /* version 15 */
- xcf_load_image /* version 16 */
+ xcf_load_image, /* version 16 */
+ xcf_load_image, /* version 17 */
};
diff --git a/devel-docs/specifications/xcf.txt b/devel-docs/specifications/xcf.txt
index 9b17f92739..4900bc7c7d 100644
--- a/devel-docs/specifications/xcf.txt
+++ b/devel-docs/specifications/xcf.txt
@@ -194,6 +194,11 @@ Since GIMP 3.0.0, released on TODO.
- New PROP_ITEM_SET and PROP_ITEM_SET_ITEM to store sets of layers,
channels or paths.
+Version 17:
+Since GIMP 3.0.0, released on TODO.
+- New PROP_LOCK_VISIBILITY on layers and channels.
+- PROP_LOCK_POSITION and PROP_LOCK_ALPHA can now be set on layer groups.
+
1. BASIC CONCEPTS
=================
@@ -670,6 +675,9 @@ PROP_LOCK_POSITION (since GIMP 2.10.0, commit d4933b30526, editing state)
PROP_LOCK_POSITION specifies whether the layer, channel or path's
position is locked, i.e. cannot be transformed (translation, etc.).
+ Up to XCF 16, this could not be set on layer groups. It is possible
+ since XCF 17.
+
PROP_LOCK_VISIBILITY (since version 3, editing state)
uint32 42 Type identification
uint32 4 Four bytes of payload
@@ -1374,6 +1382,9 @@ PROP_LOCK_ALPHA (editing state)
PROP_LOCK_ALPHA prevents all drawing tools in GIMP from increasing the alpha
of any pixel in the layer. Decreasing the alpha is possible.
+ Up to XCF 16, this could not be set on layer groups. It is possible
+ since XCF 17.
+
PROP_MODE (essential)
uint32 7 Type identification
uint32 4 Four bytes of payload
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]