Commit ca1fb7b7 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

turn c_style_procedure_names() in $proc->{help} into

2006-05-19  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/app.pl: turn c_style_procedure_names() in
	$proc->{help} into 'canonical-procedure-names'.

	* tools/pdbgen/pdb/color.pdb: std_pdb_deprecated() expects
	canonical procedure names.

	* app/pdb/color_cmds.c
	* app/pdb/drawable_cmds.c
	* app/pdb/drawable_transform_cmds.c
	* app/pdb/edit_cmds.c
	* app/pdb/paths_cmds.c
	* app/pdb/progress_cmds.c: regenerated.
parent fec7ca95
2006-05-19 Michael Natterer <mitch@gimp.org>
* tools/pdbgen/app.pl: turn c_style_procedure_names() in
$proc->{help} into 'canonical-procedure-names'.
* tools/pdbgen/pdb/color.pdb: std_pdb_deprecated() expects
canonical procedure names.
* app/pdb/color_cmds.c
* app/pdb/drawable_cmds.c
* app/pdb/drawable_transform_cmds.c
* app/pdb/edit_cmds.c
* app/pdb/paths_cmds.c
* app/pdb/progress_cmds.c: regenerated.
2006-05-19 Sven Neumann <sven@gimp.org>
* app/tools/gimptransformoptions.[ch]: removed one of the two
......
......@@ -936,12 +936,12 @@ register_color_procs (GimpPDB *pdb)
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-levels-auto");
gimp_procedure_set_static_strings (procedure,
"gimp-levels-auto",
"This procedure is deprecated! Use 'gimp_levels_stretch' instead.",
"This procedure is deprecated! Use 'gimp_levels_stretch' instead.",
"This procedure is deprecated! Use 'gimp-levels-stretch' instead.",
"This procedure is deprecated! Use 'gimp-levels-stretch' instead.",
"",
"",
"",
"gimp_levels_stretch");
"gimp-levels-stretch");
gimp_procedure_add_argument (procedure,
gimp_param_spec_drawable_id ("drawable",
"drawable",
......
......@@ -1849,7 +1849,7 @@ register_drawable_procs (GimpPDB *pdb)
gimp_procedure_set_static_strings (procedure,
"gimp-drawable-mask-bounds",
"Find the bounding box of the current selection in relation to the specified drawable.",
"This procedure returns whether there is a selection. If there is one, the upper left and lower righthand corners of its bounding box are returned. These coordinates are specified relative to the drawable's origin, and bounded by the drawable's extents. Please note that the pixel specified by the lower righthand coordinate of the bounding box is not part of the selection. The selection ends at the upper left corner of this pixel. This means the width of the selection can be calculated as (x2 - x1), its height as (y2 - y1). Note that the returned boolean does NOT correspond with the returned region being empty or not, it always returns whether the selection is non_empty. See gimp_drawable_mask_intersect() for a boolean return value which is more useful in most cases.",
"This procedure returns whether there is a selection. If there is one, the upper left and lower righthand corners of its bounding box are returned. These coordinates are specified relative to the drawable's origin, and bounded by the drawable's extents. Please note that the pixel specified by the lower righthand coordinate of the bounding box is not part of the selection. The selection ends at the upper left corner of this pixel. This means the width of the selection can be calculated as (x2 - x1), its height as (y2 - y1). Note that the returned boolean does NOT correspond with the returned region being empty or not, it always returns whether the selection is non_empty. See 'gimp-drawable-mask-intersect' for a boolean return value which is more useful in most cases.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
......@@ -1901,7 +1901,7 @@ register_drawable_procs (GimpPDB *pdb)
gimp_procedure_set_static_strings (procedure,
"gimp-drawable-mask-intersect",
"Find the bounding box of the current selection in relation to the specified drawable.",
"This procedure returns whether there is an intersection between the drawable and the selection. Unlike gimp_drawable_mask_bounds(), the intersection's bounds are returned as x, y, width, height. If there is no selection this function returns TRUE and the returned bounds are the extents of the whole drawable.",
"This procedure returns whether there is an intersection between the drawable and the selection. Unlike 'gimp-drawable-mask-bounds', the intersection's bounds are returned as x, y, width, height. If there is no selection this function returns TRUE and the returned bounds are the extents of the whole drawable.",
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2004",
......
......@@ -1328,7 +1328,7 @@ register_drawable_transform_procs (GimpPDB *pdb)
gimp_procedure_set_static_strings (procedure,
"gimp-drawable-transform-flip-default",
"Flip the specified drawable around a given line.",
"This procedure is a variant of gimp_drawable_transform_flip() which uses no interpolation/supersampling at all, or default values (depending on the 'interpolate' parameter).",
"This procedure is a variant of 'gimp-drawable-transform-flip' which uses no interpolation/supersampling at all, or default values (depending on the 'interpolate' parameter).",
"Jo\xc3\xa3o S. O. Bueno Calligaris",
"Jo\xc3\xa3o S. O. Bueno Calligaris",
"2004",
......@@ -1500,7 +1500,7 @@ register_drawable_transform_procs (GimpPDB *pdb)
gimp_procedure_set_static_strings (procedure,
"gimp-drawable-transform-perspective-default",
"Perform a possibly non-affine transformation on the specified drawable, with extra parameters.",
"This procedure is a variant of gimp_drawable_transform_perspective() which uses no interpolation/supersampling at all, or default values (depending on the 'interpolate' parameter).",
"This procedure is a variant of 'gimp-drawable-transform-perspective' which uses no interpolation/supersampling at all, or default values (depending on the 'interpolate' parameter).",
"Jo\xc3\xa3o S. O. Bueno Calligaris",
"Jo\xc3\xa3o S. O. Bueno Calligaris",
"2004",
......@@ -1731,7 +1731,7 @@ register_drawable_transform_procs (GimpPDB *pdb)
gimp_procedure_set_static_strings (procedure,
"gimp-drawable-transform-rotate-default",
"Rotate the specified drawable about given coordinates through the specified angle.",
"This procedure is a variant of gimp_drawable_transform_rotate() which uses no interpolation/supersampling at all, or default values (depending on the 'interpolate' parameter).",
"This procedure is a variant of 'gimp-drawable-transform-rotate' which uses no interpolation/supersampling at all, or default values (depending on the 'interpolate' parameter).",
"Jo\xc3\xa3o S. O. Bueno Calligaris",
"Jo\xc3\xa3o S. O. Bueno Calligaris",
"2004",
......@@ -1879,7 +1879,7 @@ register_drawable_transform_procs (GimpPDB *pdb)
gimp_procedure_set_static_strings (procedure,
"gimp-drawable-transform-scale-default",
"Scale the specified drawable with extra parameters",
"This procedure is a variant of gimp_drawable_transform_scale() which uses no interpolation/supersampling at all, or default values (depending on the 'interpolate' parameter).",
"This procedure is a variant of 'gimp-drawable-transform-scale' which uses no interpolation/supersampling at all, or default values (depending on the 'interpolate' parameter).",
"Jo\xc3\xa3o S. O. Bueno Calligaris",
"Jo\xc3\xa3o S. O. Bueno Calligaris",
"2004",
......@@ -2018,7 +2018,7 @@ register_drawable_transform_procs (GimpPDB *pdb)
gimp_procedure_set_static_strings (procedure,
"gimp-drawable-transform-shear-default",
"Shear the specified drawable about its center by the specified magnitude, with extra parameters.",
"This procedure is a variant of gimp_drawable_transform_shear() which uses no interpolation/supersampling at all, or default values (depending on the 'interpolate' parameter).",
"This procedure is a variant of 'gimp-drawable-transform-shear' which uses no interpolation/supersampling at all, or default values (depending on the 'interpolate' parameter).",
"Jo\xc3\xa3o S. O. Bueno Calligaris",
"Jo\xc3\xa3o S. O. Bueno Calligaris",
"2004",
......@@ -2175,7 +2175,7 @@ register_drawable_transform_procs (GimpPDB *pdb)
gimp_procedure_set_static_strings (procedure,
"gimp-drawable-transform-2d-default",
"Transform the specified drawable in 2d, with extra parameters.",
"This procedure is a variant of gimp_drawable_transform_2d() which uses no interpolation/supersampling at all, or default values (depending on the 'interpolate' parameter).",
"This procedure is a variant of 'gimp-drawable-transform-2d' which uses no interpolation/supersampling at all, or default values (depending on the 'interpolate' parameter).",
"Jo\xc3\xa3o S. O. Bueno Calligaris",
"Jo\xc3\xa3o S. O. Bueno Calligaris",
"2004",
......@@ -2371,7 +2371,7 @@ register_drawable_transform_procs (GimpPDB *pdb)
gimp_procedure_set_static_strings (procedure,
"gimp-drawable-transform-matrix-default",
"Transform the specified drawable in 2d, with extra parameters.",
"This procedure is a variant of gimp_drawable_transform_matrix() which uses no interpolation/supersampling at all, or default values (depending on the 'interpolate' parameter).",
"This procedure is a variant of 'gimp-drawable-transform-matrix' which uses no interpolation/supersampling at all, or default values (depending on the 'interpolate' parameter).",
"Jo\xc3\xa3o S. O. Bueno Calligaris",
"Jo\xc3\xa3o S. O. Bueno Calligaris",
"2004",
......
......@@ -982,7 +982,7 @@ register_edit_procs (GimpPDB *pdb)
gimp_procedure_set_static_strings (procedure,
"gimp-edit-fill",
"Fill selected area of drawable.",
"This procedure fills the specified drawable with the fill mode. If the fill mode is foreground, the current foreground color is used. If the fill mode is background, the current background color is used. Other fill modes should not be used. This procedure only affects regions within a selection if there is a selection active. If you want to fill the whole drawable, regardless of the selection, use gimp_drawable_fill().",
"This procedure fills the specified drawable with the fill mode. If the fill mode is foreground, the current foreground color is used. If the fill mode is background, the current background color is used. Other fill modes should not be used. This procedure only affects regions within a selection if there is a selection active. If you want to fill the whole drawable, regardless of the selection, use 'gimp-drawable-fill'.",
"Spencer Kimball & Peter Mattis & Raphael Quinet",
"Spencer Kimball & Peter Mattis",
"1995-2000",
......
......@@ -1249,7 +1249,7 @@ register_paths_procs (GimpPDB *pdb)
gimp_procedure_set_static_strings (procedure,
"gimp-path-import-string",
"Import paths from an SVG string.",
"This procedure works like gimp_path_import() but takes a string rather than reading the SVG from a file. This allows you to write scripts that generate SVG and feed it to GIMP.",
"This procedure works like 'gimp-path-import' but takes a string rather than reading the SVG from a file. This allows you to write scripts that generate SVG and feed it to GIMP.",
"Sven Neumann <sven@gimp.org>",
"Sven Neumann",
"2005",
......
......@@ -309,7 +309,7 @@ register_progress_procs (GimpPDB *pdb)
gimp_procedure_set_static_strings (procedure,
"gimp-progress-pulse",
"Pulses the progress bar for the current plug-in.",
"Updates the progress bar for the current plug-in. It is only valid to call this procedure from a plug-in. Use this function instead of gimp_progress_update() if you cannot tell how much progress has been made. This usually causes the the progress bar to enter \"activity mode\", where a block bounces back and forth.",
"Updates the progress bar for the current plug-in. It is only valid to call this procedure from a plug-in. Use this function instead of 'gimp-progress-update' if you cannot tell how much progress has been made. This usually causes the the progress bar to enter \"activity mode\", where a block bounces back and forth.",
"Sven Neumann <sven@gimp.org>",
"Sven Neumann",
"2005",
......@@ -325,7 +325,7 @@ register_progress_procs (GimpPDB *pdb)
gimp_procedure_set_static_strings (procedure,
"gimp-progress-set-text",
"Changes the text in the progress bar for the current plug-in.",
"This function allows to change the text in the progress bar for the current plug-in. Unlike gimp_progress_init() it does not change the displayed value.",
"This function allows to change the text in the progress bar for the current plug-in. Unlike 'gimp-progress-init' it does not change the displayed value.",
"Sven Neumann <sven@gimp.org>",
"Sven Neumann",
"2005",
......@@ -393,7 +393,7 @@ register_progress_procs (GimpPDB *pdb)
gimp_procedure_set_static_strings (procedure,
"gimp-progress-uninstall",
"Uninstalls the progress callback for the current plug-in.",
"This function uninstalls any progress callback installed with gimp_progress_install() before.",
"This function uninstalls any progress callback installed with 'gimp-progress-install' before.",
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2004",
......
......@@ -491,6 +491,10 @@ CODE
return ($pspec, $postproc);
}
sub canonicalize {
$_ = shift; s/_/-/g; return $_;
}
sub generate {
my @procs = @{(shift)};
my %out;
......@@ -503,9 +507,13 @@ sub generate {
my @inargs = @{$proc->{inargs}} if exists $proc->{inargs};
my @outargs = @{$proc->{outargs}} if exists $proc->{outargs};
my $help = $proc->{help};
local $success = 0;
$help =~ s/gimp(\w+)\(\s*\)/"'gimp".canonicalize($1)."'"/ge;
$out->{pcount}++; $total++;
$out->{register} .= <<CODE;
......@@ -518,7 +526,7 @@ sub generate {
gimp_procedure_set_static_strings (procedure,
"gimp-$proc->{canonical_name}",
@{[ &quotewrap($proc->{blurb}, 2) ]},
@{[ &quotewrap($proc->{help}, 2) ]},
@{[ &quotewrap($help, 2) ]},
"$proc->{author}",
"$proc->{copyright}",
"$proc->{date}",
......
......@@ -177,7 +177,7 @@ CODE
}
sub levels_auto {
&std_pdb_deprecated ('gimp_levels_stretch');
&std_pdb_deprecated ('gimp-levels-stretch');
@inargs = (
{ name => 'drawable', type => 'drawable',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment