Commit 11ce60ba authored by Jehan's avatar Jehan
Browse files

app: check "gradient-repeat" sensitivity at Blend Options creation.

When starting the tool with one of the gradient types for which the
repeat option should be deactivated, it is not. Run the handler function
once at GUI creation.
Also compare the gradient type with an enum value, which makes the test
clearer than using an int.
parent 5751bb11
...@@ -291,6 +291,7 @@ gimp_blend_options_gui (GimpToolOptions *tool_options) ...@@ -291,6 +291,7 @@ gimp_blend_options_gui (GimpToolOptions *tool_options)
g_signal_connect (config, "notify::gradient-type", g_signal_connect (config, "notify::gradient-type",
G_CALLBACK (blend_options_gradient_type_notify), G_CALLBACK (blend_options_gradient_type_notify),
combo); combo);
blend_options_gradient_type_notify (options, NULL, combo);
/* the offset scale */ /* the offset scale */
scale = gimp_prop_spin_scale_new (config, "offset", NULL, scale = gimp_prop_spin_scale_new (config, "offset", NULL,
...@@ -374,5 +375,6 @@ blend_options_gradient_type_notify (GimpBlendOptions *options, ...@@ -374,5 +375,6 @@ blend_options_gradient_type_notify (GimpBlendOptions *options,
GParamSpec *pspec, GParamSpec *pspec,
GtkWidget *repeat_combo) GtkWidget *repeat_combo)
{ {
gtk_widget_set_sensitive (repeat_combo, options->gradient_type < 6); gtk_widget_set_sensitive (repeat_combo,
options->gradient_type < GIMP_GRADIENT_SHAPEBURST_ANGULAR);
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment