[gimp/gimp-2-10] app, libgimpbase: move enum GimpBucketFillArea to the core



commit fca2e84f4faceafc4fe07c6b28a2c69369d60427
Author: Michael Natterer <mitch gimp org>
Date:   Wed Jan 2 15:47:31 2019 +0100

    app, libgimpbase: move enum GimpBucketFillArea to the core
    
    The whole bucket fill specific enum stuff is on its way out, so let's
    keep this one out of libgimp for now until we decide how to present
    line art filling in the PDB.
    
    (cherry picked from commit 368f2e596af0fa84d7a107615b711321f2fabee9)

 app/tools/tools-enums.c     | 31 +++++++++++++++++++++++++++++++
 app/tools/tools-enums.h     | 20 ++++++++++++++++++++
 libgimp/gimpenums.c.tail    |  2 --
 libgimpbase/gimpbase.def    |  1 -
 libgimpbase/gimpbaseenums.c | 32 --------------------------------
 libgimpbase/gimpbaseenums.h | 20 --------------------
 pdb/enums.pl                | 10 ----------
 7 files changed, 51 insertions(+), 65 deletions(-)
---
diff --git a/app/tools/tools-enums.c b/app/tools/tools-enums.c
index 9ac946711c..1ff1e9387a 100644
--- a/app/tools/tools-enums.c
+++ b/app/tools/tools-enums.c
@@ -9,6 +9,37 @@
 #include "gimp-intl.h"
 
 /* enumerations from "tools-enums.h" */
+GType
+gimp_bucket_fill_area_get_type (void)
+{
+  static const GEnumValue values[] =
+  {
+    { GIMP_BUCKET_FILL_SELECTION, "GIMP_BUCKET_FILL_SELECTION", "selection" },
+    { GIMP_BUCKET_FILL_SIMILAR_COLORS, "GIMP_BUCKET_FILL_SIMILAR_COLORS", "similar-colors" },
+    { GIMP_BUCKET_FILL_LINE_ART, "GIMP_BUCKET_FILL_LINE_ART", "line-art" },
+    { 0, NULL, NULL }
+  };
+
+  static const GimpEnumDesc descs[] =
+  {
+    { GIMP_BUCKET_FILL_SELECTION, NC_("bucket-fill-area", "Fill whole selection"), NULL },
+    { GIMP_BUCKET_FILL_SIMILAR_COLORS, NC_("bucket-fill-area", "Fill similar colors"), NULL },
+    { GIMP_BUCKET_FILL_LINE_ART, NC_("bucket-fill-area", "Fill by line art detection"), NULL },
+    { 0, NULL, NULL }
+  };
+
+  static GType type = 0;
+
+  if (G_UNLIKELY (! type))
+    {
+      type = g_enum_register_static ("GimpBucketFillArea", values);
+      gimp_type_set_translation_context (type, "bucket-fill-area");
+      gimp_enum_set_value_descriptions (type, descs);
+    }
+
+  return type;
+}
+
 GType
 gimp_rect_select_mode_get_type (void)
 {
diff --git a/app/tools/tools-enums.h b/app/tools/tools-enums.h
index acbe05915a..592c17bd7c 100644
--- a/app/tools/tools-enums.h
+++ b/app/tools/tools-enums.h
@@ -23,6 +23,26 @@
  * these enums are registered with the type system
  */
 
+/**
+ * GimpBucketFillArea:
+ * @GIMP_BUCKET_FILL_SELECTION:      Fill whole selection
+ * @GIMP_BUCKET_FILL_SIMILAR_COLORS: Fill similar colors
+ * @GIMP_BUCKET_FILL_LINE_ART:       Fill by line art detection
+ *
+ * Bucket fill area.
+ */
+#define GIMP_TYPE_BUCKET_FILL_AREA (gimp_bucket_fill_area_get_type ())
+
+GType gimp_bucket_fill_area_get_type (void) G_GNUC_CONST;
+
+typedef enum
+{
+  GIMP_BUCKET_FILL_SELECTION,       /*< desc="Fill whole selection" >*/
+  GIMP_BUCKET_FILL_SIMILAR_COLORS,  /*< desc="Fill similar colors" >*/
+  GIMP_BUCKET_FILL_LINE_ART         /*< desc="Fill by line art detection" >*/
+} GimpBucketFillArea;
+
+
 #define GIMP_TYPE_RECT_SELECT_MODE (gimp_rect_select_mode_get_type ())
 
 GType gimp_rect_select_mode_get_type (void) G_GNUC_CONST;
diff --git a/libgimp/gimpenums.c.tail b/libgimp/gimpenums.c.tail
index 9cb7f49d38..e8821e2313 100644
--- a/libgimp/gimpenums.c.tail
+++ b/libgimp/gimpenums.c.tail
@@ -8,7 +8,6 @@ static const GimpGetTypeFunc get_type_funcs[] =
   gimp_blend_mode_get_type,
   gimp_brush_application_mode_get_type,
   gimp_brush_generated_shape_get_type,
-  gimp_bucket_fill_area_get_type,
   gimp_bucket_fill_mode_get_type,
   gimp_cap_style_get_type,
   gimp_channel_ops_get_type,
@@ -77,7 +76,6 @@ static const gchar * const type_names[] =
   "GimpBlendMode",
   "GimpBrushApplicationMode",
   "GimpBrushGeneratedShape",
-  "GimpBucketFillArea",
   "GimpBucketFillMode",
   "GimpCapStyle",
   "GimpChannelOps",
diff --git a/libgimpbase/gimpbase.def b/libgimpbase/gimpbase.def
index ea0f7f4d97..8e93f11460 100644
--- a/libgimpbase/gimpbase.def
+++ b/libgimpbase/gimpbase.def
@@ -7,7 +7,6 @@ EXPORTS
        gimp_blend_mode_compat_get_type
        gimp_blend_mode_get_type
        gimp_brush_generated_shape_get_type
-       gimp_bucket_fill_area_get_type
        gimp_bucket_fill_mode_compat_get_type
        gimp_bucket_fill_mode_get_type
        gimp_cache_directory
diff --git a/libgimpbase/gimpbaseenums.c b/libgimpbase/gimpbaseenums.c
index 2a623c8630..ad87b7523b 100644
--- a/libgimpbase/gimpbaseenums.c
+++ b/libgimpbase/gimpbaseenums.c
@@ -114,38 +114,6 @@ gimp_brush_generated_shape_get_type (void)
   return type;
 }
 
