app: remove checks from stuff that now works on indexed layers

This commit is contained in:
Michael Natterer
2012-03-20 21:33:55 +01:00
parent 0053494c18
commit e01189ca77
8 changed files with 14 additions and 43 deletions

View File

@ -147,14 +147,6 @@ gimp_brightness_contrast_tool_initialize (GimpTool *tool,
if (! drawable)
return FALSE;
if (gimp_drawable_is_indexed (drawable))
{
g_set_error_literal (error, GIMP_ERROR, GIMP_FAILED,
_("Brightness-Contrast does not operate "
"on indexed layers."));
return FALSE;
}
gimp_config_reset (GIMP_CONFIG (bc_tool->config));
return GIMP_TOOL_CLASS (parent_class)->initialize (tool, display, error);

View File

@ -124,10 +124,10 @@ gimp_colorize_tool_initialize (GimpTool *tool,
if (! drawable)
return FALSE;
if (! gimp_drawable_is_rgb (drawable))
if (gimp_drawable_is_gray (drawable))
{
g_set_error_literal (error, GIMP_ERROR, GIMP_FAILED,
_("Colorize operates only on RGB color layers."));
_("Colorize does not operate on grayscale layers."));
return FALSE;
}

View File

@ -116,13 +116,6 @@ gimp_posterize_tool_initialize (GimpTool *tool,
if (! drawable)
return FALSE;
if (gimp_drawable_is_indexed (drawable))
{
g_set_error_literal (error, GIMP_ERROR, GIMP_FAILED,
_("Posterize does not operate on indexed layers."));
return FALSE;
}
gimp_config_reset (GIMP_CONFIG (posterize_tool->config));
if (! GIMP_TOOL_CLASS (parent_class)->initialize (tool, display, error))

View File

@ -145,13 +145,6 @@ gimp_threshold_tool_initialize (GimpTool *tool,
if (! drawable)
return FALSE;
if (gimp_drawable_is_indexed (drawable))
{
g_set_error_literal (error, GIMP_ERROR, GIMP_FAILED,
_("Threshold does not operate on indexed layers."));
return FALSE;
}
gimp_config_reset (GIMP_CONFIG (t_tool->config));
if (! GIMP_TOOL_CLASS (parent_class)->initialize (tool, display, error))