Commit 05581ddf authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

app/tools/gimpairbrushtool.c app/tools/gimpblendtool.c

2002-04-28  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpairbrushtool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpconvolvetool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpdodgeburntool.c
	* app/tools/gimperasertool.c
	* app/tools/gimpinktool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpsmudgetool.c
	* app/tools/gimptexttool.c
	* app/tools/paint_options.c
	* app/tools/selection_options.c
	* app/tools/transform_options.c: in preparation of a more generic tool
	options framework: use the options value, not the default value when
	setting up the tool options UI. Doesn't make any difference since both
	are initialized to the same value, but reduces usage of the ugly foo_d
	variables.

	* app/tools/gimpmagnifytool.c: don't change the resize_windows_on_zoom
	gimprc value in response to changes in the tool options. Only use it
	as default value when resetting the tool options.
parent b94fc9f7
2002-04-28 Sven Neumann <sven@gimp.org>
* app/tools/gimpairbrushtool.c
* app/tools/gimpblendtool.c
* app/tools/gimpbucketfilltool.c
* app/tools/gimpcolorpickertool.c
* app/tools/gimpconvolvetool.c
* app/tools/gimpcroptool.c
* app/tools/gimpdodgeburntool.c
* app/tools/gimperasertool.c
* app/tools/gimpinktool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimpsmudgetool.c
* app/tools/gimptexttool.c
* app/tools/paint_options.c
* app/tools/selection_options.c
* app/tools/transform_options.c: in preparation of a more generic tool
options framework: use the options value, not the default value when
setting up the tool options UI. Doesn't make any difference since both
are initialized to the same value, but reduces usage of the ugly foo_d
variables.
* app/tools/gimpmagnifytool.c: don't change the resize_windows_on_zoom
gimprc value in response to changes in the tool options. Only use it
as default value when resetting the tool options.
2002-04-28 Sven Neumann <sven@gimp.org>
 
