Commit 425748da authored by Michael Natterer's avatar Michael Natterer 😴
Browse files

libgimpbase, *: rename GimpFillType values: GIMP_FOO_FILL -> GIMP_FILL_FOO

Change all users accordingly and add compat enum values and compat
constants to script-fu and pygimp.
parent 41148e89
......@@ -163,7 +163,7 @@ channels_new_last_vals_cmd_callback (GtkAction *action,
gimp_drawable_fill_by_type (GIMP_DRAWABLE (new_channel),
action_data_get_context (data),
GIMP_TRANSPARENT_FILL);
GIMP_FILL_TRANSPARENT);
gimp_image_add_channel (image, new_channel,
GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
......@@ -360,7 +360,7 @@ channels_new_channel_response (GtkWidget *widget,
gimp_drawable_fill_by_type (GIMP_DRAWABLE (new_channel),
options->context,
GIMP_TRANSPARENT_FILL);
GIMP_FILL_TRANSPARENT);
}
gimp_image_add_channel (options->image, new_channel,
......
......@@ -194,19 +194,19 @@ static const GimpEnumActionEntry edit_fill_actions[] =
{ "edit-fill-fg", GIMP_STOCK_TOOL_BUCKET_FILL,
NC_("edit-action", "Fill with _FG Color"), "<primary>comma",
NC_("edit-action", "Fill the selection using the foreground color"),
GIMP_FOREGROUND_FILL, FALSE,
GIMP_FILL_FOREGROUND, FALSE,
GIMP_HELP_EDIT_FILL_FG },
{ "edit-fill-bg", GIMP_STOCK_TOOL_BUCKET_FILL,
NC_("edit-action", "Fill with B_G Color"), "<primary>period",
NC_("edit-action", "Fill the selection using the background color"),
GIMP_BACKGROUND_FILL, FALSE,
GIMP_FILL_BACKGROUND, FALSE,
GIMP_HELP_EDIT_FILL_BG },
{ "edit-fill-pattern", GIMP_STOCK_TOOL_BUCKET_FILL,
NC_("edit-action", "Fill _with Pattern"), "<primary>semicolon",
NC_("edit-action", "Fill the selection using the active pattern"),
GIMP_PATTERN_FILL, FALSE,
GIMP_FILL_PATTERN, FALSE,
GIMP_HELP_EDIT_FILL_PATTERN }
};
......
......@@ -139,7 +139,7 @@ static gint layers_mode_index (GimpLayerModeEffects layer_mode);
/* private variables */
static GimpFillType layer_fill_type = GIMP_TRANSPARENT_FILL;
static GimpFillType layer_fill_type = GIMP_FILL_TRANSPARENT;
static gchar *layer_name = NULL;
static GimpUnit layer_resize_unit = GIMP_UNIT_PIXEL;
static GimpUnit layer_scale_unit = GIMP_UNIT_PIXEL;
......
......@@ -438,27 +438,27 @@ gimp_edit_fill (GimpImage *image,
switch (fill_type)
{
case GIMP_FOREGROUND_FILL:
case GIMP_FILL_FOREGROUND:
gimp_context_get_foreground (context, &color);
undo_desc = C_("undo-type", "Fill with Foreground Color");
break;
case GIMP_BACKGROUND_FILL:
case GIMP_FILL_BACKGROUND:
gimp_context_get_background (context, &color);
undo_desc = C_("undo-type", "Fill with Background Color");
break;
case GIMP_WHITE_FILL:
case GIMP_FILL_WHITE:
gimp_rgba_set (&color, 1.0, 1.0, 1.0, GIMP_OPACITY_OPAQUE);
undo_desc = C_("undo-type", "Fill with White");
break;
case GIMP_TRANSPARENT_FILL:
case GIMP_FILL_TRANSPARENT:
gimp_context_get_background (context, &color);
undo_desc = C_("undo-type", "Fill with Transparency");
break;
case GIMP_PATTERN_FILL:
case GIMP_FILL_PATTERN:
pattern = gimp_context_get_pattern (context);
undo_desc = C_("undo-type", "Fill with Pattern");
break;
......@@ -466,7 +466,7 @@ gimp_edit_fill (GimpImage *image,
default:
g_warning ("%s: unknown fill type", G_STRFUNC);
return gimp_edit_fill (image, drawable,
context, GIMP_BACKGROUND_FILL,
context, GIMP_FILL_BACKGROUND,
GIMP_OPACITY_OPAQUE, GIMP_NORMAL_MODE);
}
......
......@@ -1538,23 +1538,23 @@ gimp_drawable_fill_by_type (GimpDrawable *drawable,
switch (fill_type)
{
case GIMP_FOREGROUND_FILL:
case GIMP_FILL_FOREGROUND:
gimp_context_get_foreground (context, &color);
break;
case GIMP_BACKGROUND_FILL:
case GIMP_FILL_BACKGROUND:
gimp_context_get_background (context, &color);
break;
case GIMP_WHITE_FILL:
case GIMP_FILL_WHITE:
gimp_rgba_set (&color, 1.0, 1.0, 1.0, GIMP_OPACITY_OPAQUE);
break;
case GIMP_TRANSPARENT_FILL:
case GIMP_FILL_TRANSPARENT:
gimp_rgba_set (&color, 0.0, 0.0, 0.0, GIMP_OPACITY_TRANSPARENT);
break;
case GIMP_PATTERN_FILL:
case GIMP_FILL_PATTERN:
pattern = gimp_context_get_pattern (context);
break;
......
......@@ -126,7 +126,7 @@ gimp_image_new_from_template (Gimp *gimp,
width = gimp_image_get_width (image);
height = gimp_image_get_height (image);
if (gimp_template_get_fill_type (template) == GIMP_TRANSPARENT_FILL)
if (gimp_template_get_fill_type (template) == GIMP_FILL_TRANSPARENT)
has_alpha = TRUE;
else
has_alpha = FALSE;
......
......@@ -169,7 +169,7 @@ gimp_template_class_init (GimpTemplateClass *klass)
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_FILL_TYPE,
"fill-type",
NULL,
GIMP_TYPE_FILL_TYPE, GIMP_BACKGROUND_FILL,
GIMP_TYPE_FILL_TYPE, GIMP_FILL_BACKGROUND,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_COMMENT,
......@@ -328,7 +328,7 @@ gimp_template_notify (GObject *object,
/* the initial layer */
format = gimp_babl_format (private->base_type,
private->precision,
private->fill_type == GIMP_TRANSPARENT_FILL);
private->fill_type == GIMP_FILL_TRANSPARENT);
bytes = babl_format_get_bytes_per_pixel (format);
/* the selection */
......@@ -470,7 +470,7 @@ gimp_template_get_precision (GimpTemplate *template)
GimpFillType
gimp_template_get_fill_type (GimpTemplate *template)
{
g_return_val_if_fail (GIMP_IS_TEMPLATE (template), GIMP_BACKGROUND_FILL);
g_return_val_if_fail (GIMP_IS_TEMPLATE (template), GIMP_FILL_BACKGROUND);
return GET_PRIVATE (template)->fill_type;
}
......
......@@ -200,8 +200,8 @@ layer_options_dialog_new (GimpImage *image,
/* The radio frame */
frame = gimp_enum_radio_frame_new_with_range (GIMP_TYPE_FILL_TYPE,
GIMP_FOREGROUND_FILL,
GIMP_TRANSPARENT_FILL,
GIMP_FILL_FOREGROUND,
GIMP_FILL_TRANSPARENT,
gtk_label_new (_("Layer Fill Type")),
G_CALLBACK (gimp_radio_button_update),
&options->fill_type,
......
......@@ -1642,7 +1642,7 @@ register_drawable_procs (GimpPDB *pdb)
"fill type",
"The type of fill",
GIMP_TYPE_FILL_TYPE,
GIMP_FOREGROUND_FILL,
GIMP_FILL_FOREGROUND,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
......
......@@ -604,20 +604,20 @@ edit_bucket_fill_invoker (GimpProcedure *procedure,
if (! gimp_channel_is_empty (gimp_image_get_mask (image)))
{
GimpFillType fill_type = GIMP_FOREGROUND_FILL;
GimpFillType fill_type = GIMP_FILL_FOREGROUND;
switch (fill_mode)
{
case GIMP_BUCKET_FILL_FG:
fill_type = GIMP_FOREGROUND_FILL;
fill_type = GIMP_FILL_FOREGROUND;
break;
case GIMP_BUCKET_FILL_BG:
fill_type = GIMP_BACKGROUND_FILL;
fill_type = GIMP_FILL_BACKGROUND;
break;
case GIMP_BUCKET_FILL_PATTERN:
fill_type = GIMP_PATTERN_FILL;
fill_type = GIMP_FILL_PATTERN;
break;
}
......@@ -684,20 +684,20 @@ edit_bucket_fill_full_invoker (GimpProcedure *procedure,
if (! gimp_channel_is_empty (gimp_image_get_mask (image)))
{
GimpFillType fill_type = GIMP_FOREGROUND_FILL;
GimpFillType fill_type = GIMP_FILL_FOREGROUND;
switch (fill_mode)
{
case GIMP_BUCKET_FILL_FG:
fill_type = GIMP_FOREGROUND_FILL;
fill_type = GIMP_FILL_FOREGROUND;
break;
case GIMP_BUCKET_FILL_BG:
fill_type = GIMP_BACKGROUND_FILL;
fill_type = GIMP_FILL_BACKGROUND;
break;
case GIMP_BUCKET_FILL_PATTERN:
fill_type = GIMP_PATTERN_FILL;
fill_type = GIMP_FILL_PATTERN;
break;
}
......@@ -1308,7 +1308,7 @@ register_edit_procs (GimpPDB *pdb)
"fill type",
"The type of fill",
GIMP_TYPE_FILL_TYPE,
GIMP_FOREGROUND_FILL,
GIMP_FILL_FOREGROUND,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
......
......@@ -196,13 +196,13 @@ gimp_bucket_fill_tool_button_release (GimpTool *tool,
{
default:
case GIMP_BUCKET_FILL_FG:
fill_type = GIMP_FOREGROUND_FILL;
fill_type = GIMP_FILL_FOREGROUND;
break;
case GIMP_BUCKET_FILL_BG:
fill_type = GIMP_BACKGROUND_FILL;
fill_type = GIMP_FILL_BACKGROUND;
break;
case GIMP_BUCKET_FILL_PATTERN:
fill_type = GIMP_PATTERN_FILL;
fill_type = GIMP_FILL_PATTERN;
break;
}
......
......@@ -395,8 +395,7 @@ gimp_template_editor_constructed (GObject *object)
combo = gimp_prop_enum_combo_box_new (G_OBJECT (template),
"fill-type",
GIMP_FOREGROUND_FILL,
GIMP_PATTERN_FILL);
0, 0);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 4,
_("_Fill with:"), 0.0, 0.5,
combo, 1, FALSE);
......
......@@ -487,21 +487,21 @@ gimp_fill_type_get_type (void)
{
static const GEnumValue values[] =
{
{ GIMP_FOREGROUND_FILL, "GIMP_FOREGROUND_FILL", "foreground-fill" },
{ GIMP_BACKGROUND_FILL, "GIMP_BACKGROUND_FILL", "background-fill" },
{ GIMP_WHITE_FILL, "GIMP_WHITE_FILL", "white-fill" },
{ GIMP_TRANSPARENT_FILL, "GIMP_TRANSPARENT_FILL", "transparent-fill" },
{ GIMP_PATTERN_FILL, "GIMP_PATTERN_FILL", "pattern-fill" },
{ GIMP_FILL_FOREGROUND, "GIMP_FILL_FOREGROUND", "foreground-fill" },
{ GIMP_FILL_BACKGROUND, "GIMP_FILL_BACKGROUND", "background-fill" },
{ GIMP_FILL_WHITE, "GIMP_FILL_WHITE", "white-fill" },
{ GIMP_FILL_TRANSPARENT, "GIMP_FILL_TRANSPARENT", "transparent-fill" },
{ GIMP_FILL_PATTERN, "GIMP_FILL_PATTERN", "pattern-fill" },
{ 0, NULL, NULL }
};
static const GimpEnumDesc descs[] =
{
{ GIMP_FOREGROUND_FILL, NC_("fill-type", "Foreground color"), NULL },
{ GIMP_BACKGROUND_FILL, NC_("fill-type", "Background color"), NULL },
{ GIMP_WHITE_FILL, NC_("fill-type", "White"), NULL },
{ GIMP_TRANSPARENT_FILL, NC_("fill-type", "Transparency"), NULL },
{ GIMP_PATTERN_FILL, NC_("fill-type", "Pattern"), NULL },
{ GIMP_FILL_FOREGROUND, NC_("fill-type", "Foreground color"), NULL },
{ GIMP_FILL_BACKGROUND, NC_("fill-type", "Background color"), NULL },
{ GIMP_FILL_WHITE, NC_("fill-type", "White"), NULL },
{ GIMP_FILL_TRANSPARENT, NC_("fill-type", "Transparency"), NULL },
{ GIMP_FILL_PATTERN, NC_("fill-type", "Pattern"), NULL },
{ 0, NULL, NULL }
};
......
......@@ -260,11 +260,19 @@ GType gimp_fill_type_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_FOREGROUND_FILL, /*< desc="Foreground color" >*/
GIMP_BACKGROUND_FILL, /*< desc="Background color" >*/
GIMP_WHITE_FILL, /*< desc="White" >*/
GIMP_TRANSPARENT_FILL, /*< desc="Transparency" >*/
GIMP_PATTERN_FILL /*< desc="Pattern" >*/
GIMP_FILL_FOREGROUND, /*< nick=foreground-fill, desc="Foreground color" >*/
GIMP_FILL_BACKGROUND, /*< nick=background-fill, desc="Background color" >*/
GIMP_FILL_WHITE, /*< nick=white-fill, desc="White" >*/
GIMP_FILL_TRANSPARENT, /*< nick=transparent-fill, desc="Transparency" >*/
GIMP_FILL_PATTERN, /*< nick=pattern-fill, desc="Pattern" >*/
#ifndef GIMP_DISABLE_DEPRECATED
GIMP_FOREGROUND_FILL = GIMP_FILL_FOREGROUND, /*< skip, pdb-skip >*/
GIMP_BACKGROUND_FILL = GIMP_FILL_BACKGROUND, /*< skip, pdb-skip >*/
GIMP_WHITE_FILL = GIMP_FILL_WHITE, /*< skip, pdb-skip >*/
GIMP_TRANSPARENT_FILL = GIMP_FILL_TRANSPARENT, /*< skip, pdb-skip >*/
GIMP_PATTERN_FILL = GIMP_FILL_PATTERN /*< skip, pdb-skip >*/
#endif /* GIMP_DISABLE_DEPRECATED */
} GimpFillType;
......
......@@ -426,7 +426,7 @@ film (void)
&drawable_dst, &pixel_rgn_dst);
/* Fill film background */
gimp_drawable_fill (layer_ID_dst, GIMP_BACKGROUND_FILL);
gimp_drawable_fill (layer_ID_dst, GIMP_FILL_BACKGROUND);
/* Draw all the holes */
hole_offset = film_height * filmvals.hole_offset;
......
......@@ -351,7 +351,7 @@ pluginCore (piArgs *argp)
nl = gimp_layer_new (argp->image, name, width, height,
GIMP_RGBA_IMAGE, (gdouble)100, GIMP_NORMAL_MODE);
ndrw = gimp_drawable_get (nl);
gimp_drawable_fill (nl, GIMP_TRANSPARENT_FILL);
gimp_drawable_fill (nl, GIMP_FILL_TRANSPARENT);
gimp_image_insert_layer (argp->image, nl, -1, 0);
}
......
......@@ -949,8 +949,8 @@ diff (GimpDrawable *drawable,
gimp_image_insert_layer (new_image_id, xlayer_id, -1, 1);
gimp_image_insert_layer (new_image_id, ylayer_id, -1, 1);
gimp_drawable_fill (xlayer_id, GIMP_BACKGROUND_FILL);
gimp_drawable_fill (ylayer_id, GIMP_BACKGROUND_FILL);
gimp_drawable_fill (xlayer_id, GIMP_FILL_BACKGROUND);
gimp_drawable_fill (ylayer_id, GIMP_FILL_BACKGROUND);
gimp_image_set_active_layer (image_id, layer_active);
dest_bytes = draw_xd->bpp;
......
......@@ -1345,7 +1345,7 @@ add_layers (gint32 image_id,
image_type, 0, GIMP_NORMAL_MODE);
g_free (lyr_a[lidx]->name);
gimp_image_insert_layer (image_id, layer_id, parent_group_id, -1);
gimp_drawable_fill (layer_id, GIMP_TRANSPARENT_FILL);
gimp_drawable_fill (layer_id, GIMP_FILL_TRANSPARENT);
gimp_item_set_visible (layer_id, lyr_a[lidx]->layer_flags.visible);
if (lyr_a[lidx]->id)
gimp_item_set_tattoo (layer_id, lyr_a[lidx]->id);
......
......@@ -239,7 +239,7 @@ gfig_dialog (void)
if (parasite)
{
gimp_drawable_fill (gfig_context->drawable_id, GIMP_TRANSPARENT_FILL);
gimp_drawable_fill (gfig_context->drawable_id, GIMP_FILL_TRANSPARENT);
gfig_context->using_new_layer = FALSE;
gimp_parasite_free (parasite);
}
......@@ -248,7 +248,7 @@ gfig_dialog (void)
newlayer = gimp_layer_new (gfig_context->image_id, "GFig",
img_width, img_height,
img_type, 100.0, GIMP_NORMAL_MODE);
gimp_drawable_fill (newlayer, GIMP_TRANSPARENT_FILL);
gimp_drawable_fill (newlayer, GIMP_FILL_TRANSPARENT);
gimp_image_insert_layer (gfig_context->image_id, newlayer, -1, -1);
gfig_context->drawable_id = newlayer;
gfig_context->using_new_layer = TRUE;
......@@ -1991,7 +1991,7 @@ gfig_paint_callback (void)
objs = gfig_context->current_obj->obj_list;
gimp_drawable_fill (gfig_context->drawable_id, GIMP_TRANSPARENT_FILL);
gimp_drawable_fill (gfig_context->drawable_id, GIMP_FILL_TRANSPARENT);
while (objs)
{
......
......@@ -739,7 +739,7 @@ do_curl_effect (gint32 drawable_id)
gimp_image_insert_layer (image_id, curl_layer->drawable_id,
gimp_item_get_parent (drawable_id),
drawable_position);
gimp_drawable_fill (curl_layer->drawable_id, GIMP_TRANSPARENT_FILL);
gimp_drawable_fill (curl_layer->drawable_id, GIMP_FILL_TRANSPARENT);
gimp_drawable_offsets (drawable_id, &x1, &y1);
gimp_layer_set_offsets (curl_layer->drawable_id, sel_x + x1, sel_y + y1);
......
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