[gegl] operations: Rename gegl:scaleratio and gegl:scalesize to include dashes
- From: Michael Henning <mhenning src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] operations: Rename gegl:scaleratio and gegl:scalesize to include dashes
- Date: Sun, 9 Jun 2013 19:09:55 +0000 (UTC)
commit b707f60cdad2a26c7ebcbcf3a545e16a5941e2a5
Author: Michael Henning <drawoc darkrefraction com>
Date: Sun Jun 9 14:53:01 2013 -0400
operations: Rename gegl:scaleratio and gegl:scalesize to include dashes
operations/transform/chant.h | 10 ++++++++--
operations/transform/module.c | 8 ++++----
operations/transform/scale-ratio.c | 3 ++-
operations/transform/scale-size.c | 3 ++-
4 files changed, 16 insertions(+), 8 deletions(-)
---
diff --git a/operations/transform/chant.h b/operations/transform/chant.h
index e4c95ee..d343e24 100644
--- a/operations/transform/chant.h
+++ b/operations/transform/chant.h
@@ -18,6 +18,12 @@
#define GEGL_CHANT_PARENT_TYPE TYPE_OP_TRANSFORM
#define GEGL_CHANT_PARENT_CLASS OP_TRANSFORM_CLASS
+#ifndef GEGL_CHANT_OPERATION_NAME
+#define STRINGIFY(x) #x
+#define TOSTRING(x) STRINGIFY(x)
+#define GEGL_CHANT_OPERATION_NAME ("gegl:" TOSTRING(GEGL_CHANT_NAME))
+#endif
+
typedef struct Generated GeglChantOperation;
typedef struct GeneratedClass ChantClass;
@@ -185,9 +191,9 @@ gegl_chant_class_init (ChantClass * klass)
parent_class->create_matrix = create_matrix;
#define M_GEGL_CHANT_SET_NAME_EXTENDED(nam) \
- operation_class->name=g_strdup("gegl:"#nam);
+ operation_class->name=g_strdup(nam);
#define M_GEGL_CHANT_SET_NAME(name) M_GEGL_CHANT_SET_NAME_EXTENDED(name)
- M_GEGL_CHANT_SET_NAME (GEGL_CHANT_NAME);
+ M_GEGL_CHANT_SET_NAME (GEGL_CHANT_OPERATION_NAME);
gegl_operation_class_set_key (operation_class, "categories", "transform");
diff --git a/operations/transform/module.c b/operations/transform/module.c
index 34976ac..3d2398a 100644
--- a/operations/transform/module.c
+++ b/operations/transform/module.c
@@ -41,8 +41,8 @@ gegl_module_query (GTypeModule *module)
GType rotate_get_type (void);
GType scale_get_type (void);
-GType scaleratio_get_type (void);
-GType scalesize_get_type (void);
+GType scale_ratio_get_type (void);
+GType scale_size_get_type (void);
GType shear_get_type (void);
GType translate_get_type (void);
GType reflect_get_type (void);
@@ -57,8 +57,8 @@ gegl_module_register (GTypeModule *module)
dummy = op_transform_get_type ();
dummy = rotate_get_type ();
dummy = scale_get_type ();
- dummy = scaleratio_get_type ();
- dummy = scalesize_get_type ();
+ dummy = scale_ratio_get_type ();
+ dummy = scale_size_get_type ();
dummy = shear_get_type ();
dummy = translate_get_type ();
dummy = reflect_get_type ();
diff --git a/operations/transform/scale-ratio.c b/operations/transform/scale-ratio.c
index a233462..b5c32e3 100644
--- a/operations/transform/scale-ratio.c
+++ b/operations/transform/scale-ratio.c
@@ -29,7 +29,8 @@ gegl_chant_double (y, -G_MAXDOUBLE, G_MAXDOUBLE, 1.0,
#else
-#define GEGL_CHANT_NAME scaleratio
+#define GEGL_CHANT_NAME scale_ratio
+#define GEGL_CHANT_OPERATION_NAME "gegl:scale-ratio"
#define GEGL_CHANT_DESCRIPTION _("Scales the buffer according to a ratio.")
#define GEGL_CHANT_SELF "scale-ratio.c"
#include "chant.h"
diff --git a/operations/transform/scale-size.c b/operations/transform/scale-size.c
index a0395bd..e2f05f3 100644
--- a/operations/transform/scale-size.c
+++ b/operations/transform/scale-size.c
@@ -29,7 +29,8 @@ gegl_chant_double (y, -G_MAXDOUBLE, G_MAXDOUBLE, 100.0,
#else
-#define GEGL_CHANT_NAME scalesize
+#define GEGL_CHANT_NAME scale_size
+#define GEGL_CHANT_OPERATION_NAME "gegl:scale-size"
#define GEGL_CHANT_DESCRIPTION _("Scales the buffer according to a size.")
#define GEGL_CHANT_SELF "scale-size.c"
#include "chant.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]