Commit 19af93ac authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

app/tools/gimpclonetool.c app/tools/gimpconvolvetool.c

2001-11-22  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpclonetool.c
	* app/tools/gimpconvolvetool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpdodgeburntool.c
	* app/tools/gimpmagnifytool.c
	* app/tools/paint_options.c
	* app/tools/transform_options.c: removed the remaining cases of
	we-rely-on-the-radio-buttons-being-in-the-same-order-as-the-enum
	and use gimp_radio_group_set_active() instead.
	Use GINT_TO_POINTER(gint) instead of (gpointer)gint all over
	the place.
parent 535f35d4
2001-11-22 Michael Natterer <mitch@gimp.org>
* app/tools/gimpclonetool.c
* app/tools/gimpconvolvetool.c
* app/tools/gimpcroptool.c
* app/tools/gimpdodgeburntool.c
* app/tools/gimpmagnifytool.c
* app/tools/paint_options.c
* app/tools/transform_options.c: removed the remaining cases of
we-rely-on-the-radio-buttons-being-in-the-same-order-as-the-enum
and use gimp_radio_group_set_active() instead.
Use GINT_TO_POINTER(gint) instead of (gpointer)gint all over
the place.
2001-11-22 Michael Natterer <mitch@gimp.org>
* libgimpwidgets/gimpstock.c: added stock *items* (not only icons)
......
......@@ -827,11 +827,15 @@ clone_options_new (GimpToolInfo *tool_info)
frame = gimp_radio_group_new2 (TRUE, _("Source"),
G_CALLBACK (gimp_radio_button_update),
&options->type, (gpointer) options->type,
&options->type,
GINT_TO_POINTER (options->type),
_("Image Source"), (gpointer) IMAGE_CLONE,
_("Image Source"),
GINT_TO_POINTER (IMAGE_CLONE),
&options->type_w[0],
_("Pattern Source"), (gpointer) PATTERN_CLONE,
_("Pattern Source"),
GINT_TO_POINTER (PATTERN_CLONE),
&options->type_w[1],
NULL);
......@@ -841,13 +845,19 @@ clone_options_new (GimpToolInfo *tool_info)
frame = gimp_radio_group_new2 (TRUE, _("Alignment"),
G_CALLBACK (gimp_radio_button_update),
&options->aligned, (gpointer) options->aligned,
&options->aligned,
GINT_TO_POINTER (options->aligned),
_("Non Aligned"), (gpointer) ALIGN_NO,
_("Non Aligned"),
GINT_TO_POINTER (ALIGN_NO),
&options->aligned_w[0],
_("Aligned"), (gpointer) ALIGN_YES,
_("Aligned"),
GINT_TO_POINTER (ALIGN_YES),
&options->aligned_w[1],
_("Registered"), (gpointer) ALIGN_REGISTERED,
_("Registered"),
GINT_TO_POINTER (ALIGN_REGISTERED),
&options->aligned_w[2],
NULL);
......@@ -867,6 +877,8 @@ clone_options_reset (GimpToolOptions *tool_options)
paint_options_reset (tool_options);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->type_w[options->type_d]), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->aligned_w[options->aligned_d]), TRUE);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
GINT_TO_POINTER (options->type_d));
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->aligned_w[0]),
GINT_TO_POINTER (options->aligned_d));
}
......@@ -278,12 +278,12 @@ gimp_convolve_tool_modifier_key (GimpTool *tool,
switch (options->type)
{
case BLUR_CONVOLVE:
gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON (options->type_w[SHARPEN_CONVOLVE]), TRUE);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
GINT_TO_POINTER (SHARPEN_CONVOLVE));
break;
case SHARPEN_CONVOLVE:
gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON (options->type_w[BLUR_CONVOLVE]), TRUE);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
GINT_TO_POINTER (BLUR_CONVOLVE));
break;
default:
break;
......@@ -723,11 +723,15 @@ convolve_options_new (GimpToolInfo *tool_info)
frame = gimp_radio_group_new2 (TRUE, _("Convolve Type"),
G_CALLBACK (gimp_radio_button_update),
&options->type, (gpointer) options->type,
&options->type,
GINT_TO_POINTER (options->type),
_("Blur"), (gpointer) BLUR_CONVOLVE,
_("Blur"),
GINT_TO_POINTER (BLUR_CONVOLVE),
&options->type_w[0],
_("Sharpen"), (gpointer) SHARPEN_CONVOLVE,
_("Sharpen"),
GINT_TO_POINTER (SHARPEN_CONVOLVE),
&options->type_w[1],
NULL);
......@@ -749,5 +753,7 @@ convolve_options_reset (GimpToolOptions *tool_options)
gtk_adjustment_set_value (GTK_ADJUSTMENT (options->rate_w),
options->rate_d);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->type_w[options->type_d]), TRUE);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
GINT_TO_POINTER (options->type_d));
}
......@@ -262,12 +262,12 @@ gimp_dodgeburn_tool_modifier_key (GimpTool *tool,
switch (options->type)
{
case DODGE:
gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON (options->type_w[BURN]), TRUE);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
GINT_TO_POINTER (BURN));
break;
case BURN:
gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON (options->type_w[DODGE]), TRUE);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
GINT_TO_POINTER (DODGE));
break;
default:
break;
......@@ -673,11 +673,14 @@ gimp_dodgeburn_tool_options_new (GimpToolInfo *tool_info)
frame = gimp_radio_group_new2 (TRUE, _("Type"),
G_CALLBACK (gimp_radio_button_update),
&options->type,
(gpointer) options->type,
GINT_TO_POINTER (options->type),
_("Dodge"), (gpointer) DODGE,
_("Dodge"),
GINT_TO_POINTER (DODGE),
&options->type_w[0],
_("Burn"), (gpointer) BURN,
_("Burn"),
GINT_TO_POINTER (BURN),
&options->type_w[1],
NULL);
......@@ -686,20 +689,24 @@ gimp_dodgeburn_tool_options_new (GimpToolInfo *tool_info)
gtk_widget_show (frame);
/* mode (highlights, midtones, or shadows) */
frame =
gimp_radio_group_new2 (TRUE, _("Mode"),
G_CALLBACK (gimp_radio_button_update),
&options->mode,
GINT_TO_POINTER (options->mode),
frame = gimp_radio_group_new2 (TRUE, _("Mode"),
G_CALLBACK (gimp_radio_button_update),
&options->mode,
GINT_TO_POINTER (options->mode),
_("Highlights"),
GINT_TO_POINTER (GIMP_HIGHLIGHTS),
&options->mode_w[0],
_("Midtones"),
GINT_TO_POINTER (GIMP_MIDTONES),
&options->mode_w[1],
_("Highlights"), GINT_TO_POINTER (GIMP_HIGHLIGHTS),
&options->mode_w[0],
_("Midtones"), GINT_TO_POINTER (GIMP_MIDTONES),
&options->mode_w[1],
_("Shadows"), GINT_TO_POINTER (GIMP_SHADOWS),
&options->mode_w[2],
_("Shadows"),
GINT_TO_POINTER (GIMP_SHADOWS),
&options->mode_w[2],
NULL);
NULL);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
......@@ -719,9 +726,9 @@ gimp_dodgeburn_tool_options_reset (GimpToolOptions *tool_options)
gtk_adjustment_set_value (GTK_ADJUSTMENT (options->exposure_w),
options->exposure_d);
gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON (options->type_w[options->type_d]), TRUE);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
GINT_TO_POINTER (options->type_d));
gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON (options->mode_w[options->mode_d]), TRUE);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->mode_w[0]),
GINT_TO_POINTER (options->mode_d));
}
......@@ -827,11 +827,15 @@ clone_options_new (GimpToolInfo *tool_info)
frame = gimp_radio_group_new2 (TRUE, _("Source"),
G_CALLBACK (gimp_radio_button_update),
&options->type, (gpointer) options->type,
&options->type,
GINT_TO_POINTER (options->type),
_("Image Source"), (gpointer) IMAGE_CLONE,
_("Image Source"),
GINT_TO_POINTER (IMAGE_CLONE),
&options->type_w[0],
_("Pattern Source"), (gpointer) PATTERN_CLONE,
_("Pattern Source"),
GINT_TO_POINTER (PATTERN_CLONE),
&options->type_w[1],
NULL);
......@@ -841,13 +845,19 @@ clone_options_new (GimpToolInfo *tool_info)
frame = gimp_radio_group_new2 (TRUE, _("Alignment"),
G_CALLBACK (gimp_radio_button_update),
&options->aligned, (gpointer) options->aligned,
&options->aligned,
GINT_TO_POINTER (options->aligned),
_("Non Aligned"), (gpointer) ALIGN_NO,
_("Non Aligned"),
GINT_TO_POINTER (ALIGN_NO),
&options->aligned_w[0],
_("Aligned"), (gpointer) ALIGN_YES,
_("Aligned"),
GINT_TO_POINTER (ALIGN_YES),
&options->aligned_w[1],
_("Registered"), (gpointer) ALIGN_REGISTERED,
_("Registered"),
GINT_TO_POINTER (ALIGN_REGISTERED),
&options->aligned_w[2],
NULL);
......@@ -867,6 +877,8 @@ clone_options_reset (GimpToolOptions *tool_options)
paint_options_reset (tool_options);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->type_w[options->type_d]), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->aligned_w[options->aligned_d]), TRUE);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
GINT_TO_POINTER (options->type_d));
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->aligned_w[0]),
GINT_TO_POINTER (options->aligned_d));
}
......@@ -827,11 +827,15 @@ clone_options_new (GimpToolInfo *tool_info)
frame = gimp_radio_group_new2 (TRUE, _("Source"),
G_CALLBACK (gimp_radio_button_update),
&options->type, (gpointer) options->type,
&options->type,
GINT_TO_POINTER (options->type),
_("Image Source"), (gpointer) IMAGE_CLONE,
_("Image Source"),
GINT_TO_POINTER (IMAGE_CLONE),
&options->type_w[0],
_("Pattern Source"), (gpointer) PATTERN_CLONE,
_("Pattern Source"),
GINT_TO_POINTER (PATTERN_CLONE),
&options->type_w[1],
NULL);
......@@ -841,13 +845,19 @@ clone_options_new (GimpToolInfo *tool_info)
frame = gimp_radio_group_new2 (TRUE, _("Alignment"),
G_CALLBACK (gimp_radio_button_update),
&options->aligned, (gpointer) options->aligned,
&options->aligned,
GINT_TO_POINTER (options->aligned),
_("Non Aligned"), (gpointer) ALIGN_NO,
_("Non Aligned"),
GINT_TO_POINTER (ALIGN_NO),
&options->aligned_w[0],
_("Aligned"), (gpointer) ALIGN_YES,
_("Aligned"),
GINT_TO_POINTER (ALIGN_YES),
&options->aligned_w[1],
_("Registered"), (gpointer) ALIGN_REGISTERED,
_("Registered"),
GINT_TO_POINTER (ALIGN_REGISTERED),
&options->aligned_w[2],
NULL);
......@@ -867,6 +877,8 @@ clone_options_reset (GimpToolOptions *tool_options)
paint_options_reset (tool_options);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->type_w[options->type_d]), TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->aligned_w[options->aligned_d]), TRUE);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
GINT_TO_POINTER (options->type_d));
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->aligned_w[0]),
GINT_TO_POINTER (options->aligned_d));
}
......@@ -278,12 +278,12 @@ gimp_convolve_tool_modifier_key (GimpTool *tool,
switch (options->type)
{
case BLUR_CONVOLVE:
gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON (options->type_w[SHARPEN_CONVOLVE]), TRUE);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
GINT_TO_POINTER (SHARPEN_CONVOLVE));
break;
case SHARPEN_CONVOLVE:
gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON (options->type_w[BLUR_CONVOLVE]), TRUE);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
GINT_TO_POINTER (BLUR_CONVOLVE));
break;
default:
break;
......@@ -723,11 +723,15 @@ convolve_options_new (GimpToolInfo *tool_info)
frame = gimp_radio_group_new2 (TRUE, _("Convolve Type"),
G_CALLBACK (gimp_radio_button_update),
&options->type, (gpointer) options->type,
&options->type,
GINT_TO_POINTER (options->type),
_("Blur"), (gpointer) BLUR_CONVOLVE,
_("Blur"),
GINT_TO_POINTER (BLUR_CONVOLVE),
&options->type_w[0],
_("Sharpen"), (gpointer) SHARPEN_CONVOLVE,
_("Sharpen"),
GINT_TO_POINTER (SHARPEN_CONVOLVE),
&options->type_w[1],
NULL);
......@@ -749,5 +753,7 @@ convolve_options_reset (GimpToolOptions *tool_options)
gtk_adjustment_set_value (GTK_ADJUSTMENT (options->rate_w),
options->rate_d);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->type_w[options->type_d]), TRUE);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
GINT_TO_POINTER (options->type_d));
}
......@@ -728,12 +728,12 @@ gimp_crop_tool_modifier_key (GimpTool *tool,
switch (options->type)
{
case CROP_CROP:
gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON (options->type_w[RESIZE_CROP]), TRUE);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
GINT_TO_POINTER (RESIZE_CROP));
break;
case RESIZE_CROP:
gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON (options->type_w[CROP_CROP]), TRUE);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
GINT_TO_POINTER (CROP_CROP));
break;
default:
break;
......@@ -1416,11 +1416,15 @@ crop_options_new (GimpToolInfo *tool_info)
/* tool toggle */
frame = gimp_radio_group_new2 (TRUE, _("Tool Toggle"),
G_CALLBACK (gimp_radio_button_update),
&options->type, (gpointer) options->type,
&options->type,
GINT_TO_POINTER (options->type),
_("Crop"), (gpointer) CROP_CROP,
_("Crop"),
GINT_TO_POINTER (CROP_CROP),
&options->type_w[0],
_("Resize"), (gpointer) RESIZE_CROP,
_("Resize"),
GINT_TO_POINTER (RESIZE_CROP),
&options->type_w[1],
NULL);
......@@ -1442,5 +1446,7 @@ crop_options_reset (GimpToolOptions *tool_options)
options->layer_only_d);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(options->allow_enlarge_w),
options->allow_enlarge_d);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->type_w[options->type_d]), TRUE);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
GINT_TO_POINTER (options->type_d));
}
......@@ -262,12 +262,12 @@ gimp_dodgeburn_tool_modifier_key (GimpTool *tool,
switch (options->type)
{
case DODGE:
gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON (options->type_w[BURN]), TRUE);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
GINT_TO_POINTER (BURN));
break;
case BURN:
gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON (options->type_w[DODGE]), TRUE);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
GINT_TO_POINTER (DODGE));
break;
default:
break;
......@@ -673,11 +673,14 @@ gimp_dodgeburn_tool_options_new (GimpToolInfo *tool_info)
frame = gimp_radio_group_new2 (TRUE, _("Type"),
G_CALLBACK (gimp_radio_button_update),
&options->type,
(gpointer) options->type,
GINT_TO_POINTER (options->type),
_("Dodge"), (gpointer) DODGE,
_("Dodge"),
GINT_TO_POINTER (DODGE),
&options->type_w[0],
_("Burn"), (gpointer) BURN,
_("Burn"),
GINT_TO_POINTER (BURN),
&options->type_w[1],
NULL);
......@@ -686,20 +689,24 @@ gimp_dodgeburn_tool_options_new (GimpToolInfo *tool_info)
gtk_widget_show (frame);
/* mode (highlights, midtones, or shadows) */
frame =
gimp_radio_group_new2 (TRUE, _("Mode"),
G_CALLBACK (gimp_radio_button_update),
&options->mode,
GINT_TO_POINTER (options->mode),
frame = gimp_radio_group_new2 (TRUE, _("Mode"),
G_CALLBACK (gimp_radio_button_update),
&options->mode,
GINT_TO_POINTER (options->mode),
_("Highlights"),
GINT_TO_POINTER (GIMP_HIGHLIGHTS),
&options->mode_w[0],
_("Midtones"),
GINT_TO_POINTER (GIMP_MIDTONES),
&options->mode_w[1],
_("Highlights"), GINT_TO_POINTER (GIMP_HIGHLIGHTS),
&options->mode_w[0],
_("Midtones"), GINT_TO_POINTER (GIMP_MIDTONES),
&options->mode_w[1],
_("Shadows"), GINT_TO_POINTER (GIMP_SHADOWS),
&options->mode_w[2],
_("Shadows"),
GINT_TO_POINTER (GIMP_SHADOWS),
&options->mode_w[2],
NULL);
NULL);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
......@@ -719,9 +726,9 @@ gimp_dodgeburn_tool_options_reset (GimpToolOptions *tool_options)
gtk_adjustment_set_value (GTK_ADJUSTMENT (options->exposure_w),
options->exposure_d);
gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON (options->type_w[options->type_d]), TRUE);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
GINT_TO_POINTER (options->type_d));
gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON (options->mode_w[options->mode_d]), TRUE);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->mode_w[0]),
GINT_TO_POINTER (options->mode_d));
}
......@@ -338,12 +338,12 @@ gimp_magnify_tool_modifier_key (GimpTool *tool,
switch (options->type)
{
case GIMP_ZOOM_IN:
gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON (options->type_w[GIMP_ZOOM_OUT]), TRUE);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
GINT_TO_POINTER (GIMP_ZOOM_OUT));
break;
case GIMP_ZOOM_OUT:
gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON (options->type_w[GIMP_ZOOM_IN]), TRUE);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
GINT_TO_POINTER (GIMP_ZOOM_IN));
break;
default:
break;
......@@ -455,28 +455,31 @@ magnify_options_new (GimpToolInfo *tool_info)
/* the allow_resize toggle button */
options->allow_resize_w =
gtk_check_button_new_with_label (_("Allow Window Resizing"));
g_signal_connect (G_OBJECT (options->allow_resize_w), "toggled",
G_CALLBACK (gimp_toggle_button_update),
&(gimprc.resize_windows_on_zoom));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->allow_resize_w),
gimprc.resize_windows_on_zoom);
gtk_box_pack_start (GTK_BOX (vbox),
options->allow_resize_w, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox), options->allow_resize_w,
FALSE, FALSE, 0);
gtk_widget_show (options->allow_resize_w);
g_signal_connect (G_OBJECT (options->allow_resize_w), "toggled",
G_CALLBACK (gimp_toggle_button_update),
&(gimprc.resize_windows_on_zoom));
/* tool toggle */
frame =
gimp_radio_group_new2 (TRUE, _("Tool Toggle"),
G_CALLBACK (gimp_radio_button_update),
&options->type,
(gpointer) options->type,
frame = gimp_radio_group_new2 (TRUE, _("Tool Toggle"),
G_CALLBACK (gimp_radio_button_update),
&options->type,
GINT_TO_POINTER (options->type),
_("Zoom in"),
GINT_TO_POINTER (GIMP_ZOOM_IN),
&options->type_w[0],
_("Zoom in"), (gpointer) GIMP_ZOOM_IN,
&options->type_w[0],
_("Zoom out"), (gpointer) GIMP_ZOOM_OUT,
&options->type_w[1],
_("Zoom out"),
GINT_TO_POINTER (GIMP_ZOOM_OUT),
&options->type_w[1],
NULL);
NULL);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
......@@ -494,6 +497,6 @@ magnify_options_reset (GimpToolOptions *tool_options)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->allow_resize_w),
options->allow_resize_d);
gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON (options->type_w[options->type_d]), TRUE);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w[0]),
GINT_TO_POINTER (options->type_d));
}
......@@ -222,12 +222,13 @@ paint_options_init (PaintOptions *options,
gtk_check_button_new_with_label (_("Incremental"));
gtk_box_pack_start (GTK_BOX (options->tool_options.main_vbox),
options->incremental_w, FALSE, FALSE, 0);
g_signal_connect (G_OBJECT (options->incremental_w), "toggled",
G_CALLBACK (gimp_toggle_button_update),
&options->incremental);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->incremental_w),
options->incremental_d);
gtk_widget_show (options->incremental_w);
g_signal_connect (G_OBJECT (options->incremental_w), "toggled",
G_CALLBACK (gimp_toggle_button_update),
&options->incremental);
}
options->pressure_options = paint_pressure_options_new (tool_info->tool_type,
......@@ -385,12 +386,13 @@ paint_pressure_options_new (GType tool_type,
pressure->opacity_w =
gtk_check_button_new_with_label (_("Opacity"));
gtk_container_add (GTK_CONTAINER (wbox), pressure->opacity_w);
g_signal_connect (G_OBJECT (pressure->opacity_w), "toggled",
G_CALLBACK (gimp_toggle_button_update),
&pressure->opacity);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (pressure->opacity_w),
pressure->opacity_d);
gtk_widget_show (pressure->opacity_w);
g_signal_connect (G_OBJECT (pressure->opacity_w), "toggled",
G_CALLBACK (gimp_toggle_button_update),
&pressure->opacity);
}