Commit 22c22229 authored by Michael Natterer's avatar Michael Natterer 😴
Browse files

libgimpbase,*: clean up enum values in gimpbaseenums.h

GIMP_ADD_foo_MASK -> GIMP_ADD_MASK_foo
GIMP_foo_MODE -> GIMP_BLEND_foo
GIMP_foo_CLONE -> GIMP_CLONE_foo
GIMP_foo -> GIMP_DODGE_BURN_TYPE_foo
GIMP_foo -> GIMP_TRANSFER_foo

Add compat values for the old names and compat code to script-fu
and pygimp.
parent 86a2f385
......@@ -144,7 +144,7 @@ static gchar *layer_name = NULL;
static GimpUnit layer_resize_unit = GIMP_UNIT_PIXEL;
static GimpUnit layer_scale_unit = GIMP_UNIT_PIXEL;
static GimpInterpolationType layer_scale_interp = -1;
static GimpAddMaskType layer_add_mask_type = GIMP_ADD_WHITE_MASK;
static GimpAddMaskType layer_add_mask_type = GIMP_ADD_MASK_WHITE;
static gboolean layer_mask_invert = FALSE;
......@@ -1108,7 +1108,7 @@ layers_add_mask_response (GtkWidget *widget,
GimpImage *image = gimp_item_get_image (GIMP_ITEM (layer));
GimpLayerMask *mask;
if (dialog->add_mask_type == GIMP_ADD_CHANNEL_MASK &&
if (dialog->add_mask_type == GIMP_ADD_MASK_CHANNEL &&
! dialog->channel)
{
gimp_message_literal (image->gimp,
......
......@@ -757,7 +757,7 @@ gradient_render_pixel (gdouble x,
color->r = color->g = color->b = 0;
color->a = GIMP_OPACITY_TRANSPARENT;
}
else if (rbd->blend_mode == GIMP_CUSTOM_MODE)
else if (rbd->blend_mode == GIMP_BLEND_CUSTOM)
{
#ifdef USE_GRADIENT_CACHE
*color = rbd->gradient_cache[(gint) (factor * (rbd->gradient_cache_size - 1))];
......@@ -778,7 +778,7 @@ gradient_render_pixel (gdouble x,
color->b = rbd->fg.b + (rbd->bg.b - rbd->fg.b) * factor;
color->a = rbd->fg.a + (rbd->bg.a - rbd->fg.a) * factor;
if (rbd->blend_mode == GIMP_FG_BG_HSV_MODE)
if (rbd->blend_mode == GIMP_BLEND_FG_BG_HSV)
{
GimpHSV hsv = *((GimpHSV *) color);
......@@ -878,10 +878,10 @@ gradient_fill_region (GimpImage *image,
switch (blend_mode)
{
case GIMP_FG_BG_RGB_MODE:
case GIMP_BLEND_FG_BG_RGB:
break;
case GIMP_FG_BG_HSV_MODE:
case GIMP_BLEND_FG_BG_HSV:
/* Convert to HSV */
{
GimpHSV fg_hsv;
......@@ -895,14 +895,14 @@ gradient_fill_region (GimpImage *image,
}
break;
case GIMP_FG_TRANSPARENT_MODE:
case GIMP_BLEND_FG_TRANSPARENT:
/* Color does not change, just the opacity */
rbd.bg = rbd.fg;
rbd.bg.a = GIMP_OPACITY_TRANSPARENT;
break;
case GIMP_CUSTOM_MODE:
case GIMP_BLEND_CUSTOM:
break;
default:
......
......@@ -83,15 +83,15 @@ gimp_drawable_bucket_fill (GimpDrawable *drawable,
g_return_val_if_fail (GIMP_IS_CONTEXT (context), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
if (fill_mode == GIMP_FG_BUCKET_FILL)
if (fill_mode == GIMP_BUCKET_FILL_FG)
{
gimp_context_get_foreground (context, &color);
}
else if (fill_mode == GIMP_BG_BUCKET_FILL)
else if (fill_mode == GIMP_BUCKET_FILL_BG)
{
gimp_context_get_background (context, &color);
}
else if (fill_mode == GIMP_PATTERN_BUCKET_FILL)
else if (fill_mode == GIMP_BUCKET_FILL_PATTERN)
{
pattern = gimp_context_get_pattern (context);
......@@ -146,9 +146,9 @@ gimp_drawable_bucket_fill_internal (GimpDrawable *drawable,
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)));
g_return_if_fail (fill_mode != GIMP_PATTERN_BUCKET_FILL ||
g_return_if_fail (fill_mode != GIMP_BUCKET_FILL_PATTERN ||
GIMP_IS_PATTERN (pattern));
g_return_if_fail (fill_mode == GIMP_PATTERN_BUCKET_FILL ||
g_return_if_fail (fill_mode == GIMP_BUCKET_FILL_PATTERN ||
color != NULL);
image = gimp_item_get_image (GIMP_ITEM (drawable));
......@@ -226,8 +226,8 @@ gimp_drawable_bucket_fill_internal (GimpDrawable *drawable,
switch (fill_mode)
{
case GIMP_FG_BUCKET_FILL:
case GIMP_BG_BUCKET_FILL:
case GIMP_BUCKET_FILL_FG:
case GIMP_BUCKET_FILL_BG:
{
GeglColor *gegl_color = gimp_gegl_color_new (color);
......@@ -236,7 +236,7 @@ gimp_drawable_bucket_fill_internal (GimpDrawable *drawable,
}
break;
case GIMP_PATTERN_BUCKET_FILL:
case GIMP_BUCKET_FILL_PATTERN:
{
GeglBuffer *pattern_buffer = gimp_pattern_create_buffer (pattern);
......
......@@ -1439,7 +1439,7 @@ gimp_layer_create_mask (const GimpLayer *layer,
GimpRGB black = { 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE };
g_return_val_if_fail (GIMP_IS_LAYER (layer), NULL);
g_return_val_if_fail (add_mask_type != GIMP_ADD_CHANNEL_MASK ||
g_return_val_if_fail (add_mask_type != GIMP_ADD_MASK_CHANNEL ||
GIMP_IS_CHANNEL (channel), NULL);
drawable = GIMP_DRAWABLE (layer);
......@@ -1458,11 +1458,11 @@ gimp_layer_create_mask (const GimpLayer *layer,
switch (add_mask_type)
{
case GIMP_ADD_WHITE_MASK:
case GIMP_ADD_MASK_WHITE:
gimp_channel_all (GIMP_CHANNEL (mask), FALSE);
return mask;
case GIMP_ADD_BLACK_MASK:
case GIMP_ADD_MASK_BLACK:
gimp_channel_clear (GIMP_CHANNEL (mask), NULL, FALSE);
return mask;
......@@ -1472,12 +1472,12 @@ gimp_layer_create_mask (const GimpLayer *layer,
switch (add_mask_type)
{
case GIMP_ADD_WHITE_MASK:
case GIMP_ADD_BLACK_MASK:
case GIMP_ADD_MASK_WHITE:
case GIMP_ADD_MASK_BLACK:
break;
case GIMP_ADD_ALPHA_MASK:
case GIMP_ADD_ALPHA_TRANSFER_MASK:
case GIMP_ADD_MASK_ALPHA:
case GIMP_ADD_MASK_ALPHA_TRANSFER:
if (gimp_drawable_has_alpha (drawable))
{
GeglBuffer *dest_buffer;
......@@ -1493,7 +1493,7 @@ gimp_layer_create_mask (const GimpLayer *layer,
dest_buffer, NULL);
gegl_buffer_set_format (dest_buffer, NULL);
if (add_mask_type == GIMP_ADD_ALPHA_TRANSFER_MASK)
if (add_mask_type == GIMP_ADD_MASK_ALPHA_TRANSFER)
{
gimp_drawable_push_undo (drawable,
C_("undo-type", "Transfer Alpha to Mask"),
......@@ -1510,15 +1510,15 @@ gimp_layer_create_mask (const GimpLayer *layer,
}
break;
case GIMP_ADD_SELECTION_MASK:
case GIMP_ADD_CHANNEL_MASK:
case GIMP_ADD_MASK_SELECTION:
case GIMP_ADD_MASK_CHANNEL:
{
gboolean channel_empty;
gint offset_x, offset_y;
gint copy_x, copy_y;
gint copy_width, copy_height;
if (add_mask_type == GIMP_ADD_SELECTION_MASK)
if (add_mask_type == GIMP_ADD_MASK_SELECTION)
channel = GIMP_CHANNEL (gimp_image_get_mask (image));
channel_empty = gimp_channel_is_empty (channel);
......@@ -1559,7 +1559,7 @@ gimp_layer_create_mask (const GimpLayer *layer,
}
break;
case GIMP_ADD_COPY_MASK:
case GIMP_ADD_MASK_COPY:
{
GeglBuffer *src_buffer;
GeglBuffer *dest_buffer;
......
......@@ -125,7 +125,7 @@ layer_add_mask_dialog_new (GimpLayer *layer,
context,
GIMP_VIEW_SIZE_SMALL, 1);
gimp_enum_radio_frame_add (GTK_FRAME (frame), combo,
GIMP_ADD_CHANNEL_MASK, TRUE);
GIMP_ADD_MASK_CHANNEL, TRUE);
gtk_widget_show (combo);
g_signal_connect (combo, "select-item",
......
......@@ -215,7 +215,7 @@ gimp_gegl_dodgeburn (GeglBuffer *src_buffer,
{
GeglBufferIterator *iter;
if (type == GIMP_BURN)
if (type == GIMP_DODGE_BURN_TYPE_BURN)
exposure = -exposure;
iter = gegl_buffer_iterator_new (src_buffer, src_rect, 0,
......@@ -230,7 +230,7 @@ gimp_gegl_dodgeburn (GeglBuffer *src_buffer,
{
gfloat factor;
case GIMP_HIGHLIGHTS:
case GIMP_TRANSFER_HIGHLIGHTS:
factor = 1.0 + exposure * (0.333333);
while (gegl_buffer_iterator_next (iter))
......@@ -250,7 +250,7 @@ gimp_gegl_dodgeburn (GeglBuffer *src_buffer,
}
break;
case GIMP_MIDTONES:
case GIMP_TRANSFER_MIDTONES:
if (exposure < 0)
factor = 1.0 - exposure * (0.333333);
else
......@@ -273,7 +273,7 @@ gimp_gegl_dodgeburn (GeglBuffer *src_buffer,
}
break;
case GIMP_SHADOWS:
case GIMP_TRANSFER_SHADOWS:
if (exposure >= 0)
factor = 0.333333 * exposure;
else
......
......@@ -93,7 +93,7 @@ gimp_color_balance_config_class_init (GimpColorBalanceConfigClass *klass)
"range",
"The affected range",
GIMP_TYPE_TRANSFER_MODE,
GIMP_MIDTONES, 0);
GIMP_TRANSFER_MIDTONES, 0);
GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_CYAN_RED,
"cyan-red",
......@@ -222,7 +222,9 @@ gimp_color_balance_config_serialize (GimpConfig *config,
old_range = bc_config->range;
for (range = GIMP_SHADOWS; range <= GIMP_HIGHLIGHTS; range++)
for (range = GIMP_TRANSFER_SHADOWS;
range <= GIMP_TRANSFER_HIGHLIGHTS;
range++)
{
bc_config->range = range;
......@@ -280,7 +282,9 @@ gimp_color_balance_config_equal (GimpConfig *a,
GimpColorBalanceConfig *config_b = GIMP_COLOR_BALANCE_CONFIG (b);
GimpTransferMode range;
for (range = GIMP_SHADOWS; range <= GIMP_HIGHLIGHTS; range++)
for (range = GIMP_TRANSFER_SHADOWS;
range <= GIMP_TRANSFER_HIGHLIGHTS;
range++)
{
if (config_a->cyan_red[range] != config_b->cyan_red[range] ||
config_a->magenta_green[range] != config_b->magenta_green[range] ||
......@@ -302,7 +306,9 @@ gimp_color_balance_config_reset (GimpConfig *config)
GimpColorBalanceConfig *cb_config = GIMP_COLOR_BALANCE_CONFIG (config);
GimpTransferMode range;
for (range = GIMP_SHADOWS; range <= GIMP_HIGHLIGHTS; range++)
for (range = GIMP_TRANSFER_SHADOWS;
range <= GIMP_TRANSFER_HIGHLIGHTS;
range++)
{
cb_config->range = range;
gimp_color_balance_config_reset_range (cb_config);
......@@ -321,7 +327,9 @@ gimp_color_balance_config_copy (GimpConfig *src,
GimpColorBalanceConfig *dest_config = GIMP_COLOR_BALANCE_CONFIG (dest);
GimpTransferMode range;
for (range = GIMP_SHADOWS; range <= GIMP_HIGHLIGHTS; range++)
for (range = GIMP_TRANSFER_SHADOWS;
range <= GIMP_TRANSFER_HIGHLIGHTS;
range++)
{
dest_config->cyan_red[range] = src_config->cyan_red[range];
dest_config->magenta_green[range] = src_config->magenta_green[range];
......
......@@ -146,19 +146,19 @@ gimp_operation_color_balance_process (GeglOperation *operation,
gimp_rgb_to_hsl (&rgb, &hsl);
r_n = gimp_operation_color_balance_map (r, hsl.l,
config->cyan_red[GIMP_SHADOWS],
config->cyan_red[GIMP_MIDTONES],
config->cyan_red[GIMP_HIGHLIGHTS]);
config->cyan_red[GIMP_TRANSFER_SHADOWS],
config->cyan_red[GIMP_TRANSFER_MIDTONES],
config->cyan_red[GIMP_TRANSFER_HIGHLIGHTS]);
g_n = gimp_operation_color_balance_map (g, hsl.l,
config->magenta_green[GIMP_SHADOWS],
config->magenta_green[GIMP_MIDTONES],
config->magenta_green[GIMP_HIGHLIGHTS]);
config->magenta_green[GIMP_TRANSFER_SHADOWS],
config->magenta_green[GIMP_TRANSFER_MIDTONES],
config->magenta_green[GIMP_TRANSFER_HIGHLIGHTS]);
b_n = gimp_operation_color_balance_map (b, hsl.l,
config->yellow_blue[GIMP_SHADOWS],
config->yellow_blue[GIMP_MIDTONES],
config->yellow_blue[GIMP_HIGHLIGHTS]);
config->yellow_blue[GIMP_TRANSFER_SHADOWS],
config->yellow_blue[GIMP_TRANSFER_MIDTONES],
config->yellow_blue[GIMP_TRANSFER_HIGHLIGHTS]);
if (config->preserve_luminosity)
{
......
......@@ -119,7 +119,7 @@ gimp_clone_start (GimpPaintCore *paint_core,
return FALSE;
}
if (options->clone_type == GIMP_PATTERN_CLONE)
if (options->clone_type == GIMP_CLONE_PATTERN)
{
if (! gimp_context_get_pattern (GIMP_CONTEXT (options)))
{
......@@ -171,7 +171,7 @@ gimp_clone_motion (GimpSourceCore *source_core,
paint_area_offset_y,
0, 0));
}
else if (options->clone_type == GIMP_PATTERN_CLONE)
else if (options->clone_type == GIMP_CLONE_PATTERN)
{
GimpPattern *pattern = gimp_context_get_pattern (context);
GeglBuffer *src_buffer = gimp_pattern_create_buffer (pattern);
......@@ -224,5 +224,5 @@ static gboolean
gimp_clone_use_source (GimpSourceCore *source_core,
GimpSourceOptions *options)
{
return GIMP_CLONE_OPTIONS (options)->clone_type == GIMP_IMAGE_CLONE;
return GIMP_CLONE_OPTIONS (options)->clone_type == GIMP_CLONE_IMAGE;
}
......@@ -62,7 +62,7 @@ gimp_clone_options_class_init (GimpCloneOptionsClass *klass)
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_CLONE_TYPE,
"clone-type", NULL,
GIMP_TYPE_CLONE_TYPE,
GIMP_IMAGE_CLONE,
GIMP_CLONE_IMAGE,
GIMP_PARAM_STATIC_STRINGS);
}
......
......@@ -27,8 +27,8 @@
#include "gimpdodgeburnoptions.h"
#define DODGE_BURN_DEFAULT_TYPE GIMP_DODGE
#define DODGE_BURN_DEFAULT_MODE GIMP_MIDTONES
#define DODGE_BURN_DEFAULT_TYPE GIMP_DODGE_BURN_TYPE_DODGE
#define DODGE_BURN_DEFAULT_MODE GIMP_TRANSFER_MIDTONES
#define DODGE_BURN_DEFAULT_EXPOSURE 50.0
......
......@@ -171,7 +171,7 @@ gimp_perspective_clone_paint (GimpPaintCore *paint_core,
switch (clone_options->clone_type)
{
case GIMP_IMAGE_CLONE:
case GIMP_CLONE_IMAGE:
{
GimpPickable *src_pickable;
GimpImage *src_image;
......@@ -208,7 +208,7 @@ gimp_perspective_clone_paint (GimpPaintCore *paint_core,
}
break;
case GIMP_PATTERN_CLONE:
case GIMP_CLONE_PATTERN:
{
GimpPattern *pattern = gimp_context_get_pattern (context);
......@@ -395,7 +395,7 @@ gimp_perspective_clone_get_source (GimpSourceCore *source_core,
switch (clone_options->clone_type)
{
case GIMP_IMAGE_CLONE:
case GIMP_CLONE_IMAGE:
if (! gimp_rectangle_intersect (xmin, ymin,
xmax - xmin, ymax - ymin,
0, 0,
......@@ -408,7 +408,7 @@ gimp_perspective_clone_get_source (GimpSourceCore *source_core,
}
break;
case GIMP_PATTERN_CLONE:
case GIMP_CLONE_PATTERN:
gegl_node_set (clone->crop,
"x", (gdouble) xmin,
"y", (gdouble) ymin,
......
......@@ -1162,7 +1162,7 @@ register_color_procs (GimpPDB *pdb)
"transfer mode",
"Transfer mode",
GIMP_TYPE_TRANSFER_MODE,
GIMP_SHADOWS,
GIMP_TRANSFER_SHADOWS,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("preserve-lum",
......
......@@ -776,7 +776,7 @@ register_drawable_color_procs (GimpPDB *pdb)
"transfer mode",
"Transfer mode",
GIMP_TYPE_TRANSFER_MODE,
GIMP_SHADOWS,
GIMP_TRANSFER_SHADOWS,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("preserve-lum",
......
......@@ -603,19 +603,19 @@ edit_bucket_fill_invoker (GimpProcedure *procedure,
if (! gimp_channel_is_empty (gimp_image_get_mask (image)))
{
GimpFillType fill_type = GIMP_FG_BUCKET_FILL;
GimpFillType fill_type = GIMP_FOREGROUND_FILL;
switch (fill_mode)
{
case GIMP_FG_BUCKET_FILL:
case GIMP_BUCKET_FILL_FG:
fill_type = GIMP_FOREGROUND_FILL;
break;
case GIMP_BG_BUCKET_FILL:
case GIMP_BUCKET_FILL_BG:
fill_type = GIMP_BACKGROUND_FILL;
break;
case GIMP_PATTERN_BUCKET_FILL:
case GIMP_BUCKET_FILL_PATTERN:
fill_type = GIMP_PATTERN_FILL;
break;
}
......@@ -683,19 +683,19 @@ edit_bucket_fill_full_invoker (GimpProcedure *procedure,
if (! gimp_channel_is_empty (gimp_image_get_mask (image)))
{
GimpFillType fill_type = GIMP_FG_BUCKET_FILL;
GimpFillType fill_type = GIMP_FOREGROUND_FILL;
switch (fill_mode)
{
case GIMP_FG_BUCKET_FILL:
case GIMP_BUCKET_FILL_FG:
fill_type = GIMP_FOREGROUND_FILL;
break;
case GIMP_BG_BUCKET_FILL:
case GIMP_BUCKET_FILL_BG:
fill_type = GIMP_BACKGROUND_FILL;
break;
case GIMP_PATTERN_BUCKET_FILL:
case GIMP_BUCKET_FILL_PATTERN:
fill_type = GIMP_PATTERN_FILL;
break;
}
......@@ -1315,7 +1315,7 @@ register_edit_procs (GimpPDB *pdb)
"fill mode",
"The type of fill",
GIMP_TYPE_BUCKET_FILL_MODE,
GIMP_FG_BUCKET_FILL,
GIMP_BUCKET_FILL_FG,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("paint-mode",
......@@ -1382,7 +1382,7 @@ register_edit_procs (GimpPDB *pdb)
"fill mode",
"The type of fill",
GIMP_TYPE_BUCKET_FILL_MODE,
GIMP_FG_BUCKET_FILL,
GIMP_BUCKET_FILL_FG,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("paint-mode",
......@@ -1462,7 +1462,7 @@ register_edit_procs (GimpPDB *pdb)
"blend mode",
"The type of blend",
GIMP_TYPE_BLEND_MODE,
GIMP_FG_BG_RGB_MODE,
GIMP_BLEND_FG_BG_RGB,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("paint-mode",
......
......@@ -620,7 +620,7 @@ layer_create_mask_invoker (GimpProcedure *procedure,
{
GimpChannel *channel = NULL;
if (mask_type == GIMP_ADD_CHANNEL_MASK)
if (mask_type == GIMP_ADD_MASK_CHANNEL)
{
channel = gimp_image_get_active_channel (gimp_item_get_image (GIMP_ITEM (layer)));
......@@ -1660,7 +1660,7 @@ register_layer_procs (GimpPDB *pdb)
"mask type",
"The type of mask",
GIMP_TYPE_ADD_MASK_TYPE,
GIMP_ADD_WHITE_MASK,
GIMP_ADD_MASK_WHITE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_layer_mask_id ("mask",
......
......@@ -1049,7 +1049,7 @@ register_paint_tools_procs (GimpPDB *pdb)
"clone type",
"The type of clone",
GIMP_TYPE_CLONE_TYPE,
GIMP_IMAGE_CLONE,
GIMP_CLONE_IMAGE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("src-x",
......@@ -1223,14 +1223,14 @@ register_paint_tools_procs (GimpPDB *pdb)
"dodgeburn type",
"The type either dodge or burn",
GIMP_TYPE_DODGE_BURN_TYPE,
GIMP_DODGE,
GIMP_DODGE_BURN_TYPE_DODGE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("dodgeburn-mode",
"dodgeburn mode",
"The mode",
GIMP_TYPE_TRANSFER_MODE,
GIMP_SHADOWS,
GIMP_TRANSFER_SHADOWS,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_int32 ("num-strokes",
......
......@@ -252,7 +252,7 @@ gimp_blend_tool_button_release (GimpTool *tool,
gimp_drawable_blend (drawable,
context,
GIMP_CUSTOM_MODE,
GIMP_BLEND_CUSTOM,
gimp_context_get_paint_mode (context),
options->gradient_type,
gimp_context_get_opacity (context),
......
......@@ -87,7 +87,7 @@ gimp_bucket_fill_options_class_init (GimpBucketFillOptionsClass *klass)
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_FILL_MODE,
"fill-mode", NULL,
GIMP_TYPE_BUCKET_FILL_MODE,
GIMP_FG_BUCKET_FILL,
GIMP_BUCKET_FILL_FG,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_FILL_SELECTION,
"fill-selection",
......@@ -238,7 +238,7 @@ gimp_bucket_fill_options_gui (GimpToolOptions *tool_options)
NULL, 2,
"pattern-view-type", "pattern-view-size");
gimp_enum_radio_frame_add (GTK_FRAME (frame), hbox,
GIMP_PATTERN_BUCKET_FILL, TRUE);
GIMP_BUCKET_FILL_PATTERN, TRUE);
/* fill selection */
str = g_strdup_printf (_("Affected Area (%s)"),
......
......@@ -195,13 +195,13 @@ gimp_bucket_fill_tool_button_release (GimpTool *tool,
switch (options->fill_mode)
{
default:
case GIMP_FG_BUCKET_FILL:
case GIMP_BUCKET_FILL_FG:
fill_type = GIMP_FOREGROUND_FILL;
break;
case GIMP_BG_BUCKET_FILL:
case GIMP_BUCKET_FILL_BG:
fill_type = GIMP_BACKGROUND_FILL;
break;
case GIMP_PATTERN_BUCKET_FILL:
case GIMP_BUCKET_FILL_PATTERN:
fill_type = GIMP_PATTERN_FILL;
break;
}
......@@ -257,12 +257,12 @@ gimp_bucket_fill_tool_modifier_key (GimpTool *tool,
{
switch (options->fill_mode)
{
case GIMP_FG_BUCKET_FILL:
g_object_set (options, "fill-mode", GIMP_BG_BUCKET_FILL, NULL);
case GIMP_BUCKET_FILL_FG:
g_object_set (options, "fill-mode", GIMP_BUCKET_FILL_BG, NULL);
break;
case GIMP_BG_BUCKET_FILL:
g_object_set (options, "fill-mode", GIMP_FG_BUCKET_FILL, NULL);
case GIMP_BUCKET_FILL_BG:
g_object_set (options, "fill-mode", GIMP_BUCKET_FILL_FG, NULL);
break;
default:
......@@ -296,15 +296,15 @@ gimp_bucket_fill_tool_cursor_update (GimpTool *tool,
{
switch (options->fill_mode)
{
case GIMP_FG_BUCKET_FILL:
case GIMP_BUCKET_FILL_FG:
modifier = GIMP_CURSOR_MODIFIER_FOREGROUND;
break;
case GIMP_BG_BUCKET_FILL:
case GIMP_BUCKET_FILL_BG:
modifier = GIMP_CURSOR_MODIFIER_BACKGROUND;
break;
case GIMP_PATTERN_BUCKET_FILL:
case GIMP_BUCKET_FILL_PATTERN:
modifier = GIMP_CURSOR_MODIFIER_PATTERN;
break;
}
......