Commit 3cf423f0 authored by Michael Natterer's avatar Michael Natterer 😴

*: rename NORMAL to NORMAL_LEGACY and NORMAL_LINEAR to NORMAL

and make NORMAL_LEGACY immutable.
parent 78836aff
......@@ -373,7 +373,7 @@ layers_new_last_vals_cmd_callback (GtkAction *action,
off_x = 0;
off_y = 0;
opacity = 1.0;
mode = GIMP_LAYER_MODE_NORMAL;
mode = GIMP_LAYER_MODE_NORMAL_LEGACY;
}
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_EDIT_PASTE,
......@@ -419,7 +419,7 @@ layers_new_from_visible_cmd_callback (GtkAction *action,
TRUE),
_("Visible"),
GIMP_OPACITY_OPAQUE,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL_LEGACY,
profile);
gimp_image_add_layer (image, layer, GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
......
......@@ -302,7 +302,7 @@ gimp_dialog_config_class_init (GimpDialogConfigClass *klass)
"Default new layer mode",
LAYER_NEW_MODE_BLURB,
GIMP_TYPE_LAYER_MODE,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL_LEGACY,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_ENUM (object_class, PROP_LAYER_NEW_BLEND_SPACE,
......
......@@ -420,7 +420,7 @@ gimp_edit_paste (GimpImage *image,
floating_format,
_("Pasted Layer"),
GIMP_OPACITY_OPAQUE,
GIMP_LAYER_MODE_NORMAL);
GIMP_LAYER_MODE_NORMAL_LEGACY);
}
if (! layer)
......
......@@ -868,7 +868,7 @@ gimp_create_image_from_buffer (Gimp *gimp,
layer = gimp_layer_new_from_gegl_buffer (buffer, image, format,
image_name,
GIMP_OPACITY_OPAQUE,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL_LEGACY,
NULL /* same image */);
gimp_image_add_layer (image, layer, NULL, -1, FALSE);
......
......@@ -696,7 +696,7 @@ gimp_context_class_init (GimpContextClass *klass)
_("Paint Mode"),
_("Paint Mode"),
GIMP_TYPE_LAYER_MODE,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL_LEGACY,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_OBJECT (object_class, GIMP_CONTEXT_PROP_BRUSH,
......@@ -2589,7 +2589,7 @@ gimp_context_real_set_opacity (GimpContext *context,
GimpLayerMode
gimp_context_get_paint_mode (GimpContext *context)
{
g_return_val_if_fail (GIMP_IS_CONTEXT (context), GIMP_LAYER_MODE_NORMAL);
g_return_val_if_fail (GIMP_IS_CONTEXT (context), GIMP_LAYER_MODE_NORMAL_LEGACY);
return context->paint_mode;
}
......
......@@ -1003,7 +1003,7 @@ gimp_drawable_transform_paste (GimpDrawable *drawable,
gimp_drawable_get_format_with_alpha (drawable),
_("Transformation"),
GIMP_OPACITY_OPAQUE,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL_LEGACY,
buffer_profile);
gimp_item_set_offset (GIMP_ITEM (layer), offset_x, offset_y);
......
......@@ -529,7 +529,7 @@ gimp_image_merge_layers (GimpImage *image,
gimp_image_get_layer_format (image, FALSE),
gimp_object_get_name (layer),
GIMP_OPACITY_OPAQUE,
GIMP_LAYER_MODE_NORMAL);
GIMP_LAYER_MODE_NORMAL_LEGACY);
if (! merge_layer)
{
g_warning ("%s: could not allocate merge layer.", G_STRFUNC);
......@@ -562,7 +562,7 @@ gimp_image_merge_layers (GimpImage *image,
gimp_drawable_get_format_with_alpha (GIMP_DRAWABLE (layer)),
"merged layer",
GIMP_OPACITY_OPAQUE,
GIMP_LAYER_MODE_NORMAL);
GIMP_LAYER_MODE_NORMAL_LEGACY);
if (!merge_layer)
{
......@@ -621,7 +621,7 @@ gimp_image_merge_layers (GimpImage *image,
if (layer == bottom_layer && mode != GIMP_LAYER_MODE_DISSOLVE)
{
mode = GIMP_LAYER_MODE_NORMAL;
mode = GIMP_LAYER_MODE_NORMAL_LEGACY;
blend_space = GIMP_LAYER_COLOR_SPACE_AUTO;
composite_space = GIMP_LAYER_COLOR_SPACE_AUTO;
composite_mode = GIMP_LAYER_COMPOSITE_AUTO;
......
......@@ -149,7 +149,7 @@ gimp_image_new_from_template (Gimp *gimp,
gimp_image_get_layer_format (image, has_alpha),
_("Background"),
GIMP_OPACITY_OPAQUE,
GIMP_LAYER_MODE_NORMAL);
GIMP_LAYER_MODE_NORMAL_LEGACY);
gimp_drawable_fill (GIMP_DRAWABLE (layer),
context, gimp_template_get_fill_type (template));
......@@ -224,7 +224,7 @@ gimp_image_new_from_drawable (Gimp *gimp,
gimp_item_translate (GIMP_ITEM (new_layer), -off_x, -off_y, FALSE);
gimp_item_set_visible (GIMP_ITEM (new_layer), TRUE, FALSE);
gimp_item_set_linked (GIMP_ITEM (new_layer), FALSE, FALSE);
gimp_layer_set_mode (new_layer, GIMP_LAYER_MODE_NORMAL, FALSE);
gimp_layer_set_mode (new_layer, GIMP_LAYER_MODE_NORMAL_LEGACY, FALSE);
gimp_layer_set_opacity (new_layer, GIMP_OPACITY_OPAQUE, FALSE);
if (gimp_layer_can_lock_alpha (new_layer))
gimp_layer_set_lock_alpha (new_layer, FALSE, FALSE);
......@@ -326,7 +326,7 @@ gimp_image_new_from_buffer (Gimp *gimp,
has_alpha),
_("Pasted Layer"),
GIMP_OPACITY_OPAQUE,
GIMP_LAYER_MODE_NORMAL);
GIMP_LAYER_MODE_NORMAL_LEGACY);
gimp_image_add_layer (image, layer, NULL, 0, TRUE);
......@@ -385,7 +385,7 @@ gimp_image_new_from_pixbuf (Gimp *gimp,
has_alpha),
layer_name,
GIMP_OPACITY_OPAQUE,
GIMP_LAYER_MODE_NORMAL);
GIMP_LAYER_MODE_NORMAL_LEGACY);
gimp_image_add_layer (new_image, layer, NULL, 0, TRUE);
......
......@@ -2394,7 +2394,7 @@ gimp_image_get_xcf_version (GimpImage *image,
switch (gimp_layer_get_mode (layer))
{
/* Modes that exist since ancient times */
case GIMP_LAYER_MODE_NORMAL:
case GIMP_LAYER_MODE_NORMAL_LEGACY:
case GIMP_LAYER_MODE_DISSOLVE:
case GIMP_LAYER_MODE_BEHIND_LEGACY:
case GIMP_LAYER_MODE_MULTIPLY_LEGACY:
......@@ -2433,7 +2433,7 @@ gimp_image_get_xcf_version (GimpImage *image,
break;
/* Since 2.10 */
case GIMP_LAYER_MODE_NORMAL_LINEAR:
case GIMP_LAYER_MODE_NORMAL:
case GIMP_LAYER_MODE_BEHIND:
case GIMP_LAYER_MODE_MULTIPLY:
case GIMP_LAYER_MODE_SCREEN:
......
......@@ -402,7 +402,7 @@ gimp_layer_class_init (GimpLayerClass *klass)
g_object_class_install_property (object_class, PROP_MODE,
g_param_spec_enum ("mode", NULL, NULL,
GIMP_TYPE_LAYER_MODE,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL_LEGACY,
GIMP_PARAM_READABLE));
g_object_class_install_property (object_class, PROP_BLEND_SPACE,
......@@ -449,7 +449,7 @@ static void
gimp_layer_init (GimpLayer *layer)
{
layer->opacity = GIMP_OPACITY_OPAQUE;
layer->mode = GIMP_LAYER_MODE_NORMAL;
layer->mode = GIMP_LAYER_MODE_NORMAL_LEGACY;
layer->blend_space = GIMP_LAYER_COLOR_SPACE_AUTO;
layer->composite_space = GIMP_LAYER_COLOR_SPACE_AUTO;
layer->composite_mode = GIMP_LAYER_COMPOSITE_AUTO;
......@@ -589,7 +589,7 @@ gimp_layer_update_mode_node (GimpLayer *layer)
if (layer->mask && layer->show_mask)
{
visible_mode = GIMP_LAYER_MODE_NORMAL;
visible_mode = GIMP_LAYER_MODE_NORMAL_LEGACY;
visible_blend_space = GIMP_LAYER_COLOR_SPACE_AUTO;
visible_composite_space = GIMP_LAYER_COLOR_SPACE_AUTO;
visible_composite_mode = GIMP_LAYER_COMPOSITE_AUTO;
......@@ -599,7 +599,7 @@ gimp_layer_update_mode_node (GimpLayer *layer)
if (layer->mode != GIMP_LAYER_MODE_DISSOLVE &&
gimp_filter_get_is_last_node (GIMP_FILTER (layer)))
{
visible_mode = GIMP_LAYER_MODE_NORMAL;
visible_mode = GIMP_LAYER_MODE_NORMAL_LEGACY;
visible_blend_space = GIMP_LAYER_COLOR_SPACE_AUTO;
visible_composite_space = GIMP_LAYER_COLOR_SPACE_AUTO;
visible_composite_mode = GIMP_LAYER_COMPOSITE_AUTO;
......@@ -2203,7 +2203,7 @@ gimp_layer_set_mode (GimpLayer *layer,
GimpLayerMode
gimp_layer_get_mode (GimpLayer *layer)
{
g_return_val_if_fail (GIMP_IS_LAYER (layer), GIMP_LAYER_MODE_NORMAL);
g_return_val_if_fail (GIMP_IS_LAYER (layer), GIMP_LAYER_MODE_NORMAL_LEGACY);
return layer->mode;
}
......
......@@ -891,7 +891,7 @@ gimp_selection_float (GimpSelection *selection,
gimp_drawable_get_format_with_alpha (drawable),
_("Floated Layer"),
GIMP_OPACITY_OPAQUE,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL_LEGACY,
profile);
/* Set the offsets */
......
......@@ -725,7 +725,7 @@ gimp_display_shell_drop_pixbuf (GtkWidget *widget,
gimp_image_get_layer_format (image, has_alpha),
_("Dropped Buffer"),
GIMP_OPACITY_OPAQUE,
GIMP_LAYER_MODE_NORMAL);
GIMP_LAYER_MODE_NORMAL_LEGACY);
if (new_layer)
{
......
......@@ -58,7 +58,7 @@ static void
gimp_applicator_init (GimpApplicator *applicator)
{
applicator->opacity = 1.0;
applicator->paint_mode = GIMP_LAYER_MODE_NORMAL;
applicator->paint_mode = GIMP_LAYER_MODE_NORMAL_LEGACY;
applicator->blend_space = GIMP_LAYER_COLOR_SPACE_AUTO;
applicator->composite_space = GIMP_LAYER_COLOR_SPACE_AUTO;
applicator->composite_mode = GIMP_LAYER_COMPOSITE_AUTO;
......
......@@ -75,11 +75,13 @@ struct _GimpLayerModeInfo
static const GimpLayerModeInfo layer_mode_infos[] =
{
{ GIMP_LAYER_MODE_NORMAL,
{ GIMP_LAYER_MODE_NORMAL_LEGACY,
.op_name = "gimp:normal",
.function = gimp_operation_normal_process,
.flags = GIMP_LAYER_MODE_FLAG_BLEND_SPACE_IMMUTABLE,
.flags = GIMP_LAYER_MODE_FLAG_BLEND_SPACE_IMMUTABLE |
GIMP_LAYER_MODE_FLAG_COMPOSITE_SPACE_IMMUTABLE |
GIMP_LAYER_MODE_FLAG_COMPOSITE_MODE_IMMUTABLE,
.context = GIMP_LAYER_MODE_CONTEXT_ALL,
.paint_composite_mode = GIMP_LAYER_COMPOSITE_SRC_OVER,
.composite_mode = GIMP_LAYER_COMPOSITE_SRC_OVER,
......@@ -471,11 +473,10 @@ static const GimpLayerModeInfo layer_mode_infos[] =
.blend_space = GIMP_LAYER_COLOR_SPACE_LAB
},
{ GIMP_LAYER_MODE_NORMAL_LINEAR,
{ GIMP_LAYER_MODE_NORMAL,
.op_name = "gimp:normal",
.function = gimp_operation_normal_process,
.flags = GIMP_LAYER_MODE_FLAG_BLEND_SPACE_IMMUTABLE,
.context = GIMP_LAYER_MODE_CONTEXT_ALL,
.paint_composite_mode = GIMP_LAYER_COMPOSITE_SRC_OVER,
.composite_mode = GIMP_LAYER_COMPOSITE_SRC_OVER,
......@@ -898,7 +899,7 @@ static const GimpLayerMode layer_mode_group_default[] =
static const GimpLayerMode layer_mode_group_legacy[] =
{
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL_LEGACY,
GIMP_LAYER_MODE_DISSOLVE,
GIMP_LAYER_MODE_BEHIND_LEGACY,
......@@ -939,7 +940,7 @@ static const GimpLayerMode layer_mode_group_legacy[] =
static const GimpLayerMode layer_mode_groups[][2] =
{
{ [GIMP_LAYER_MODE_GROUP_DEFAULT] = GIMP_LAYER_MODE_NORMAL,
[GIMP_LAYER_MODE_GROUP_LEGACY ] = GIMP_LAYER_MODE_NORMAL
[GIMP_LAYER_MODE_GROUP_LEGACY ] = GIMP_LAYER_MODE_NORMAL_LEGACY
},
{ [GIMP_LAYER_MODE_GROUP_DEFAULT] = GIMP_LAYER_MODE_DISSOLVE,
......
......@@ -154,7 +154,7 @@ gimp_operation_layer_mode_class_init (GimpOperationLayerModeClass *klass)
g_param_spec_enum ("layer-mode",
NULL, NULL,
GIMP_TYPE_LAYER_MODE,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL_LEGACY,
GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT));
......@@ -1877,7 +1877,7 @@ gimp_layer_mode_get_blend_fun (GimpLayerMode mode)
case GIMP_LAYER_MODE_ADDITION: return blendfun_addition;
case GIMP_LAYER_MODE_SUBTRACT: return blendfun_subtract;
case GIMP_LAYER_MODE_MULTIPLY: return blendfun_multiply;
case GIMP_LAYER_MODE_NORMAL_LINEAR:
case GIMP_LAYER_MODE_NORMAL_LEGACY:
case GIMP_LAYER_MODE_NORMAL: return blendfun_normal;
case GIMP_LAYER_MODE_BURN: return blendfun_burn;
case GIMP_LAYER_MODE_GRAIN_MERGE: return blendfun_grain_merge;
......
......@@ -81,7 +81,7 @@ gimp_layer_mode_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_LAYER_MODE_NORMAL, "GIMP_LAYER_MODE_NORMAL", "normal" },
{ GIMP_LAYER_MODE_NORMAL_LEGACY, "GIMP_LAYER_MODE_NORMAL_LEGACY", "normal-legacy" },
{ GIMP_LAYER_MODE_DISSOLVE, "GIMP_LAYER_MODE_DISSOLVE", "dissolve" },
{ GIMP_LAYER_MODE_BEHIND_LEGACY, "GIMP_LAYER_MODE_BEHIND_LEGACY", "behind-legacy" },
{ GIMP_LAYER_MODE_MULTIPLY_LEGACY, "GIMP_LAYER_MODE_MULTIPLY_LEGACY", "multiply-legacy" },
......@@ -109,7 +109,7 @@ gimp_layer_mode_get_type (void)
{ GIMP_LAYER_MODE_LCH_CHROMA, "GIMP_LAYER_MODE_LCH_CHROMA", "lch-chroma" },
{ GIMP_LAYER_MODE_LCH_COLOR, "GIMP_LAYER_MODE_LCH_COLOR", "lch-color" },
{ GIMP_LAYER_MODE_LCH_LIGHTNESS, "GIMP_LAYER_MODE_LCH_LIGHTNESS", "lch-lightness" },
{ GIMP_LAYER_MODE_NORMAL_LINEAR, "GIMP_LAYER_MODE_NORMAL_LINEAR", "normal-linear" },
{ GIMP_LAYER_MODE_NORMAL, "GIMP_LAYER_MODE_NORMAL", "normal" },
{ GIMP_LAYER_MODE_BEHIND, "GIMP_LAYER_MODE_BEHIND", "behind" },
{ GIMP_LAYER_MODE_MULTIPLY, "GIMP_LAYER_MODE_MULTIPLY", "multiply" },
{ GIMP_LAYER_MODE_SCREEN, "GIMP_LAYER_MODE_SCREEN", "screen" },
......@@ -146,7 +146,7 @@ gimp_layer_mode_get_type (void)
static const GimpEnumDesc descs[] =
{
{ GIMP_LAYER_MODE_NORMAL, NC_("layer-mode", "Normal"), NULL },
{ GIMP_LAYER_MODE_NORMAL_LEGACY, NC_("layer-mode", "Normal (legacy)"), NULL },
{ GIMP_LAYER_MODE_DISSOLVE, NC_("layer-mode", "Dissolve"), NULL },
{ GIMP_LAYER_MODE_BEHIND_LEGACY, NC_("layer-mode", "Behind (legacy)"), NULL },
{ GIMP_LAYER_MODE_MULTIPLY_LEGACY, NC_("layer-mode", "Multiply (legacy)"), NULL },
......@@ -174,7 +174,7 @@ gimp_layer_mode_get_type (void)
{ GIMP_LAYER_MODE_LCH_CHROMA, NC_("layer-mode", "Chroma (LCH)"), NULL },
{ GIMP_LAYER_MODE_LCH_COLOR, NC_("layer-mode", "Color (LCH)"), NULL },
{ GIMP_LAYER_MODE_LCH_LIGHTNESS, NC_("layer-mode", "Lightness (LCH)"), NULL },
{ GIMP_LAYER_MODE_NORMAL_LINEAR, NC_("layer-mode", "Normal (linear)"), NULL },
{ GIMP_LAYER_MODE_NORMAL, NC_("layer-mode", "Normal"), NULL },
{ GIMP_LAYER_MODE_BEHIND, NC_("layer-mode", "Behind"), NULL },
{ GIMP_LAYER_MODE_MULTIPLY, NC_("layer-mode", "Multiply"), NULL },
{ GIMP_LAYER_MODE_SCREEN, NC_("layer-mode", "Screen"), NULL },
......
......@@ -55,7 +55,7 @@ GType gimp_layer_mode_get_type (void) G_GNUC_CONST;
typedef enum
{
/* Modes that exist since ancient times */
GIMP_LAYER_MODE_NORMAL, /*< desc="Normal" >*/
GIMP_LAYER_MODE_NORMAL_LEGACY, /*< desc="Normal (legacy)" >*/
GIMP_LAYER_MODE_DISSOLVE, /*< desc="Dissolve" >*/
GIMP_LAYER_MODE_BEHIND_LEGACY, /*< desc="Behind (legacy)" >*/
GIMP_LAYER_MODE_MULTIPLY_LEGACY, /*< desc="Multiply (legacy)" >*/
......@@ -87,7 +87,7 @@ typedef enum
GIMP_LAYER_MODE_LCH_LIGHTNESS, /*< desc="Lightness (LCH)" >*/
/* Since 2.10 */
GIMP_LAYER_MODE_NORMAL_LINEAR, /*< desc="Normal (linear)" >*/
GIMP_LAYER_MODE_NORMAL, /*< desc="Normal" >*/
GIMP_LAYER_MODE_BEHIND, /*< desc="Behind" >*/
GIMP_LAYER_MODE_MULTIPLY, /*< desc="Multiply" >*/
GIMP_LAYER_MODE_SCREEN, /*< desc="Screen" >*/
......
......@@ -167,7 +167,7 @@ gimp_convolve_motion (GimpPaintCore *paint_core,
paint_buffer = gimp_paint_core_get_paint_buffer (paint_core, drawable,
paint_options,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL_LEGACY,
coords,
&paint_buffer_x,
&paint_buffer_y,
......
......@@ -151,7 +151,7 @@ gimp_dodge_burn_motion (GimpPaintCore *paint_core,
paint_buffer = gimp_paint_core_get_paint_buffer (paint_core, drawable,
paint_options,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL_LEGACY,
coords,
&paint_buffer_x,
&paint_buffer_y,
......
......@@ -164,7 +164,7 @@ gimp_eraser_motion (GimpPaintCore *paint_core,
else if (gimp_drawable_has_alpha (drawable))
paint_mode = GIMP_LAYER_MODE_ERASE;
else
paint_mode = GIMP_LAYER_MODE_NORMAL;
paint_mode = GIMP_LAYER_MODE_NORMAL_LEGACY;
gimp_brush_core_eval_transform_dynamics (GIMP_BRUSH_CORE (paint_core),
drawable,
......
......@@ -1040,7 +1040,7 @@ gimp_paint_core_replace (GimpPaintCore *core,
drawable,
paint_opacity,
image_opacity,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL_LEGACY,
mode);
return;
}
......
......@@ -213,7 +213,7 @@ gimp_smudge_start (GimpPaintCore *paint_core,
*/
paint_buffer = gimp_paint_core_get_paint_buffer (paint_core, drawable,
paint_options,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL_LEGACY,
coords,
&paint_buffer_x,
&paint_buffer_y,
......@@ -318,7 +318,7 @@ gimp_smudge_motion (GimpPaintCore *paint_core,
paint_buffer = gimp_paint_core_get_paint_buffer (paint_core, drawable,
paint_options,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL_LEGACY,
coords,
&paint_buffer_x,
&paint_buffer_y,
......
......@@ -204,7 +204,7 @@ register_brush_select_procs (GimpPDB *pdb)
"paint mode",
"The initial paint mode",
GIMP_TYPE_LAYER_MODE,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL_LEGACY,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
......@@ -278,7 +278,7 @@ register_brush_select_procs (GimpPDB *pdb)
"paint mode",
"The initial paint mode",
GIMP_TYPE_LAYER_MODE,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL_LEGACY,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
......
......@@ -440,7 +440,7 @@ register_brushes_procs (GimpPDB *pdb)
"paint mode",
"The paint mode",
GIMP_TYPE_LAYER_MODE,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL_LEGACY,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_int32 ("width",
......
......@@ -3139,7 +3139,7 @@ register_context_procs (GimpPDB *pdb)
"paint mode",
"The paint mode",
GIMP_TYPE_LAYER_MODE,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL_LEGACY,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
......@@ -3163,7 +3163,7 @@ register_context_procs (GimpPDB *pdb)
"paint mode",
"The paint mode",
GIMP_TYPE_LAYER_MODE,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL_LEGACY,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
......
......@@ -1349,7 +1349,7 @@ register_edit_procs (GimpPDB *pdb)
"paint mode",
"The paint application mode",
GIMP_TYPE_LAYER_MODE,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL_LEGACY,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("opacity",
......@@ -1416,7 +1416,7 @@ register_edit_procs (GimpPDB *pdb)
"paint mode",
"The paint application mode",
GIMP_TYPE_LAYER_MODE,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL_LEGACY,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("opacity",
......@@ -1496,7 +1496,7 @@ register_edit_procs (GimpPDB *pdb)
"paint mode",
"The paint application mode",
GIMP_TYPE_LAYER_MODE,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL_LEGACY,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("gradient-type",
......
......@@ -182,7 +182,7 @@ layer_new_from_visible_invoker (GimpProcedure *procedure,
TRUE),
name,
GIMP_OPACITY_OPAQUE,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL_LEGACY,
profile);
}
......@@ -1384,7 +1384,7 @@ register_layer_procs (GimpPDB *pdb)
"mode",
"The layer combination mode",
GIMP_TYPE_LAYER_MODE,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL_LEGACY,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_layer_id ("layer",
......@@ -2320,7 +2320,7 @@ register_layer_procs (GimpPDB *pdb)
"mode",
"The layer combination mode",
GIMP_TYPE_LAYER_MODE,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL_LEGACY,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
......@@ -2350,7 +2350,7 @@ register_layer_procs (GimpPDB *pdb)
"mode",
"The new layer combination mode",
GIMP_TYPE_LAYER_MODE,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL_LEGACY,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
......
......@@ -138,7 +138,7 @@ gimp_test_utils_create_image (Gimp *gimp,
gimp_image_get_layer_format (image, TRUE),
"layer1",
1.0,
GIMP_LAYER_MODE_NORMAL);
GIMP_LAYER_MODE_NORMAL_LEGACY);
gimp_image_add_layer (image,
layer,
......
......@@ -127,7 +127,7 @@ rotate_non_overlapping (GimpTestFixture *fixture,
babl_format ("R'G'B'A u8"),
"Test Layer",
GIMP_OPACITY_OPAQUE,
GIMP_LAYER_MODE_NORMAL);
GIMP_LAYER_MODE_NORMAL_LEGACY);
g_assert_cmpint (GIMP_IS_LAYER (layer), ==, TRUE);
......@@ -167,7 +167,7 @@ add_layer (GimpTestFixture *fixture,
babl_format ("R'G'B'A u8"),
"Test Layer",
GIMP_OPACITY_OPAQUE,
GIMP_LAYER_MODE_NORMAL);
GIMP_LAYER_MODE_NORMAL_LEGACY);
g_assert_cmpint (GIMP_IS_LAYER (layer), ==, TRUE);
......@@ -204,7 +204,7 @@ remove_layer (GimpTestFixture *fixture,
babl_format ("R'G'B'A u8"),
"Test Layer",
GIMP_OPACITY_OPAQUE,
GIMP_LAYER_MODE_NORMAL);
GIMP_LAYER_MODE_NORMAL_LEGACY);
g_assert_cmpint (GIMP_IS_LAYER (layer), ==, TRUE);
......
......@@ -236,7 +236,7 @@ create_new_image_via_dialog (gconstpointer data)
gimp_image_get_layer_format (image, TRUE),
"Layer for testing",
GIMP_OPACITY_OPAQUE,
GIMP_LAYER_MODE_NORMAL);
GIMP_LAYER_MODE_NORMAL_LEGACY);
gimp_image_add_layer (image, layer,
GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
......
......@@ -68,7 +68,7 @@
#define GIMP_MAINIMAGE_LAYER1_HEIGHT 51
#define GIMP_MAINIMAGE_LAYER1_FORMAT babl_format ("R'G'B'A u8")
#define GIMP_MAINIMAGE_LAYER1_OPACITY GIMP_OPACITY_OPAQUE
#define GIMP_MAINIMAGE_LAYER1_MODE GIMP_LAYER_MODE_NORMAL
#define GIMP_MAINIMAGE_LAYER1_MODE GIMP_LAYER_MODE_NORMAL_LEGACY
#define GIMP_MAINIMAGE_LAYER2_NAME "layer2"
#define GIMP_MAINIMAGE_LAYER2_WIDTH 25
......
......@@ -918,7 +918,7 @@ gimp_warp_tool_animate (GimpWarpTool *wt)
gimp_item_set_offset (GIMP_ITEM (layer), 0, 0);
gimp_item_set_visible (GIMP_ITEM (layer), TRUE, FALSE);
gimp_layer_set_mode (layer, GIMP_LAYER_MODE_NORMAL, FALSE);
gimp_layer_set_mode (layer, GIMP_LAYER_MODE_NORMAL_LEGACY, FALSE);
gimp_layer_set_opacity (layer, GIMP_OPACITY_OPAQUE, FALSE);
gimp_image_add_layer (image, layer, NULL, 0, FALSE);
......
......@@ -105,7 +105,7 @@ gimp_brush_select_class_init (GimpBrushSelectClass *klass)
g_object_class_install_property (object_class, PROP_PAINT_MODE,
g_param_spec_enum ("paint-mode", NULL, NULL,
GIMP_TYPE_LAYER_MODE,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL_LEGACY,
GIMP_PARAM_WRITABLE |
G_PARAM_CONSTRUCT));
......
......@@ -101,7 +101,7 @@ gimp_layer_mode_box_class_init (GimpLayerModeBoxClass *klass)
g_param_spec_enum ("layer-mode",
NULL, NULL,
GIMP_TYPE_LAYER_MODE,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL_LEGACY,
GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT));
......@@ -290,7 +290,7 @@ GimpLayerMode
gimp_layer_mode_box_get_mode (GimpLayerModeBox *box)
{
g_return_val_if_fail (GIMP_IS_LAYER_MODE_BOX (box),
GIMP_LAYER_MODE_NORMAL);
GIMP_LAYER_MODE_NORMAL_LEGACY);
return box->priv->layer_mode;
}
......
......@@ -108,7 +108,7 @@ gimp_layer_mode_combo_box_class_init (GimpLayerModeComboBoxClass *klass)
g_param_spec_enum ("layer-mode",
NULL, NULL,
GIMP_TYPE_LAYER_MODE,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL_LEGACY,
GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT));
......@@ -297,7 +297,7 @@ GimpLayerMode
gimp_layer_mode_combo_box_get_mode (GimpLayerModeComboBox *combo)
{
g_return_val_if_fail (GIMP_IS_LAYER_MODE_COMBO_BOX (combo),
GIMP_LAYER_MODE_NORMAL);
GIMP_LAYER_MODE_NORMAL_LEGACY);
return combo->priv->layer_mode;
}
......
......@@ -809,7 +809,7 @@ gimp_layer_tree_view_drop_pixbuf (GimpContainerTreeView *tree_view,
gimp_image_get_layer_format (image, TRUE),
_("Dropped Buffer"),
GIMP_OPACITY_OPAQUE,
GIMP_LAYER_MODE_NORMAL);
GIMP_LAYER_MODE_NORMAL_LEGACY);
gimp_image_add_layer (image, new_layer, parent, index, TRUE);
......@@ -851,7 +851,7 @@ gimp_layer_tree_view_item_new (GimpImage *image)
gimp_image_get_layer_format (image, TRUE),
NULL,
GIMP_OPACITY_OPAQUE,
GIMP_LAYER_MODE_NORMAL);
GIMP_LAYER_MODE_NORMAL_LEGACY);
gimp_image_add_layer (image, new_layer,
GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
......
......@@ -1561,7 +1561,7 @@ xcf_load_layer (XcfInfo *info,
/* create a new layer */
layer = gimp_layer_new (image, width, height,
format, name, 255, GIMP_LAYER_MODE_NORMAL);
format, name, 255, GIMP_LAYER_MODE_NORMAL_LEGACY);
g_free (name);
if (! layer)
return NULL;
......
......@@ -95,7 +95,7 @@ GType gimp_layer_mode_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_NORMAL_LEGACY,
GIMP_LAYER_MODE_DISSOLVE,
GIMP_LAYER_MODE_BEHIND_LEGACY,
GIMP_LAYER_MODE_MULTIPLY_LEGACY,
......@@ -123,7 +123,7 @@ typedef enum
GIMP_LAYER_MODE_LCH_CHROMA,
GIMP_LAYER_MODE_LCH_COLOR,
GIMP_LAYER_MODE_LCH_LIGHTNESS,
GIMP_LAYER_MODE_NORMAL_LINEAR,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_BEHIND,
GIMP_LAYER_MODE_MULTIPLY,
GIMP_LAYER_MODE_SCREEN,
......
......@@ -95,7 +95,7 @@ export_merge (gint32 image_ID,
gimp_image_width (image_ID),
gimp_image_height (image_ID),
gimp_drawable_type (*drawable_ID) | 1,
100.0, GIMP_LAYER_MODE_NORMAL);
100.0, GIMP_LAYER_MODE_NORMAL_LEGACY);
gimp_image_insert_layer (image_ID, transp, -1, 1);
gimp_selection_none (image_ID);
gimp_edit_clear (transp);
......
......@@ -609,7 +609,8 @@ gimp_image_metadata_load_thumbnail (GFile *file,
layer_ID = gimp_layer_new_from_pixbuf (image_ID, _("Background"),
pixbuf,
100.0, GIMP_LAYER_MODE_NORMAL,
100.0,
GIMP_LAYER_MODE_NORMAL_LEGACY,
0.0, 0.0);
g_object_unref (pixbuf);
......
......@@ -274,7 +274,7 @@ gimp_layer_new_from_surface (gint32 image_ID,
layer = gimp_layer_new (image_ID, name, width, height,
format == CAIRO_FORMAT_RGB24 ?
GIMP_RGB_IMAGE : GIMP_RGBA_IMAGE,
100.0, GIMP_LAYER_MODE_NORMAL);
100.0, GIMP_LAYER_MODE_NORMAL_LEGACY);
if (layer == -1)
return -1;
......