[gimp/goat-invasion: 316/418] app: follow changes in GeglOperation API



commit 27bbe579a393a53e0c7e0354104b99a49ffaa2dc
Author: Ãyvind KolÃs <pippin gimp org>
Date:   Thu Mar 29 19:37:40 2012 +0100

    app: follow changes in GeglOperation API

 app/gegl/gimp-gegl-config-proxy.c      |    4 ++--
 app/gegl/gimpoperationborder.c         |    8 +++++---
 app/gegl/gimpoperationequalize.c       |    8 +++++---
 app/gegl/gimpoperationgrow.c           |    8 +++++---
 app/gegl/gimpoperationnormalmode.c     |    8 ++++++--
 app/gegl/gimpoperationpointlayermode.c |    9 +++++----
 app/gegl/gimpoperationsetalpha.c       |    9 ++++++---
 app/gegl/gimpoperationshapeburst.c     |    8 +++++---
 app/gegl/gimpoperationshrink.c         |    8 +++++---
 app/tools/gimpgegltool.c               |    7 ++++---
 10 files changed, 48 insertions(+), 29 deletions(-)
---
diff --git a/app/gegl/gimp-gegl-config-proxy.c b/app/gegl/gimp-gegl-config-proxy.c
index 6da44cf..349680a 100644
--- a/app/gegl/gimp-gegl-config-proxy.c
+++ b/app/gegl/gimp-gegl-config-proxy.c
@@ -120,7 +120,7 @@ gimp_gegl_config_class_init (GObjectClass *klass,
   klass->set_property = gimp_gegl_config_set_property;
   klass->get_property = gimp_gegl_config_get_property;
 
-  pspecs = gegl_list_properties (operation, &n_pspecs);
+  pspecs = gegl_operation_list_properties (operation, &n_pspecs);
 
   for (i = 0; i < n_pspecs; i++)
     {
@@ -218,7 +218,7 @@ gimp_gegl_config_proxy_sync (GimpObject  *proxy,
 
   g_return_if_fail (operation != NULL);
 
-  pspecs = gegl_list_properties (operation, &n_pspecs);
+  pspecs = gegl_operation_list_properties (operation, &n_pspecs);
   g_free (operation);
 
   for (i = 0; i < n_pspecs; i++)
diff --git a/app/gegl/gimpoperationborder.c b/app/gegl/gimpoperationborder.c
index 935c95c..16a4981 100644
--- a/app/gegl/gimpoperationborder.c
+++ b/app/gegl/gimpoperationborder.c
@@ -82,9 +82,11 @@ gimp_operation_border_class_init (GimpOperationBorderClass *klass)
   object_class->set_property   = gimp_operation_border_set_property;
   object_class->get_property   = gimp_operation_border_get_property;
 
-  operation_class->name        = "gimp:border";
-  operation_class->categories  = "gimp";
-  operation_class->description = "GIMP Border operation";
+  gegl_operation_class_set_keys (operation_class,
+      "name"        , "gimp:border",
+      "categories"  , "gimp",
+      "description" , "GIMP Border operation",
+      NULL);
 
   operation_class->prepare                 = gimp_operation_border_prepare;
   operation_class->get_required_for_output = gimp_operation_border_get_required_for_output;
diff --git a/app/gegl/gimpoperationequalize.c b/app/gegl/gimpoperationequalize.c
index 2986f5f..06bff53 100644
--- a/app/gegl/gimpoperationequalize.c
+++ b/app/gegl/gimpoperationequalize.c
@@ -75,9 +75,11 @@ gimp_operation_equalize_class_init (GimpOperationEqualizeClass *klass)
   object_class->set_property   = gimp_operation_equalize_set_property;
   object_class->get_property   = gimp_operation_equalize_get_property;
 
-  operation_class->name        = "gimp:equalize";
-  operation_class->categories  = "color";
-  operation_class->description = "GIMP Equalize operation";
+  gegl_operation_class_set_keys (operation_class,
+          "name"        , "gimp:equalize",
+          "categories"  , "color",
+          "description" , "GIMP Equalize operation",
+          NULL);
 
   point_class->process         = gimp_operation_equalize_process;
 
diff --git a/app/gegl/gimpoperationgrow.c b/app/gegl/gimpoperationgrow.c
index d9ae41f..58c8c46 100644
--- a/app/gegl/gimpoperationgrow.c
+++ b/app/gegl/gimpoperationgrow.c
@@ -80,9 +80,11 @@ gimp_operation_grow_class_init (GimpOperationGrowClass *klass)
   object_class->set_property   = gimp_operation_grow_set_property;
   object_class->get_property   = gimp_operation_grow_get_property;
 
-  operation_class->name        = "gimp:grow";
-  operation_class->categories  = "gimp";
-  operation_class->description = "GIMP Grow operation";
+  gegl_operation_class_set_keys (operation_class,
+        "name"        , "gimp:grow",
+        "categories"  , "gimp",
+        "description" , "GIMP Grow operation",
+        NULL);
 
   operation_class->prepare                 = gimp_operation_grow_prepare;
   operation_class->get_required_for_output = gimp_operation_grow_get_required_for_output;
diff --git a/app/gegl/gimpoperationnormalmode.c b/app/gegl/gimpoperationnormalmode.c
index 5b5a999..ab865cf 100644
--- a/app/gegl/gimpoperationnormalmode.c
+++ b/app/gegl/gimpoperationnormalmode.c
@@ -57,8 +57,12 @@ gimp_operation_normal_mode_class_init (GimpOperationNormalModeClass *klass)
   operation_class = GEGL_OPERATION_CLASS (klass);
   point_class     = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
 
-  operation_class->name        = "gimp:normal-mode";
-  operation_class->description = "GIMP normal mode operation";
+  gegl_operation_class_set_keys (operation_class,
+        "name"        , "gimp:normal-mode",
+        "description" , "GIMP normal mode operation",
+        NULL);
+
+
   operation_class->process     = gimp_operation_normal_parent_process;
 
   point_class->process         = gimp_operation_normal_mode_process;
diff --git a/app/gegl/gimpoperationpointlayermode.c b/app/gegl/gimpoperationpointlayermode.c
index 450bacb..d6b9444 100644
--- a/app/gegl/gimpoperationpointlayermode.c
+++ b/app/gegl/gimpoperationpointlayermode.c
@@ -114,10 +114,10 @@ gimp_operation_point_layer_mode_class_init (GimpOperationPointLayerModeClass *kl
   object_class->get_property   = gimp_operation_point_layer_mode_get_property;
 
   gegl_operation_class_set_keys (operation_class,
-           "name"       , "gimp:point-layer-mode",
-           "description", "GIMP point layer mode operation",
-           "categories" , "compositors",
-           NULL);
+                                 "name",        "gimp:point-layer-mode",
+                                 "description", "GIMP point layer mode operation",
+                                 "categories",  "compositors",
+                                 NULL);
 
   operation_class->prepare     = gimp_operation_point_layer_mode_prepare;
 
@@ -312,6 +312,7 @@ gimp_operation_point_layer_mode_process (GeglOperation       *operation,
 
   while (sample--)
     {
+      /* XXX: having such a switch in an innerloop is a horrible idea */
       switch (blend_mode)
         {
         case GIMP_ERASE_MODE:
diff --git a/app/gegl/gimpoperationsetalpha.c b/app/gegl/gimpoperationsetalpha.c
index fea77c2..55d44c0 100644
--- a/app/gegl/gimpoperationsetalpha.c
+++ b/app/gegl/gimpoperationsetalpha.c
@@ -69,9 +69,12 @@ gimp_operation_set_alpha_class_init (GimpOperationSetAlphaClass *klass)
   object_class->set_property = gimp_operation_set_alpha_set_property;
   object_class->get_property = gimp_operation_set_alpha_get_property;
 
-  operation_class->name        = "gimp:set-alpha";
-  operation_class->categories  = "color";
-  operation_class->description = "Set a buffer's alpha channel to a value";
+  gegl_operation_class_set_keys (operation_class,
+            "name"        , "gimp:set-alpha",
+            "categories"  , "color",
+            "description" , "Set a buffer's alpha channel to a value",
+            NULL);
+
   operation_class->prepare     = gimp_operation_set_alpha_prepare;
 
   point_class->process         = gimp_operation_set_alpha_process;
diff --git a/app/gegl/gimpoperationshapeburst.c b/app/gegl/gimpoperationshapeburst.c
index 114ee9c..364891d 100644
--- a/app/gegl/gimpoperationshapeburst.c
+++ b/app/gegl/gimpoperationshapeburst.c
@@ -80,9 +80,11 @@ gimp_operation_shapeburst_class_init (GimpOperationShapeburstClass *klass)
   object_class->set_property   = gimp_operation_shapeburst_set_property;
   object_class->get_property   = gimp_operation_shapeburst_get_property;
 
-  operation_class->name        = "gimp:shapeburst";
-  operation_class->categories  = "gimp";
-  operation_class->description = "GIMP Shapeburst operation";
+  gegl_operation_class_set_keys (operation_class,
+    "name"        , "gimp:shapeburst",
+    "categories"  , "gimp",
+    "description" , "GIMP Shapeburst operation",
+    NULL);
 
   operation_class->prepare                 = gimp_operation_shapeburst_prepare;
   operation_class->get_required_for_output = gimp_operation_shapeburst_get_required_for_output;
diff --git a/app/gegl/gimpoperationshrink.c b/app/gegl/gimpoperationshrink.c
index a18df16..0bbfe18 100644
--- a/app/gegl/gimpoperationshrink.c
+++ b/app/gegl/gimpoperationshrink.c
@@ -81,9 +81,11 @@ gimp_operation_shrink_class_init (GimpOperationShrinkClass *klass)
   object_class->set_property   = gimp_operation_shrink_set_property;
   object_class->get_property   = gimp_operation_shrink_get_property;
 
-  operation_class->name        = "gimp:shrink";
-  operation_class->categories  = "gimp";
-  operation_class->description = "GIMP Shrink operation";
+  gegl_operation_class_set_keys (operation_class,
+          "name"        , "gimp:shrink",
+          "categories"  , "gimp",
+          "description" , "GIMP Shrink operation",
+          NULL);
 
   operation_class->prepare                 = gimp_operation_shrink_prepare;
   operation_class->get_required_for_output = gimp_operation_shrink_get_required_for_output;
diff --git a/app/tools/gimpgegltool.c b/app/tools/gimpgegltool.c
index 48d590c..ab67e81 100644
--- a/app/tools/gimpgegltool.c
+++ b/app/tools/gimpgegltool.c
@@ -167,6 +167,7 @@ gimp_get_subtype_classes (GType  type,
 {
   GeglOperationClass *klass;
   GType              *ops;
+  const gchar        *categories;
   guint               n_ops;
   gint                i;
 
@@ -176,9 +177,9 @@ gimp_get_subtype_classes (GType  type,
   klass = GEGL_OPERATION_CLASS (g_type_class_ref (type));
   ops = g_type_children (type, &n_ops);
 
-  if (! gimp_gegl_tool_operation_blacklisted (klass->name,
-                                              gegl_operation_class_get_key (klass,
-                                                "categories")))
+  categories = gegl_operation_class_get_key (klass, "categories");
+
+  if (! gimp_gegl_tool_operation_blacklisted (klass->name, categories))
     classes = g_list_prepend (classes, klass);
 
   for (i = 0; i < n_ops; i++)



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