[gimp] app, libgimp, libgimpbase, pdb: s/GimpDistanceMetric/GeglDistanceMetric/
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app, libgimp, libgimpbase, pdb: s/GimpDistanceMetric/GeglDistanceMetric/
- Date: Sat, 17 Mar 2018 15:00:38 +0000 (UTC)
commit 9b11fb2b915c821e9ae2b17c8cc678823e7e16f2
Author: Jehan <jehan girinstud io>
Date: Sat Mar 17 14:57:31 2018 +0100
app, libgimp, libgimpbase, pdb: s/GimpDistanceMetric/GeglDistanceMetric/
GeglDistanceMetric has just been added as a public enum in GEGL. Basing
our code on this, and getting rid of the newly added GimpDistanceMetric.
app/core/gimpdrawable-blend.c | 4 ++--
app/core/gimpdrawable-blend.h | 2 +-
app/tools/gimpblendoptions.c | 4 ++--
app/tools/gimpblendoptions.h | 2 +-
libgimp/gimpenums.c.tail | 2 --
libgimpbase/gimpbase.def | 1 -
libgimpbase/gimpbaseenums.c | 32 --------------------------------
libgimpbase/gimpbaseenums.h | 11 -----------
pdb/enums.pl | 10 ----------
9 files changed, 6 insertions(+), 62 deletions(-)
---
diff --git a/app/core/gimpdrawable-blend.c b/app/core/gimpdrawable-blend.c
index 7273bdc..eba7194 100644
--- a/app/core/gimpdrawable-blend.c
+++ b/app/core/gimpdrawable-blend.c
@@ -89,7 +89,7 @@ gimp_drawable_blend (GimpDrawable *drawable,
* API needs to stay compatible.
*/
shapeburst =
- gimp_drawable_blend_shapeburst_distmap (drawable, GIMP_DISTANCE_METRIC_MANHATTAN,
+ gimp_drawable_blend_shapeburst_distmap (drawable, GEGL_DISTANCE_MANHATTAN,
GEGL_RECTANGLE (x, y, width, height),
progress);
}
@@ -139,7 +139,7 @@ gimp_drawable_blend (GimpDrawable *drawable,
GeglBuffer *
gimp_drawable_blend_shapeburst_distmap (GimpDrawable *drawable,
- GimpDistanceMetric metric,
+ GeglDistanceMetric metric,
const GeglRectangle *region,
GimpProgress *progress)
{
diff --git a/app/core/gimpdrawable-blend.h b/app/core/gimpdrawable-blend.h
index 1f6f30e..945cb92 100644
--- a/app/core/gimpdrawable-blend.h
+++ b/app/core/gimpdrawable-blend.h
@@ -40,7 +40,7 @@ void gimp_drawable_blend (GimpDrawable *drawable,
GeglBuffer *
gimp_drawable_blend_shapeburst_distmap (GimpDrawable *drawable,
- GimpDistanceMetric metric,
+ GeglDistanceMetric metric,
const GeglRectangle *region,
GimpProgress *progress);
diff --git a/app/tools/gimpblendoptions.c b/app/tools/gimpblendoptions.c
index 98e9556..c7b5aee 100644
--- a/app/tools/gimpblendoptions.c
+++ b/app/tools/gimpblendoptions.c
@@ -100,8 +100,8 @@ gimp_blend_options_class_init (GimpBlendOptionsClass *klass)
"distance-metric",
_("Metric"),
_("Metric to use for the distance calculation"),
- GIMP_TYPE_DISTANCE_METRIC,
- GIMP_DISTANCE_METRIC_EUCLIDEAN,
+ GEGL_TYPE_DISTANCE_METRIC,
+ GEGL_DISTANCE_EUCLIDEAN,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_ENUM (object_class, PROP_GRADIENT_REPEAT,
"gradient-repeat",
diff --git a/app/tools/gimpblendoptions.h b/app/tools/gimpblendoptions.h
index 6a8a4fc..7974a78 100644
--- a/app/tools/gimpblendoptions.h
+++ b/app/tools/gimpblendoptions.h
@@ -39,7 +39,7 @@ struct _GimpBlendOptions
gdouble offset;
GimpGradientType gradient_type;
- GimpDistanceMetric distance_metric;
+ GeglDistanceMetric distance_metric;
gboolean supersample;
gint supersample_depth;
diff --git a/libgimp/gimpenums.c.tail b/libgimp/gimpenums.c.tail
index 747e21c..ac40359 100644
--- a/libgimp/gimpenums.c.tail
+++ b/libgimp/gimpenums.c.tail
@@ -20,7 +20,6 @@ static const GimpGetTypeFunc get_type_funcs[] =
gimp_convert_palette_type_get_type,
gimp_convolve_type_get_type,
gimp_desaturate_mode_get_type,
- gimp_distance_metric_get_type,
gimp_dodge_burn_type_get_type,
gimp_fill_type_get_type,
gimp_foreground_extract_mode_get_type,
@@ -87,7 +86,6 @@ static const gchar * const type_names[] =
"GimpConvertPaletteType",
"GimpConvolveType",
"GimpDesaturateMode",
- "GimpDistanceMetric",
"GimpDodgeBurnType",
"GimpFillType",
"GimpForegroundExtractMode",
diff --git a/libgimpbase/gimpbase.def b/libgimpbase/gimpbase.def
index 6a80526..794ec4c 100644
--- a/libgimpbase/gimpbase.def
+++ b/libgimpbase/gimpbase.def
@@ -36,7 +36,6 @@ EXPORTS
gimp_desaturate_mode_get_type
gimp_directory
gimp_directory_file
- gimp_distance_metric_get_type
gimp_dodge_burn_type_compat_get_type
gimp_dodge_burn_type_get_type
gimp_enum_get_desc
diff --git a/libgimpbase/gimpbaseenums.c b/libgimpbase/gimpbaseenums.c
index f591623..648940d 100644
--- a/libgimpbase/gimpbaseenums.c
+++ b/libgimpbase/gimpbaseenums.c
@@ -533,38 +533,6 @@ gimp_desaturate_mode_get_type (void)
}
GType
-gimp_distance_metric_get_type (void)
-{
- static const GEnumValue values[] =
- {
- { GIMP_DISTANCE_METRIC_EUCLIDEAN, "GIMP_DISTANCE_METRIC_EUCLIDEAN", "euclidean" },
- { GIMP_DISTANCE_METRIC_MANHATTAN, "GIMP_DISTANCE_METRIC_MANHATTAN", "manhattan" },
- { GIMP_DISTANCE_METRIC_CHESSBOARD, "GIMP_DISTANCE_METRIC_CHESSBOARD", "chessboard" },
- { 0, NULL, NULL }
- };
-
- static const GimpEnumDesc descs[] =
- {
- { GIMP_DISTANCE_METRIC_EUCLIDEAN, NC_("distance-metric", "Euclidean"), NULL },
- { GIMP_DISTANCE_METRIC_MANHATTAN, NC_("distance-metric", "Manhattan"), NULL },
- { GIMP_DISTANCE_METRIC_CHESSBOARD, NC_("distance-metric", "Chessboard"), NULL },
- { 0, NULL, NULL }
- };
-
- static GType type = 0;
-
- if (G_UNLIKELY (! type))
- {
- type = g_enum_register_static ("GimpDistanceMetric", values);
- gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
- gimp_type_set_translation_context (type, "distance-metric");
- gimp_enum_set_value_descriptions (type, descs);
- }
-
- return type;
-}
-
-GType
gimp_dodge_burn_type_get_type (void)
{
static const GEnumValue values[] =
diff --git a/libgimpbase/gimpbaseenums.h b/libgimpbase/gimpbaseenums.h
index afa6538..5064d7d 100644
--- a/libgimpbase/gimpbaseenums.h
+++ b/libgimpbase/gimpbaseenums.h
@@ -290,17 +290,6 @@ typedef enum
#endif /* GIMP_DISABLE_DEPRECATED */
} GimpDesaturateMode;
-#define GIMP_TYPE_DISTANCE_METRIC (gimp_distance_metric_get_type ())
-
-GType gimp_distance_metric_get_type (void) G_GNUC_CONST;
-
-typedef enum
-{
- GIMP_DISTANCE_METRIC_EUCLIDEAN, /*< desc="Euclidean" >*/
- GIMP_DISTANCE_METRIC_MANHATTAN, /*< desc="Manhattan" >*/
- GIMP_DISTANCE_METRIC_CHESSBOARD /*< desc="Chessboard" >*/
-} GimpDistanceMetric;
-
#define GIMP_TYPE_DODGE_BURN_TYPE (gimp_dodge_burn_type_get_type ())
GType gimp_dodge_burn_type_get_type (void) G_GNUC_CONST;
diff --git a/pdb/enums.pl b/pdb/enums.pl
index 76258b1..85075b9 100644
--- a/pdb/enums.pl
+++ b/pdb/enums.pl
@@ -165,16 +165,6 @@ package Gimp::CodeGen::enums;
GIMP_DESATURATE_LUMINANCE => '3',
GIMP_DESATURATE_VALUE => '4' }
},
- GimpDistanceMetric =>
- { contig => 1,
- header => 'libgimpbase/gimpbaseenums.h',
- symbols => [ qw(GIMP_DISTANCE_METRIC_EUCLIDEAN
- GIMP_DISTANCE_METRIC_MANHATTAN
- GIMP_DISTANCE_METRIC_CHESSBOARD) ],
- mapping => { GIMP_DISTANCE_METRIC_EUCLIDEAN => '0',
- GIMP_DISTANCE_METRIC_MANHATTAN => '1',
- GIMP_DISTANCE_METRIC_CHESSBOARD => '2' }
- },
GimpDodgeBurnType =>
{ contig => 1,
header => 'libgimpbase/gimpbaseenums.h',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]