-GType
-gimp_bucket_fill_area_get_type (void)
-{
-  static const GEnumValue values[] =
-  {
-    { GIMP_BUCKET_FILL_SELECTION, "GIMP_BUCKET_FILL_SELECTION", "selection" },
-    { GIMP_BUCKET_FILL_SIMILAR_COLORS, "GIMP_BUCKET_FILL_SIMILAR_COLORS", "similar-colors" },
-    { GIMP_BUCKET_FILL_LINE_ART, "GIMP_BUCKET_FILL_LINE_ART", "line-art" },
-    { 0, NULL, NULL }
-  };
-
-  static const GimpEnumDesc descs[] =
-  {
-    { GIMP_BUCKET_FILL_SELECTION, NC_("bucket-fill-area", "Fill whole selection"), NULL },
-    { GIMP_BUCKET_FILL_SIMILAR_COLORS, NC_("bucket-fill-area", "Fill similar colors"), NULL },
-    { GIMP_BUCKET_FILL_LINE_ART, NC_("bucket-fill-area", "Fill by line art detection"), NULL },
-    { 0, NULL, NULL }
-  };
-
-  static GType type = 0;
-
-  if (G_UNLIKELY (! type))
-    {
-      type = g_enum_register_static ("GimpBucketFillArea", values);
-      gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
-      gimp_type_set_translation_context (type, "bucket-fill-area");
-      gimp_enum_set_value_descriptions (type, descs);
-    }
-
-  return type;
-}
-
 GType
 gimp_bucket_fill_mode_get_type (void)
 {
diff --git a/libgimpbase/gimpbaseenums.h b/libgimpbase/gimpbaseenums.h
index 0a27a78ee9..45bf8da201 100644
--- a/libgimpbase/gimpbaseenums.h
+++ b/libgimpbase/gimpbaseenums.h
@@ -133,26 +133,6 @@ typedef enum
 } GimpBrushGeneratedShape;
 
 
-/**
- * GimpBucketFillArea:
- * @GIMP_BUCKET_FILL_SELECTION:      Fill whole selection
- * @GIMP_BUCKET_FILL_SIMILAR_COLORS: Fill similar colors
- * @GIMP_BUCKET_FILL_LINE_ART:       Fill by line art detection
- *
- * Bucket fill area.
- */
-#define GIMP_TYPE_BUCKET_FILL_AREA (gimp_bucket_fill_area_get_type ())
-
-GType gimp_bucket_fill_area_get_type (void) G_GNUC_CONST;
-
-typedef enum
-{
-  GIMP_BUCKET_FILL_SELECTION,       /*< desc="Fill whole selection" >*/
-  GIMP_BUCKET_FILL_SIMILAR_COLORS,  /*< desc="Fill similar colors" >*/
-  GIMP_BUCKET_FILL_LINE_ART         /*< desc="Fill by line art detection" >*/
-} GimpBucketFillArea;
-
-
 /**
  * GimpBucketFillMode:
  * @GIMP_BUCKET_FILL_FG:      FG color fill
diff --git a/pdb/enums.pl b/pdb/enums.pl
index d467959a38..a04d88b62d 100644
--- a/pdb/enums.pl
+++ b/pdb/enums.pl
@@ -64,16 +64,6 @@ package Gimp::CodeGen::enums;
                       GIMP_BRUSH_GENERATED_SQUARE => '1',
                       GIMP_BRUSH_GENERATED_DIAMOND => '2' }
        },
-    GimpBucketFillArea =>
-       { contig => 1,
-         header => 'libgimpbase/gimpbaseenums.h',
-         symbols => [ qw(GIMP_BUCKET_FILL_SELECTION
-                         GIMP_BUCKET_FILL_SIMILAR_COLORS
-                         GIMP_BUCKET_FILL_LINE_ART) ],
-         mapping => { GIMP_BUCKET_FILL_SELECTION => '0',
-                      GIMP_BUCKET_FILL_SIMILAR_COLORS => '1',
-                      GIMP_BUCKET_FILL_LINE_ART => '2' }
-       },
     GimpBucketFillMode =>
        { contig => 1,
          header => 'libgimpbase/gimpbaseenums.h',


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]