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

This commit is contained in:
Michael Natterer 2010-11-10 11:40:48 +01:00
parent 3ac37bbff0
commit 3b09aaa5f1
2 changed files with 15 additions and 16 deletions

View File

@ -31,6 +31,14 @@
#include "gimpcageconfig.h" #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_finalize (GObject *object);
static void gimp_operation_cage_transform_get_property (GObject *object, static void gimp_operation_cage_transform_get_property (GObject *object,
guint property_id, guint property_id,
@ -99,16 +107,14 @@ gimp_operation_cage_transform_class_init (GimpOperationCageTransformClass *klass
filter_class->process = gimp_operation_cage_transform_process; filter_class->process = gimp_operation_cage_transform_process;
g_object_class_install_property (object_class, g_object_class_install_property (object_class, PROP_CONFIG,
GIMP_OPERATION_CAGE_TRANSFORM_PROP_CONFIG,
g_param_spec_object ("config", NULL, NULL, g_param_spec_object ("config", NULL, NULL,
GIMP_TYPE_CAGE_CONFIG, GIMP_TYPE_CAGE_CONFIG,
G_PARAM_READWRITE | G_PARAM_READWRITE |
G_PARAM_CONSTRUCT)); G_PARAM_CONSTRUCT));
g_object_class_install_property (object_class, g_object_class_install_property (object_class, PROP_FILL,
GIMP_OPERATION_CAGE_TRANSFORM_PROP_FILL, g_param_spec_boolean ("fill-plain-color",
g_param_spec_boolean ("fill_plain_color",
"Blocking render", "Blocking render",
"Fill the original position of the cage with a plain color", "Fill the original position of the cage with a plain color",
FALSE, FALSE,
@ -145,10 +151,10 @@ gimp_operation_cage_transform_get_property (GObject *object,
switch (property_id) switch (property_id)
{ {
case GIMP_OPERATION_CAGE_TRANSFORM_PROP_CONFIG: case PROP_CONFIG:
g_value_set_object (value, self->config); g_value_set_object (value, self->config);
break; break;
case GIMP_OPERATION_CAGE_TRANSFORM_PROP_FILL: case PROP_FILL:
g_value_set_boolean (value, self->fill_plain_color); g_value_set_boolean (value, self->fill_plain_color);
break; break;
@ -168,12 +174,12 @@ gimp_operation_cage_transform_set_property (GObject *object,
switch (property_id) switch (property_id)
{ {
case GIMP_OPERATION_CAGE_TRANSFORM_PROP_CONFIG: case PROP_CONFIG:
if (self->config) if (self->config)
g_object_unref (self->config); g_object_unref (self->config);
self->config = g_value_dup_object (value); self->config = g_value_dup_object (value);
break; break;
case GIMP_OPERATION_CAGE_TRANSFORM_PROP_FILL: case PROP_FILL:
self->fill_plain_color = g_value_get_boolean (value); self->fill_plain_color = g_value_get_boolean (value);
break; break;

View File

@ -24,13 +24,6 @@
#include <gegl-plugin.h> #include <gegl-plugin.h>
#include <operation/gegl-operation-composer.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_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)) #define GIMP_OPERATION_CAGE_TRANSFORM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_CAGE_TRANSFORM, GimpOperationCageTransform))