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

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,
......
......@@ -873,7 +873,7 @@ static ProcArg eraser_inargs[] =
{
GIMP_PDB_INT32,
"method",
"CONTINUOUS (0) or INCREMENTAL (1)"
"CONSTANT (0) or INCREMENTAL (1)"
}
};
......@@ -1045,7 +1045,7 @@ static ProcArg paintbrush_inargs[] =
{
GIMP_PDB_INT32,
"method",
"CONTINUOUS (0) or INCREMENTAL (1)"
"CONSTANT (0) or INCREMENTAL (1)"
},
{
GIMP_PDB_FLOAT,
......
......@@ -1051,7 +1051,7 @@ static ProcArg selection_combine_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) }"
}
};
......
......@@ -127,7 +127,7 @@ static ProcArg by_color_select_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,
......@@ -251,7 +251,7 @@ static ProcArg ellipse_select_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,
......@@ -354,7 +354,7 @@ static ProcArg free_select_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,
......@@ -474,7 +474,7 @@ static ProcArg fuzzy_select_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,
......@@ -595,7 +595,7 @@ static ProcArg rect_select_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,
......
......@@ -666,7 +666,7 @@ gimp_bezier_select_tool_button_press (GimpTool *tool,
}
else if (state & GDK_CONTROL_MASK)
{
op = CHANNEL_OP_SUB;
op = CHANNEL_OP_SUBTRACT;
}
else
{
......
......@@ -448,7 +448,7 @@ by_color_select_oper_update (GimpTool *tool,
}
else if (state & GDK_CONTROL_MASK)
{
sel_tool->op = SELECTION_SUB; /* subtract from the selection */
sel_tool->op = SELECTION_SUBTRACT; /* subtract from the selection */
}
else
{
......@@ -881,7 +881,7 @@ by_color_select_preview_button_press (ByColorDialog *bcd,
operation = SELECTION_ADD;
else if ((bevent->state & GDK_CONTROL_MASK) &&
!(bevent->state & GDK_SHIFT_MASK))
operation = SELECTION_SUB;
operation = SELECTION_SUBTRACT;
else if ((bevent->state & GDK_CONTROL_MASK) &&
(bevent->state & GDK_SHIFT_MASK))
operation = SELECTION_INTERSECT;
......
......@@ -64,7 +64,7 @@ gimp_eraser_tool_register (Gimp *gimp,
TRUE,
"gimp:eraser_tool",
_("Eraser"),
_("Paint fuzzy brush strokes"),
_("Erase to background or transparency"),
N_("/Tools/Paint Tools/Eraser"), "<shift>E",
NULL, "tools/eraser.html",
GIMP_STOCK_TOOL_ERASER);
......
......@@ -232,7 +232,7 @@ gimp_rect_select_tool_button_press (GimpTool *tool,
case SELECTION_ADD:
gimp_tool_push_status (tool, _("Selection: ADD"));
break;
case SELECTION_SUB:
case SELECTION_SUBTRACT:
gimp_tool_push_status (tool, _("Selection: SUBTRACT"));
break;
case SELECTION_INTERSECT:
......
......@@ -96,7 +96,7 @@ selection_options_init (SelectionOptions *options,
{
SELECTION_REPLACE,
SELECTION_ADD,
SELECTION_SUB,
SELECTION_SUBTRACT,
SELECTION_INTERSECT
};
......
......@@ -160,7 +160,7 @@ gimp_selection_tool_modifier_key (GimpTool *tool,
}
else if (state & GDK_CONTROL_MASK)
{
button_op = SELECTION_SUB;
button_op = SELECTION_SUBTRACT;
}
if (button_op != sel_options->op)
......@@ -211,7 +211,7 @@ gimp_selection_tool_oper_update (GimpTool *tool,
}
else if (state & GDK_CONTROL_MASK)
{
selection_tool->op = SELECTION_SUB; /* subtract from the selection */
selection_tool->op = SELECTION_SUBTRACT; /* subtract from the selection */
}
else if (floating_sel)
{
......@@ -243,7 +243,7 @@ gimp_selection_tool_cursor_update (GimpTool *tool,
case SELECTION_ADD:
cmodifier = GIMP_CURSOR_MODIFIER_PLUS;
break;
case SELECTION_SUB:
case SELECTION_SUBTRACT:
cmodifier = GIMP_CURSOR_MODIFIER_MINUS;
break;
case SELECTION_INTERSECT:
......
......@@ -96,7 +96,7 @@ selection_options_init (SelectionOptions *options,
{
SELECTION_REPLACE,
SELECTION_ADD,
SELECTION_SUB,
SELECTION_SUBTRACT,
SELECTION_INTERSECT
};
......
......@@ -70,7 +70,7 @@ typedef void (* GimpToolRegisterFunc) (Gimp *gimp,
typedef enum /*< pdb-skip >*/
{
SELECTION_ADD = CHANNEL_OP_ADD,
SELECTION_SUB = CHANNEL_OP_SUB,
SELECTION_SUBTRACT = CHANNEL_OP_SUBTRACT,
SELECTION_REPLACE = CHANNEL_OP_REPLACE,
SELECTION_INTERSECT = CHANNEL_OP_INTERSECT,
SELECTION_MOVE_MASK,
......
......@@ -360,7 +360,7 @@ gimp_channel_list_view_toselection_extended_clicked (GtkWidget *widget
}
else if (state & GDK_CONTROL_MASK)
{
operation = CHANNEL_OP_SUB;
operation = CHANNEL_OP_SUBTRACT;
}
gimp_channel_list_view_to_selection (view, GIMP_CHANNEL (viewable),
......
......@@ -360,7 +360,7 @@ gimp_channel_list_view_toselection_extended_clicked (GtkWidget *widget
}
else if (state & GDK_CONTROL_MASK)
{
operation = CHANNEL_OP_SUB;
operation = CHANNEL_OP_SUBTRACT;
}
gimp_channel_list_view_to_selection (view, GIMP_CHANNEL (viewable),
......
......@@ -27,6 +27,8 @@
#include "gimpenummenu.h"
#include "libgimp/gimpintl.h"
static void gimp_enum_menu_class_init (GimpEnumMenuClass *klass);
static void gimp_enum_menu_init (GimpEnumMenu *enum_menu);
......
......@@ -235,7 +235,7 @@ gimp_vectors_list_view_toselection_extended_clicked (GtkWidget *widget
}
else if (state & GDK_CONTROL_MASK)
{
operation = CHANNEL_OP_SUB;
operation = CHANNEL_OP_SUBTRACT;
}
gimp_vectors_list_view_to_selection (view, GIMP_VECTORS (viewable),
......
......@@ -235,7 +235,7 @@ gimp_vectors_list_view_toselection_extended_clicked (GtkWidget *widget
}
else if (state & GDK_CONTROL_MASK)
{
operation = CHANNEL_OP_SUB;
operation = CHANNEL_OP_SUBTRACT;
}
gimp_vectors_list_view_to_selection (view, GIMP_VECTORS (viewable),
......
......@@ -44,6 +44,47 @@ G_BEGIN_DECLS
#define gimp_gradients_set_active gimp_gradients_set_gradient
enum
{
GIMP_WHITE_MASK = GIMP_ADD_WHITE_MASK,
GIMP_BLACK_MASK = GIMP_ADD_BLACK_MASK,
GIMP_ALPHA_MASK = GIMP_ADD_ALPHA_MASK,
GIMP_SELECTION_MASK = GIMP_ADD_SELECTION_MASK,
GIMP_INV_SELECTION_MASK = GIMP_ADD_INVERSE_SELECTION_MASK,
GIMP_COPY_MASK = GIMP_ADD_COPY_MASK,
GIMP_INV_COPY_MASK = GIMP_ADD_INVERSE_COPY_MASK
};
enum
{
GIMP_ADD = GIMP_CHANNEL_OP_ADD,
GIMP_SUB = GIMP_CHANNEL_OP_SUBTRACT,
GIMP_REPLACE = GIMP_CHANNEL_OP_REPLACE,
GIMP_INTERSECT = GIMP_CHANNEL_OP_INTERSECT
};
enum
{
GIMP_FG_BG_RGB = GIMP_FG_BG_RGB_MODE,
GIMP_FG_BG_HSV = GIMP_FG_BG_HSV_MODE,
GIMP_FG_TRANS = GIMP_FG_TRANSPARENT_MODE,
GIMP_CUSTOM = GIMP_CUSTOM_MODE
};
enum
{
GIMP_FG_IMAGE_FILL = GIMP_FOREGROUND_FILL,
GIMP_BG_IMAGE_FILL = GIMP_BACKGROUND_FILL,
GIMP_WHITE_IMAGE_FILL = GIMP_WHITE_FILL,
GIMP_TRANS_IMAGE_FILL = GIMP_TRANSPARENT_FILL,
GIMP_NO_IMAGE_FILL = GIMP_NO_FILL
};
enum
{
GIMP_CONTINUOUS = GIMP_CONSTANT
};
G_END_DECLS
#endif /* GIMP_ENABLE_COMPAT_CRUFT */
......
......@@ -26,13 +26,13 @@ G_BEGIN_DECLS
typedef enum
{
GIMP_WHITE_MASK,
GIMP_BLACK_MASK,
GIMP_ALPHA_MASK,
GIMP_SELECTION_MASK,
GIMP_INV_SELECTION_MASK,
GIMP_COPY_MASK,
GIMP_INV_COPY_MASK
GIMP_ADD_WHITE_MASK,
GIMP_ADD_BLACK_MASK,
GIMP_ADD_ALPHA_MASK,
GIMP_ADD_SELECTION_MASK,
GIMP_ADD_INVERSE_SELECTION_MASK,
GIMP_ADD_COPY_MASK,
GIMP_ADD_INVERSE_COPY_MASK
} GimpAddMaskType;