Commit 96f78088 authored by Manish Singh's avatar Manish Singh Committed by Manish Singh
Browse files

tools/pdbgen/app.pl tools/pdbgen/enumcode-py.pl tools/pdbgen/enumcode.pl

2002-03-17  Manish Singh  <yosh@gimp.org>

        * tools/pdbgen/app.pl
        * tools/pdbgen/enumcode-py.pl
        * tools/pdbgen/enumcode.pl
        * tools/pdbgen/enumgen.pl: removed enum nick support, best to keep
        internal and external names consistent

        * app/core/core-enums.h: remove chops from enums. Change TRANS to
        TRANSPARENT in GimpBlendMode

        * app/core/core-types.h: remove chops and nicks from enums. Change INV
        to INVERSE and SUB to SUBTRACT to make things more clear

        * app/core/gimpchannel.c
        * app/gui/channels-commands.c
        * app/gui/vectors-commands.c
        * app/tools/gimpbezierselecttool.c
        * app/tools/gimpbycolorselecttool.c
        * app/tools/gimprectselecttool.c
        * app/tools/gimpselectiontool.c
        * app/tools/selection_options.c
        * app/tools/tools-types.h
        * app/widgets/gimpchannellistview.c
        * app/widgets/gimpvectorslistview.c: reflect SUB -> SUBTRACT change

        * app/core/gimpdrawable-blend.c: reflect TRANS -> TRANSPARENT change

        * app/core/gimplayer.c
        * app/gui/layers-commands.c: reflect INV -> INVERSE change

        * app/paint/paint-types.h: remove nick from PaintApplicationMode

        * app/tools/gimperasertool.c: fix tooltip

        * app/widgets/gimpenummenu.c: #include "libgimp/gimpintl.h" for
        gettext

        * libgimp/gimpcompat.h: compatibility enums here, since we removed
        the nicks

        * tools/pdbgen/enums.pl
        * libgimp/gimpenums.h
        * plug-ins/script-fu/script-fu-constants.c
        * app/core/core-enums.c
        * app/pdb/channel_cmds.c
        * app/pdb/drawable_cmds.c
        * app/pdb/edit_cmds.c
        * app/pdb/layer_cmds.c
        * app/pdb/misc_tools_cmds.c
        * app/pdb/paint_tools_cmds.c
        * app/pdb/selection_cmds.c
        * app/pdb/selection_tools_cmds.c: regenerated, enum changes

        * plug-ins/common/hot.c: GIMP_TRANS_IMAGE_FILL -> GIMP_TRANSPARENT_FILL

        * plug-ins/common/warp.c: GIMP_BG_IMAGE_FILL -> GIMP_BACKGROUND_FILL

        * plug-ins/script-fu/siod-wrapper.c: compat constant definitions
parent b1deb2b0
2002-03-17 Manish Singh <yosh@gimp.org>
* tools/pdbgen/app.pl
* tools/pdbgen/enumcode-py.pl
* tools/pdbgen/enumcode.pl
* tools/pdbgen/enumgen.pl: removed enum nick support, best to keep
internal and external names consistent
* app/core/core-enums.h: remove chops from enums. Change TRANS to
TRANSPARENT in GimpBlendMode
* app/core/core-types.h: remove chops and nicks from enums. Change INV
to INVERSE and SUB to SUBTRACT to make things more clear
* app/core/gimpchannel.c
* app/gui/channels-commands.c
* app/gui/vectors-commands.c
* app/tools/gimpbezierselecttool.c
* app/tools/gimpbycolorselecttool.c
* app/tools/gimprectselecttool.c
* app/tools/gimpselectiontool.c
* app/tools/selection_options.c
* app/tools/tools-types.h
* app/widgets/gimpchannellistview.c
* app/widgets/gimpvectorslistview.c: reflect SUB -> SUBTRACT change
* app/core/gimpdrawable-blend.c: reflect TRANS -> TRANSPARENT change
* app/core/gimplayer.c
* app/gui/layers-commands.c: reflect INV -> INVERSE change
* app/paint/paint-types.h: remove nick from PaintApplicationMode
* app/tools/gimperasertool.c: fix tooltip
* app/widgets/gimpenummenu.c: #include "libgimp/gimpintl.h" for
gettext
* libgimp/gimpcompat.h: compatibility enums here, since we removed
the nicks
* tools/pdbgen/enums.pl
* libgimp/gimpenums.h
* plug-ins/script-fu/script-fu-constants.c
* app/core/core-enums.c
* app/pdb/channel_cmds.c
* app/pdb/drawable_cmds.c
* app/pdb/edit_cmds.c
* app/pdb/layer_cmds.c
* app/pdb/misc_tools_cmds.c
* app/pdb/paint_tools_cmds.c
* app/pdb/selection_cmds.c
* app/pdb/selection_tools_cmds.c: regenerated, enum changes
* plug-ins/common/hot.c: GIMP_TRANS_IMAGE_FILL -> GIMP_TRANSPARENT_FILL
* plug-ins/common/warp.c: GIMP_BG_IMAGE_FILL -> GIMP_BACKGROUND_FILL
* plug-ins/script-fu/siod-wrapper.c: compat constant definitions
2002-03-17 Sven Neumann <sven@gimp.org>
 
