Commit 31fcd79d authored by Michael Natterer's avatar Michael Natterer

Bug 769738 - Add color tags/labels for layers/channels/paths

Add property "color-tag" of type enum GimpColorTag to GimpItem so all
layers, channels and paths can be tagged with a color.

For interoperability, use the color list from Krita which is a
superset of Photoshop's colors.

Features a "Color Tag" submenu in the layers, channels and paths
menus, a row of color radio buttons in the properties dialogs,
undo and PDB API.

As a side effect, some common code is now factores out into
items-actions.[ch] and items-commands.[ch] which adds visible, linked
and lock actions for layers and channels.
parent 956d45bf
......@@ -116,6 +116,10 @@ libappactions_a_SOURCES = \
images-actions.h \
images-commands.c \
images-commands.h \
items-commands.c \
items-commands.h \
items-actions.c \
items-actions.h \
layers-actions.c \
layers-actions.h \
layers-commands.c \
......
......@@ -34,6 +34,7 @@
#include "actions.h"
#include "channels-actions.h"
#include "channels-commands.h"
#include "items-actions.h"
#include "gimp-intl.h"
......@@ -44,6 +45,10 @@ static const GimpActionEntry channels_actions[] =
NC_("channels-action", "Channels Menu"), NULL, NULL, NULL,
GIMP_HELP_CHANNEL_DIALOG },
{ "channels-color-tag-menu", GIMP_STOCK_CLOSE /* abused */,
NC_("channels-action", "Color Tag"), NULL, NULL, NULL,
GIMP_HELP_CHANNEL_COLOR_TAG },
{ "channels-edit-attributes", "gtk-edit",
NC_("channels-action", "_Edit Channel Attributes..."), NULL,
NC_("channels-action", "Edit the channel's name, color and opacity"),
......@@ -102,6 +107,90 @@ static const GimpActionEntry channels_actions[] =
GIMP_HELP_CHANNEL_LOWER_TO_BOTTOM }
};
static const GimpToggleActionEntry channels_toggle_actions[] =
{
{ "channels-visible", GIMP_STOCK_VISIBLE,
NC_("channels-action", "_Visible"), NULL, NULL,
G_CALLBACK (channels_visible_cmd_callback),
FALSE,
GIMP_HELP_CHANNEL_VISIBLE },
{ "channels-linked", GIMP_STOCK_LINKED,
NC_("channels-action", "_Linked"), NULL, NULL,
G_CALLBACK (channels_linked_cmd_callback),
FALSE,
GIMP_HELP_CHANNEL_LINKED },
{ "channels-lock-content", NULL /* GIMP_STOCK_LOCK */,
NC_("channels-action", "L_ock pixels"), NULL, NULL,
G_CALLBACK (channels_lock_content_cmd_callback),
FALSE,
GIMP_HELP_CHANNEL_LOCK_PIXELS },
{ "channels-lock-position", GIMP_STOCK_TOOL_MOVE,
NC_("channels-action", "L_ock position"), NULL, NULL,
G_CALLBACK (channels_lock_position_cmd_callback),
FALSE,
GIMP_HELP_CHANNEL_LOCK_POSITION }
};
static const GimpEnumActionEntry channels_color_tag_actions[] =
{
{ "channels-color-tag-none", GIMP_STOCK_CLOSE /* abused */,
NC_("channels-action", "None"), NULL,
NC_("channels-action", "Clear color tag"),
GIMP_COLOR_TAG_NONE, FALSE,
GIMP_HELP_CHANNEL_COLOR_TAG },
{ "channels-color-tag-blue", NULL,
NC_("channels-action", "Blue"), NULL,
NC_("channels-action", "Set color tag to blue"),
GIMP_COLOR_TAG_BLUE, FALSE,
GIMP_HELP_CHANNEL_COLOR_TAG },
{ "channels-color-tag-green", NULL,
NC_("channels-action", "Green"), NULL,
NC_("channels-action", "Set color tag to green"),
GIMP_COLOR_TAG_GREEN, FALSE,
GIMP_HELP_CHANNEL_COLOR_TAG },
{ "channels-color-tag-yellow", NULL,
NC_("channels-action", "Yellow"), NULL,
NC_("channels-action", "Set color tag to yellow"),
GIMP_COLOR_TAG_YELLOW, FALSE,
GIMP_HELP_CHANNEL_COLOR_TAG },
{ "channels-color-tag-orange", NULL,
NC_("channels-action", "Orange"), NULL,
NC_("channels-action", "Set color tag to orange"),
GIMP_COLOR_TAG_ORANGE, FALSE,
GIMP_HELP_CHANNEL_COLOR_TAG },
{ "channels-color-tag-brown", NULL,
NC_("channels-action", "Brown"), NULL,
NC_("channels-action", "Set color tag to brown"),
GIMP_COLOR_TAG_BROWN, FALSE,
GIMP_HELP_CHANNEL_COLOR_TAG },
{ "channels-color-tag-red", NULL,
NC_("channels-action", "Red"), NULL,
NC_("channels-action", "Set color tag to red"),
GIMP_COLOR_TAG_RED, FALSE,
GIMP_HELP_CHANNEL_COLOR_TAG },
{ "channels-color-tag-violet", NULL,
NC_("channels-action", "Violet"), NULL,
NC_("channels-action", "Set color tag to violet"),
GIMP_COLOR_TAG_VIOLET, FALSE,
GIMP_HELP_CHANNEL_COLOR_TAG },
{ "channels-color-tag-gray", NULL,
NC_("channels-action", "Gray"), NULL,
NC_("channels-action", "Set color tag to gray"),
GIMP_COLOR_TAG_GRAY, FALSE,
GIMP_HELP_CHANNEL_COLOR_TAG }
};
static const GimpEnumActionEntry channels_to_selection_actions[] =
{
{ "channels-selection-replace", GIMP_STOCK_SELECTION_REPLACE,
......@@ -137,10 +226,21 @@ channels_actions_setup (GimpActionGroup *group)
channels_actions,
G_N_ELEMENTS (channels_actions));
gimp_action_group_add_toggle_actions (group, "channels-action",
channels_toggle_actions,
G_N_ELEMENTS (channels_toggle_actions));
gimp_action_group_add_enum_actions (group, "channels-action",
channels_color_tag_actions,
G_N_ELEMENTS (channels_color_tag_actions),
G_CALLBACK (channels_color_tag_cmd_callback));
gimp_action_group_add_enum_actions (group, "channels-action",
channels_to_selection_actions,
G_N_ELEMENTS (channels_to_selection_actions),
G_CALLBACK (channels_to_selection_cmd_callback));
items_actions_setup (group, "channels");
}
void
......@@ -206,4 +306,6 @@ channels_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("channels-selection-intersect", !fs && (channel || component));
#undef SET_SENSITIVE
items_actions_update (group, "channels", GIMP_ITEM (channel));
}
......@@ -49,6 +49,7 @@
#include "actions.h"
#include "channels-commands.h"
#include "items-commands.h"
#include "gimp-intl.h"
......@@ -64,6 +65,7 @@ static void channels_new_callback (GtkWidget *dialog,
gboolean save_selection,
gboolean channel_visible,
gboolean channel_linked,
GimpColorTag channel_color_tag,
gboolean channel_lock_content,
gboolean channel_lock_position,
gpointer user_data);
......@@ -76,6 +78,7 @@ static void channels_edit_attributes_callback (GtkWidget *dialog,
gboolean save_selection,
gboolean channel_visible,
gboolean channel_linked,
GimpColorTag channel_color_tag,
gboolean channel_lock_content,
gboolean channel_lock_position,
gpointer user_data);
......@@ -117,6 +120,7 @@ channels_edit_attributes_cmd_callback (GtkAction *action,
&channel->color,
gimp_item_get_visible (item),
gimp_item_get_linked (item),
gimp_item_get_color_tag (item),
gimp_item_get_lock_content (item),
gimp_item_get_lock_position (item),
channels_edit_attributes_callback,
......@@ -161,6 +165,7 @@ channels_new_cmd_callback (GtkAction *action,
&config->channel_new_color,
TRUE,
FALSE,
GIMP_COLOR_TAG_NONE,
FALSE,
FALSE,
channels_new_callback,
......@@ -362,6 +367,63 @@ channels_to_selection_cmd_callback (GtkAction *action,
gimp_image_flush (image);
}
void
channels_visible_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *image;
GimpChannel *channel;
return_if_no_channel (image, channel, data);
items_visible_cmd_callback (action, image, GIMP_ITEM (channel));
}
void
channels_linked_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *image;
GimpChannel *channel;
return_if_no_channel (image, channel, data);
items_linked_cmd_callback (action, image, GIMP_ITEM (channel));
}
void
channels_lock_content_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *image;
GimpChannel *channel;
return_if_no_channel (image, channel, data);
items_lock_content_cmd_callback (action, image, GIMP_ITEM (channel));
}
void
channels_lock_position_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *image;
GimpChannel *channel;
return_if_no_channel (image, channel, data);
items_lock_position_cmd_callback (action, image, GIMP_ITEM (channel));
}
void
channels_color_tag_cmd_callback (GtkAction *action,
gint value,
gpointer data)
{
GimpImage *image;
GimpChannel *channel;
return_if_no_channel (image, channel, data);
items_color_tag_cmd_callback (action, image, GIMP_ITEM (channel),
(GimpColorTag) value);
}
/* private functions */
......@@ -375,6 +437,7 @@ channels_new_callback (GtkWidget *dialog,
gboolean save_selection,
gboolean channel_visible,
gboolean channel_linked,
GimpColorTag channel_color_tag,
gboolean channel_lock_content,
gboolean channel_lock_position,
gpointer user_data)
......@@ -411,6 +474,7 @@ channels_new_callback (GtkWidget *dialog,
gimp_item_set_visible (GIMP_ITEM (channel), channel_visible, FALSE);
gimp_item_set_linked (GIMP_ITEM (channel), channel_linked, FALSE);
gimp_item_set_color_tag (GIMP_ITEM (channel), channel_color_tag, FALSE);
gimp_item_set_lock_content (GIMP_ITEM (channel), channel_lock_content, FALSE);
gimp_item_set_lock_position (GIMP_ITEM (channel), channel_lock_position, FALSE);
......@@ -431,6 +495,7 @@ channels_edit_attributes_callback (GtkWidget *dialog,
gboolean save_selection,
gboolean channel_visible,
gboolean channel_linked,
GimpColorTag channel_color_tag,
gboolean channel_lock_content,
gboolean channel_lock_position,
gpointer user_data)
......@@ -441,6 +506,7 @@ channels_edit_attributes_callback (GtkWidget *dialog,
gimp_rgba_distance (channel_color, &channel->color) > 0.0001 ||
channel_visible != gimp_item_get_visible (item) ||
channel_linked != gimp_item_get_linked (item) ||
channel_color_tag != gimp_item_get_color_tag (item) ||
channel_lock_content != gimp_item_get_lock_content (item) ||
channel_lock_position != gimp_item_get_lock_position (item))
{
......@@ -460,6 +526,9 @@ channels_edit_attributes_callback (GtkWidget *dialog,
if (channel_linked != gimp_item_get_linked (item))
gimp_item_set_linked (item, channel_linked, TRUE);
if (channel_color_tag != gimp_item_get_color_tag (item))
gimp_item_set_color_tag (item, channel_color_tag, TRUE);
if (channel_lock_content != gimp_item_get_lock_content (item))
gimp_item_set_lock_content (item, channel_lock_content, TRUE);
......
......@@ -43,5 +43,18 @@ void channels_to_selection_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void channels_visible_cmd_callback (GtkAction *action,
gpointer data);
void channels_linked_cmd_callback (GtkAction *action,
gpointer data);
void channels_lock_content_cmd_callback (GtkAction *action,
gpointer data);
void channels_lock_position_cmd_callback (GtkAction *action,
gpointer data);
void channels_color_tag_cmd_callback (GtkAction *action,
gint value,
gpointer data);
#endif /* __CHANNELS_COMMANDS_H__ */
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"
#include "actions-types.h"
#include "core/gimpitem.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimpwidgets-utils.h"
#include "items-actions.h"
void
items_actions_setup (GimpActionGroup *group,
const gchar *prefix)
{
GEnumClass *enum_class;
GEnumValue *value;
enum_class = g_type_class_ref (GIMP_TYPE_COLOR_TAG);
for (value = enum_class->values; value->value_name; value++)
{
gchar action[32];
g_snprintf (action, sizeof (action),
"%s-color-tag-%s", prefix, value->value_nick);
if (value->value == GIMP_COLOR_TAG_NONE)
{
gimp_action_group_set_action_always_show_image (group, action, TRUE);
}
else
{
GimpRGB color;
gimp_get_color_tag_color (value->value, &color);
gimp_action_group_set_action_color (group, action, &color, FALSE);
}
}
g_type_class_unref (enum_class);
}
void
items_actions_update (GimpActionGroup *group,
const gchar *prefix,
GimpItem *item)
{
GEnumClass *enum_class;
GEnumValue *value;
gchar action[32];
gboolean visible = FALSE;
gboolean linked = FALSE;
gboolean has_color_tag = FALSE;
gboolean locked = FALSE;
gboolean can_lock = FALSE;
gboolean locked_pos = FALSE;
gboolean can_lock_pos = FALSE;
GimpRGB tag_color;
if (item)
{
visible = gimp_item_get_visible (item);
linked = gimp_item_get_linked (item);
locked = gimp_item_get_lock_content (item);
can_lock = gimp_item_can_lock_content (item);
locked_pos = gimp_item_get_lock_position (item);
can_lock_pos = gimp_item_can_lock_position (item);
has_color_tag = gimp_get_color_tag_color (gimp_item_get_color_tag (item),
&tag_color);
}
#define SET_SENSITIVE(action,condition) \
gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
#define SET_ACTIVE(action,condition) \
gimp_action_group_set_action_active (group, action, (condition) != 0)
#define SET_COLOR(action,color) \
gimp_action_group_set_action_color (group, action, color, FALSE)
g_snprintf (action, sizeof (action), "%s-visible", prefix);
SET_SENSITIVE (action, item);
SET_ACTIVE (action, visible);
g_snprintf (action, sizeof (action), "%s-linked", prefix);
SET_SENSITIVE (action, item);
SET_ACTIVE (action, linked);
g_snprintf (action, sizeof (action), "%s-lock-content", prefix);
SET_SENSITIVE (action, can_lock);
SET_ACTIVE (action, locked);
g_snprintf (action, sizeof (action), "%s-lock-position", prefix);
SET_SENSITIVE (action, can_lock_pos);
SET_ACTIVE (action, locked_pos);
g_snprintf (action, sizeof (action), "%s-color-tag-menu", prefix);
SET_COLOR (action, has_color_tag ? &tag_color : NULL);
enum_class = g_type_class_ref (GIMP_TYPE_COLOR_TAG);
for (value = enum_class->values; value->value_name; value++)
{
g_snprintf (action, sizeof (action),
"%s-color-tag-%s", prefix, value->value_nick);
SET_SENSITIVE (action, item);
}
g_type_class_unref (enum_class);
#undef SET_SENSITIVE
#undef SET_ACTIVE
#undef SET_COLOR
}
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __ITEMS_ACTIONS_H__
#define __ITEMS_ACTIONS_H__
void items_actions_setup (GimpActionGroup *group,
const gchar *prefix);
void items_actions_update (GimpActionGroup *group,
const gchar *prefix,
GimpItem *item);
#endif /* __ITEMS_ACTIONS_H__ */
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "actions-types.h"
#include "core/gimpimage.h"
#include "core/gimpimage-undo.h"
#include "core/gimpitem.h"
#include "core/gimpitemundo.h"
#include "items-commands.h"
#include "gimp-intl.h"
/* public functions */
void
items_visible_cmd_callback (GtkAction *action,
GimpImage *image,
GimpItem *item)
{
gboolean visible;
visible = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
if (visible != gimp_item_get_visible (item))
{
GimpUndo *undo;
gboolean push_undo = TRUE;
undo = gimp_image_undo_can_compress (image, GIMP_TYPE_ITEM_UNDO,
GIMP_UNDO_ITEM_VISIBILITY);
if (undo && GIMP_ITEM_UNDO (undo)->item == item)
push_undo = FALSE;
gimp_item_set_visible (item, visible, push_undo);
gimp_image_flush (image);
}
}
void
items_linked_cmd_callback (GtkAction *action,
GimpImage *image,
GimpItem *item)
{
gboolean linked;
linked = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
if (linked != gimp_item_get_linked (item))
{
GimpUndo *undo;
gboolean push_undo = TRUE;
undo = gimp_image_undo_can_compress (image, GIMP_TYPE_ITEM_UNDO,
GIMP_UNDO_ITEM_LINKED);
if (undo && GIMP_ITEM_UNDO (undo)->item == item)
push_undo = FALSE;
gimp_item_set_linked (item, linked, push_undo);
gimp_image_flush (image);
}
}
void
items_lock_content_cmd_callback (GtkAction *action,
GimpImage *image,
GimpItem *item)
{
gboolean locked;
locked = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
if (locked != gimp_item_get_lock_content (item))
{
GimpUndo *undo;
gboolean push_undo = TRUE;
undo = gimp_image_undo_can_compress (image, GIMP_TYPE_ITEM_UNDO,
GIMP_UNDO_ITEM_LINKED);
if (undo && GIMP_ITEM_UNDO (undo)->item == item)
push_undo = FALSE;
gimp_item_set_lock_content (item, locked, push_undo);
gimp_image_flush (image);
}
}
void
items_lock_position_cmd_callback (GtkAction *action,
GimpImage *image,
GimpItem *item)
{
gboolean locked;
locked = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
if (locked != gimp_item_get_lock_position (item))
{
GimpUndo *undo;
gboolean push_undo = TRUE;
undo = gimp_image_undo_can_compress (image, GIMP_TYPE_ITEM_UNDO,
GIMP_UNDO_ITEM_LOCK_POSITION);
if (undo && GIMP_ITEM_UNDO (undo)->item == item)
push_undo = FALSE;
gimp_item_set_lock_position (item, locked, push_undo);
gimp_image_flush (image);
}
}
void
items_color_tag_cmd_callback (GtkAction *action,
GimpImage *image,
GimpItem *item,
GimpColorTag color_tag)
{
if (color_tag != gimp_item_get_color_tag (item))
{
GimpUndo *undo;
gboolean push_undo = TRUE;
undo = gimp_image_undo_can_compress (image, GIMP_TYPE_ITEM_UNDO,
GIMP_UNDO_ITEM_COLOR_TAG);
if (undo && GIMP_ITEM_UNDO (undo)->item == item)
push_undo = FALSE;
gimp_item_set_color_tag (item, color_tag, push_undo);
gimp_image_flush (image);
}
}
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __ITEMS_COMMANDS_H__
#define __ITEMS_COMMANDS_H__
void items_visible_cmd_callback (GtkAction *action,
GimpImage *image,
GimpItem *item);
void items_linked_cmd_callback (GtkAction *action,
GimpImage *image,
GimpItem *item);
void items_lock_content_cmd_callback (GtkAction *action,
GimpImage *image,
GimpItem *item);
void items_lock_position_cmd_callback (GtkAction *action,
GimpImage *image,
GimpItem *item);
void items_color_tag_cmd_callback (GtkAction *action,
GimpImage *image,
GimpItem *item,
GimpColorTag color_tag);
#endif /* __ITEMS_COMMANDS_H__ */
......@@ -37,6 +37,7 @@
#include "actions.h"
#include "image-commands.h"
#include "items-actions.h"
#include "layers-actions.h"
#include "layers-commands.h"
......@@ -49,6 +50,10 @@ static const GimpActionEntry layers_actions[] =
NC_("layers-action", "Layers Menu"), NULL, NULL, NULL,
GIMP_HELP_LAYER_DIALOG },
{ "layers-color-tag-menu", GIMP_STOCK_CLOSE /* abused */,
NC_("layers-action", "Color Tag"), NULL, NULL, NULL,
GIMP_HELP_LAYER_COLOR_TAG },
{ "layers-menu", NULL,
NC_("layers-action", "_Layer") },
{ "layers-stack-menu", NULL,
......@@ -257,14 +262,6 @@ static const GimpActionEntry layers_actions[] =
static const GimpToggleActionEntry layers_toggle_actions[] =
{
{ "layers-lock-alpha", GIMP_STOCK_TRANSPARENCY,
NC_("layers-action", "Lock Alph_a Channel"), NULL,
NC_("layers-action",
"Keep transparency information on this layer from being modified"),
G_CALLBACK (layers_lock_alpha_cmd_callback),
FALSE,
GIMP_HELP_LAYER_LOCK_ALPHA },
{ "layers-mask-edit", "gtk-edit",
NC_("layers-action", "_Edit Layer Mask"), NULL,
NC_("layers-action", "Work on the layer mask"),
......@@ -283,7 +280,96 @@ static const GimpToggleActionEntry layers_toggle_actions[] =
NC_("layers-action", "Dismiss the effect of the layer mask"),
G_CALLBACK (layers_mask_disable_cmd_callback),
FALSE,
GIMP_HELP_LAYER_MASK_DISABLE }
GIMP_HELP_LAYER_MASK_DISABLE },
{ "layers-visible", GIMP_STOCK_VISIBLE,
NC_("layers-action", "_Visible"), NULL, NULL,
G_CALLBACK (layers_visible_cmd_callback),
FALSE,
GIMP_HELP_LAYER_VISIBLE },
{ "layers-linked", GIMP_STOCK_LINKED,
NC_("layers-action", "_Linked"), NULL, NULL,