* app/core/gimpimage-convert.c (gimp_image_convert): invalidate layer
......
......@@ -1466,7 +1466,7 @@ ink_options_new (GimpToolInfo *tool_info)
/* size slider */
options->size_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("Size:"), -1, 50,
options->size_d,
options->size,
0.0, 20.0, 1.0, 2.0, 1,
TRUE, 0.0, 0.0,
NULL, NULL);
......@@ -1478,7 +1478,7 @@ ink_options_new (GimpToolInfo *tool_info)
/* angle adjust slider */
options->tilt_angle_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("Angle:"), -1, 50,
options->tilt_angle_d,
options->tilt_angle,
-90.0, 90.0, 1, 10.0, 1,
TRUE, 0.0, 0.0,
NULL, NULL);
......@@ -1502,7 +1502,7 @@ ink_options_new (GimpToolInfo *tool_info)
/* size sens slider */
options->sensitivity_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("Size:"), -1, 50,
options->sensitivity_d,
options->sensitivity,
0.0, 1.0, 0.01, 0.1, 1,
TRUE, 0.0, 0.0,
NULL, NULL);
......@@ -1514,7 +1514,7 @@ ink_options_new (GimpToolInfo *tool_info)
/* tilt sens slider */
options->tilt_sensitivity_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("Tilt:"), -1, 50,
options->tilt_sensitivity_d,
options->tilt_sensitivity,
0.0, 1.0, 0.01, 0.1, 1,
TRUE, 0.0, 0.0,
NULL, NULL);
......@@ -1526,7 +1526,7 @@ ink_options_new (GimpToolInfo *tool_info)
/* velocity sens slider */
options->vel_sensitivity_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 2,
_("Speed:"), -1, 50,
options->vel_sensitivity_d,
options->vel_sensitivity,
0.0, 1.0, 0.01, 0.1, 1,
TRUE, 0.0, 0.0,
NULL, NULL);
......
......@@ -160,7 +160,7 @@ airbrush_options_new (GimpToolInfo *tool_info)
options->rate_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("Rate:"), -1, 50,
options->rate_d,
options->rate,
0.0, 150.0, 1.0, 1.0, 1,
TRUE, 0.0, 0.0,
NULL, NULL);
......@@ -172,7 +172,7 @@ airbrush_options_new (GimpToolInfo *tool_info)
/* the pressure scale */
options->pressure_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("Pressure:"), -1, 50,
options->pressure_d,
options->pressure,
0.0, 100.0, 1.0, 1.0, 1,
TRUE, 0.0, 0.0,
NULL, NULL);
......
......@@ -363,14 +363,20 @@ gimp_blend_tool_motion (GimpTool *tool,
{
radius = sqrt (SQR (dx) + SQR (dy));
frac = abs ((dx << 8) / dy);
for (i = 0; i < 6; i++)
{
if (frac < tangens2[i])
break;
}
dx = dx > 0 ? (cosinus[6-i] * radius) >> 8 : - ((cosinus[6-i] * radius) >> 8);
dy = dy > 0 ? (cosinus[i] * radius) >> 8 : - ((cosinus[i] * radius) >> 8);
dx = dx > 0 ?
(cosinus[6-i] * radius) >> 8 : - ((cosinus[6-i] * radius) >> 8);
dy = dy > 0 ?
(cosinus[i] * radius) >> 8 : - ((cosinus[i] * radius) >> 8);
}
blend_tool->endx = blend_tool->startx + dx;
blend_tool->endy = blend_tool->starty + dy;
}
......@@ -497,7 +503,7 @@ blend_options_new (GimpToolInfo *tool_info)
options->offset_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("Offset:"), -1, 50,
options->offset_d,
options->offset,
0.0, 100.0, 1.0, 10.0, 1,
TRUE, 0.0, 0.0,
NULL, NULL);
......@@ -512,7 +518,7 @@ blend_options_new (GimpToolInfo *tool_info)
G_CALLBACK (gimp_menu_item_update),
&options->blend_mode);
gimp_option_menu_set_history (GTK_OPTION_MENU (options->blend_mode_w),
GINT_TO_POINTER (options->blend_mode_d));
GINT_TO_POINTER (options->blend_mode));
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Blend:"), 1.0, 0.5,
options->blend_mode_w, 2, TRUE);
......@@ -523,7 +529,7 @@ blend_options_new (GimpToolInfo *tool_info)
G_CALLBACK (gradient_type_callback),
options);
gimp_option_menu_set_history (GTK_OPTION_MENU (options->gradient_type_w),
GINT_TO_POINTER (options->gradient_type_d));
GINT_TO_POINTER (options->gradient_type));
gimp_table_attach_aligned (GTK_TABLE (table), 0, 2,
_("Gradient:"), 1.0, 0.5,
options->gradient_type_w, 2, TRUE);
......@@ -534,7 +540,7 @@ blend_options_new (GimpToolInfo *tool_info)
G_CALLBACK (gimp_menu_item_update),
&options->repeat);
gimp_option_menu_set_history (GTK_OPTION_MENU (options->repeat_w),
GINT_TO_POINTER (options->repeat_d));
GINT_TO_POINTER (options->repeat));
gimp_table_attach_aligned (GTK_TABLE (table), 0, 3,
_("Repeat:"), 1.0, 0.5,
options->repeat_w, 2, TRUE);
......@@ -557,7 +563,7 @@ blend_options_new (GimpToolInfo *tool_info)
options->supersample_w =
gtk_check_button_new_with_label (_("Adaptive Supersampling"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->supersample_w),
options->supersample_d);
options->supersample);
gtk_frame_set_label_widget (GTK_FRAME (frame), options->supersample_w);
gtk_widget_show (options->supersample_w);
......@@ -573,14 +579,14 @@ blend_options_new (GimpToolInfo *tool_info)
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
/* automatically set the sensitive state of the table */
gtk_widget_set_sensitive (table, options->supersample_d);
gtk_widget_set_sensitive (table, options->supersample);
g_object_set_data (G_OBJECT (options->supersample_w), "set_sensitive",
table);
/* max depth scale */
options->max_depth_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("Max Depth:"), -1, 50,
options->max_depth_d,
options->max_depth,
1.0, 10.0, 1.0, 1.0, 0,
TRUE, 0.0, 0.0,
NULL, NULL);
......@@ -592,12 +598,12 @@ blend_options_new (GimpToolInfo *tool_info)
/* threshold scale */
options->threshold_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("Threshold:"), -1, 50,
options->threshold_d,
options->threshold,
0.0, 4.0, 0.01, 0.1, 2,
TRUE, 0.0, 0.0,
NULL, NULL);
g_signal_connect (G_OBJECT(options->threshold_w), "value_changed",
g_signal_connect (G_OBJECT (options->threshold_w), "value_changed",
G_CALLBACK (gimp_double_adjustment_update),
&options->threshold);
......
......@@ -389,7 +389,7 @@ bucket_options_new (GimpToolInfo *tool_info)
options->fill_transparent_w =
gtk_check_button_new_with_label (_("Fill Transparent Areas"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->fill_transparent_w),
options->fill_transparent_d);
options->fill_transparent);
gtk_box_pack_start (GTK_BOX (vbox2), options->fill_transparent_w,
FALSE, FALSE, 0);
gtk_widget_show (options->fill_transparent_w);
......
......@@ -715,7 +715,7 @@ gimp_color_picker_tool_options_new (GimpToolInfo *tool_info)
options->sample_merged_w =
gtk_check_button_new_with_label (_("Sample Merged"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->sample_merged_w),
options->sample_merged_d);
options->sample_merged);
gtk_box_pack_start (GTK_BOX (vbox), options->sample_merged_w, FALSE, FALSE, 0);
gtk_widget_show (options->sample_merged_w);
......@@ -738,7 +738,7 @@ gimp_color_picker_tool_options_new (GimpToolInfo *tool_info)
options->sample_average_w =
gtk_check_button_new_with_label (_("Sample Average"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->sample_average_w),
options->sample_average_d);
options->sample_average);
gtk_frame_set_label_widget (GTK_FRAME (frame), options->sample_average_w);
gtk_widget_show (options->sample_average_w);
......@@ -746,14 +746,14 @@ gimp_color_picker_tool_options_new (GimpToolInfo *tool_info)
G_CALLBACK (gimp_toggle_button_update),
&options->sample_average);
gtk_widget_set_sensitive (table, options->sample_average_d);
gtk_widget_set_sensitive (table, options->sample_average);
g_object_set_data (G_OBJECT (options->sample_average_w), "set_sensitive",
table);
options->average_radius_w =
gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("Radius:"), -1, 50,
options->average_radius_d,
options->average_radius,
1.0, 15.0, 1.0, 3.0, 0,
TRUE, 0.0, 0.0,
NULL, NULL);
......@@ -766,7 +766,7 @@ gimp_color_picker_tool_options_new (GimpToolInfo *tool_info)
options->update_active_w =
gtk_check_button_new_with_label (_("Update Active Color"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->update_active_w),
options->update_active_d);
options->update_active);
gtk_box_pack_start (GTK_BOX (vbox), options->update_active_w, FALSE, FALSE, 0);
gtk_widget_show (options->update_active_w);
......
......@@ -246,7 +246,7 @@ convolve_options_new (GimpToolInfo *tool_info)
options->rate_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("Rate:"), -1, 50,
options->rate_d,
options->rate,
0.0, 100.0, 1.0, 10.0, 1,
TRUE, 0.0, 0.0,
NULL, NULL);
......
......@@ -1381,7 +1381,7 @@ crop_options_new (GimpToolInfo *tool_info)
G_CALLBACK (gimp_toggle_button_update),
&options->layer_only);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->layer_only_w),
options->layer_only_d);
options->layer_only);
gtk_widget_show (options->layer_only_w);
/* enlarge toggle */
......@@ -1393,7 +1393,7 @@ crop_options_new (GimpToolInfo *tool_info)
G_CALLBACK (gimp_toggle_button_update),
&options->allow_enlarge);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->allow_enlarge_w),
options->allow_enlarge_d);
options->allow_enlarge);
gtk_widget_show (options->allow_enlarge_w);
return (GimpToolOptions *) options;
......
......@@ -240,7 +240,7 @@ gimp_dodgeburn_tool_options_new (GimpToolInfo *tool_info)
options->exposure_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("Exposure:"), -1, 50,
options->exposure_d,
options->exposure,
0.0, 100.0, 1.0, 10.0, 1,
TRUE, 0.0, 0.0,
NULL, NULL);
......
......@@ -192,7 +192,7 @@ gimp_eraser_tool_options_new (GimpToolInfo *tool_info)
options->anti_erase_w =
gtk_check_button_new_with_label (_("Anti Erase (<Ctrl>)"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->anti_erase_w),
options->anti_erase_d);
options->anti_erase);
gtk_box_pack_start (GTK_BOX (vbox), options->anti_erase_w, FALSE, FALSE, 0);
gtk_widget_show (options->anti_erase_w);
......@@ -203,7 +203,7 @@ gimp_eraser_tool_options_new (GimpToolInfo *tool_info)
/* the hard toggle */
options->hard_w = gtk_check_button_new_with_label (_("Hard Edge"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->hard_w),
options->hard_d);
options->hard);
gtk_box_pack_start (GTK_BOX (vbox), options->hard_w, FALSE, FALSE, 0);
gtk_widget_show (options->hard_w);
......
......@@ -1466,7 +1466,7 @@ ink_options_new (GimpToolInfo *tool_info)
/* size slider */
options->size_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("Size:"), -1, 50,
options->size_d,
options->size,
0.0, 20.0, 1.0, 2.0, 1,
TRUE, 0.0, 0.0,
NULL, NULL);
......@@ -1478,7 +1478,7 @@ ink_options_new (GimpToolInfo *tool_info)
/* angle adjust slider */
options->tilt_angle_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("Angle:"), -1, 50,
options->tilt_angle_d,
options->tilt_angle,
-90.0, 90.0, 1, 10.0, 1,
TRUE, 0.0, 0.0,
NULL, NULL);
......@@ -1502,7 +1502,7 @@ ink_options_new (GimpToolInfo *tool_info)
/* size sens slider */
options->sensitivity_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("Size:"), -1, 50,
options->sensitivity_d,
options->sensitivity,
0.0, 1.0, 0.01, 0.1, 1,
TRUE, 0.0, 0.0,
NULL, NULL);
......@@ -1514,7 +1514,7 @@ ink_options_new (GimpToolInfo *tool_info)
/* tilt sens slider */
options->tilt_sensitivity_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("Tilt:"), -1, 50,
options->tilt_sensitivity_d,
options->tilt_sensitivity,
0.0, 1.0, 0.01, 0.1, 1,
TRUE, 0.0, 0.0,
NULL, NULL);
......@@ -1526,7 +1526,7 @@ ink_options_new (GimpToolInfo *tool_info)
/* velocity sens slider */
options->vel_sensitivity_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 2,
_("Speed:"), -1, 50,
options->vel_sensitivity_d,
options->vel_sensitivity,
0.0, 1.0, 0.01, 0.1, 1,
TRUE, 0.0, 0.0,
NULL, NULL);
......
......@@ -52,8 +52,7 @@ struct _MagnifyOptions
{
GimpToolOptions tool_options;
/* gint resize_windows_on_zoom; (from gimprc) */
gint allow_resize_d;
gint allow_resize; /* default from gimprc.resize_windows_on_zoom */
GtkWidget *allow_resize_w;
GimpZoomType type;
......@@ -300,7 +299,7 @@ gimp_magnify_tool_button_release (GimpTool *tool,
(win_width / 2)),
((scaledest * ((y1 + y2) / 2)) / scalesrc -
(win_height / 2)),
gimprc.resize_windows_on_zoom);
options->allow_resize);
}
}
......@@ -439,9 +438,9 @@ magnify_options_new (GimpToolInfo *tool_info)
((GimpToolOptions *) options)->reset_func = magnify_options_reset;
options->allow_resize_d = gimprc.resize_windows_on_zoom;
options->type_d = options->type = GIMP_ZOOM_IN;
options->threshold_d = options->threshold = 5;
options->allow_resize = gimprc.resize_windows_on_zoom;
options->type_d = options->type = GIMP_ZOOM_IN;
options->threshold_d = options->threshold = 5;
/* the main vbox */
vbox = options->tool_options.main_vbox;
......@@ -450,14 +449,14 @@ magnify_options_new (GimpToolInfo *tool_info)
options->allow_resize_w =
gtk_check_button_new_with_label (_("Allow Window Resizing"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->allow_resize_w),
gimprc.resize_windows_on_zoom);
options->allow_resize);
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));
&options->allow_resize);
/* tool toggle */
frame = gimp_enum_radio_frame_new (GIMP_TYPE_ZOOM_TYPE,
......@@ -480,7 +479,7 @@ magnify_options_new (GimpToolInfo *tool_info)
options->threshold_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("Threshold:"), -1, 50,
options->threshold_d,
options->threshold,
1.0, 15.0, 1.0, 3.0, 1,
TRUE, 0.0, 0.0,
NULL, NULL);
......@@ -500,7 +499,7 @@ magnify_options_reset (GimpToolOptions *tool_options)
options = (MagnifyOptions *) tool_options;
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->allow_resize_w),
options->allow_resize_d);
gimprc.resize_windows_on_zoom);
gimp_radio_group_set_active (GTK_RADIO_BUTTON (options->type_w),
GINT_TO_POINTER (options->type_d));
......
......@@ -875,7 +875,7 @@ measure_tool_options_new (GimpToolInfo *tool_info)
options->use_info_window_w =
gtk_check_button_new_with_label (_("Use Info Window"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->use_info_window_w),
options->use_info_window_d);
options->use_info_window);
gtk_box_pack_start (GTK_BOX (vbox), options->use_info_window_w,
FALSE, FALSE, 0);
gtk_widget_show (options->use_info_window_w);
......
......@@ -176,7 +176,7 @@ paint_options_init (GimpPaintOptions *options,
gtk_box_pack_start (GTK_BOX (options->tool_options.main_vbox),
options->incremental_w, FALSE, FALSE, 0);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->incremental_w),
options->incremental_d);
options->incremental);
gtk_widget_show (options->incremental_w);
g_signal_connect (G_OBJECT (options->incremental_w), "toggled",
......@@ -284,7 +284,7 @@ pressure_options_init (GimpPressureOptions *pressure,
gtk_check_button_new_with_label (_("Opacity"));
gtk_container_add (GTK_CONTAINER (wbox), pressure->opacity_w);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (pressure->opacity_w),
pressure->opacity_d);
pressure->opacity);
gtk_widget_show (pressure->opacity_w);
g_signal_connect (G_OBJECT (pressure->opacity_w), "toggled",
......@@ -303,7 +303,7 @@ pressure_options_init (GimpPressureOptions *pressure,
pressure->pressure_w = gtk_check_button_new_with_label (_("Hardness"));
gtk_container_add (GTK_CONTAINER (wbox), pressure->pressure_w);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (pressure->pressure_w),
pressure->pressure_d);
pressure->pressure);
gtk_widget_show (pressure->pressure_w);
g_signal_connect (G_OBJECT (pressure->pressure_w), "toggled",
......@@ -320,7 +320,7 @@ pressure_options_init (GimpPressureOptions *pressure,
gtk_check_button_new_with_label (_("Rate"));
gtk_container_add (GTK_CONTAINER (wbox), pressure->rate_w);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (pressure->rate_w),
pressure->rate_d);
pressure->rate);
gtk_widget_show (pressure->rate_w);
g_signal_connect (G_OBJECT (pressure->rate_w), "toggled",
......@@ -341,7 +341,7 @@ pressure_options_init (GimpPressureOptions *pressure,
gtk_check_button_new_with_label (_("Size"));
gtk_container_add (GTK_CONTAINER (wbox), pressure->size_w);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (pressure->size_w),
pressure->size_d);
pressure->size);
gtk_widget_show (pressure->size_w);
g_signal_connect (G_OBJECT (pressure->size_w), "toggled",
......@@ -358,7 +358,7 @@ pressure_options_init (GimpPressureOptions *pressure,
gtk_check_button_new_with_label (_("Color"));
gtk_container_add (GTK_CONTAINER (wbox), pressure->color_w);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (pressure->color_w),
pressure->color_d);
pressure->color);
gtk_widget_show (pressure->color_w);
g_signal_connect (G_OBJECT (pressure->color_w), "toggled",
......@@ -425,13 +425,13 @@ gradient_options_init (GimpGradientOptions *gradient,
G_CALLBACK (gimp_toggle_button_update),
&gradient->use_fade);
gtk_widget_set_sensitive (table, gradient->use_fade_d);
gtk_widget_set_sensitive (table, gradient->use_fade);
g_object_set_data (G_OBJECT (gradient->use_fade_w),
"set_sensitive", table);
/* the fade-out sizeentry */
gradient->fade_out_w =
gtk_adjustment_new (gradient->fade_out_d,
gtk_adjustment_new (gradient->fade_out,
1e-5, 32767.0, 1.0, 50.0, 0.0);
spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (gradient->fade_out_w),
......@@ -449,7 +449,7 @@ gradient_options_init (GimpGradientOptions *gradient,
/* the fade-out unitmenu */
gradient->fade_unit_w =
gimp_unit_menu_new ("%a", gradient->fade_unit_d, TRUE, TRUE, TRUE);
gimp_unit_menu_new ("%a", gradient->fade_unit, TRUE, TRUE, TRUE);
gtk_table_attach (GTK_TABLE (table), gradient->fade_unit_w, 2, 3, 0, 1,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (gradient->fade_unit_w);
......@@ -483,7 +483,7 @@ gradient_options_init (GimpGradientOptions *gradient,
G_CALLBACK (paint_options_gradient_toggle_callback),
paint_options);
gtk_widget_set_sensitive (table, gradient->use_gradient_d);
gtk_widget_set_sensitive (table, gradient->use_gradient);
g_object_set_data (G_OBJECT (gradient->use_gradient_w), "set_sensitive",
table);
g_object_set_data (G_OBJECT (gradient->use_gradient_w),
......@@ -492,7 +492,7 @@ gradient_options_init (GimpGradientOptions *gradient,
/* the gradient length scale */
gradient->gradient_length_w =
gtk_adjustment_new (gradient->gradient_length_d,
gtk_adjustment_new (gradient->gradient_length,
1e-5, 32767.0, 1.0, 50.0, 0.0);
spinbutton =
gtk_spin_button_new (GTK_ADJUSTMENT (gradient->gradient_length_w),
......@@ -510,7 +510,7 @@ gradient_options_init (GimpGradientOptions *gradient,
/* the gradient unitmenu */
gradient->gradient_unit_w =
gimp_unit_menu_new ("%a", gradient->gradient_unit_d, TRUE, TRUE, TRUE);
gimp_unit_menu_new ("%a", gradient->gradient_unit, TRUE, TRUE, TRUE);
gtk_table_attach (GTK_TABLE (table), gradient->gradient_unit_w, 2, 3, 0, 1,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (gradient->gradient_unit_w);
......@@ -528,7 +528,7 @@ gradient_options_init (GimpGradientOptions *gradient,
G_CALLBACK (gimp_menu_item_update),
&gradient->gradient_type);
gimp_option_menu_set_history (GTK_OPTION_MENU (gradient->gradient_type_w),
GINT_TO_POINTER (gradient->gradient_type_d));
GINT_TO_POINTER (gradient->gradient_type));
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Type:"), 1.0, 0.5,
......
......@@ -164,7 +164,7 @@ selection_options_init (SelectionOptions *options,
/* the antialias toggle button */
options->antialias_w = gtk_check_button_new_with_label (_("Antialiasing"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->antialias_w),
options->antialias_d);
options->antialias);
gtk_box_pack_start (GTK_BOX (vbox), options->antialias_w, FALSE, FALSE, 0);
gtk_widget_show (options->antialias_w);
......@@ -192,7 +192,7 @@ selection_options_init (SelectionOptions *options,
options->feather_w = gtk_check_button_new_with_label (_("Feather Edges"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->feather_w),
options->feather_d);
options->feather);
gtk_frame_set_label_widget (GTK_FRAME (frame), options->feather_w);
gtk_widget_show (options->feather_w);
......@@ -207,20 +207,19 @@ selection_options_init (SelectionOptions *options,
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_widget_show (table);
options->feather_radius_w =
gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("Radius:"), -1, 50,
options->feather_radius_d,
0.0, 100.0, 1.0, 10.0, 1,
TRUE, 0.0, 0.0,
NULL, NULL);
options->feather_radius_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("Radius:"), -1, 50,
options->feather_radius,
0.0, 100.0, 1.0, 10.0, 1,
TRUE, 0.0, 0.0,
NULL, NULL);
g_signal_connect (G_OBJECT (options->feather_radius_w), "value_changed",
G_CALLBACK (gimp_double_adjustment_update),
&options->feather_radius);
/* grey out label & scale if feather is off */
gtk_widget_set_sensitive (table, options->feather_d);
gtk_widget_set_sensitive (table, options->feather);
g_object_set_data (G_OBJECT (options->feather_w), "set_sensitive", table);
}
......@@ -246,7 +245,7 @@ selection_options_init (SelectionOptions *options,
options->interactive_w =
gtk_check_button_new_with_label (_("Show Interactive Boundary"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->interactive_w),
options->interactive_d);
options->interactive);
gtk_box_pack_start (GTK_BOX (vbox), options->interactive_w,
FALSE, FALSE, 0);
gtk_widget_show (options->interactive_w);
......@@ -277,7 +276,7 @@ selection_options_init (SelectionOptions *options,
options->select_transparent_w =
gtk_check_button_new_with_label (_("Select Transparent Areas"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->select_transparent_w),
options->select_transparent_d);
options->select_transparent);
gtk_box_pack_start (GTK_BOX (vbox2), options->select_transparent_w,
FALSE, FALSE, 0);
gtk_widget_show (options->select_transparent_w);
......@@ -294,7 +293,7 @@ selection_options_init (SelectionOptions *options,
options->sample_merged_w =
gtk_check_button_new_with_label (_("Sample Merged"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->sample_merged_w),
options->sample_merged_d);
options->sample_merged);
gtk_box_pack_start (GTK_BOX (vbox2), options->sample_merged_w,
FALSE, FALSE, 0);
gtk_widget_show (options->sample_merged_w);
......@@ -347,7 +346,7 @@ selection_options_init (SelectionOptions *options,
options->auto_shrink_w =
gtk_check_button_new_with_label (_("Auto Shrink Selection"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->auto_shrink_w),
options->auto_shrink_d);
options->auto_shrink);