Don't allow dropping colors and patterns and don't allow pasting to groups

This commit is contained in:
Michael Natterer 2009-08-29 12:27:57 +02:00
parent 13b384e332
commit 35e67dae43
1 changed files with 24 additions and 5 deletions

View File

@ -367,6 +367,14 @@ gimp_display_shell_dnd_bucket_fill (GimpDisplayShell *shell,
if (! drawable)
return;
if (gimp_viewable_get_children (GIMP_VIEWABLE (drawable)))
{
gimp_message_literal (shell->display->gimp, G_OBJECT (shell->display),
GIMP_MESSAGE_ERROR,
_("Cannot modify the pixels of group layers."));
return;
}
if (gimp_item_get_lock_content (GIMP_ITEM (drawable)))
{
gimp_message_literal (shell->display->gimp, G_OBJECT (shell->display),
@ -452,12 +460,23 @@ gimp_display_shell_drop_buffer (GtkWidget *widget,
drawable = gimp_image_get_active_drawable (image);
if (drawable && gimp_item_get_lock_content (GIMP_ITEM (drawable)))
if (drawable)
{
gimp_message_literal (shell->display->gimp, G_OBJECT (shell->display),
GIMP_MESSAGE_ERROR,
_("The active layer's pixels are locked."));
return;
if (gimp_viewable_get_children (GIMP_VIEWABLE (drawable)))
{
gimp_message_literal (shell->display->gimp, G_OBJECT (shell->display),
GIMP_MESSAGE_ERROR,
_("Cannot modify the pixels of group layers."));
return;
}
if (gimp_item_get_lock_content (GIMP_ITEM (drawable)))
{
gimp_message_literal (shell->display->gimp, G_OBJECT (shell->display),
GIMP_MESSAGE_ERROR,
_("The active layer's pixels are locked."));
return;
}
}
buffer = GIMP_BUFFER (viewable);