diff --git a/app/pdb/image-autocrop-cmds.c b/app/pdb/image-autocrop-cmds.c index a77e750de7..af54d42235 100644 --- a/app/pdb/image-autocrop-cmds.c +++ b/app/pdb/image-autocrop-cmds.c @@ -110,12 +110,12 @@ image_autocrop_invoker (GimpProcedure *procedure, } static GimpValueArray * -image_autocrop_layer_invoker (GimpProcedure *procedure, - Gimp *gimp, - GimpContext *context, - GimpProgress *progress, - const GimpValueArray *args, - GError **error) +image_autocrop_selected_layers_invoker (GimpProcedure *procedure, + Gimp *gimp, + GimpContext *context, + GimpProgress *progress, + const GimpValueArray *args, + GError **error) { gboolean success = TRUE; GimpImage *image; @@ -185,7 +185,9 @@ register_image_autocrop_procs (GimpPDB *pdb) "gimp-image-autocrop"); gimp_procedure_set_static_help (procedure, "Remove empty borders from the image", - "Remove empty borders from the image.", + "Remove empty borders from the @image based on empty borders of the input @drawable.\n" + "\n" + "The input drawable serves as a base for detecting cropping extents (transparency or background color).", NULL); gimp_procedure_set_static_attribution (procedure, "Spencer Kimball & Peter Mattis", @@ -207,14 +209,15 @@ register_image_autocrop_procs (GimpPDB *pdb) g_object_unref (procedure); /* - * gimp-image-autocrop-layer + * gimp-image-autocrop-selected-layers */ - procedure = gimp_procedure_new (image_autocrop_layer_invoker, TRUE, FALSE); + procedure = gimp_procedure_new (image_autocrop_selected_layers_invoker, TRUE, FALSE); gimp_object_set_static_name (GIMP_OBJECT (procedure), - "gimp-image-autocrop-layer"); + "gimp-image-autocrop-selected-layers"); gimp_procedure_set_static_help (procedure, "Crop the selected layers based on empty borders of the input drawable", - "Crop the selected layers of the input \"image\" based on empty borders of the input \"drawable\". \n\nThe input drawable serves as a base for detecting cropping extents (transparency or background color), and is not necessarily among the cropped layers (the current selected layers).", + "Crop the selected layers of the input @image based on empty borders of the input @drawable.\n" + "The input drawable serves as a base for detecting cropping extents (transparency or background color), and is not necessarily among the cropped layers (the current selected layers).", NULL); gimp_procedure_set_static_attribution (procedure, "Spencer Kimball & Peter Mattis", diff --git a/libgimp/gimp.def b/libgimp/gimp.def index 94f07816b6..2b4ec8372d 100644 --- a/libgimp/gimp.def +++ b/libgimp/gimp.def @@ -408,8 +408,8 @@ EXPORTS gimp_image_add_sample_point gimp_image_add_vguide gimp_image_attach_parasite - gimp_image_autocrop - gimp_image_autocrop_layer + gimp_image_autocrop + gimp_image_autocrop_selected_layers gimp_image_clean_all gimp_image_convert_color_profile gimp_image_convert_color_profile_from_file diff --git a/libgimp/gimpimageautocrop_pdb.c b/libgimp/gimpimageautocrop_pdb.c index c2942106a0..c086627ca3 100644 --- a/libgimp/gimpimageautocrop_pdb.c +++ b/libgimp/gimpimageautocrop_pdb.c @@ -30,9 +30,9 @@ /** * SECTION: gimpimageautocrop * @title: gimpimageautocrop - * @short_description: Functions that crop images to a layer. + * @short_description: Functions that crop images or layers. * - * Functions that crop images to a layer. + * Functions that crop images or layers. **/ @@ -43,7 +43,11 @@ * * Remove empty borders from the image * - * Remove empty borders from the image. + * Remove empty borders from the @image based on empty borders of the + * input @drawable. + * + * The input drawable serves as a base for detecting cropping extents + * (transparency or background color). * * Returns: TRUE on success. **/ @@ -73,24 +77,24 @@ gimp_image_autocrop (GimpImage *image, } /** - * gimp_image_autocrop_layer: + * gimp_image_autocrop_selected_layers: * @image: Input image). * @drawable: Input drawable. * * Crop the selected layers based on empty borders of the input * drawable * - * Crop the selected layers of the input \"image\" based on empty - * borders of the input \"drawable\". \n\nThe input drawable serves as - * a base for detecting cropping extents (transparency or background - * color), and is not necessarily among the cropped layers (the current - * selected layers). + * Crop the selected layers of the input @image based on empty borders + * of the input @drawable. + * The input drawable serves as a base for detecting cropping extents + * (transparency or background color), and is not necessarily among the + * cropped layers (the current selected layers). * * Returns: TRUE on success. **/ gboolean -gimp_image_autocrop_layer (GimpImage *image, - GimpDrawable *drawable) +gimp_image_autocrop_selected_layers (GimpImage *image, + GimpDrawable *drawable) { GimpValueArray *args; GimpValueArray *return_vals; @@ -102,7 +106,7 @@ gimp_image_autocrop_layer (GimpImage *image, G_TYPE_NONE); return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (), - "gimp-image-autocrop-layer", + "gimp-image-autocrop-selected-layers", args); gimp_value_array_unref (args); diff --git a/libgimp/gimpimageautocrop_pdb.h b/libgimp/gimpimageautocrop_pdb.h index d7610dfa98..6c0813ddb4 100644 --- a/libgimp/gimpimageautocrop_pdb.h +++ b/libgimp/gimpimageautocrop_pdb.h @@ -32,10 +32,10 @@ G_BEGIN_DECLS /* For information look into the C source or the html documentation */ -gboolean gimp_image_autocrop (GimpImage *image, - GimpDrawable *drawable); -gboolean gimp_image_autocrop_layer (GimpImage *image, - GimpDrawable *drawable); +gboolean gimp_image_autocrop (GimpImage *image, + GimpDrawable *drawable); +gboolean gimp_image_autocrop_selected_layers (GimpImage *image, + GimpDrawable *drawable); G_END_DECLS diff --git a/pdb/groups/image_autocrop.pdb b/pdb/groups/image_autocrop.pdb index 0ea48bfc72..e059f0feac 100644 --- a/pdb/groups/image_autocrop.pdb +++ b/pdb/groups/image_autocrop.pdb @@ -21,7 +21,11 @@ sub image_autocrop { $blurb = 'Remove empty borders from the image'; $help = <<'HELP'; -Remove empty borders from the image. +Remove empty borders from the @image based on empty borders of the input @drawable. + + +The input drawable serves as a base for detecting cropping extents +(transparency or background color). HELP &std_pdb_misc; @@ -82,12 +86,15 @@ CODE ); } -sub image_autocrop_layer { +sub image_autocrop_selected_layers { $blurb = 'Crop the selected layers based on empty borders of the input drawable'; $help = <<'HELP'; -Crop the selected layers of the input "image" based on empty borders of the input "drawable". -\n\nThe input drawable serves as a base for detecting cropping extents (transparency or background color), and is not necessarily among the cropped layers (the current selected layers). +Crop the selected layers of the input @image based on empty borders of the input @drawable. + +The input drawable serves as a base for detecting cropping extents +(transparency or background color), and is not necessarily among the +cropped layers (the current selected layers). HELP &std_pdb_misc; @@ -157,13 +164,13 @@ CODE "gimp-intl.h"); @procs = qw(image_autocrop - image_autocrop_layer); + image_autocrop_selected_layers); %exports = (app => [@procs], lib => [@procs]); $desc = 'Image Autocrop'; $doc_title = 'gimpimageautocrop'; -$doc_short_desc = 'Functions that crop images to a layer.'; -$doc_long_desc = 'Functions that crop images to a layer.'; +$doc_short_desc = 'Functions that crop images or layers.'; +$doc_long_desc = 'Functions that crop images or layers.'; 1;