Commit 9e18b43f authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

app/core/gimplayer.c app/gui/image-menu.c there doesn't seem to be a good

2003-03-23  Sven Neumann  <sven@gimp.org>

	* app/core/gimplayer.c
	* app/gui/image-menu.c
	* app/gui/layers-menu.c: there doesn't seem to be a good reason to
	disallow the creation of layer masks on indexed images.
parent fe9f715a
2003-03-23 Sven Neumann <sven@gimp.org>
* app/core/gimplayer.c
* app/gui/image-menu.c
* app/gui/layers-menu.c: there doesn't seem to be a good reason to
disallow the creation of layer masks on indexed images.
2003-03-23 Sven Neumann <sven@gimp.org>
* Made 1.3.13 release.
......@@ -593,28 +593,21 @@ gimp_layer_add_mask (GimpLayer *layer,
if (! gimage)
{
g_message (_("Cannot add layer mask to layer\n"
g_message (_("Cannot add layer mask to layer "
"which is not part of an image."));
return NULL;
}
if (layer->mask)
{
g_message(_("Unable to add a layer mask since\n"
"the layer already has one."));
return NULL;
}
if (gimp_drawable_is_indexed (GIMP_DRAWABLE (layer)))
{
g_message(_("Unable to add a layer mask to a\n"
"layer in an indexed image."));
g_message (_("Unable to add a layer mask since "
"the layer already has one."));
return NULL;
}
if (! gimp_drawable_has_alpha (GIMP_DRAWABLE (layer)))
{
g_message (_("Cannot add layer mask to a layer\n"
g_message (_("Cannot add layer mask to a layer "
"with no alpha channel."));
return NULL;
}
......@@ -624,7 +617,7 @@ gimp_layer_add_mask (GimpLayer *layer,
(gimp_drawable_height (GIMP_DRAWABLE (layer)) !=
gimp_drawable_height (GIMP_DRAWABLE (mask))))
{
g_message(_("Cannot add layer mask of different\n"
g_message(_("Cannot add layer mask of different "
"dimensions than specified layer."));
return NULL;
}
......
......@@ -1351,10 +1351,10 @@ image_menu_update (GtkItemFactory *item_factory,
SET_SENSITIVE ("/Layer/Colors/Auto/Equalize", lp && ! is_indexed);
SET_SENSITIVE ("/Layer/Colors/Histogram...", lp);
SET_SENSITIVE ("/Layer/Mask/Add Layer Mask...", lp && !aux && !lm && alpha && ! is_indexed);
SET_SENSITIVE ("/Layer/Mask/Apply Layer Mask", lp && !aux && lm);
SET_SENSITIVE ("/Layer/Mask/Delete Layer Mask", lp && !aux && lm);
SET_SENSITIVE ("/Layer/Mask/Mask to Selection", lp && !aux && lm);
SET_SENSITIVE ("/Layer/Mask/Add Layer Mask...", lp && !fs && !aux && !lm && alpha);
SET_SENSITIVE ("/Layer/Mask/Apply Layer Mask", lp && !fs && !aux && lm);
SET_SENSITIVE ("/Layer/Mask/Delete Layer Mask", lp && !fs && !aux && lm);
SET_SENSITIVE ("/Layer/Mask/Mask to Selection", lp && !fs && !aux && lm);
SET_SENSITIVE ("/Layer/Transparency/Alpha to Selection", lp && !aux && alpha);
SET_SENSITIVE ("/Layer/Transparency/Add Alpha Channel", lp && !aux && !fs && !lm && !alpha);
......
......@@ -220,7 +220,7 @@ layers_menu_update (GtkItemFactory *factory,
SET_SENSITIVE ("/Layer to Imagesize", !ac && gimage && lp);
SET_SENSITIVE ("/Scale Layer...", !ac && gimage && lp);
SET_SENSITIVE ("/Add Layer Mask...", !fs && !ac && gimage && !lm && lp && alpha && !indexed);
SET_SENSITIVE ("/Add Layer Mask...", !fs && !ac && gimage && !lm && lp && alpha);
SET_SENSITIVE ("/Apply Layer Mask", !fs && !ac && gimage && lm && lp);
SET_SENSITIVE ("/Delete Layer Mask", !fs && !ac && gimage && lm && lp);
SET_SENSITIVE ("/Mask to Selection", !fs && !ac && gimage && lm && lp);
......
......@@ -1351,10 +1351,10 @@ image_menu_update (GtkItemFactory *item_factory,
SET_SENSITIVE ("/Layer/Colors/Auto/Equalize", lp && ! is_indexed);
SET_SENSITIVE ("/Layer/Colors/Histogram...", lp);
SET_SENSITIVE ("/Layer/Mask/Add Layer Mask...", lp && !aux && !lm && alpha && ! is_indexed);
SET_SENSITIVE ("/Layer/Mask/Apply Layer Mask", lp && !aux && lm);
SET_SENSITIVE ("/Layer/Mask/Delete Layer Mask", lp && !aux && lm);
SET_SENSITIVE ("/Layer/Mask/Mask to Selection", lp && !aux && lm);
SET_SENSITIVE ("/Layer/Mask/Add Layer Mask...", lp && !fs && !aux && !lm && alpha);
SET_SENSITIVE ("/Layer/Mask/Apply Layer Mask", lp && !fs && !aux && lm);
SET_SENSITIVE ("/Layer/Mask/Delete Layer Mask", lp && !fs && !aux && lm);
SET_SENSITIVE ("/Layer/Mask/Mask to Selection", lp && !fs && !aux && lm);
SET_SENSITIVE ("/Layer/Transparency/Alpha to Selection", lp && !aux && alpha);
SET_SENSITIVE ("/Layer/Transparency/Add Alpha Channel", lp && !aux && !fs && !lm && !alpha);
......
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