app: remove various layers discard action in favor of layers-rasterize.
The following actions are removed: layers-link-discard, layers-text-discard and layers-vector-discard. The new action "layers-rasterize" introduced previously will handle all of these. Since layers-text-discard is the only one which existed until GIMP 3.0, we are migrating any custom shortcut which may have been set to layers-rasterize (both from 3.0 shortcutsrc or older menurc). Action layers-link-monitor is also removed (in favor of layers-retrieve) but no migration code is added, since this didn't exist in 3.0.
This commit is contained in:
parent
a54e13c105
commit
c392d8ea7f
2 changed files with 14 additions and 36 deletions
|
|
@ -182,12 +182,6 @@ static const GimpActionEntry layers_actions[] =
|
|||
image_flatten_image_cmd_callback,
|
||||
GIMP_HELP_IMAGE_FLATTEN },
|
||||
|
||||
{ "layers-link-discard", GIMP_ICON_TOOL_TEXT,
|
||||
NC_("layers-action", "_Discard Link Information"), NULL, { NULL },
|
||||
NC_("layers-action", "Turn this link layer into a normal layer"),
|
||||
layers_rasterize_cmd_callback,
|
||||
GIMP_HELP_LAYER_TEXT_DISCARD },
|
||||
|
||||
{ "layers-rasterize", GIMP_ICON_TOOL_TEXT,
|
||||
NC_("layers-action", "_Rasterize"), NULL, { NULL },
|
||||
NC_("layers-action", "Turn selected text, link or vector layers into raster layers"),
|
||||
|
|
@ -200,18 +194,6 @@ static const GimpActionEntry layers_actions[] =
|
|||
layers_retrieve_cmd_callback,
|
||||
GIMP_HELP_LAYER_TEXT_DISCARD },
|
||||
|
||||
{ "layers-link-monitor", GIMP_ICON_TOOL_TEXT,
|
||||
NC_("layers-action", "_Monitor Linked Image"), NULL, { NULL },
|
||||
NC_("layers-action", "Discard any transformation and monitor the linked file again"),
|
||||
layers_retrieve_cmd_callback,
|
||||
GIMP_HELP_LAYER_TEXT_DISCARD },
|
||||
|
||||
{ "layers-text-discard", GIMP_ICON_TOOL_TEXT,
|
||||
NC_("layers-action", "_Discard Text Information"), NULL, { NULL },
|
||||
NC_("layers-action", "Turn these text layers into normal layers"),
|
||||
layers_rasterize_cmd_callback,
|
||||
GIMP_HELP_LAYER_TEXT_DISCARD },
|
||||
|
||||
{ "layers-text-to-path", GIMP_ICON_TOOL_TEXT,
|
||||
NC_("layers-action", "Text to _Path"), NULL, { NULL },
|
||||
NC_("layers-action", "Create paths from text layers"),
|
||||
|
|
@ -230,12 +212,6 @@ static const GimpActionEntry layers_actions[] =
|
|||
layers_vector_fill_stroke_cmd_callback,
|
||||
GIMP_HELP_LAYER_VECTOR_FILL_STROKE },
|
||||
|
||||
{ "layers-vector-discard", NULL,
|
||||
NC_("layers-action", "Discard Vector Information"), NULL, { NULL },
|
||||
NC_("layers-action", "Turn this vector layer into a normal layer"),
|
||||
layers_rasterize_cmd_callback,
|
||||
GIMP_HELP_LAYER_VECTOR_DISCARD },
|
||||
|
||||
{ "layers-resize", GIMP_ICON_OBJECT_RESIZE,
|
||||
NC_("layers-action", "Layer B_oundary Size..."), NULL, { NULL },
|
||||
NC_("layers-action", "Adjust the layer dimensions"),
|
||||
|
|
@ -805,7 +781,6 @@ layers_actions_update (GimpActionGroup *group,
|
|||
gboolean has_rasterized = FALSE;
|
||||
gboolean text_layer = FALSE;
|
||||
gboolean vector_layer = FALSE;
|
||||
gboolean link_layer = FALSE;
|
||||
gboolean bs_mutable = FALSE; /* At least 1 selected layers' blend space is mutable. */
|
||||
gboolean cs_mutable = FALSE; /* At least 1 selected layers' composite space is mutable. */
|
||||
gboolean cm_mutable = FALSE; /* At least 1 selected layers' composite mode is mutable. */
|
||||
|
|
@ -1031,7 +1006,6 @@ layers_actions_update (GimpActionGroup *group,
|
|||
|
||||
text_layer = gimp_item_is_text_layer (GIMP_ITEM (layer));
|
||||
vector_layer = gimp_item_is_vector_layer (GIMP_ITEM (layer));
|
||||
link_layer = gimp_item_is_link_layer (GIMP_ITEM (layer));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1096,15 +1070,10 @@ layers_actions_update (GimpActionGroup *group,
|
|||
SET_VISIBLE ("layers-rasterize", has_rasterizable);
|
||||
SET_VISIBLE ("layers-retrieve", has_rasterized);
|
||||
|
||||
SET_VISIBLE ("layers-text-discard", n_text_layers > 0 && !ac);
|
||||
SET_VISIBLE ("layers-text-to-path", n_text_layers > 0 && !ac);
|
||||
SET_VISIBLE ("layers-text-along-path", text_layer && !ac);
|
||||
|
||||
SET_VISIBLE ("layers-vector-fill-stroke", vector_layer && !ac);
|
||||
SET_VISIBLE ("layers-vector-discard", vector_layer && !ac);
|
||||
|
||||
SET_VISIBLE ("layers-link-discard", link_layer && !ac);
|
||||
SET_VISIBLE ("layers-link-monitor", GIMP_IS_LINK_LAYER (layer) && ! link_layer && !ac);
|
||||
|
||||
SET_SENSITIVE ("layers-resize", n_selected_layers == 1 && all_writable && all_movable && !ac);
|
||||
SET_SENSITIVE ("layers-resize-to-image", all_writable && all_movable && !ac);
|
||||
|
|
|
|||
|
|
@ -726,6 +726,9 @@ user_update_menurc_over20 (const GMatchInfo *matched_value,
|
|||
g_strcmp0 (action_match, "view-zoom-2-1") == 0 ||
|
||||
g_strcmp0 (action_match, "view-zoom-1-1") == 0)
|
||||
accel_variant = TRUE;
|
||||
/* Generalized in GIMP 3.2 (works on text, link and vector layers). */
|
||||
else if (g_strcmp0 (action_match, "layers-text-discard") == 0)
|
||||
new_action_name = g_strdup ("layers-rasterize");
|
||||
|
||||
if (new_action_name == NULL)
|
||||
new_action_name = g_strdup (action_match);
|
||||
|
|
@ -833,11 +836,12 @@ user_update_post_process_menurc_over20 (gpointer user_data)
|
|||
}
|
||||
|
||||
#define SHORTCUTSRC_UPDATE_PATTERN \
|
||||
"\"(" \
|
||||
"tools-vector|" \
|
||||
"dialogs-vectors|" \
|
||||
"layers-text-.*-vectors|" \
|
||||
"view-snap-to-vectors" \
|
||||
"\"(" "|" \
|
||||
"tools-vector" "|" \
|
||||
"dialogs-vectors" "|" \
|
||||
"layers-text-.*-vectors" "|" \
|
||||
"view-snap-to-vectors" "|" \
|
||||
"layers-text-discard" \
|
||||
")\""
|
||||
|
||||
static gboolean
|
||||
|
|
@ -872,6 +876,11 @@ user_update_shortcutsrc (const GMatchInfo *matched_value,
|
|||
/* Renamed in GIMP 3.2. */
|
||||
g_string_append (new_value, "\"view-snap-to-path\"");
|
||||
}
|
||||
else if (g_strcmp0 (match, "\"layers-text-discard\"") == 0)
|
||||
{
|
||||
/* Generalized in GIMP 3.2 (works on text, link and vector layers). */
|
||||
g_string_append (new_value, "\"layers-rasterize\"");
|
||||
}
|
||||
|
||||
g_free (match);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue