diff --git a/app/actions/channels-commands.c b/app/actions/channels-commands.c index 2a2393e99a..6701242e20 100644 --- a/app/actions/channels-commands.c +++ b/app/actions/channels-commands.c @@ -432,13 +432,13 @@ channels_select_cmd_callback (GimpAction *action, GimpChannel *channel; GimpChannel *channel2; GimpContainer *container; - GimpActionSelectType type; + GimpActionSelectType select_type; return_if_no_channel (image, channel, data); - type = (GimpActionSelectType) g_variant_get_int32 (value); + select_type = (GimpActionSelectType) g_variant_get_int32 (value); container = gimp_image_get_channels (image); - channel2 = (GimpChannel *) action_select_object (type, container, + channel2 = (GimpChannel *) action_select_object (select_type, container, (GimpObject *) channel); if (channel2 && channel2 != channel) diff --git a/app/actions/layers-commands.c b/app/actions/layers-commands.c index e211270ae6..68c6dcc1fa 100644 --- a/app/actions/layers-commands.c +++ b/app/actions/layers-commands.c @@ -1155,20 +1155,23 @@ layers_opacity_cmd_callback (GimpAction *action, GVariant *value, gpointer data) { - GimpImage *image; - GimpLayer *layer; - gdouble opacity; - GimpUndo *undo; - gboolean push_undo = TRUE; + GimpImage *image; + GimpLayer *layer; + gdouble opacity; + GimpUndo *undo; + GimpActionSelectType select_type; + gboolean push_undo = TRUE; return_if_no_layer (image, layer, data); + select_type = (GimpActionSelectType) g_variant_get_int32 (value); + undo = gimp_image_undo_can_compress (image, GIMP_TYPE_ITEM_UNDO, GIMP_UNDO_LAYER_OPACITY); if (undo && GIMP_ITEM_UNDO (undo)->item == GIMP_ITEM (layer)) push_undo = FALSE; - opacity = action_select_value ((GimpActionSelectType) value, + opacity = action_select_value (select_type, gimp_layer_get_opacity (layer), 0.0, 1.0, 1.0, 1.0 / 255.0, 0.01, 0.1, 0.0, FALSE); @@ -1181,16 +1184,19 @@ layers_mode_cmd_callback (GimpAction *action, GVariant *value, gpointer data) { - GimpImage *image; - GimpLayer *layer; - GimpLayerMode *modes; - gint n_modes; - GimpLayerMode layer_mode; - gint index; - GimpUndo *undo; - gboolean push_undo = TRUE; + GimpImage *image; + GimpLayer *layer; + GimpLayerMode *modes; + gint n_modes; + GimpLayerMode layer_mode; + gint index; + GimpUndo *undo; + GimpActionSelectType select_type; + gboolean push_undo = TRUE; return_if_no_layer (image, layer, data); + select_type = (GimpActionSelectType) g_variant_get_int32 (value); + undo = gimp_image_undo_can_compress (image, GIMP_TYPE_ITEM_UNDO, GIMP_UNDO_LAYER_MODE); @@ -1203,7 +1209,7 @@ layers_mode_cmd_callback (GimpAction *action, GIMP_LAYER_MODE_CONTEXT_LAYER, &n_modes); index = layers_mode_index (layer_mode, modes, n_modes); - index = action_select_value ((GimpActionSelectType) value, + index = action_select_value (select_type, index, 0, n_modes - 1, 0, 0.0, 1.0, 1.0, 0.0, FALSE); layer_mode = modes[index]; diff --git a/app/actions/vectors-commands.c b/app/actions/vectors-commands.c index e2be6fa90a..43b30440df 100644 --- a/app/actions/vectors-commands.c +++ b/app/actions/vectors-commands.c @@ -864,12 +864,15 @@ vectors_select_cmd_callback (GimpAction *action, GVariant *value, gpointer data) { - GimpImage *image; - GimpVectors *vectors; - GimpContainer *container; - GimpVectors *new_vectors; + GimpImage *image; + GimpVectors *vectors; + GimpContainer *container; + GimpVectors *new_vectors; + GimpActionSelectType select_type; return_if_no_image (image, data); + select_type = (GimpActionSelectType) g_variant_get_int32 (value); + vectors = gimp_image_get_active_vectors (image); if (vectors) @@ -877,8 +880,8 @@ vectors_select_cmd_callback (GimpAction *action, else container = gimp_image_get_vectors (image); - new_vectors = (GimpVectors *) action_select_object ((GimpActionSelectType) value, - container, + new_vectors = (GimpVectors *) action_select_object (select_type, + container, (GimpObject *) vectors); if (new_vectors && new_vectors != vectors)