PDB: improve doc string for gimp-image-reorder-item

Discuss requirements on args.

Discuss reordering in a group versus moving to top-level.
This commit is contained in:
lloyd konneker 2024-11-19 09:17:17 -05:00
parent c65cf25805
commit 9e1d0d7642
3 changed files with 30 additions and 3 deletions

View File

@ -4340,7 +4340,11 @@ register_image_procs (GimpPDB *pdb)
"gimp-image-reorder-item");
gimp_procedure_set_static_help (procedure,
"Reorder the specified item within its item tree",
"This procedure reorders the specified item within its item tree.",
"Reorders or moves item within an item tree. Requires parent is %NULL or a GroupLayer, else returns error. When parent is not %NULL and item is in parent, reorders item within parent group. When parent is not %NULL and item is not in parent, moves item into parent group. When parent is %NULL, moves item from current parent to top level.\n"
"\n"
"Requires item is in same tree as not %NULL parent, else returns error. Layers, Channels, and Paths are in separate trees.\n"
"\n"
"Requires item is not ancestor of parent, else returns error, to preclude cycles.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",

View File

@ -1709,7 +1709,17 @@ gimp_image_lower_item_to_bottom (GimpImage *image,
*
* Reorder the specified item within its item tree
*
* This procedure reorders the specified item within its item tree.
* Reorders or moves item within an item tree. Requires parent is %NULL
* or a GroupLayer, else returns error. When parent is not %NULL and
* item is in parent, reorders item within parent group. When parent is
* not %NULL and item is not in parent, moves item into parent group.
* When parent is %NULL, moves item from current parent to top level.
*
* Requires item is in same tree as not %NULL parent, else returns
* error. Layers, Channels, and Paths are in separate trees.
*
* Requires item is not ancestor of parent, else returns error, to
* preclude cycles.
*
* Returns: TRUE on success.
*

View File

@ -687,7 +687,20 @@ sub image_reorder_item {
$blurb = "Reorder the specified item within its item tree";
$help = <<'HELP';
This procedure reorders the specified item within its item tree.
Reorders or moves item within an item tree.
Requires parent is %NULL or a GroupLayer, else returns error.
When parent is not %NULL and item is in parent,
reorders item within parent group.
When parent is not %NULL and item is not in parent,
moves item into parent group.
When parent is %NULL, moves item from current parent to top level.
Requires item is in same tree as not %NULL parent, else returns error.
Layers, Channels, and Paths are in separate trees.
Requires item is not ancestor of parent, else returns error, to preclude cycles.
HELP
&mitch_pdb_misc('2010', '2.8');