app: avoid GIMP_TYPE_INT32 with gimp_pdb_execute_procedure_by_name()

Instead, use the actual enum type, G_TYPE_BOOLEAN, and G_TYPE_INT for
plain integers.
This commit is contained in:
Michael Natterer 2019-08-04 14:10:42 +02:00
parent 4962428440
commit 0f8747f10a
8 changed files with 21 additions and 21 deletions

View file

@ -256,9 +256,9 @@ gimp_pdb_progress_run_callback (GimpPdbProgress *progress,
progress->context,
NULL, NULL,
progress->callback_name,
GIMP_TYPE_INT32, command,
G_TYPE_STRING, text,
G_TYPE_DOUBLE, value,
GIMP_TYPE_PROGRESS_COMMAND, command,
G_TYPE_STRING, text,
G_TYPE_DOUBLE, value,
G_TYPE_NONE);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) !=

View file

@ -488,7 +488,7 @@ gimp_eek (const gchar *reason,
gimp_get_user_context (the_errors_gimp),
NULL, NULL,
"gimp-xcf-save",
GIMP_TYPE_INT32, 0,
GIMP_TYPE_RUN_MODE, GIMP_RUN_NONINTERACTIVE,
GIMP_TYPE_IMAGE_ID, gimp_image_get_ID (image),
GIMP_TYPE_DRAWABLE_ID, gimp_item_get_ID (item),
G_TYPE_STRING, backup_path,

View file

@ -386,8 +386,8 @@ file_open_thumbnail (Gimp *gimp,
gimp_pdb_execute_procedure_by_name (gimp->pdb,
context, progress, error,
gimp_object_get_name (procedure),
G_TYPE_STRING, path,
GIMP_TYPE_INT32, size,
G_TYPE_STRING, path,
G_TYPE_INT, size,
G_TYPE_NONE);
g_free (path);

View file

@ -282,13 +282,13 @@ gimp_brush_select_run_callback (GimpPdbDialog *dialog,
dialog->callback_name,
G_TYPE_STRING, gimp_object_get_name (object),
G_TYPE_DOUBLE, gimp_context_get_opacity (dialog->context) * 100.0,
GIMP_TYPE_INT32, GIMP_BRUSH_SELECT (dialog)->spacing,
GIMP_TYPE_INT32, gimp_context_get_paint_mode (dialog->context),
GIMP_TYPE_INT32, gimp_brush_get_width (brush),
GIMP_TYPE_INT32, gimp_brush_get_height (brush),
G_TYPE_INT, GIMP_BRUSH_SELECT (dialog)->spacing,
GIMP_TYPE_LAYER_MODE, gimp_context_get_paint_mode (dialog->context),
G_TYPE_INT, gimp_brush_get_width (brush),
G_TYPE_INT, gimp_brush_get_height (brush),
GIMP_TYPE_INT32, array->length,
GIMP_TYPE_INT8_ARRAY, array,
GIMP_TYPE_INT32, closing,
G_TYPE_BOOLEAN, closing,
G_TYPE_NONE);
gimp_array_free (array);

View file

@ -106,7 +106,7 @@ gimp_font_select_run_callback (GimpPdbDialog *dialog,
dialog->caller_context,
NULL, error,
dialog->callback_name,
G_TYPE_STRING, gimp_object_get_name (object),
GIMP_TYPE_INT32, closing,
G_TYPE_STRING, gimp_object_get_name (object),
G_TYPE_BOOLEAN, closing,
G_TYPE_NONE);
}

View file

@ -186,7 +186,7 @@ gimp_gradient_select_run_callback (GimpPdbDialog *dialog,
G_TYPE_STRING, gimp_object_get_name (object),
GIMP_TYPE_INT32, array->length / sizeof (gdouble),
GIMP_TYPE_FLOAT_ARRAY, array,
GIMP_TYPE_INT32, closing,
G_TYPE_BOOLEAN, closing,
G_TYPE_NONE);
gimp_array_free (array);

View file

@ -109,8 +109,8 @@ gimp_palette_select_run_callback (GimpPdbDialog *dialog,
dialog->caller_context,
NULL, error,
dialog->callback_name,
G_TYPE_STRING, gimp_object_get_name (object),
GIMP_TYPE_INT32, gimp_palette_get_n_colors (palette),
GIMP_TYPE_INT32, closing,
G_TYPE_STRING, gimp_object_get_name (object),
G_TYPE_INT, gimp_palette_get_n_colors (palette),
G_TYPE_BOOLEAN, closing,
G_TYPE_NONE);
}

View file

@ -126,12 +126,12 @@ gimp_pattern_select_run_callback (GimpPdbDialog *dialog,
NULL, error,
dialog->callback_name,
G_TYPE_STRING, gimp_object_get_name (object),
GIMP_TYPE_INT32, gimp_temp_buf_get_width (pattern->mask),
GIMP_TYPE_INT32, gimp_temp_buf_get_height (pattern->mask),
GIMP_TYPE_INT32, babl_format_get_bytes_per_pixel (gimp_temp_buf_get_format (pattern->mask)),
G_TYPE_INT, gimp_temp_buf_get_width (pattern->mask),
G_TYPE_INT, gimp_temp_buf_get_height (pattern->mask),
G_TYPE_INT, babl_format_get_bytes_per_pixel (gimp_temp_buf_get_format (pattern->mask)),
GIMP_TYPE_INT32, array->length,
GIMP_TYPE_INT8_ARRAY, array,
GIMP_TYPE_INT32, closing,
G_TYPE_BOOLEAN, closing,
G_TYPE_NONE);
gimp_array_free (array);