[gimp/cage: 43/130] app: property ID enums don't need to be public



commit 38760e8415bc3190b5aa851751cbb3b7a7e9e6f1
Author: Michael Natterer <mitch gimp org>
Date:   Wed Nov 10 11:40:48 2010 +0100

    app: property ID enums don't need to be public

 app/gegl/gimpoperationcagetransform.c |   24 +++++++++++++++---------
 app/gegl/gimpoperationcagetransform.h |    7 -------
 2 files changed, 15 insertions(+), 16 deletions(-)
---
diff --git a/app/gegl/gimpoperationcagetransform.c b/app/gegl/gimpoperationcagetransform.c
index abdf8ef..47ece5f 100644
--- a/app/gegl/gimpoperationcagetransform.c
+++ b/app/gegl/gimpoperationcagetransform.c
@@ -31,6 +31,14 @@
 #include "gimpcageconfig.h"
 
 
+enum
+{
+  PROP_0,
+  PROP_CONFIG,
+  PROP_FILL
+};
+
+
 static void         gimp_operation_cage_transform_finalize                (GObject             *object);
 static void         gimp_operation_cage_transform_get_property            (GObject             *object,
                                                                            guint                property_id,
@@ -99,16 +107,14 @@ gimp_operation_cage_transform_class_init (GimpOperationCageTransformClass *klass
 
   filter_class->process                    = gimp_operation_cage_transform_process;
 
-  g_object_class_install_property (object_class,
-                                   GIMP_OPERATION_CAGE_TRANSFORM_PROP_CONFIG,
+  g_object_class_install_property (object_class, PROP_CONFIG,
                                    g_param_spec_object ("config", NULL, NULL,
                                                         GIMP_TYPE_CAGE_CONFIG,
                                                         G_PARAM_READWRITE |
                                                         G_PARAM_CONSTRUCT));
 
-  g_object_class_install_property (object_class,
-                                   GIMP_OPERATION_CAGE_TRANSFORM_PROP_FILL,
-                                   g_param_spec_boolean ("fill_plain_color",
+  g_object_class_install_property (object_class, PROP_FILL,
+                                   g_param_spec_boolean ("fill-plain-color",
                                                          "Blocking render",
                                                          "Fill the original position of the cage with a plain color",
                                                          FALSE,
@@ -145,10 +151,10 @@ gimp_operation_cage_transform_get_property (GObject    *object,
 
   switch (property_id)
     {
-    case GIMP_OPERATION_CAGE_TRANSFORM_PROP_CONFIG:
+    case PROP_CONFIG:
       g_value_set_object (value, self->config);
       break;
-    case GIMP_OPERATION_CAGE_TRANSFORM_PROP_FILL:
+    case PROP_FILL:
       g_value_set_boolean (value, self->fill_plain_color);
       break;
 
@@ -168,12 +174,12 @@ gimp_operation_cage_transform_set_property (GObject      *object,
 
   switch (property_id)
     {
-    case GIMP_OPERATION_CAGE_TRANSFORM_PROP_CONFIG:
+    case PROP_CONFIG:
       if (self->config)
         g_object_unref (self->config);
       self->config = g_value_dup_object (value);
       break;
-    case GIMP_OPERATION_CAGE_TRANSFORM_PROP_FILL:
+    case PROP_FILL:
       self->fill_plain_color = g_value_get_boolean (value);
       break;
 
diff --git a/app/gegl/gimpoperationcagetransform.h b/app/gegl/gimpoperationcagetransform.h
index cd02932..2e06234 100644
--- a/app/gegl/gimpoperationcagetransform.h
+++ b/app/gegl/gimpoperationcagetransform.h
@@ -24,13 +24,6 @@
 #include <gegl-plugin.h>
 #include <operation/gegl-operation-composer.h>
 
-enum
-{
-  GIMP_OPERATION_CAGE_TRANSFORM_PROP_0,
-  GIMP_OPERATION_CAGE_TRANSFORM_PROP_CONFIG,
-  GIMP_OPERATION_CAGE_TRANSFORM_PROP_FILL
-};
-
 
 #define GIMP_TYPE_OPERATION_CAGE_TRANSFORM            (gimp_operation_cage_transform_get_type ())
 #define GIMP_OPERATION_CAGE_TRANSFORM(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_CAGE_TRANSFORM, GimpOperationCageTransform))



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