From e960ed0d1270c404579957a572d56e00e2b34383 Mon Sep 17 00:00:00 2001 From: Jehan Date: Wed, 15 Oct 2025 15:07:30 +0200 Subject: [PATCH] app, menus: delete "layers-vector-fill-stroke" action. Cf. discussions on IRC with Alx. Since this is editable directly in the Path tool options, we likely don't need to have the separate action for it. It feels redundant. It is still available on a double-click, though I am not sure if it's a good idea. Maybe the double-click should rather activate the path tool, from which you can edit all these (just as what happens with the text tool). To be continued after more UX discussions? --- app/actions/layers-actions.c | 8 ----- app/actions/layers-commands.c | 68 ++++++++++++++++++----------------- menus/image-menu.ui.in.in | 3 -- menus/layers-menu.ui | 2 -- 4 files changed, 36 insertions(+), 45 deletions(-) diff --git a/app/actions/layers-actions.c b/app/actions/layers-actions.c index 6da5afc290..2090cdc365 100644 --- a/app/actions/layers-actions.c +++ b/app/actions/layers-actions.c @@ -206,12 +206,6 @@ static const GimpActionEntry layers_actions[] = layers_text_along_path_cmd_callback, GIMP_HELP_LAYER_TEXT_ALONG_PATH }, - { "layers-vector-fill-stroke", NULL, - NC_("layers-action", "Fill / Stroke..."), NULL, { NULL }, - NC_("layers-action", "Edit the fill and stroke of this vector layer"), - layers_vector_fill_stroke_cmd_callback, - GIMP_HELP_LAYER_VECTOR_FILL_STROKE }, - { "layers-resize", GIMP_ICON_OBJECT_RESIZE, NC_("layers-action", "Layer B_oundary Size..."), NULL, { NULL }, NC_("layers-action", "Adjust the layer dimensions"), @@ -1073,8 +1067,6 @@ layers_actions_update (GimpActionGroup *group, 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_SENSITIVE ("layers-resize", n_selected_layers == 1 && all_writable && all_movable && !ac); SET_SENSITIVE ("layers-resize-to-image", all_writable && all_movable && !ac); SET_SENSITIVE ("layers-scale", n_selected_layers == 1 && all_writable && all_movable && !ac); diff --git a/app/actions/layers-commands.c b/app/actions/layers-commands.c index 6f8247c2c2..56308702ee 100644 --- a/app/actions/layers-commands.c +++ b/app/actions/layers-commands.c @@ -183,6 +183,10 @@ static gint layers_mode_index (GimpLayerMode layer_mode const GimpLayerMode *modes, gint n_modes); +static void layers_vector_show_fill_stroke (GimpAction *action, + GVariant *value, + gpointer data); + /* private variables */ @@ -213,7 +217,7 @@ layers_edit_cmd_callback (GimpAction *action, } else if (gimp_item_is_vector_layer (GIMP_ITEM (layers->data))) { - layers_vector_fill_stroke_cmd_callback (action, value, data); + layers_vector_show_fill_stroke (action, value, data); } else { @@ -2693,37 +2697,6 @@ layers_scale_callback (GtkWidget *dialog, } } -void -layers_vector_fill_stroke_cmd_callback (GimpAction *action, - GVariant *value, - gpointer data) -{ - GimpImage *image; - GimpLayer *layer; - GList *layers; - GtkWidget *widget; - return_if_no_layers (image, layers, data); - return_if_no_widget (widget, data); - - if (g_list_length (layers) != 1) - return; - - layer = layers->data; - - if (GIMP_IS_VECTOR_LAYER (layer)) - { - GtkWidget *dialog; - - dialog = vector_layer_options_dialog_new (GIMP_VECTOR_LAYER (layer), - action_data_get_context (data), - _("Fill / Stroke"), - "gimp-vector-layer-stroke", - GIMP_HELP_LAYER_VECTOR_FILL_STROKE, - widget); - gtk_widget_show (dialog); - } -} - static void layers_resize_callback (GtkWidget *dialog, GimpViewable *viewable, @@ -2782,3 +2755,34 @@ layers_mode_index (GimpLayerMode layer_mode, return i; } + +static void +layers_vector_show_fill_stroke (GimpAction *action, + GVariant *value, + gpointer data) +{ + GimpImage *image; + GimpLayer *layer; + GList *layers; + GtkWidget *widget; + return_if_no_layers (image, layers, data); + return_if_no_widget (widget, data); + + if (g_list_length (layers) != 1) + return; + + layer = layers->data; + + if (GIMP_IS_VECTOR_LAYER (layer)) + { + GtkWidget *dialog; + + dialog = vector_layer_options_dialog_new (GIMP_VECTOR_LAYER (layer), + action_data_get_context (data), + _("Fill / Stroke"), + "gimp-vector-layer-stroke", + GIMP_HELP_LAYER_VECTOR_FILL_STROKE, + widget); + gtk_widget_show (dialog); + } +} diff --git a/menus/image-menu.ui.in.in b/menus/image-menu.ui.in.in index 896be148fe..d0aabf19a7 100644 --- a/menus/image-menu.ui.in.in +++ b/menus/image-menu.ui.in.in @@ -435,9 +435,6 @@ app.layers-text-to-path app.layers-text-along-path - - app.layers-vector-fill-stroke - app.layers-rasterize app.layers-revert-rasterize diff --git a/menus/layers-menu.ui b/menus/layers-menu.ui index 96646bf44d..11535fe825 100644 --- a/menus/layers-menu.ui +++ b/menus/layers-menu.ui @@ -63,8 +63,6 @@ app.layers-text-to-path app.layers-text-along-path - app.layers-vector-fill-stroke - app.layers-rasterize app.layers-revert-rasterize