[gimp] app: add missing procedure argument types to pluginrc



commit 8acff481a31cd9438ac58791e5c16c2347b62527
Author: Michael Natterer <mitch gimp org>
Date:   Thu Sep 5 20:29:07 2019 +0200

    app: add missing procedure argument types to pluginrc
    
    GP_PARAM_DEF_TYPE_ID_ARRAY and GP_PARAM_DEF_TYPE_PARAM_DEF.

 app/plug-in/plug-in-rc.c | 38 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 37 insertions(+), 1 deletion(-)
---
diff --git a/app/plug-in/plug-in-rc.c b/app/plug-in/plug-in-rc.c
index bd5084554b..73d32eb6c5 100644
--- a/app/plug-in/plug-in-rc.c
+++ b/app/plug-in/plug-in-rc.c
@@ -40,7 +40,7 @@
 #include "gimp-intl.h"
 
 
-#define PLUG_IN_RC_FILE_VERSION 11
+#define PLUG_IN_RC_FILE_VERSION 12
 
 
 /*
@@ -877,6 +877,24 @@ plug_in_proc_arg_deserialize (GScanner      *scanner,
           goto error;
         }
       break;
+
+    case GP_PARAM_DEF_TYPE_ID_ARRAY:
+      if (! gimp_scanner_parse_string (scanner,
+                                       &param_def.meta.m_id_array.type_name))
+        {
+          token = G_TOKEN_STRING;
+          goto error;
+        }
+      break;
+
+    case GP_PARAM_DEF_TYPE_PARAM_DEF:
+      if (! gimp_scanner_parse_string (scanner,
+                                       &param_def.meta.m_param_def.type_name))
+        {
+          token = G_TOKEN_STRING;
+          goto error;
+        }
+      break;
     }
 
   if (! gimp_scanner_parse_token (scanner, G_TOKEN_RIGHT_PAREN))
@@ -923,6 +941,14 @@ plug_in_proc_arg_deserialize (GScanner      *scanner,
     case GP_PARAM_DEF_TYPE_COLOR:
     case GP_PARAM_DEF_TYPE_ID:
       break;
+
+    case GP_PARAM_DEF_TYPE_ID_ARRAY:
+      g_free (param_def.meta.m_id_array.type_name);
+      break;
+
+    case GP_PARAM_DEF_TYPE_PARAM_DEF:
+      g_free (param_def.meta.m_param_def.type_name);
+      break;
     }
 
   return token;
@@ -1080,6 +1106,16 @@ plug_in_rc_write_proc_arg (GimpConfigWriter *writer,
       gimp_config_writer_printf (writer, "%d",
                                  param_def.meta.m_id.none_ok);
       break;
+
+    case GP_PARAM_DEF_TYPE_ID_ARRAY:
+      gimp_config_writer_string (writer,
+                                 param_def.meta.m_id_array.type_name);
+      break;
+
+    case GP_PARAM_DEF_TYPE_PARAM_DEF:
+      gimp_config_writer_string (writer,
+                                 param_def.meta.m_param_def.type_name);
+      break;
     }
 
   gimp_config_writer_close (writer);


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