Commit fae8657c authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

tools/pdbgen/app.pl removed code that used to fiddles with the argument

2006-05-18  Sven Neumann  <sven@gimp.org>

	* tools/pdbgen/app.pl
	* tools/pdbgen/lib.pl: removed code that used to fiddles with
the
	argument descriptions.

	* tools/pdbgen/pdb/*.pdb: removed %%desc%% placeholder, added
some
	missing argument descriptions.

	* app/pdb/*_cmds.c
	* libgimp/gimpdrawabletransform_pdb.c
	* libgimp/gimpfloatingsel_pdb.c
	* libgimp/gimpgradient_pdb.c
	* libgimp/gimppainttools_pdb.c: regenerated.

	* app/core/Makefile.am
	* app/core/gimpparamspecs-desc.[ch] (gimp_param_spec_get_desc):
	new function that creates a parameter description for the PDB.

	* app/pdb/gimppdb-query.c
	* app/pdb/procedural_db_cmds.c: use the new function to create
the
	descriptions on the fly.
parent ac20627c
2006-05-18 Sven Neumann <sven@gimp.org>
* tools/pdbgen/app.pl
* tools/pdbgen/lib.pl: removed code that used to fiddles with the
argument descriptions.
* tools/pdbgen/pdb/*.pdb: removed %%desc%% placeholder, added some
missing argument descriptions.
* app/pdb/*_cmds.c
* libgimp/gimpdrawabletransform_pdb.c
* libgimp/gimpfloatingsel_pdb.c
* libgimp/gimpgradient_pdb.c
* libgimp/gimppainttools_pdb.c: regenerated.
* app/core/Makefile.am
* app/core/gimpparamspecs-desc.[ch] (gimp_param_spec_get_desc):
new function that creates a parameter description for the PDB.
* app/pdb/gimppdb-query.c
* app/pdb/procedural_db_cmds.c: use the new function to create the
descriptions on the fly.
2006-05-18 Michael Natterer <mitch@gimp.org>
* app/tools/gimphuesaturationtool.c: add tooltips to all hue
......
......@@ -203,6 +203,8 @@ libappcore_a_sources = \
gimppalette-import.h \
gimpparamspecs.c \
gimpparamspecs.h \
gimpparamspecs-desc.c \
gimpparamspecs-desc.h \
gimpparasitelist.c \
gimpparasitelist.h \
gimppdbprogress.c \
......
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <glib-object.h>
#include "libgimpbase/gimpbase.h"
#include "core-types.h"
#include "gimpparamspecs.h"
#include "gimpparamspecs-desc.h"
static inline const gchar *
gimp_param_spec_get_blurb (GParamSpec *pspec)
{
const gchar *blurb = g_param_spec_get_blurb (pspec);
return blurb ? blurb : "";
}
static gchar *
gimp_param_spec_boolean_desc (GParamSpec *pspec)
{
const gchar *blurb = gimp_param_spec_get_blurb (pspec);
return g_strconcat (blurb, " (TRUE or FALSE)", NULL);
}
static gchar *
gimp_param_spec_int32_desc (GParamSpec *pspec)
{
GParamSpecInt *ispec = G_PARAM_SPEC_INT (pspec);
const gchar *blurb = gimp_param_spec_get_blurb (pspec);
if (ispec->minimum == G_MININT32 && ispec->maximum == G_MAXINT32)
return g_strdup (blurb);
if (ispec->minimum == G_MININT32)
return g_strdup_printf ("%s (%s <= %d)", blurb,
g_param_spec_get_name (pspec),
ispec->maximum);
if (ispec->maximum == G_MAXINT32)
return g_strdup_printf ("%s (%s >= %d)", blurb,
g_param_spec_get_name (pspec),
ispec->minimum);
return g_strdup_printf ("%s (%d <= %s <= %d)", blurb,
ispec->minimum,
g_param_spec_get_name (pspec),
ispec->maximum);
}
static gchar *
gimp_param_spec_double_desc (GParamSpec *pspec)
{
GParamSpecDouble *dspec = G_PARAM_SPEC_DOUBLE (pspec);
const gchar *blurb = gimp_param_spec_get_blurb (pspec);
if (dspec->minimum == - G_MAXDOUBLE && dspec->maximum == G_MAXDOUBLE)
return g_strdup (blurb);
if (dspec->minimum == - G_MAXDOUBLE)
return g_strdup_printf ("%s (%s <= %g)", blurb,
g_param_spec_get_name (pspec),
dspec->maximum);
if (dspec->maximum == G_MAXDOUBLE)
return g_strdup_printf ("%s (%s >= %g)", blurb,
g_param_spec_get_name (pspec),
dspec->minimum);
return g_strdup_printf ("%s (%g <= %s <= %g)", blurb,
dspec->minimum,
g_param_spec_get_name (pspec),
dspec->maximum);
}
static gchar *
gimp_param_spec_enum_desc (GParamSpec *pspec)
{
const gchar *blurb = gimp_param_spec_get_blurb (pspec);
GString *str = g_string_new (blurb);
GEnumClass *enum_class = g_type_class_peek (pspec->value_type);
GEnumValue *enum_value;
GSList *excluded;
gint i, n;
if (GIMP_IS_PARAM_SPEC_ENUM (pspec))
excluded = GIMP_PARAM_SPEC_ENUM (pspec)->excluded_values;
else
excluded = NULL;
g_string_append (str, " { ");
for (i = 0, n = 0, enum_value = enum_class->values;
i < enum_class->n_values;
i++, enum_value++)
{
GSList *list;
gchar *nick;
for (list = excluded; list; list = list->next)
{
gint value = GPOINTER_TO_INT (list->data);
if (value == enum_value->value)
break;
}
if (list)
continue;
nick = g_ascii_strup (enum_value->value_nick, -1);
if (n > 0)
g_string_append (str, ", ");
g_string_append (str, nick);
g_free (nick);
g_string_append_printf (str, " (%d)", enum_value->value);
n++;
}
g_string_append (str, " }");
return g_string_free (str, FALSE);
}
/**
* gimp_param_spec_get_desc:
* @pspec: a #GParamSpec
*
* This function creates a description of the passed @pspec, which is
* suitable for use in the PDB. Actually, it currently only deals with
* parameter types used in the PDB and should not be used for anything
* else.
*
* Return value: A newly allocated string describing the parameter.
*/
gchar *
gimp_param_spec_get_desc (GParamSpec *pspec)
{
g_return_val_if_fail (G_IS_PARAM_SPEC (pspec), NULL);
if (GIMP_IS_PARAM_SPEC_UNIT (pspec))
{
}
else if (GIMP_IS_PARAM_SPEC_INT32 (pspec))
{
return gimp_param_spec_int32_desc (pspec);
}
else
{
switch (G_TYPE_FUNDAMENTAL (pspec->value_type))
{
case G_TYPE_BOOLEAN:
return gimp_param_spec_boolean_desc (pspec);
case G_TYPE_DOUBLE:
return gimp_param_spec_double_desc (pspec);
case G_TYPE_ENUM:
return gimp_param_spec_enum_desc (pspec);
}
}
return g_strdup (g_param_spec_get_blurb (pspec));
}
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __GIMP_PARAM_SPECS_DESC_H__
#define __GIMP_PARAM_SPECS_DESC_H__
gchar * gimp_param_spec_get_desc (GParamSpec *pspec);
#endif /* __GIMP_PARAM_SPECS_DESC_H__ */
......@@ -24,7 +24,6 @@
#include "core-types.h"
#include "gimp.h"
#include "gimp.h"
#include "gimpimage.h"
#include "gimplayer.h"
......
......@@ -1183,7 +1183,7 @@ register_brush_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
gimp_param_spec_int32 ("spacing",
"spacing",
"The brush spacing (0 <= spacing <= 1000)",
"The brush spacing",
0, 1000, 0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -1212,7 +1212,7 @@ register_brush_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
gimp_param_spec_int32 ("spacing",
"spacing",
"The brush spacing (0 <= spacing <= 1000)",
"The brush spacing",
0, 1000, 0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -1241,7 +1241,7 @@ register_brush_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
g_param_spec_enum ("shape",
"shape",
"The brush shape: { GIMP_BRUSH_GENERATED_CIRCLE (0), GIMP_BRUSH_GENERATED_SQUARE (1), GIMP_BRUSH_GENERATED_DIAMOND (2) }",
"The brush shape",
GIMP_TYPE_BRUSH_GENERATED_SHAPE,
GIMP_BRUSH_GENERATED_CIRCLE,
GIMP_PARAM_READWRITE));
......@@ -1416,14 +1416,14 @@ register_brush_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("shape-in",
"shape in",
"The brush shape: { GIMP_BRUSH_GENERATED_CIRCLE (0), GIMP_BRUSH_GENERATED_SQUARE (1), GIMP_BRUSH_GENERATED_DIAMOND (2) }",
"The brush shape",
GIMP_TYPE_BRUSH_GENERATED_SHAPE,
GIMP_BRUSH_GENERATED_CIRCLE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_enum ("shape-out",
"shape out",
"The brush shape actually assigned: { GIMP_BRUSH_GENERATED_CIRCLE (0), GIMP_BRUSH_GENERATED_SQUARE (1), GIMP_BRUSH_GENERATED_DIAMOND (2) }",
"The brush shape actually assigned",
GIMP_TYPE_BRUSH_GENERATED_SHAPE,
GIMP_BRUSH_GENERATED_CIRCLE,
GIMP_PARAM_READWRITE));
......
......@@ -184,7 +184,7 @@ register_brush_select_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("paint-mode",
"paint mode",
"The initial paint mode: { GIMP_NORMAL_MODE (0), GIMP_DISSOLVE_MODE (1), GIMP_BEHIND_MODE (2), GIMP_MULTIPLY_MODE (3), GIMP_SCREEN_MODE (4), GIMP_OVERLAY_MODE (5), GIMP_DIFFERENCE_MODE (6), GIMP_ADDITION_MODE (7), GIMP_SUBTRACT_MODE (8), GIMP_DARKEN_ONLY_MODE (9), GIMP_LIGHTEN_ONLY_MODE (10), GIMP_HUE_MODE (11), GIMP_SATURATION_MODE (12), GIMP_COLOR_MODE (13), GIMP_VALUE_MODE (14), GIMP_DIVIDE_MODE (15), GIMP_DODGE_MODE (16), GIMP_BURN_MODE (17), GIMP_HARDLIGHT_MODE (18), GIMP_SOFTLIGHT_MODE (19), GIMP_GRAIN_EXTRACT_MODE (20), GIMP_GRAIN_MERGE_MODE (21), GIMP_COLOR_ERASE_MODE (22) }",
"The initial paint mode",
GIMP_TYPE_LAYER_MODE_EFFECTS,
GIMP_NORMAL_MODE,
GIMP_PARAM_READWRITE));
......@@ -256,7 +256,7 @@ register_brush_select_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("paint-mode",
"paint mode",
"The initial paint mode: { GIMP_NORMAL_MODE (0), GIMP_DISSOLVE_MODE (1), GIMP_BEHIND_MODE (2), GIMP_MULTIPLY_MODE (3), GIMP_SCREEN_MODE (4), GIMP_OVERLAY_MODE (5), GIMP_DIFFERENCE_MODE (6), GIMP_ADDITION_MODE (7), GIMP_SUBTRACT_MODE (8), GIMP_DARKEN_ONLY_MODE (9), GIMP_LIGHTEN_ONLY_MODE (10), GIMP_HUE_MODE (11), GIMP_SATURATION_MODE (12), GIMP_COLOR_MODE (13), GIMP_VALUE_MODE (14), GIMP_DIVIDE_MODE (15), GIMP_DODGE_MODE (16), GIMP_BURN_MODE (17), GIMP_HARDLIGHT_MODE (18), GIMP_SOFTLIGHT_MODE (19), GIMP_GRAIN_EXTRACT_MODE (20), GIMP_GRAIN_MERGE_MODE (21), GIMP_COLOR_ERASE_MODE (22) }",
"The initial paint mode",
GIMP_TYPE_LAYER_MODE_EFFECTS,
GIMP_NORMAL_MODE,
GIMP_PARAM_READWRITE));
......
......@@ -323,7 +323,7 @@ register_brushes_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
gimp_param_spec_int32 ("spacing",
"spacing",
"The brush spacing (0 <= spacing <= 1000)",
"The brush spacing",
0, 1000, 0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -345,7 +345,7 @@ register_brushes_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
gimp_param_spec_int32 ("spacing",
"spacing",
"The brush spacing (0 <= spacing <= 1000)",
"The brush spacing",
0, 1000, 0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -367,7 +367,7 @@ register_brushes_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
gimp_param_spec_int32 ("spacing",
"spacing",
"The brush spacing (0 <= spacing <= 1000)",
"The brush spacing",
0, 1000, 0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -403,19 +403,19 @@ register_brushes_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("opacity",
"opacity",
"The brush opacity (0 <= opacity <= 100)",
"The brush opacity",
0, 100, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_int32 ("spacing",
"spacing",
"The brush spacing (0 <= spacing <= 1000)",
"The brush spacing",
0, 1000, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_enum ("paint-mode",
"paint mode",
"The paint mode: { GIMP_NORMAL_MODE (0), GIMP_DISSOLVE_MODE (1), GIMP_BEHIND_MODE (2), GIMP_MULTIPLY_MODE (3), GIMP_SCREEN_MODE (4), GIMP_OVERLAY_MODE (5), GIMP_DIFFERENCE_MODE (6), GIMP_ADDITION_MODE (7), GIMP_SUBTRACT_MODE (8), GIMP_DARKEN_ONLY_MODE (9), GIMP_LIGHTEN_ONLY_MODE (10), GIMP_HUE_MODE (11), GIMP_SATURATION_MODE (12), GIMP_COLOR_MODE (13), GIMP_VALUE_MODE (14), GIMP_DIVIDE_MODE (15), GIMP_DODGE_MODE (16), GIMP_BURN_MODE (17), GIMP_HARDLIGHT_MODE (18), GIMP_SOFTLIGHT_MODE (19), GIMP_GRAIN_EXTRACT_MODE (20), GIMP_GRAIN_MERGE_MODE (21), GIMP_COLOR_ERASE_MODE (22) }",
"The paint mode",
GIMP_TYPE_LAYER_MODE_EFFECTS,
GIMP_NORMAL_MODE,
GIMP_PARAM_READWRITE));
......
......@@ -473,7 +473,7 @@ register_buffer_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
g_param_spec_enum ("image-type",
"image type",
"The buffer image type: { GIMP_RGB (0), GIMP_GRAY (1), GIMP_INDEXED (2) }",
"The buffer image type",
GIMP_TYPE_IMAGE_BASE_TYPE,
GIMP_RGB,
GIMP_PARAM_READWRITE));
......
......@@ -353,13 +353,13 @@ register_channel_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
gimp_param_spec_int32 ("width",
"width",
"The channel width (1 <= width)",
"The channel width",
1, G_MAXINT32, 1,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_int32 ("height",
"height",
"The channel height (1 <= height)",
"The channel height",
1, G_MAXINT32, 1,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
......@@ -372,7 +372,7 @@ register_channel_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
g_param_spec_double ("opacity",
"opacity",
"The channel opacity (0 <= opacity <= 100)",
"The channel opacity",
0, 100, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
......@@ -413,7 +413,7 @@ register_channel_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("component",
"component",
"The image component: { GIMP_RED_CHANNEL (0), GIMP_GREEN_CHANNEL (1), GIMP_BLUE_CHANNEL (2), GIMP_GRAY_CHANNEL (3), GIMP_INDEXED_CHANNEL (4), GIMP_ALPHA_CHANNEL (5) }",
"The image component",
GIMP_TYPE_CHANNEL_TYPE,
GIMP_RED_CHANNEL,
GIMP_PARAM_READWRITE));
......@@ -489,7 +489,7 @@ register_channel_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("operation",
"operation",
"The selection operation: { GIMP_CHANNEL_OP_ADD (0), GIMP_CHANNEL_OP_SUBTRACT (1), GIMP_CHANNEL_OP_REPLACE (2), GIMP_CHANNEL_OP_INTERSECT (3) }",
"The selection operation",
GIMP_TYPE_CHANNEL_OPS,
GIMP_CHANNEL_OP_ADD,
GIMP_PARAM_READWRITE));
......@@ -614,7 +614,7 @@ register_channel_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
g_param_spec_double ("opacity",
"opacity",
"The new channel opacity (0 <= opacity <= 100)",
"The new channel opacity",
0, 100, 0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......
......@@ -858,13 +858,13 @@ register_color_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
gimp_param_spec_int32 ("brightness",
"brightness",
"Brightness adjustment (-127 <= brightness <= 127)",
"Brightness adjustment",
-127, 127, -127,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_int32 ("contrast",
"contrast",
"Contrast adjustment (-127 <= contrast <= 127)",
"Contrast adjustment",
-127, 127, -127,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -892,38 +892,38 @@ register_color_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("channel",
"channel",
"The channel to modify: { GIMP_HISTOGRAM_VALUE (0), GIMP_HISTOGRAM_RED (1), GIMP_HISTOGRAM_GREEN (2), GIMP_HISTOGRAM_BLUE (3), GIMP_HISTOGRAM_ALPHA (4) }",
"The channel to modify",
GIMP_TYPE_HISTOGRAM_CHANNEL,
GIMP_HISTOGRAM_VALUE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_int32 ("low-input",
"low input",
"Intensity of lowest input (0 <= low_input <= 255)",
"Intensity of lowest input",
0, 255, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_int32 ("high-input",
"high input",
"Intensity of highest input (0 <= high_input <= 255)",
"Intensity of highest input",
0, 255, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("gamma",
"gamma",
"Gamma correction factor (0.1 <= gamma <= 10)",
"Gamma correction factor",
0.1, 10, 0.1,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_int32 ("low-output",
"low output",
"Intensity of lowest output (0 <= low_output <= 255)",
"Intensity of lowest output",
0, 255, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_int32 ("high-output",
"high output",
"Intensity of highest output (0 <= high_output <= 255)",
"Intensity of highest output",
0, 255, 0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -995,7 +995,7 @@ register_color_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
gimp_param_spec_int32 ("levels",
"levels",
"Levels of posterization (2 <= levels <= 255)",
"Levels of posterization",
2, 255, 2,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -1124,14 +1124,14 @@ register_color_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("channel",
"channel",
"The channel to modify: { GIMP_HISTOGRAM_VALUE (0), GIMP_HISTOGRAM_RED (1), GIMP_HISTOGRAM_GREEN (2), GIMP_HISTOGRAM_BLUE (3), GIMP_HISTOGRAM_ALPHA (4) }",
"The channel to modify",
GIMP_TYPE_HISTOGRAM_CHANNEL,
GIMP_HISTOGRAM_VALUE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_int32 ("num-points",
"num points",
"The number of values in the control point array (4 <= num_points <= 34)",
"The number of values in the control point array",
4, 34, 4,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
......@@ -1164,7 +1164,7 @@ register_color_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("channel",
"channel",
"The channel to modify: { GIMP_HISTOGRAM_VALUE (0), GIMP_HISTOGRAM_RED (1), GIMP_HISTOGRAM_GREEN (2), GIMP_HISTOGRAM_BLUE (3), GIMP_HISTOGRAM_ALPHA (4) }",
"The channel to modify",
GIMP_TYPE_HISTOGRAM_CHANNEL,
GIMP_HISTOGRAM_VALUE,
GIMP_PARAM_READWRITE));
......@@ -1204,7 +1204,7 @@ register_color_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("transfer-mode",
"transfer mode",
"Transfer mode: { GIMP_SHADOWS (0), GIMP_MIDTONES (1), GIMP_HIGHLIGHTS (2) }",
"Transfer mode",
GIMP_TYPE_TRANSFER_MODE,
GIMP_SHADOWS,
GIMP_PARAM_READWRITE));
......@@ -1217,19 +1217,19 @@ register_color_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
g_param_spec_double ("cyan-red",
"cyan red",
"Cyan-Red color balance (-100 <= cyan_red <= 100)",
"Cyan-Red color balance",
-100, 100, -100,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("magenta-green",
"magenta green",
"Magenta-Green color balance (-100 <= magenta_green <= 100)",
"Magenta-Green color balance",
-100, 100, -100,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("yellow-blue",
"yellow blue",
"Yellow-Blue color balance (-100 <= yellow_blue <= 100)",
"Yellow-Blue color balance",
-100, 100, -100,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -1257,19 +1257,19 @@ register_color_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
g_param_spec_double ("hue",
"hue",
"Hue in degrees (0 <= hue <= 360)",
"Hue in degrees",
0, 360, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("saturation",
"saturation",
"Saturation in percent (0 <= saturation <= 100)",
"Saturation in percent",
0, 100, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("lightness",
"lightness",
"Lightness in percent (-100 <= lightness <= 100)",
"Lightness in percent",
-100, 100, -100,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -1297,7 +1297,7 @@ register_color_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("channel",
"channel",
"The channel to modify: { GIMP_HISTOGRAM_VALUE (0), GIMP_HISTOGRAM_RED (1), GIMP_HISTOGRAM_GREEN (2), GIMP_HISTOGRAM_BLUE (3), GIMP_HISTOGRAM_ALPHA (4) }",
"The channel to modify",
GIMP_TYPE_HISTOGRAM_CHANNEL,
GIMP_HISTOGRAM_VALUE,
GIMP_PARAM_READWRITE));
......@@ -1374,26 +1374,26 @@ register_color_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("hue-range",
"hue range",
"Range of affected hues: { GIMP_ALL_HUES (0), GIMP_RED_HUES (1), GIMP_YELLOW_HUES (2), GIMP_GREEN_HUES (3), GIMP_CYAN_HUES (4), GIMP_BLUE_HUES (5), GIMP_MAGENTA_HUES (6) }",
"Range of affected hues",
GIMP_TYPE_HUE_RANGE,
GIMP_ALL_HUES,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("hue-offset",
"hue offset",
"Hue offset in degrees (-180 <= hue_offset <= 180)",
"Hue offset in degrees",
-180, 180, -180,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("lightness",
"lightness",
"Lightness modification (-100 <= lightness <= 100)",
"Lightness modification",
-100, 100, -100,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("saturation",
"saturation",
"Saturation modification (-100 <= saturation <= 100)",
"Saturation modification",
-100, 100, -100,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -1421,13 +1421,13 @@ register_color_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
gimp_param_spec_int32 ("low-threshold",
"low threshold",
"The low threshold value (0 <= low_threshold <= 255)",
"The low threshold value",
0, 255, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_int32 ("high-threshold",
"high threshold",
"The high threshold value (0 <= high_threshold <= 255)",
"The high threshold value",
0, 255, 0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......
......@@ -788,7 +788,7 @@ register_context_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("opacity",
"opacity",
"The opacity (0 <= opacity <= 100)",
"The opacity",
0, 100, 0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -810,7 +810,7 @@ register_context_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
g_param_spec_double ("opacity",
"opacity",
"The opacity (0 <= opacity <= 100)",
"The opacity",
0, 100, 0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -832,7 +832,7 @@ register_context_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
g_param_spec_enum ("paint-mode",
"paint mode",
"The paint mode: { GIMP_NORMAL_MODE (0), GIMP_DISSOLVE_MODE (1), GIMP_BEHIND_MODE (2), GIMP_MULTIPLY_MODE (3), GIMP_SCREEN_MODE (4), GIMP_OVERLAY_MODE (5), GIMP_DIFFERENCE_MODE (6), GIMP_ADDITION_MODE (7), GIMP_SUBTRACT_MODE (8), GIMP_DARKEN_ONLY_MODE (9), GIMP_LIGHTEN_ONLY_MODE (10), GIMP_HUE_MODE (11), GIMP_SATURATION_MODE (12), GIMP_COLOR_MODE (13), GIMP_VALUE_MODE (14), GIMP_DIVIDE_MODE (15), GIMP_DODGE_MODE (16), GIMP_BURN_MODE (17), GIMP_HARDLIGHT_MODE (18), GIMP_SOFTLIGHT_MODE (19), GIMP_GRAIN_EXTRACT_MODE (20), GIMP_GRAIN_MERGE_MODE (21), GIMP_COLOR_ERASE_MODE (22) }",
"The paint mode",
GIMP_TYPE_LAYER_MODE_EFFECTS,
GIMP_NORMAL_MODE,
GIMP_PARAM_READWRITE));
......@@ -855,7 +855,7 @@ register_context_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("paint-mode",
"paint mode",
"The paint mode: { GIMP_NORMAL_MODE (0), GIMP_DISSOLVE_MODE (1), GIMP_BEHIND_MODE (2), GIMP_MULTIPLY_MODE (3), GIMP_SCREEN_MODE (4), GIMP_OVERLAY_MODE (5), GIMP_DIFFERENCE_MODE (6), GIMP_ADDITION_MODE (7), GIMP_SUBTRACT_MODE (8), GIMP_DARKEN_ONLY_MODE (9), GIMP_LIGHTEN_ONLY_MODE (10), GIMP_HUE_MODE (11), GIMP_SATURATION_MODE (12), GIMP_COLOR_MODE (13), GIMP_VALUE_MODE (14), GIMP_DIVIDE_MODE (15), GIMP_DODGE_MODE (16), GIMP_BURN_MODE (17), GIMP_HARDLIGHT_MODE (18), GIMP_SOFTLIGHT_MODE (19), GIMP_GRAIN_EXTRACT_MODE (20), GIMP_GRAIN_MERGE_MODE (21), GIMP_COLOR_ERASE_MODE (22) }",
"The paint mode",
GIMP_TYPE_LAYER_MODE_EFFECTS,
GIMP_NORMAL_MODE,
GIMP_PARAM_READWRITE));
......
......@@ -214,14 +214,14 @@ register_convert_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("dither-type",
"dither type",
"The dither type to use: { GIMP_NO_DITHER (0), GIMP_FS_DITHER (1), GIMP_FSLOWBLEED_DITHER (2), GIMP_FIXED_DITHER (3) }",
"The dither type to use",
GIMP_TYPE_CONVERT_DITHER_TYPE,
GIMP_NO_DITHER,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("palette-type",
"palette type",
"The type of palette to use: { GIMP_MAKE_PALETTE (0), GIMP_REUSE_PALETTE (1), GIMP_WEB_PALETTE (2), GIMP_MONO_PALETTE (3), GIMP_CUSTOM_PALETTE (4) }",
"The type of palette to use",
GIMP_TYPE_CONVERT_PALETTE_TYPE,
GIMP_MAKE_PALETTE,
GIMP_PARAM_READWRITE));
......
......@@ -1287,7 +1287,7 @@ register_drawable_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
g_param_spec_enum ("type",
"type",
"The drawable's type: { GIMP_RGB_IMAGE (0), GIMP_RGBA_IMAGE (1), GIMP_GRAY_IMAGE (2), GIMP_GRAYA_IMAGE (3), GIMP_INDEXED_IMAGE (4), GIMP_INDEXEDA_IMAGE (5) }",
"The drawable's type",
GIMP_TYPE_IMAGE_TYPE,
GIMP_RGB_IMAGE,
GIMP_PARAM_READWRITE));
......@@ -1316,7 +1316,7 @@ register_drawable_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
gimp_param_spec_enum ("type-with-alpha",
"type with alpha",
"The drawable's type with alpha: { GIMP_RGBA_IMAGE (1), GIMP_GRAYA_IMAGE (3), GIMP_INDEXEDA_IMAGE (5) }",
"The drawable's type with alpha",
GIMP_TYPE_IMAGE_TYPE,
GIMP_RGB_IMAGE,
GIMP_PARAM_READWRITE));
......@@ -2131,7 +2131,7 @@ register_drawable_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("fill-type",
"fill type",
"The type of fill: { GIMP_FOREGROUND_FILL (0), GIMP_BACKGROUND_FILL (1), GIMP_WHITE_FILL (2), GIMP_TRANSPARENT_FILL (3), GIMP_PATTERN_FILL (4) }",
"The type of fill",
GIMP_TYPE_FILL_TYPE,
GIMP_FOREGROUND_FILL,
GIMP_PARAM_READWRITE));
......@@ -2166,7 +2166,7 @@ register_drawable_procs (GimpPDB *pdb)