diff --git a/ChangeLog b/ChangeLog index 7b3fb7fa98..c865a15854 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-03-23 Sven Neumann + + * 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 * Made 1.3.13 release. diff --git a/app/core/gimplayer.c b/app/core/gimplayer.c index 194a8baa8a..c66c22c23f 100644 --- a/app/core/gimplayer.c +++ b/app/core/gimplayer.c @@ -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; } diff --git a/app/gui/image-menu.c b/app/gui/image-menu.c index dd382128f0..6b61b03fe5 100644 --- a/app/gui/image-menu.c +++ b/app/gui/image-menu.c @@ -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); diff --git a/app/gui/layers-menu.c b/app/gui/layers-menu.c index dc1d1659cf..7e547e543f 100644 --- a/app/gui/layers-menu.c +++ b/app/gui/layers-menu.c @@ -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); diff --git a/app/menus/image-menu.c b/app/menus/image-menu.c index dd382128f0..6b61b03fe5 100644 --- a/app/menus/image-menu.c +++ b/app/menus/image-menu.c @@ -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);