static GimpValueArray * message_invoker (GimpProcedure *procedure, Gimp *gimp, GimpContext *context, GimpProgress *progress, const GimpValueArray *args, GError **error) { gboolean success = TRUE; const gchar *message; message = g_value_get_string (gimp_value_array_index (args, 0)); if (success) { const gchar *domain = NULL; if (gimp->plug_in_manager->current_plug_in) domain = gimp_plug_in_get_undo_desc (gimp->plug_in_manager->current_plug_in); gimp_show_message (gimp, G_OBJECT (progress), GIMP_MESSAGE_WARNING, domain, message); } return gimp_procedure_get_return_values (procedure, success, error ? *error : NULL); }
static GValueArray * image_undo_group_start_invoker (GimpProcedure *procedure, Gimp *gimp, GimpContext *context, GimpProgress *progress, const GValueArray *args, GError **error) { gboolean success = TRUE; GimpImage *image; image = gimp_value_get_image (&args->values[0], gimp); if (success) { GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in; const gchar *undo_desc = NULL; if (plug_in) { success = gimp_plug_in_cleanup_undo_group_start (plug_in, image); if (success) undo_desc = gimp_plug_in_get_undo_desc (plug_in); } if (success) gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_MISC, undo_desc); } return gimp_procedure_get_return_values (procedure, success, error ? *error : NULL); }