* app/core/core-enums.[ch]: registered more enums.
......
......@@ -167,7 +167,7 @@ void
channels_sub_channel_from_sel_cmd_callback (GtkWidget *widget,
gpointer data)
{
channels_channel_to_sel (widget, data, CHANNEL_OP_SUB);
channels_channel_to_sel (widget, data, CHANNEL_OP_SUBTRACT);
}
void
......
......@@ -875,12 +875,12 @@ layers_add_mask_query (GimpLayer *layer)
_("Selection"),
GINT_TO_POINTER (ADD_SELECTION_MASK), NULL,
_("Inverse Selection"),
GINT_TO_POINTER (ADD_INV_SELECTION_MASK), NULL,
GINT_TO_POINTER (ADD_INVERSE_SELECTION_MASK), NULL,
_("Grayscale Copy of Layer"),
GINT_TO_POINTER (ADD_COPY_MASK), NULL,
_("Inverse Grayscale Copy of Layer"),
GINT_TO_POINTER (ADD_INV_COPY_MASK), NULL,
GINT_TO_POINTER (ADD_INVERSE_COPY_MASK), NULL,
_("White (Full Opacity)"),
GINT_TO_POINTER (ADD_WHITE_MASK), NULL,
......@@ -902,7 +902,7 @@ layers_add_mask_query (GimpLayer *layer)
_("Grayscale Copy of Layer"),
GINT_TO_POINTER (ADD_COPY_MASK), NULL,
_("Inverse Grayscale Copy of Layer"),
GINT_TO_POINTER (ADD_INV_COPY_MASK), NULL,
GINT_TO_POINTER (ADD_INVERSE_COPY_MASK), NULL,
_("White (Full Opacity)"),
GINT_TO_POINTER (ADD_WHITE_MASK), NULL,
......
......@@ -171,7 +171,7 @@ void
vectors_sub_vectors_from_sel_cmd_callback (GtkWidget *widget,
gpointer data)
{
vectors_vectors_to_sel (widget, data, CHANNEL_OP_SUB);
vectors_vectors_to_sel (widget, data, CHANNEL_OP_SUBTRACT);
}
void
......
......@@ -104,7 +104,7 @@ static const GEnumValue gimp_blend_mode_enum_values[] =
{
{ GIMP_FG_BG_RGB_MODE, N_("FG to BG (RGB)"), "fg-bg-rgb-mode" },
{ GIMP_FG_BG_HSV_MODE, N_("FG to BG (HSV)"), "fg-bg-hsv-mode" },
{ GIMP_FG_TRANS_MODE, N_("FG to Transparent"), "fg-trans-mode" },
{ GIMP_FG_TRANSPARENT_MODE, N_("FG to Transparent"), "fg-transparent-mode" },
{ GIMP_CUSTOM_MODE, N_("Custom Gradient"), "custom-mode" },
{ 0, NULL, NULL }
};
......
......@@ -100,12 +100,12 @@ typedef enum
GType gimp_blend_mode_get_type (void) G_GNUC_CONST;
typedef enum /*< chop=_MODE >*/
typedef enum
{
GIMP_FG_BG_RGB_MODE, /*< desc="FG to BG (RGB)" >*/
GIMP_FG_BG_HSV_MODE, /*< desc="FG to BG (HSV)" >*/
GIMP_FG_TRANS_MODE, /*< desc="FG to Transparent" >*/
GIMP_CUSTOM_MODE /*< desc="Custom Gradient" >*/
GIMP_FG_BG_RGB_MODE, /*< desc="FG to BG (RGB)" >*/
GIMP_FG_BG_HSV_MODE, /*< desc="FG to BG (HSV)" >*/
GIMP_FG_TRANSPARENT_MODE, /*< desc="FG to Transparent" >*/
GIMP_CUSTOM_MODE /*< desc="Custom Gradient" >*/
} GimpBlendMode;
......
......@@ -36,15 +36,15 @@
/* enums */
typedef enum /*< chop=ADD_ >*/
typedef enum
{
ADD_WHITE_MASK,
ADD_BLACK_MASK,
ADD_ALPHA_MASK,
ADD_SELECTION_MASK,
ADD_INV_SELECTION_MASK,
ADD_INVERSE_SELECTION_MASK,
ADD_COPY_MASK,
ADD_INV_COPY_MASK
ADD_INVERSE_COPY_MASK
} AddMaskType;
typedef enum
......@@ -68,21 +68,21 @@ typedef enum /*< pdb-skip >*/
} InternalOrientationType;
/* Selection Boolean operations */
typedef enum /*< chop=CHANNEL_OP_ >*/
typedef enum
{
CHANNEL_OP_ADD,
CHANNEL_OP_SUB,
CHANNEL_OP_SUBTRACT,
CHANNEL_OP_REPLACE,
CHANNEL_OP_INTERSECT
} ChannelOps;
typedef enum
{
FOREGROUND_FILL, /*< nick=FG_IMAGE_FILL >*/
BACKGROUND_FILL, /*< nick=BG_IMAGE_FILL >*/
WHITE_FILL, /*< nick=WHITE_IMAGE_FILL >*/
TRANSPARENT_FILL, /*< nick=TRANS_IMAGE_FILL >*/
NO_FILL /*< nick=NO_IMAGE_FILL >*/
FOREGROUND_FILL,
BACKGROUND_FILL,
WHITE_FILL,
TRANSPARENT_FILL,
NO_FILL
} GimpFillType;
typedef enum
......
......@@ -939,11 +939,11 @@ gimp_channel_combine_ellipse (GimpChannel *mask,
case CHANNEL_OP_REPLACE:
gimp_channel_add_segment (mask, x1, i, (x2 - x1), 255);
break;
case CHANNEL_OP_SUB:
case CHANNEL_OP_SUBTRACT:
gimp_channel_sub_segment (mask, x1, i, (x2 - x1), 255);
break;
default:
g_warning ("Only ADD, REPLACE, and SUB are valid for channel_combine!");
g_warning ("Only ADD, REPLACE, and SUBTRACT are valid for channel_combine!");
break;
}
}
......@@ -983,11 +983,11 @@ gimp_channel_combine_ellipse (GimpChannel *mask,
case CHANNEL_OP_REPLACE:
gimp_channel_add_segment (mask, x0, i, j - x0, last);
break;
case CHANNEL_OP_SUB:
case CHANNEL_OP_SUBTRACT:
gimp_channel_sub_segment (mask, x0, i, j - x0, last);
break;
default:
g_warning ("Only ADD, REPLACE, and SUB are valid for channel_combine!");
g_warning ("Only ADD, REPLACE, and SUBTRACT are valid for channel_combine!");
break;
}
}
......@@ -1007,10 +1007,10 @@ gimp_channel_combine_ellipse (GimpChannel *mask,
{
if (op == CHANNEL_OP_ADD || op == CHANNEL_OP_REPLACE)
gimp_channel_add_segment (mask, x0, i, j - x0, last);
else if (op == CHANNEL_OP_SUB)
else if (op == CHANNEL_OP_SUBTRACT)
gimp_channel_sub_segment (mask, x0, i, j - x0, last);
else
g_warning ("Only ADD, REPLACE, and SUB are valid for channel_combine!");
g_warning ("Only ADD, REPLACE, and SUBTRACT are valid for channel_combine!");
}
}
......@@ -1155,7 +1155,7 @@ gimp_channel_combine_mask (GimpChannel *mask,
gimp_channel_combine_sub_region_add,
NULL, 2, &srcPR, &destPR);
break;
case CHANNEL_OP_SUB:
case CHANNEL_OP_SUBTRACT:
pixel_regions_process_parallel ((p_func)
gimp_channel_combine_sub_region_sub,
NULL, 2, &srcPR, &destPR);
......
......@@ -939,11 +939,11 @@ gimp_channel_combine_ellipse (GimpChannel *mask,
case CHANNEL_OP_REPLACE:
gimp_channel_add_segment (mask, x1, i, (x2 - x1), 255);
break;
case CHANNEL_OP_SUB:
case CHANNEL_OP_SUBTRACT:
gimp_channel_sub_segment (mask, x1, i, (x2 - x1), 255);
break;
default:
g_warning ("Only ADD, REPLACE, and SUB are valid for channel_combine!");
g_warning ("Only ADD, REPLACE, and SUBTRACT are valid for channel_combine!");
break;
}
}
......@@ -983,11 +983,11 @@ gimp_channel_combine_ellipse (GimpChannel *mask,
case CHANNEL_OP_REPLACE:
gimp_channel_add_segment (mask, x0, i, j - x0, last);
break;
case CHANNEL_OP_SUB:
case CHANNEL_OP_SUBTRACT:
gimp_channel_sub_segment (mask, x0, i, j - x0, last);
break;
default:
g_warning ("Only ADD, REPLACE, and SUB are valid for channel_combine!");
g_warning ("Only ADD, REPLACE, and SUBTRACT are valid for channel_combine!");
break;
}
}
......@@ -1007,10 +1007,10 @@ gimp_channel_combine_ellipse (GimpChannel *mask,
{
if (op == CHANNEL_OP_ADD || op == CHANNEL_OP_REPLACE)
gimp_channel_add_segment (mask, x0, i, j - x0, last);
else if (op == CHANNEL_OP_SUB)
else if (op == CHANNEL_OP_SUBTRACT)
gimp_channel_sub_segment (mask, x0, i, j - x0, last);
else
g_warning ("Only ADD, REPLACE, and SUB are valid for channel_combine!");
g_warning ("Only ADD, REPLACE, and SUBTRACT are valid for channel_combine!");
}
}
......@@ -1155,7 +1155,7 @@ gimp_channel_combine_mask (GimpChannel *mask,
gimp_channel_combine_sub_region_add,
NULL, 2, &srcPR, &destPR);
break;
case CHANNEL_OP_SUB:
case CHANNEL_OP_SUBTRACT:
pixel_regions_process_parallel ((p_func)
gimp_channel_combine_sub_region_sub,
NULL, 2, &srcPR, &destPR);
......
......@@ -863,7 +863,7 @@ gradient_fill_region (GimpImage *gimage,
break;
case GIMP_FG_TRANS_MODE:
case GIMP_FG_TRANSPARENT_MODE:
/* Color does not change, just the opacity */
rbd.bg = rbd.fg;
......
......@@ -668,7 +668,7 @@ gimp_layer_create_mask (const GimpLayer *layer,
break;
case ADD_SELECTION_MASK:
case ADD_INV_SELECTION_MASK:
case ADD_INVERSE_SELECTION_MASK:
{
GimpDrawable *selection;
......@@ -685,7 +685,7 @@ gimp_layer_create_mask (const GimpLayer *layer,
break;
case ADD_COPY_MASK:
case ADD_INV_COPY_MASK:
case ADD_INVERSE_COPY_MASK:
{
TileManager *copy_tiles;
GimpImageType layer_type;
......@@ -733,8 +733,8 @@ gimp_layer_create_mask (const GimpLayer *layer,
case ADD_COPY_MASK:
break;
case ADD_INV_SELECTION_MASK:
case ADD_INV_COPY_MASK:
case ADD_INVERSE_SELECTION_MASK:
case ADD_INVERSE_COPY_MASK:
gimp_drawable_invert (GIMP_DRAWABLE (mask));
break;
}
......
......@@ -167,7 +167,7 @@ void
channels_sub_channel_from_sel_cmd_callback (GtkWidget *widget,
gpointer data)
{
channels_channel_to_sel (widget, data, CHANNEL_OP_SUB);
channels_channel_to_sel (widget, data, CHANNEL_OP_SUBTRACT);
}
void
......
......@@ -875,12 +875,12 @@ layers_add_mask_query (GimpLayer *layer)
_("Selection"),
GINT_TO_POINTER (ADD_SELECTION_MASK), NULL,
_("Inverse Selection"),
GINT_TO_POINTER (ADD_INV_SELECTION_MASK), NULL,
GINT_TO_POINTER (ADD_INVERSE_SELECTION_MASK), NULL,
_("Grayscale Copy of Layer"),
GINT_TO_POINTER (ADD_COPY_MASK), NULL,
_("Inverse Grayscale Copy of Layer"),
GINT_TO_POINTER (ADD_INV_COPY_MASK), NULL,
GINT_TO_POINTER (ADD_INVERSE_COPY_MASK), NULL,
_("White (Full Opacity)"),
GINT_TO_POINTER (ADD_WHITE_MASK), NULL,
......@@ -902,7 +902,7 @@ layers_add_mask_query (GimpLayer *layer)
_("Grayscale Copy of Layer"),
GINT_TO_POINTER (ADD_COPY_MASK), NULL,
_("Inverse Grayscale Copy of Layer"),
GINT_TO_POINTER (ADD_INV_COPY_MASK), NULL,
GINT_TO_POINTER (ADD_INVERSE_COPY_MASK), NULL,
_("White (Full Opacity)"),
GINT_TO_POINTER (ADD_WHITE_MASK), NULL,
......
......@@ -171,7 +171,7 @@ void
vectors_sub_vectors_from_sel_cmd_callback (GtkWidget *widget,
gpointer data)
{
vectors_vectors_to_sel (widget, data, CHANNEL_OP_SUB);
vectors_vectors_to_sel (widget, data, CHANNEL_OP_SUBTRACT);
}
void
......
......@@ -51,7 +51,7 @@ typedef enum
/* Paint application modes */
typedef enum
{
CONSTANT, /*< nick=CONTINUOUS >*/ /* pencil, paintbrush, airbrush, clone */
CONSTANT, /* pencil, paintbrush, airbrush, clone */
INCREMENTAL /* convolve, smudge */
} PaintApplicationMode;
......
......@@ -342,7 +342,7 @@ static ProcArg channel_combine_masks_inargs[] =
{
GIMP_PDB_INT32,
"operation",
"The selection operation: { ADD (0), SUB (1), REPLACE (2), INTERSECT (3) }"
"The selection operation: { CHANNEL_OP_ADD (0), CHANNEL_OP_SUBTRACT (1), CHANNEL_OP_REPLACE (2), CHANNEL_OP_INTERSECT (3) }"
},
{
GIMP_PDB_INT32,
......
......@@ -177,7 +177,7 @@ static ProcArg drawable_fill_inargs[] =
{
GIMP_PDB_INT32,
"fill_type",
"The type of fill: FG_IMAGE_FILL (0), BG_IMAGE_FILL (1), WHITE_IMAGE_FILL (2), TRANS_IMAGE_FILL (3), NO_IMAGE_FILL (4)"
"The type of fill: FOREGROUND_FILL (0), BACKGROUND_FILL (1), WHITE_FILL (2), TRANSPARENT_FILL (3), NO_FILL (4)"
}
};
......
......@@ -299,7 +299,7 @@ static ProcArg edit_fill_inargs[] =
{
GIMP_PDB_INT32,
"fill_type",
"The type of fill: FG_IMAGE_FILL (0), BG_IMAGE_FILL (1), WHITE_IMAGE_FILL (2), TRANS_IMAGE_FILL (3), NO_IMAGE_FILL (4)"
"The type of fill: FOREGROUND_FILL (0), BACKGROUND_FILL (1), WHITE_FILL (2), TRANSPARENT_FILL (3), NO_FILL (4)"
}
};
......
......@@ -313,7 +313,7 @@ layer_create_mask_invoker (Gimp *gimp,
success = FALSE;
mask_type = args[1].value.pdb_int;
if (mask_type < ADD_WHITE_MASK || mask_type > ADD_INV_COPY_MASK)
if (mask_type < ADD_WHITE_MASK || mask_type > ADD_INVERSE_COPY_MASK)
success = FALSE;
if (success)
......@@ -337,7 +337,7 @@ static ProcArg layer_create_mask_inargs[] =
{
GIMP_PDB_INT32,
"mask_type",
"The type of mask: { WHITE_MASK (0), BLACK_MASK (1), ALPHA_MASK (2), SELECTION_MASK (3), INV_SELECTION_MASK (4), COPY_MASK (5), INV_COPY_MASK (6) }"
"The type of mask: { ADD_WHITE_MASK (0), ADD_BLACK_MASK (1), ADD_ALPHA_MASK (2), ADD_SELECTION_MASK (3), ADD_INVERSE_SELECTION_MASK (4), ADD_COPY_MASK (5), ADD_INVERSE_COPY_MASK (6) }"
}
};
......
......@@ -152,7 +152,7 @@ static ProcArg blend_inargs[] =
{
GIMP_PDB_INT32,
"blend_mode",
"The type of blend: { GIMP_FG_BG_RGB (0), GIMP_FG_BG_HSV (1), GIMP_FG_TRANS (2), GIMP_CUSTOM (3) }"
"The type of blend: { GIMP_FG_BG_RGB_MODE (0), GIMP_FG_BG_HSV_MODE (1), GIMP_FG_TRANSPARENT_MODE (2), GIMP_CUSTOM_MODE (3) }"
},
{
GIMP_PDB_INT32,
......
Supports Markdown
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