[gimp] app: gimp_param_spec_duplicate(): don't warn



commit f73f813e1f103ec5973c160969489f7cb8971104
Author: Michael Natterer <mitch gimp org>
Date:   Sat Sep 14 12:23:13 2019 +0200

    app: gimp_param_spec_duplicate(): don't warn
    
    about unsupported GParamSpecs, simply return NULL and move the warning
    to the only caller instead.

 app/core/gimpparamspecs-duplicate.c    | 10 ----------
 app/operations/gimp-operation-config.c |  8 ++++++++
 2 files changed, 8 insertions(+), 10 deletions(-)
---
diff --git a/app/core/gimpparamspecs-duplicate.c b/app/core/gimpparamspecs-duplicate.c
index ff0587b91e..69260f153c 100644
--- a/app/core/gimpparamspecs-duplicate.c
+++ b/app/core/gimpparamspecs-duplicate.c
@@ -244,16 +244,6 @@ gimp_param_spec_duplicate (GParamSpec *pspec)
                                   &gimp_color,
                                   flags);
     }
-  else if (G_IS_PARAM_SPEC_OBJECT (pspec) ||
-           G_IS_PARAM_SPEC_POINTER (pspec))
-    {
-      /*  silently ignore object properties  */
-    }
-  else
-    {
-      g_warning ("%s: not supported: %s (%s)\n", G_STRFUNC,
-                 g_type_name (G_TYPE_FROM_INSTANCE (pspec)), pspec->name);
-    }
 
   if (copy)
     {
diff --git a/app/operations/gimp-operation-config.c b/app/operations/gimp-operation-config.c
index 29e9d812f5..2ffe858abc 100644
--- a/app/operations/gimp-operation-config.c
+++ b/app/operations/gimp-operation-config.c
@@ -192,6 +192,14 @@ gimp_operation_config_class_init (GObjectClass *klass,
             {
               g_object_class_install_property (klass, i + 1, copy);
             }
+          else if (! G_IS_PARAM_SPEC_OBJECT (pspec) &&
+                   ! G_IS_PARAM_SPEC_POINTER (pspec))
+            {
+              /*  silently ignore object properties  */
+
+              g_warning ("%s: not supported: %s (%s)\n", G_STRFUNC,
+                         g_type_name (G_TYPE_FROM_INSTANCE (pspec)), pspec->name);
+            }
         }
     }
 


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