Commit 0cfe5506 authored by Michael Natterer's avatar Michael Natterer 😴

app, pdb: change a lot of GIMP_LAYER_MODE_NORMAL_LEGACY to just NORMAL

this commit changes just those which make no difference to
functionality: property and object member defaults that get overridden
anyway, return values of g_return_val_if_fail(), some other stuff.
parent 58a68f5e
......@@ -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_LEGACY,
GIMP_LAYER_MODE_NORMAL,
NULL /* same image */);
gimp_image_add_layer (image, layer, NULL, -1, FALSE);
......
......@@ -468,7 +468,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_LEGACY,
GIMP_LAYER_MODE_NORMAL,
GIMP_PARAM_READABLE));
g_object_class_install_property (object_class, PROP_BLEND_SPACE,
......@@ -521,7 +521,7 @@ static void
gimp_layer_init (GimpLayer *layer)
{
layer->opacity = GIMP_OPACITY_OPAQUE;
layer->mode = GIMP_LAYER_MODE_NORMAL_LEGACY;
layer->mode = GIMP_LAYER_MODE_NORMAL;
layer->blend_space = GIMP_LAYER_COLOR_SPACE_AUTO;
layer->composite_space = GIMP_LAYER_COLOR_SPACE_AUTO;
layer->composite_mode = GIMP_LAYER_COMPOSITE_AUTO;
......@@ -2381,7 +2381,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_LEGACY);
g_return_val_if_fail (GIMP_IS_LAYER (layer), GIMP_LAYER_MODE_NORMAL);
return layer->mode;
}
......
......@@ -58,7 +58,7 @@ static void
gimp_applicator_init (GimpApplicator *applicator)
{
applicator->opacity = 1.0;
applicator->paint_mode = GIMP_LAYER_MODE_NORMAL_LEGACY;
applicator->paint_mode = GIMP_LAYER_MODE_NORMAL;
applicator->blend_space = GIMP_LAYER_COLOR_SPACE_AUTO;
applicator->composite_space = GIMP_LAYER_COLOR_SPACE_AUTO;
applicator->composite_mode = GIMP_LAYER_COMPOSITE_AUTO;
......
......@@ -156,7 +156,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_LEGACY,
GIMP_LAYER_MODE_NORMAL,
GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT));
......
......@@ -204,7 +204,7 @@ register_brush_select_procs (GimpPDB *pdb)
"paint mode",
"The initial paint mode",
GIMP_TYPE_LAYER_MODE,
GIMP_LAYER_MODE_NORMAL_LEGACY,
GIMP_LAYER_MODE_NORMAL,
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_LEGACY,
GIMP_LAYER_MODE_NORMAL,
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_LEGACY,
GIMP_LAYER_MODE_NORMAL,
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_LEGACY,
GIMP_LAYER_MODE_NORMAL,
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_LEGACY,
GIMP_LAYER_MODE_NORMAL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
......
......@@ -1345,7 +1345,7 @@ register_edit_procs (GimpPDB *pdb)
"paint mode",
"The paint application mode",
GIMP_TYPE_LAYER_MODE,
GIMP_LAYER_MODE_NORMAL_LEGACY,
GIMP_LAYER_MODE_NORMAL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("opacity",
......@@ -1412,7 +1412,7 @@ register_edit_procs (GimpPDB *pdb)
"paint mode",
"The paint application mode",
GIMP_TYPE_LAYER_MODE,
GIMP_LAYER_MODE_NORMAL_LEGACY,
GIMP_LAYER_MODE_NORMAL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("opacity",
......@@ -1492,7 +1492,7 @@ register_edit_procs (GimpPDB *pdb)
"paint mode",
"The paint application mode",
GIMP_TYPE_LAYER_MODE,
GIMP_LAYER_MODE_NORMAL_LEGACY,
GIMP_LAYER_MODE_NORMAL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("gradient-type",
......
......@@ -1384,7 +1384,7 @@ register_layer_procs (GimpPDB *pdb)
"mode",
"The layer combination mode",
GIMP_TYPE_LAYER_MODE,
GIMP_LAYER_MODE_NORMAL_LEGACY,
GIMP_LAYER_MODE_NORMAL,
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_LEGACY,
GIMP_LAYER_MODE_NORMAL,
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_LEGACY,
GIMP_LAYER_MODE_NORMAL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
......
......@@ -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_LEGACY,
GIMP_LAYER_MODE_NORMAL,
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_LEGACY,
GIMP_LAYER_MODE_NORMAL,
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_LEGACY);
GIMP_LAYER_MODE_NORMAL);
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_LEGACY,
GIMP_LAYER_MODE_NORMAL,
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_LEGACY);
GIMP_LAYER_MODE_NORMAL);
return combo->priv->layer_mode;
}
......
......@@ -1628,7 +1628,7 @@ xcf_load_layer (XcfInfo *info,
/* create a new layer */
layer = gimp_layer_new (image, width, height,
format, name, 255, GIMP_LAYER_MODE_NORMAL_LEGACY);
format, name, 255, GIMP_LAYER_MODE_NORMAL);
g_free (name);
if (! layer)
return NULL;
......
......@@ -661,7 +661,7 @@ gimp_image_metadata_load_thumbnail (GFile *file,
layer_ID = gimp_layer_new_from_pixbuf (image_ID, _("Background"),
pixbuf,
100.0,
GIMP_LAYER_MODE_NORMAL_LEGACY,
GIMP_LAYER_MODE_NORMAL,
0.0, 0.0);
g_object_unref (pixbuf);
......
......@@ -36,6 +36,7 @@ sub brushes_popup {
desc => 'The initial spacing of the brush (if < 0 then use brush
default spacing)' },
{ name => 'paint_mode', type => 'enum GimpLayerMode',
default => 'GIMP_LAYER_MODE_NORMAL',
desc => 'The initial paint mode' }
);
......@@ -101,6 +102,7 @@ sub brushes_set_popup {
desc => 'The initial spacing of the brush (if < 0 then use brush
default spacing)' },
{ name => 'paint_mode', type => 'enum GimpLayerMode',
default => 'GIMP_LAYER_MODE_NORMAL',
desc => 'The initial paint mode' }
);
......
......@@ -157,6 +157,7 @@ sub brushes_get_brush_data {
{ name => 'spacing', type => '0 <= int32 <= 1000',
desc => 'The brush spacing' },
{ name => 'paint_mode', type => 'enum GimpLayerMode',
default => 'GIMP_LAYER_MODE_NORMAL',
desc => 'The paint mode' },
{ name => 'width', type => 'int32',
desc => 'The brush width' },
......
......@@ -447,6 +447,7 @@ HELP
@outargs = (
{ name => 'paint_mode', type => 'enum GimpLayerMode',
default => 'GIMP_LAYER_MODE_NORMAL',
desc => 'The paint mode' }
);
......@@ -470,6 +471,7 @@ HELP
@inargs = (
{ name => 'paint_mode', type => 'enum GimpLayerMode',
default => 'GIMP_LAYER_MODE_NORMAL',
desc => 'The paint mode' }
);
......
......@@ -622,6 +622,7 @@ HELP
{ name => 'fill_mode', type => 'enum GimpBucketFillMode',
desc => 'The type of fill' },
{ name => paint_mode, type => 'enum GimpLayerMode',
default => 'GIMP_LAYER_MODE_NORMAL',
desc => 'The paint application mode' },
{ name => 'opacity', type => '0 <= float <= 100',
desc => 'The opacity of the final bucket fill' },
......@@ -719,6 +720,7 @@ HELP
{ name => 'fill_mode', type => 'enum GimpBucketFillMode',
desc => 'The type of fill' },
{ name => paint_mode, type => 'enum GimpLayerMode',
default => 'GIMP_LAYER_MODE_NORMAL',
desc => 'The paint application mode' },
{ name => 'opacity', type => '0 <= float <= 100',
desc => 'The opacity of the final bucket fill' },
......@@ -816,6 +818,7 @@ HELP
{ name => 'blend_mode', type => 'enum GimpBlendMode',
desc => 'The type of blend' },
{ name => 'paint_mode', type => 'enum GimpLayerMode',
default => 'GIMP_LAYER_MODE_NORMAL',
desc => 'The paint application mode' },
{ name => 'gradient_type', type => 'enum GimpGradientType',
desc => 'The type of gradient' },
......
......@@ -44,6 +44,7 @@ HELP
{ name => 'opacity', type => '0 <= float <= 100',
desc => 'The layer opacity' },
{ name => 'mode', type => 'enum GimpLayerMode',
default => 'GIMP_LAYER_MODE_NORMAL',
desc => 'The layer combination mode' }
);
......@@ -1161,6 +1162,7 @@ sub layer_get_mode {
@outargs = (
{ name => 'mode', type => 'enum GimpLayerMode',
default => 'GIMP_LAYER_MODE_NORMAL',
desc => 'The layer combination mode' }
);
......@@ -1183,6 +1185,7 @@ sub layer_set_mode {
{ name => 'layer', type => 'layer',
desc => 'The layer' },
{ name => 'mode', type => 'enum GimpLayerMode',
default => 'GIMP_LAYER_MODE_NORMAL',
desc => 'The new layer combination mode' }
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment