[gimp] libgimp: use the new API in GimpPDBProcedure



commit 5c16fc205d1455fe0c7a5561f05fb4187d58b216
Author: Michael Natterer <mitch gimp org>
Date:   Sat Sep 7 21:09:22 2019 +0200

    libgimp: use the new API in GimpPDBProcedure
    
    GimpProcedure should be the only API needed to introspect procedures.

 libgimp/gimppdbprocedure.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
---
diff --git a/libgimp/gimppdbprocedure.c b/libgimp/gimppdbprocedure.c
index cc5857e5cb..925b620142 100644
--- a/libgimp/gimppdbprocedure.c
+++ b/libgimp/gimppdbprocedure.c
@@ -222,5 +222,26 @@ _gimp_pdb_procedure_new (GimpPDB     *pdb,
       gimp_procedure_add_return_value (procedure, pspec);
     }
 
+  if (type != GIMP_PDB_PROC_TYPE_INTERNAL)
+    {
+      gchar  *string;
+      gchar **menu_paths;
+      gint    n_menu_paths;
+      gint    i;
+
+      string = _gimp_pdb_proc_image_types (name);
+      gimp_procedure_set_image_types (procedure, string);
+      g_free (string);
+
+      string = _gimp_pdb_proc_menu_label (name);
+      gimp_procedure_set_menu_label (procedure, string);
+      g_free (string);
+
+      menu_paths = _gimp_pdb_proc_menu_paths (name, &n_menu_paths);
+      for (i = 0; i < n_menu_paths; i++)
+        gimp_procedure_add_menu_path (procedure, menu_paths[i]);
+      g_strfreev (menu_paths);
+    }
+
   return procedure;
 }


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