[gegl] gegl: permit instantiation of base classes



commit 363a1964187e6f2d52474c3c7a094afe1c71abf5
Author: Øyvind Kolås <pippin gimp org>
Date:   Sun Jan 22 20:29:44 2017 +0100

    gegl: permit instantiation of base classes
    
    Up until now GeglOperation classes have been treated as either derivable - or
    final. For GIMP it might be useful to have both layer mode subclasses with
    logical/implementation specific overrides as well as some layer modes that are
    implemented by the base classs using default vfuncs instead.

 gegl/operation/gegl-operation.c |   17 +++--------------
 1 files changed, 3 insertions(+), 14 deletions(-)
---
diff --git a/gegl/operation/gegl-operation.c b/gegl/operation/gegl-operation.c
index bf8cb2b..1286a25 100644
--- a/gegl/operation/gegl-operation.c
+++ b/gegl/operation/gegl-operation.c
@@ -691,21 +691,10 @@ gegl_operation_class_set_key (GeglOperationClass *klass,
 
   if (!strcmp (key_name, "name"))
     {
-      if (klass->name && strcmp (klass->name, key_value))
-        {
-          g_warning ("Cannot change name of operation class 0x%lX from \"%s\" "
-                     "to \"%s\"", (gulong) klass, klass->name, key_value);
-          g_free (key_value_dup);
-          return;
-        }
-      else
-        {
-          klass->name = key_value_dup;
-          gegl_operation_class_register_name (klass, key_value, FALSE);
-        }
+      klass->name = key_value_dup;
+      gegl_operation_class_register_name (klass, key_value, FALSE);
     }
-
-  if (!strcmp (key_name, "compat-name"))
+  else if (!strcmp (key_name, "compat-name"))
     {
       klass->compat_name = key_value_dup;
       gegl_operation_class_register_name (klass, key_value, TRUE);


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