[gimp] app, pdb: fix pdb and generated code.



commit 5357628df2bae1c404cdad976754daf530827a28
Author: Jehan <jehan girinstud io>
Date:   Sat Aug 1 15:56:04 2020 +0200

    app, pdb: fix pdb and generated code.
    
    Oups! The meson build failing to properly generate code is annoying!

 app/core/core-enums.c        | 4 ++++
 app/pdb/drawable-edit-cmds.c | 8 ++++++--
 pdb/groups/drawable_edit.pdb | 4 +++-
 3 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/app/core/core-enums.c b/app/core/core-enums.c
index 952292d5f1..e86fe391fe 100644
--- a/app/core/core-enums.c
+++ b/app/core/core-enums.c
@@ -1121,8 +1121,10 @@ gimp_undo_type_get_type (void)
     { GIMP_UNDO_GROUP_ITEM_SCALE, "GIMP_UNDO_GROUP_ITEM_SCALE", "group-item-scale" },
     { GIMP_UNDO_GROUP_ITEM_RESIZE, "GIMP_UNDO_GROUP_ITEM_RESIZE", "group-item-resize" },
     { GIMP_UNDO_GROUP_LAYER_ADD, "GIMP_UNDO_GROUP_LAYER_ADD", "group-layer-add" },
+    { GIMP_UNDO_GROUP_LAYER_ADD_ALPHA, "GIMP_UNDO_GROUP_LAYER_ADD_ALPHA", "group-layer-add-alpha" },
     { GIMP_UNDO_GROUP_LAYER_ADD_MASK, "GIMP_UNDO_GROUP_LAYER_ADD_MASK", "group-layer-add-mask" },
     { GIMP_UNDO_GROUP_LAYER_APPLY_MASK, "GIMP_UNDO_GROUP_LAYER_APPLY_MASK", "group-layer-apply-mask" },
+    { GIMP_UNDO_GROUP_LAYER_REMOVE_ALPHA, "GIMP_UNDO_GROUP_LAYER_REMOVE_ALPHA", "group-layer-remove-alpha" },
     { GIMP_UNDO_GROUP_LAYER_LOCK_ALPHA, "GIMP_UNDO_GROUP_LAYER_LOCK_ALPHA", "group-layer-lock-alpha" },
     { GIMP_UNDO_GROUP_LAYER_OPACITY, "GIMP_UNDO_GROUP_LAYER_OPACITY", "group-layer-opacity" },
     { GIMP_UNDO_GROUP_LAYER_MODE, "GIMP_UNDO_GROUP_LAYER_MODE", "group-layer-mode" },
@@ -1226,8 +1228,10 @@ gimp_undo_type_get_type (void)
     { GIMP_UNDO_GROUP_ITEM_SCALE, NC_("undo-type", "Scale item"), NULL },
     { GIMP_UNDO_GROUP_ITEM_RESIZE, NC_("undo-type", "Resize item"), NULL },
     { GIMP_UNDO_GROUP_LAYER_ADD, NC_("undo-type", "Add layer"), NULL },
+    { GIMP_UNDO_GROUP_LAYER_ADD_ALPHA, NC_("undo-type", "Add alpha channel"), NULL },
     { GIMP_UNDO_GROUP_LAYER_ADD_MASK, NC_("undo-type", "Add layer mask"), NULL },
     { GIMP_UNDO_GROUP_LAYER_APPLY_MASK, NC_("undo-type", "Apply layer mask"), NULL },
+    { GIMP_UNDO_GROUP_LAYER_REMOVE_ALPHA, NC_("undo-type", "Remove alpha channel"), NULL },
     { GIMP_UNDO_GROUP_LAYER_LOCK_ALPHA, NC_("undo-type", "Lock/Unlock alpha channels"), NULL },
     { GIMP_UNDO_GROUP_LAYER_OPACITY, NC_("undo-type", "Set layers opacity"), NULL },
     { GIMP_UNDO_GROUP_LAYER_MODE, NC_("undo-type", "Set layers mode"), NULL },
diff --git a/app/pdb/drawable-edit-cmds.c b/app/pdb/drawable-edit-cmds.c
index e5f0328ed2..066f46bcf2 100644
--- a/app/pdb/drawable-edit-cmds.c
+++ b/app/pdb/drawable-edit-cmds.c
@@ -301,6 +301,7 @@ drawable_edit_stroke_selection_invoker (GimpProcedure         *procedure,
           GimpImage         *image = gimp_item_get_image (GIMP_ITEM (drawable));
           GimpStrokeOptions *options;
           GimpPaintOptions  *paint_options;
+          GList             *drawables = g_list_prepend (NULL, drawable);
 
           options = gimp_pdb_context_get_stroke_options (GIMP_PDB_CONTEXT (context));
 
@@ -309,10 +310,11 @@ drawable_edit_stroke_selection_invoker (GimpProcedure         *procedure,
           paint_options = gimp_config_duplicate (GIMP_CONFIG (paint_options));
 
           success = gimp_item_stroke (GIMP_ITEM (gimp_image_get_mask (image)),
-                                      drawable, context, options, paint_options,
+                                      drawables, context, options, paint_options,
                                       TRUE, progress, error);
 
           g_object_unref (paint_options);
+          g_list_free (drawables);
         }
       else
         success = FALSE;
@@ -348,6 +350,7 @@ drawable_edit_stroke_item_invoker (GimpProcedure         *procedure,
         {
           GimpStrokeOptions *options;
           GimpPaintOptions  *paint_options;
+          GList             *drawables = g_list_prepend (NULL, drawable);
 
           options = gimp_pdb_context_get_stroke_options (GIMP_PDB_CONTEXT (context));
 
@@ -355,11 +358,12 @@ drawable_edit_stroke_item_invoker (GimpProcedure         *procedure,
             gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context), NULL);
           paint_options = gimp_config_duplicate (GIMP_CONFIG (paint_options));
 
-          success = gimp_item_stroke (item, drawable,
+          success = gimp_item_stroke (item, drawables,
                                       context, options, paint_options,
                                       TRUE, progress, error);
 
           g_object_unref (paint_options);
+          g_list_free (drawables);
         }
       else
         success = FALSE;
diff --git a/pdb/groups/drawable_edit.pdb b/pdb/groups/drawable_edit.pdb
index 413d256ceb..59a43815b4 100644
--- a/pdb/groups/drawable_edit.pdb
+++ b/pdb/groups/drawable_edit.pdb
@@ -403,6 +403,7 @@ HELP
     {
       GimpStrokeOptions *options;
       GimpPaintOptions  *paint_options;
+      GList             *drawables = g_list_prepend (NULL, drawable);
 
       options = gimp_pdb_context_get_stroke_options (GIMP_PDB_CONTEXT (context));
 
@@ -410,11 +411,12 @@ HELP
         gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context), NULL);
       paint_options = gimp_config_duplicate (GIMP_CONFIG (paint_options));
 
-      success = gimp_item_stroke (item, drawable,
+      success = gimp_item_stroke (item, drawables,
                                   context, options, paint_options,
                                   TRUE, progress, error);
 
       g_object_unref (paint_options);
+      g_list_free (drawables);
     }
   else
     success = FALSE;


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