[gimp] plug-ins: use gimp_get_default_new_layer_mode() for most new layers
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: use gimp_get_default_new_layer_mode() for most new layers
- Date: Sun, 20 Aug 2017 15:17:10 +0000 (UTC)
commit 838449254acacef2748a484ca4fe7d1162b00bc4
Author: Michael Natterer <mitch gimp org>
Date: Sun Aug 20 17:12:46 2017 +0200
plug-ins: use gimp_get_default_new_layer_mode() for most new layers
instead of hardcoding NORMAL_LEGACY.
libgimp/gimpimagemetadata.c | 2 +-
plug-ins/common/animation-optimize.c | 4 ++--
plug-ins/common/compose.c | 2 +-
plug-ins/common/decompose.c | 2 +-
plug-ins/common/edge-dog.c | 2 +-
plug-ins/common/file-cel.c | 4 ++--
plug-ins/common/file-dicom.c | 2 +-
plug-ins/common/file-gbr.c | 2 +-
plug-ins/common/file-gegl.c | 2 +-
plug-ins/common/file-gif-load.c | 6 +++---
plug-ins/common/file-gih.c | 2 +-
plug-ins/common/file-jp2-load.c | 2 +-
plug-ins/common/file-pat.c | 2 +-
plug-ins/common/file-pcx.c | 4 ++--
plug-ins/common/file-pix.c | 2 +-
plug-ins/common/file-png.c | 2 +-
plug-ins/common/file-pnm.c | 2 +-
plug-ins/common/file-ps.c | 2 +-
plug-ins/common/file-raw-data.c | 2 +-
plug-ins/common/file-sunras.c | 2 +-
plug-ins/common/file-svg.c | 2 +-
plug-ins/common/file-tga.c | 2 +-
plug-ins/common/file-wmf.c | 2 +-
plug-ins/common/file-xbm.c | 2 +-
plug-ins/common/file-xmc.c | 4 ++--
plug-ins/common/file-xpm.c | 2 +-
plug-ins/common/file-xwd.c | 2 +-
plug-ins/common/film.c | 2 +-
plug-ins/common/hot.c | 2 +-
plug-ins/common/smooth-palette.c | 2 +-
plug-ins/common/tile.c | 2 +-
plug-ins/common/warp.c | 4 ++--
plug-ins/common/wavelet-decompose.c | 2 +-
plug-ins/common/web-page.c | 5 +++--
plug-ins/file-bmp/bmp-load.c | 2 +-
plug-ins/file-exr/file-exr.c | 2 +-
plug-ins/file-faxg3/faxg3.c | 2 +-
plug-ins/file-fits/fits.c | 2 +-
plug-ins/file-fli/fli-gimp.c | 2 +-
plug-ins/file-ico/ico-dialog.c | 4 ++--
plug-ins/file-ico/ico-load.c | 2 +-
plug-ins/file-ico/ico-save.c | 2 +-
plug-ins/file-jpeg/jpeg-load.c | 4 ++--
plug-ins/file-psd/psd-image-res-load.c | 2 +-
plug-ins/file-psd/psd-load.c | 4 ++--
plug-ins/file-sgi/sgi.c | 2 +-
plug-ins/file-tiff/file-tiff-load.c | 4 ++--
plug-ins/file-webp/file-webp-load.c | 2 +-
plug-ins/gfig/gfig-dialog.c | 2 +-
plug-ins/lighting/lighting-apply.c | 4 ++--
plug-ins/map-object/map-object-apply.c | 2 +-
plug-ins/pagecurl/pagecurl.c | 2 +-
plug-ins/pygimp/pygimp-drawable.c | 6 +++---
plug-ins/pygimp/pygimp-image.c | 2 +-
plug-ins/screenshot/screenshot-win32.c | 2 +-
plug-ins/screenshot/screenshot-x11.c | 2 +-
56 files changed, 72 insertions(+), 71 deletions(-)
---
diff --git a/libgimp/gimpimagemetadata.c b/libgimp/gimpimagemetadata.c
index 858ce51..1526dba 100644
--- a/libgimp/gimpimagemetadata.c
+++ b/libgimp/gimpimagemetadata.c
@@ -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,
+ gimp_get_default_new_layer_mode (),
0.0, 0.0);
g_object_unref (pixbuf);
diff --git a/plug-ins/common/animation-optimize.c b/plug-ins/common/animation-optimize.c
index 91b0f1b..82faf94 100644
--- a/plug-ins/common/animation-optimize.c
+++ b/plug-ins/common/animation-optimize.c
@@ -642,7 +642,7 @@ do_optimizations (GimpRunMode run_mode,
width, height,
drawabletype_alpha,
100.0,
- GIMP_LAYER_MODE_NORMAL_LEGACY);
+ gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (new_image_id, new_layer_id, -1, 0);
@@ -1065,7 +1065,7 @@ do_optimizations (GimpRunMode run_mode,
bbox_bottom-bbox_top,
drawabletype_alpha,
100.0,
- GIMP_LAYER_MODE_NORMAL_LEGACY);
+ gimp_get_default_new_layer_mode ());
g_free (newlayer_name);
gimp_image_insert_layer (new_image_id, new_layer_id, -1, 0);
diff --git a/plug-ins/common/compose.c b/plug-ins/common/compose.c
index 2c659b1..de6ebef 100644
--- a/plug-ins/common/compose.c
+++ b/plug-ins/common/compose.c
@@ -1021,7 +1021,7 @@ create_new_image (const gchar *filename,
*layer_ID = gimp_layer_new (image_ID, _("Background"), width, height,
gdtype,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (image_ID, *layer_ID, -1, 0);
*buffer = gimp_drawable_get_buffer (*layer_ID);
diff --git a/plug-ins/common/decompose.c b/plug-ins/common/decompose.c
index a47d614..4224d30 100644
--- a/plug-ins/common/decompose.c
+++ b/plug-ins/common/decompose.c
@@ -608,7 +608,7 @@ create_new_layer (gint32 image_ID,
layer_ID = gimp_layer_new (image_ID, layername, width, height,
gdtype,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (image_ID, layer_ID, -1, position);
return layer_ID;
diff --git a/plug-ins/common/edge-dog.c b/plug-ins/common/edge-dog.c
index 5072139..04635a2 100644
--- a/plug-ins/common/edge-dog.c
+++ b/plug-ins/common/edge-dog.c
@@ -993,7 +993,7 @@ preview_update_preview (GimpPreview *preview,
preview_id = gimp_layer_new (image_id, "preview", width, height,
gimp_drawable_type (drawable->drawable_id),
100,
- GIMP_LAYER_MODE_NORMAL_LEGACY);
+ gimp_get_default_new_layer_mode ());
preview_drawable = gimp_drawable_get (preview_id);
gimp_image_insert_layer (image_id, preview_id, -1, 0);
gimp_layer_set_offsets (preview_id, 0, 0);
diff --git a/plug-ins/common/file-cel.c b/plug-ins/common/file-cel.c
index 72ce761..7e4bae5 100644
--- a/plug-ins/common/file-cel.c
+++ b/plug-ins/common/file-cel.c
@@ -440,11 +440,11 @@ load_image (const gchar *file,
if (bpp == 32)
layer = gimp_layer_new (image, _("Background"), width, height,
GIMP_RGBA_IMAGE,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
else
layer = gimp_layer_new (image, _("Background"), width, height,
GIMP_INDEXEDA_IMAGE,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (image, layer, -1, 0);
gimp_layer_set_offsets (layer, offx, offy);
diff --git a/plug-ins/common/file-dicom.c b/plug-ins/common/file-dicom.c
index be8673d..54666e6 100644
--- a/plug-ins/common/file-dicom.c
+++ b/plug-ins/common/file-dicom.c
@@ -612,7 +612,7 @@ load_image (const gchar *filename,
dicominfo->width, dicominfo->height,
(dicominfo->samples_per_pixel >= 3 ?
GIMP_RGB_IMAGE : GIMP_GRAY_IMAGE),
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
buffer = gimp_drawable_get_buffer (layer_ID);
diff --git a/plug-ins/common/file-gbr.c b/plug-ins/common/file-gbr.c
index 66df67b..d7cb18f 100644
--- a/plug-ins/common/file-gbr.c
+++ b/plug-ins/common/file-gbr.c
@@ -622,7 +622,7 @@ load_image (GFile *file,
layer_ID = gimp_layer_new (image_ID, name, bh.width, bh.height,
image_type,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
g_free (name);
diff --git a/plug-ins/common/file-gegl.c b/plug-ins/common/file-gegl.c
index ef6bd9b..0d0756f 100644
--- a/plug-ins/common/file-gegl.c
+++ b/plug-ins/common/file-gegl.c
@@ -414,7 +414,7 @@ load_image (const gchar *filename,
_("Background"),
width, height,
image_type,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
dest_buf = gimp_drawable_get_buffer (layer_ID);
diff --git a/plug-ins/common/file-gif-load.c b/plug-ins/common/file-gif-load.c
index 081053d..f46cbc3 100644
--- a/plug-ins/common/file-gif-load.c
+++ b/plug-ins/common/file-gif-load.c
@@ -989,14 +989,14 @@ ReadImage (FILE *fd,
layer_ID = gimp_layer_new (*image_ID, framename,
len, height,
GIMP_INDEXED_IMAGE,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
}
else
{
layer_ID = gimp_layer_new (*image_ID, framename,
len, height,
GIMP_INDEXEDA_IMAGE,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
alpha_frame=TRUE;
}
@@ -1081,7 +1081,7 @@ ReadImage (FILE *fd,
len, height,
promote_to_rgb ?
GIMP_RGBA_IMAGE : GIMP_INDEXEDA_IMAGE,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
alpha_frame = TRUE;
g_free (framename);
}
diff --git a/plug-ins/common/file-gih.c b/plug-ins/common/file-gih.c
index f42e645..5df0d89 100644
--- a/plug-ins/common/file-gih.c
+++ b/plug-ins/common/file-gih.c
@@ -628,7 +628,7 @@ gih_load_one_brush (GInputStream *input,
layer_ID = gimp_layer_new (image_ID, name,
bh.width, bh.height,
image_type,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
g_free (name);
if (layer_ID != -1)
diff --git a/plug-ins/common/file-jp2-load.c b/plug-ins/common/file-jp2-load.c
index ffea77d..fcc028a 100644
--- a/plug-ins/common/file-jp2-load.c
+++ b/plug-ins/common/file-jp2-load.c
@@ -395,7 +395,7 @@ load_image (const gchar *filename,
_("Background"),
width, height,
image_type,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
buffer = gimp_drawable_get_buffer (layer_ID);
diff --git a/plug-ins/common/file-pat.c b/plug-ins/common/file-pat.c
index 13a3f9f..5f0534a 100644
--- a/plug-ins/common/file-pat.c
+++ b/plug-ins/common/file-pat.c
@@ -441,7 +441,7 @@ load_image (GFile *file,
layer_ID = gimp_layer_new (image_ID, name, ph.width, ph.height,
image_type,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
g_free (name);
diff --git a/plug-ins/common/file-pcx.c b/plug-ins/common/file-pcx.c
index 980539b..0f8e618 100644
--- a/plug-ins/common/file-pcx.c
+++ b/plug-ins/common/file-pcx.c
@@ -444,14 +444,14 @@ load_image (const gchar *filename,
image= gimp_image_new (width, height, GIMP_RGB);
layer= gimp_layer_new (image, _("Background"), width, height,
GIMP_RGB_IMAGE,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
}
else
{
image= gimp_image_new (width, height, GIMP_INDEXED);
layer= gimp_layer_new (image, _("Background"), width, height,
GIMP_INDEXED_IMAGE,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
}
gimp_image_set_filename (image, filename);
diff --git a/plug-ins/common/file-pix.c b/plug-ins/common/file-pix.c
index 267901d..aa5910a 100644
--- a/plug-ins/common/file-pix.c
+++ b/plug-ins/common/file-pix.c
@@ -400,7 +400,7 @@ load_image (GFile *file,
layer_ID = gimp_layer_new (image_ID, _("Background"),
width, height,
gdtype,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
buffer = gimp_drawable_get_buffer (layer_ID);
diff --git a/plug-ins/common/file-png.c b/plug-ins/common/file-png.c
index a670d95..d055929 100644
--- a/plug-ins/common/file-png.c
+++ b/plug-ins/common/file-png.c
@@ -1064,7 +1064,7 @@ load_image (const gchar *filename,
layer = gimp_layer_new (image, _("Background"), width, height,
layer_type,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (image, layer, -1, 0);
file_format = gimp_drawable_get_format (layer);
diff --git a/plug-ins/common/file-pnm.c b/plug-ins/common/file-pnm.c
index f805a2f..c77af36 100644
--- a/plug-ins/common/file-pnm.c
+++ b/plug-ins/common/file-pnm.c
@@ -686,7 +686,7 @@ load_image (GFile *file,
pnminfo->xres, pnminfo->yres,
(pnminfo->np >= 3 ?
GIMP_RGB_IMAGE : GIMP_GRAY_IMAGE),
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
buffer = gimp_drawable_get_buffer (layer_ID);
diff --git a/plug-ins/common/file-ps.c b/plug-ins/common/file-ps.c
index d466ffd..51fcd9c 100644
--- a/plug-ins/common/file-ps.c
+++ b/plug-ins/common/file-ps.c
@@ -1915,7 +1915,7 @@ create_new_image (const gchar *filename,
tmp = g_strdup_printf (_("Page %d"), pagenum);
*layer_ID = gimp_layer_new (image_ID, tmp, width, height,
gdtype,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
g_free (tmp);
gimp_image_insert_layer (image_ID, *layer_ID, -1, 0);
diff --git a/plug-ins/common/file-raw-data.c b/plug-ins/common/file-raw-data.c
index d83780b..db57628 100644
--- a/plug-ins/common/file-raw-data.c
+++ b/plug-ins/common/file-raw-data.c
@@ -1160,7 +1160,7 @@ load_image (const gchar *filename,
layer_id = gimp_layer_new (data->image_id, _("Background"),
runtime->image_width, runtime->image_height,
ltype,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (data->image_id, layer_id, -1, 0);
data->buffer = gimp_drawable_get_buffer (layer_id);
diff --git a/plug-ins/common/file-sunras.c b/plug-ins/common/file-sunras.c
index 82224c5..c9d861c 100644
--- a/plug-ins/common/file-sunras.c
+++ b/plug-ins/common/file-sunras.c
@@ -1048,7 +1048,7 @@ create_new_image (const gchar *filename,
*layer_ID = gimp_layer_new (image_ID, _("Background"), width, height,
gdtype,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (image_ID, *layer_ID, -1, 0);
*buffer = gimp_drawable_get_buffer (*layer_ID);
diff --git a/plug-ins/common/file-svg.c b/plug-ins/common/file-svg.c
index d87206e..81a80e7 100644
--- a/plug-ins/common/file-svg.c
+++ b/plug-ins/common/file-svg.c
@@ -347,7 +347,7 @@ load_image (const gchar *filename,
load_vals.resolution, load_vals.resolution);
layer = gimp_layer_new_from_pixbuf (image, _("Rendered SVG"), pixbuf,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY,
+ 100, gimp_get_default_new_layer_mode (),
0.0, 1.0);
gimp_image_insert_layer (image, layer, -1, 0);
diff --git a/plug-ins/common/file-tga.c b/plug-ins/common/file-tga.c
index 6976fe1..635a4b9 100644
--- a/plug-ins/common/file-tga.c
+++ b/plug-ins/common/file-tga.c
@@ -1092,7 +1092,7 @@ ReadImage (FILE *fp,
_("Background"),
info->width, info->height,
dtype,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
diff --git a/plug-ins/common/file-wmf.c b/plug-ins/common/file-wmf.c
index f6fdd53..828a9a0 100644
--- a/plug-ins/common/file-wmf.c
+++ b/plug-ins/common/file-wmf.c
@@ -998,7 +998,7 @@ load_image (const gchar *filename,
_("Rendered WMF"),
width, height,
GIMP_RGBA_IMAGE,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
buffer = gimp_drawable_get_buffer (layer);
diff --git a/plug-ins/common/file-xbm.c b/plug-ins/common/file-xbm.c
index d104245..6867432 100644
--- a/plug-ins/common/file-xbm.c
+++ b/plug-ins/common/file-xbm.c
@@ -905,7 +905,7 @@ load_image (const gchar *filename,
width, height,
GIMP_INDEXED_IMAGE,
100,
- GIMP_LAYER_MODE_NORMAL_LEGACY);
+ gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
buffer = gimp_drawable_get_buffer (layer_ID);
diff --git a/plug-ins/common/file-xmc.c b/plug-ins/common/file-xmc.c
index 40d2493..b682aac 100644
--- a/plug-ins/common/file-xmc.c
+++ b/plug-ins/common/file-xmc.c
@@ -728,7 +728,7 @@ load_image (const gchar *filename,
layer_ID = gimp_layer_new (image_ID, framename, width, height,
GIMP_RGBA_IMAGE,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
/* Adjust layer position to let hotspot sit on the same point. */
@@ -952,7 +952,7 @@ load_thumbnail (const gchar *filename,
layer_ID = gimp_layer_new (image_ID, NULL, width, height,
GIMP_RGBA_IMAGE,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
diff --git a/plug-ins/common/file-xpm.c b/plug-ins/common/file-xpm.c
index 6ecd47e..b9f896d 100644
--- a/plug-ins/common/file-xpm.c
+++ b/plug-ins/common/file-xpm.c
@@ -482,7 +482,7 @@ parse_image (gint32 image_ID,
xpm_image->height,
GIMP_RGBA_IMAGE,
100,
- GIMP_LAYER_MODE_NORMAL_LEGACY);
+ gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
diff --git a/plug-ins/common/file-xwd.c b/plug-ins/common/file-xwd.c
index 643ef73..1bf1f28 100644
--- a/plug-ins/common/file-xwd.c
+++ b/plug-ins/common/file-xwd.c
@@ -1272,7 +1272,7 @@ create_new_image (const gchar *filename,
*layer_ID = gimp_layer_new (image_ID, "Background", width, height,
gdtype,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (image_ID, *layer_ID, -1, 0);
*buffer = gimp_drawable_get_buffer (*layer_ID);
diff --git a/plug-ins/common/film.c b/plug-ins/common/film.c
index 34b3ab1..9fcb57a 100644
--- a/plug-ins/common/film.c
+++ b/plug-ins/common/film.c
@@ -744,7 +744,7 @@ create_new_image (const gchar *filename,
gimp_image_undo_disable (image_ID);
*layer_ID = gimp_layer_new (image_ID, _("Background"), width, height,
gdtype,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (image_ID, *layer_ID, -1, 0);
if (drawable)
diff --git a/plug-ins/common/hot.c b/plug-ins/common/hot.c
index 1c401b6..3c92e6b 100644
--- a/plug-ins/common/hot.c
+++ b/plug-ins/common/hot.c
@@ -350,7 +350,7 @@ pluginCore (piArgs *argp)
nl = gimp_layer_new (argp->image, name, width, height,
GIMP_RGBA_IMAGE,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
ndrw = gimp_drawable_get (nl);
gimp_drawable_fill (nl, GIMP_FILL_TRANSPARENT);
gimp_image_insert_layer (argp->image, nl, -1, 0);
diff --git a/plug-ins/common/smooth-palette.c b/plug-ins/common/smooth-palette.c
index 812550a..b4c48ae 100644
--- a/plug-ins/common/smooth-palette.c
+++ b/plug-ins/common/smooth-palette.c
@@ -258,7 +258,7 @@ smooth_palette (gint32 drawable_id,
*layer_id = gimp_layer_new (new_image_id, _("Background"),
config.width, config.height,
gimp_drawable_type (drawable_id),
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (new_image_id, *layer_id, -1, 0);
diff --git a/plug-ins/common/tile.c b/plug-ins/common/tile.c
index 7da2cb4..8a8f8d3 100644
--- a/plug-ins/common/tile.c
+++ b/plug-ins/common/tile.c
@@ -354,7 +354,7 @@ tile (gint32 image_id,
*new_layer_id = gimp_layer_new (*new_image_id, _("Background"),
dst_width, dst_height,
gimp_drawable_type (drawable_id),
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
if (*new_layer_id == -1)
return;
diff --git a/plug-ins/common/warp.c b/plug-ins/common/warp.c
index 3dacf15..36b4034 100644
--- a/plug-ins/common/warp.c
+++ b/plug-ins/common/warp.c
@@ -941,12 +941,12 @@ diff (GimpDrawable *drawable,
xlayer_id = gimp_layer_new (new_image_id, "Warp_X_Vectors",
width, height,
GIMP_RGB_IMAGE,
- 100.0, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100.0, gimp_get_default_new_layer_mode ());
ylayer_id = gimp_layer_new (new_image_id, "Warp_Y_Vectors",
width, height,
GIMP_RGB_IMAGE,
- 100.0, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100.0, gimp_get_default_new_layer_mode ());
draw_yd = gimp_drawable_get (ylayer_id);
draw_xd = gimp_drawable_get (xlayer_id);
diff --git a/plug-ins/common/wavelet-decompose.c b/plug-ins/common/wavelet-decompose.c
index 1f4a0ca..23e2fc9 100644
--- a/plug-ins/common/wavelet-decompose.c
+++ b/plug-ins/common/wavelet-decompose.c
@@ -192,7 +192,7 @@ run (const gchar *name,
gimp_image_get_item_position (image_id,
blur_id));
gimp_layer_set_mode (scale_ids[id], GIMP_LAYER_MODE_GRAIN_MERGE);
- gimp_layer_set_mode (blur_id, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ gimp_layer_set_mode (blur_id, GIMP_LAYER_MODE_NORMAL);
gimp_item_set_visible (scale_ids[id], FALSE);
gimp_image_remove_layer (image_id, original_id);
diff --git a/plug-ins/common/web-page.c b/plug-ins/common/web-page.c
index 10a4676..6f75739 100644
--- a/plug-ins/common/web-page.c
+++ b/plug-ins/common/web-page.c
@@ -533,8 +533,9 @@ webpage_capture (void)
image = gimp_image_new (width, height, GIMP_RGB);
gimp_image_undo_disable (image);
- layer = gimp_layer_new_from_pixbuf (image, _("Webpage"), webpagevals.pixbuf,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY,
+ layer = gimp_layer_new_from_pixbuf (image, _("Webpage"),
+ webpagevals.pixbuf,
+ 100, gimp_get_default_new_layer_mode (),
0.0, 1.0);
gimp_image_insert_layer (image, layer, -1, 0);
gimp_image_undo_enable (image);
diff --git a/plug-ins/file-bmp/bmp-load.c b/plug-ins/file-bmp/bmp-load.c
index 61eb134..80d621c 100644
--- a/plug-ins/file-bmp/bmp-load.c
+++ b/plug-ins/file-bmp/bmp-load.c
@@ -733,7 +733,7 @@ ReadImage (FILE *fd,
image = gimp_image_new (width, height, base_type);
layer = gimp_layer_new (image, _("Background"),
width, height,
- image_type, 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ image_type, 100, gimp_get_default_new_layer_mode ());
gimp_image_set_filename (image, filename);
diff --git a/plug-ins/file-exr/file-exr.c b/plug-ins/file-exr/file-exr.c
index 32e4b92..c2be5da 100644
--- a/plug-ins/file-exr/file-exr.c
+++ b/plug-ins/file-exr/file-exr.c
@@ -256,7 +256,7 @@ load_image (const gchar *filename,
gimp_image_set_filename (image, filename);
layer = gimp_layer_new (image, _("Background"), width, height,
- layer_type, 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ layer_type, 100, gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (image, layer, -1, 0);
buffer = gimp_drawable_get_buffer (layer);
diff --git a/plug-ins/file-faxg3/faxg3.c b/plug-ins/file-faxg3/faxg3.c
index 22aeac1..82468c1 100644
--- a/plug-ins/file-faxg3/faxg3.c
+++ b/plug-ins/file-faxg3/faxg3.c
@@ -526,7 +526,7 @@ emitgimp (gint hcol,
hcol,
row,
GIMP_GRAY_IMAGE,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
buffer = gimp_drawable_get_buffer (layer_ID);
diff --git a/plug-ins/file-fits/fits.c b/plug-ins/file-fits/fits.c
index b3f1eca..84dbffb 100644
--- a/plug-ins/file-fits/fits.c
+++ b/plug-ins/file-fits/fits.c
@@ -527,7 +527,7 @@ create_new_image (const gchar *filename,
gimp_image_undo_disable (image_ID);
*layer_ID = gimp_layer_new (image_ID, _("Background"), width, height,
- dtype, 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ dtype, 100, gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (image_ID, *layer_ID, -1, 0);
*buffer = gimp_drawable_get_buffer (*layer_ID);
diff --git a/plug-ins/file-fli/fli-gimp.c b/plug-ins/file-fli/fli-gimp.c
index a4e85ae..5d24eb7 100644
--- a/plug-ins/file-fli/fli-gimp.c
+++ b/plug-ins/file-fli/fli-gimp.c
@@ -565,7 +565,7 @@ load_image (const gchar *filename,
layer_ID = gimp_layer_new (image_id, name_buf,
fli_header.width, fli_header.height,
GIMP_INDEXED_IMAGE,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
g_free (name_buf);
buffer = gimp_drawable_get_buffer (layer_ID);
diff --git a/plug-ins/file-ico/ico-dialog.c b/plug-ins/file-ico/ico-dialog.c
index f796cfe..3d2c1e9 100644
--- a/plug-ins/file-ico/ico-dialog.c
+++ b/plug-ins/file-ico/ico-dialog.c
@@ -288,7 +288,7 @@ ico_dialog_update_icon_preview (GtkWidget *dialog,
tmp_layer = gimp_layer_new (tmp_image, "temporary", w, h,
gimp_drawable_type (layer),
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (tmp_image, tmp_layer, -1, 0);
buffer = gimp_drawable_get_buffer (layer);
@@ -388,7 +388,7 @@ ico_dialog_update_icon_preview (GtkWidget *dialog,
tmp_layer = gimp_layer_new (tmp_image, "temporary", w, h,
gimp_drawable_type (layer),
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (tmp_image, tmp_layer, -1, 0);
buffer = gimp_drawable_get_buffer (layer);
diff --git a/plug-ins/file-ico/ico-load.c b/plug-ins/file-ico/ico-load.c
index 5b0ac92..70b8b4b 100644
--- a/plug-ins/file-ico/ico-load.c
+++ b/plug-ins/file-ico/ico-load.c
@@ -634,7 +634,7 @@ ico_load_layer (FILE *fp,
g_snprintf (name, sizeof (name), _("Icon #%i"), icon_num+1);
layer = gimp_layer_new (image, name, width, height,
GIMP_RGBA_IMAGE,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (image, layer, -1, icon_num);
buffer = gimp_drawable_get_buffer (layer);
diff --git a/plug-ins/file-ico/ico-save.c b/plug-ins/file-ico/ico-save.c
index 6bc7fd3..9e0f243 100644
--- a/plug-ins/file-ico/ico-save.c
+++ b/plug-ins/file-ico/ico-save.c
@@ -628,7 +628,7 @@ ico_image_get_reduced_buf (guint32 layer,
tmp_layer = gimp_layer_new (tmp_image, "tmp", w, h,
gimp_drawable_type (layer),
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (tmp_image, tmp_layer, -1, 0);
tmp = gimp_drawable_get_buffer (tmp_layer);
diff --git a/plug-ins/file-jpeg/jpeg-load.c b/plug-ins/file-jpeg/jpeg-load.c
index 0dbc52e..b8e5a40 100644
--- a/plug-ins/file-jpeg/jpeg-load.c
+++ b/plug-ins/file-jpeg/jpeg-load.c
@@ -232,7 +232,7 @@ load_image (const gchar *filename,
cinfo.output_width,
cinfo.output_height,
layer_type,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
layer_ID = preview_layer_ID;
}
else
@@ -241,7 +241,7 @@ load_image (const gchar *filename,
cinfo.output_width,
cinfo.output_height,
layer_type,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
}
if (! preview)
diff --git a/plug-ins/file-psd/psd-image-res-load.c b/plug-ins/file-psd/psd-image-res-load.c
index 527bce1..afc9460 100644
--- a/plug-ins/file-psd/psd-image-res-load.c
+++ b/plug-ins/file-psd/psd-image-res-load.c
@@ -1034,7 +1034,7 @@ load_resource_1033 (const PSDimageres *res_a,
cinfo.output_width,
cinfo.output_height,
GIMP_RGB_IMAGE,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
buffer = gimp_drawable_get_buffer (layer_id);
format = babl_format ("R'G'B' u8");
diff --git a/plug-ins/file-psd/psd-load.c b/plug-ins/file-psd/psd-load.c
index 6691e6e..5e0f5af 100644
--- a/plug-ins/file-psd/psd-load.c
+++ b/plug-ins/file-psd/psd-load.c
@@ -1435,7 +1435,7 @@ add_layers (gint32 image_id,
layer_id = gimp_layer_new (image_id, lyr_a[lidx]->name,
img_a->columns, img_a->rows,
image_type,
- 0, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 0, gimp_get_default_new_layer_mode ());
g_free (lyr_a[lidx]->name);
gimp_image_insert_layer (image_id, layer_id, parent_group_id, 0);
gimp_drawable_fill (layer_id, GIMP_FILL_TRANSPARENT);
@@ -1791,7 +1791,7 @@ add_merged_image (gint32 image_id,
layer_id = gimp_layer_new (image_id, _("Background"),
img_a->columns, img_a->rows,
image_type,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (image_id, layer_id, -1, 0);
buffer = gimp_drawable_get_buffer (layer_id);
gegl_buffer_set (buffer,
diff --git a/plug-ins/file-sgi/sgi.c b/plug-ins/file-sgi/sgi.c
index f4c2974..b9078f6 100644
--- a/plug-ins/file-sgi/sgi.c
+++ b/plug-ins/file-sgi/sgi.c
@@ -410,7 +410,7 @@ load_image (const gchar *filename,
layer = gimp_layer_new (image, _("Background"), sgip->xsize, sgip->ysize,
layer_type,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (image, layer, -1, 0);
/*
diff --git a/plug-ins/file-tiff/file-tiff-load.c b/plug-ins/file-tiff/file-tiff-load.c
index 9ded075..310c26f 100644
--- a/plug-ins/file-tiff/file-tiff-load.c
+++ b/plug-ins/file-tiff/file-tiff-load.c
@@ -913,7 +913,7 @@ load_image (GFile *file,
layer = gimp_layer_new (image, name,
cols, rows,
layer_type,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
}
else
{
@@ -927,7 +927,7 @@ load_image (GFile *file,
layer = gimp_layer_new (image, name,
cols, rows,
layer_type,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
g_free (name);
}
diff --git a/plug-ins/file-webp/file-webp-load.c b/plug-ins/file-webp/file-webp-load.c
index f14dc52..d39ee1d 100644
--- a/plug-ins/file-webp/file-webp-load.c
+++ b/plug-ins/file-webp/file-webp-load.c
@@ -55,7 +55,7 @@ create_layer (gint32 image_ID,
width, height,
GIMP_RGBA_IMAGE,
100,
- GIMP_LAYER_MODE_NORMAL_LEGACY);
+ gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (image_ID, layer_ID, -1, position);
diff --git a/plug-ins/gfig/gfig-dialog.c b/plug-ins/gfig/gfig-dialog.c
index bbcfc0c..7b50593 100644
--- a/plug-ins/gfig/gfig-dialog.c
+++ b/plug-ins/gfig/gfig-dialog.c
@@ -248,7 +248,7 @@ gfig_dialog (void)
newlayer = gimp_layer_new (gfig_context->image_id, "GFig",
img_width, img_height,
img_type,
- 100.0, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100.0, gimp_get_default_new_layer_mode ());
gimp_drawable_fill (newlayer, GIMP_FILL_TRANSPARENT);
gimp_image_insert_layer (gfig_context->image_id, newlayer, -1, -1);
gfig_context->drawable_id = newlayer;
diff --git a/plug-ins/lighting/lighting-apply.c b/plug-ins/lighting/lighting-apply.c
index 4a0608e..1c69e36 100644
--- a/plug-ins/lighting/lighting-apply.c
+++ b/plug-ins/lighting/lighting-apply.c
@@ -55,7 +55,7 @@ compute_image (void)
width, height,
GIMP_RGBA_IMAGE,
100.0,
- GIMP_LAYER_MODE_NORMAL_LEGACY);
+ gimp_get_default_new_layer_mode ());
}
else
{
@@ -66,7 +66,7 @@ compute_image (void)
width, height,
GIMP_RGB_IMAGE,
100.0,
- GIMP_LAYER_MODE_NORMAL_LEGACY);
+ gimp_get_default_new_layer_mode ());
}
gimp_image_insert_layer (new_image_id, new_layer_id, -1, 0);
diff --git a/plug-ins/map-object/map-object-apply.c b/plug-ins/map-object/map-object-apply.c
index 3e37d33..2ea2593 100644
--- a/plug-ins/map-object/map-object-apply.c
+++ b/plug-ins/map-object/map-object-apply.c
@@ -259,7 +259,7 @@ compute_image (void)
GIMP_RGBA_IMAGE :
GIMP_RGB_IMAGE,
100.0,
- GIMP_LAYER_MODE_NORMAL_LEGACY);
+ gimp_get_default_new_layer_mode ());
insert_layer = TRUE;
output_drawable = gimp_drawable_get (new_layer_id);
diff --git a/plug-ins/pagecurl/pagecurl.c b/plug-ins/pagecurl/pagecurl.c
index 0f534c3..c034037 100644
--- a/plug-ins/pagecurl/pagecurl.c
+++ b/plug-ins/pagecurl/pagecurl.c
@@ -721,7 +721,7 @@ do_curl_effect (gint32 drawable_id)
true_sel_height,
color_image ?
GIMP_RGBA_IMAGE : GIMP_GRAYA_IMAGE,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (image_id, curl_layer_id,
gimp_item_get_parent (drawable_id),
diff --git a/plug-ins/pygimp/pygimp-drawable.c b/plug-ins/pygimp/pygimp-drawable.c
index a31ffa5..0a30d85 100644
--- a/plug-ins/pygimp/pygimp-drawable.c
+++ b/plug-ins/pygimp/pygimp-drawable.c
@@ -1913,7 +1913,7 @@ lay_init(PyGimpLayer *self, PyObject *args, PyObject *kwargs)
unsigned int width, height;
GimpImageType type = GIMP_RGB_IMAGE;
double opacity = 100.0;
- GimpLayerMode mode = GIMP_LAYER_MODE_NORMAL_LEGACY;
+ GimpLayerMode mode = gimp_get_default_new_layer_mode ();
if (!PyArg_ParseTuple(args, "O!sii|idi:gimp.Layer.__init__",
@@ -2017,7 +2017,7 @@ pygimp_layer_new(gint32 ID)
#define GROUPLAYER_DOC "" \
"gimp.GroupLayer(img, name="", opacity=100.0, " \
-"mode=gimp.LAYER_MODE_NORMAL_LEGACY)\n" \
+"mode=gimp.LAYER_MODE_NORMAL)\n" \
"\n" \
" Creates a new GroupLayer object that has to be \n" \
"subsequently added to an image. Use Image.add_layer \n" \
@@ -2071,7 +2071,7 @@ grouplay_init(PyGimpLayer *self, PyObject *args, PyObject *kwargs)
char *name = "Layer Group";
GimpImageType type = GIMP_RGB_IMAGE;
double opacity = 100.0;
- GimpLayerMode mode = GIMP_LAYER_MODE_NORMAL_LEGACY;
+ GimpLayerMode mode = gimp_get_default_new_layer_mode ();
if (!PyArg_ParseTuple(args, "O!|sdi:gimp.Layer.__init__",
diff --git a/plug-ins/pygimp/pygimp-image.c b/plug-ins/pygimp/pygimp-image.c
index cd46032..e90264a 100644
--- a/plug-ins/pygimp/pygimp-image.c
+++ b/plug-ins/pygimp/pygimp-image.c
@@ -131,7 +131,7 @@ img_new_layer(PyGimpImage *self, PyObject *args, PyObject *kwargs)
gboolean alpha = TRUE;
int pos = -1;
double opacity = 100.0;
- GimpLayerMode mode = GIMP_LAYER_MODE_NORMAL_LEGACY;
+ GimpLayerMode mode = gimp_get_default_new_layer_mode ();
GimpFillType fill_mode = -1;
static char *kwlist[] = { "name", "width", "height", "offset_x", "offset_y",
diff --git a/plug-ins/screenshot/screenshot-win32.c b/plug-ins/screenshot/screenshot-win32.c
index 3de55e0..646a894 100644
--- a/plug-ins/screenshot/screenshot-win32.c
+++ b/plug-ins/screenshot/screenshot-win32.c
@@ -257,7 +257,7 @@ sendBMPToGimp(HBITMAP hBMP, HDC hDC, RECT rect)
layer_id = gimp_layer_new (new_image_id, _("Background"),
ROUND4 (width), height,
layerType,
- 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100, gimp_get_default_new_layer_mode ());
gimp_image_insert_layer (new_image_id, layer_id, -1, 0);
/* make rectangle */
diff --git a/plug-ins/screenshot/screenshot-x11.c b/plug-ins/screenshot/screenshot-x11.c
index d68b0f8..22131b6 100644
--- a/plug-ins/screenshot/screenshot-x11.c
+++ b/plug-ins/screenshot/screenshot-x11.c
@@ -465,7 +465,7 @@ add_cursor_image (gint32 image,
layer = gimp_layer_new (image, _("Mouse Pointer"),
cursor->width, cursor->height,
GIMP_RGBA_IMAGE,
- 100.0, GIMP_LAYER_MODE_NORMAL_LEGACY);
+ 100.0, gimp_get_default_new_layer_mode ());
buffer = gimp_drawable_get_buffer (layer);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]