Commit c9c025c8 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

return the crated label from gimp_table_attach_aligned(), doc fixes.

2002-03-08  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimpwidgets.[ch]: return the crated label from
	gimp_table_attach_aligned(), doc fixes.

	* app/gui/channels-commands.c
	* app/tools/gimpairbrushtool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpconvolvetool.c
	* app/tools/gimpdodgeburntool.c
	* app/tools/gimpinktool.c
	* app/tools/gimpmagnifytool.c
	* app/tools/gimpsmudgetool.c
	* app/tools/paint_options.c
	* app/tools/selection_options.c
	* app/widgets/gimpbrushfactoryview.c
	* app/widgets/gimplayerlistview.c: use gimp_scale_entries instead
	of just hscales in lots of places, so the values are keyboard
	input-able.
parent 8e22fd38
2002-03-08 Michael Natterer <mitch@gimp.org>
* libgimpwidgets/gimpwidgets.[ch]: return the crated label from
gimp_table_attach_aligned(), doc fixes.
* app/gui/channels-commands.c
* app/tools/gimpairbrushtool.c
* app/tools/gimpblendtool.c
* app/tools/gimpbucketfilltool.c
* app/tools/gimpcolorpickertool.c
* app/tools/gimpconvolvetool.c
* app/tools/gimpdodgeburntool.c
* app/tools/gimpinktool.c
* app/tools/gimpmagnifytool.c
* app/tools/gimpsmudgetool.c
* app/tools/paint_options.c
* app/tools/selection_options.c
* app/widgets/gimpbrushfactoryview.c
* app/widgets/gimplayerlistview.c: use gimp_scale_entries instead
of just hscales in lots of places, so the values are keyboard
input-able.
2002-03-08 Sven Neumann <sven@gimp.org>
* configure.in: reorder AC_OUTPUT to make intltool happy, check
......
......@@ -249,8 +249,6 @@ channels_new_channel_query (GimpImage *gimage,
GtkWidget *hbox;
GtkWidget *vbox;
GtkWidget *table;
GtkWidget *label;
GtkWidget *opacity_scale;
GtkObject *opacity_scale_data;
g_return_if_fail (GIMP_IS_IMAGE (gimage));
......@@ -325,38 +323,27 @@ channels_new_channel_query (GimpImage *gimage,
/* The table */
table = gtk_table_new (2, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
gtk_table_set_col_spacings (GTK_TABLE (table), 2);
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
/* The name entry hbox, label and entry */
label = gtk_label_new (_("Channel name:"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (label);
/* The name entry */
options->name_entry = gtk_entry_new ();
gtk_widget_set_size_request (options->name_entry, 150, -1);
gtk_table_attach_defaults (GTK_TABLE (table), options->name_entry,
1, 2, 0, 1);
gtk_entry_set_text (GTK_ENTRY (options->name_entry),
(channel_name ? channel_name : _("New Channel")));
gtk_widget_show (options->name_entry);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Channel Name:"), 1.0, 0.5,
options->name_entry, 2, FALSE);
/* The opacity scale */
label = gtk_label_new (_("Fill Opacity:"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 1.0);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (label);
opacity_scale_data =
gtk_adjustment_new (channel_color.a * 100.0, 0.0, 100.0, 1.0, 1.0, 0.0);
opacity_scale = gtk_hscale_new (GTK_ADJUSTMENT (opacity_scale_data));
gtk_table_attach_defaults (GTK_TABLE (table), opacity_scale, 1, 2, 1, 2);
gtk_scale_set_value_pos (GTK_SCALE (opacity_scale), GTK_POS_TOP);
gtk_widget_show (opacity_scale);
opacity_scale_data = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("Fill Opacity:"), -1, 50,
channel_color.a * 100.0,
0.0, 100.0, 1.0, 10.0, 1,
TRUE, 0.0, 0.0,
NULL, NULL);
g_signal_connect (G_OBJECT (opacity_scale_data), "value_changed",
G_CALLBACK (channels_opacity_update),
......@@ -438,8 +425,6 @@ channels_edit_channel_query (GimpChannel *channel)
GtkWidget *hbox;
GtkWidget *vbox;
GtkWidget *table;
GtkWidget *label;
GtkWidget *opacity_scale;
GtkObject *opacity_scale_data;
options = g_new0 (EditChannelOptions, 1);
......@@ -491,38 +476,27 @@ channels_edit_channel_query (GimpChannel *channel)
/* The table */
table = gtk_table_new (2, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
gtk_table_set_col_spacings (GTK_TABLE (table), 2);
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
/* The name entry */
label = gtk_label_new (_("Channel name:"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_widget_show (label);
options->name_entry = gtk_entry_new ();
gtk_widget_set_size_request (options->name_entry, 150, -1);
gtk_table_attach_defaults (GTK_TABLE (table), options->name_entry,
1, 2, 0, 1);
gtk_entry_set_text (GTK_ENTRY (options->name_entry),
gimp_object_get_name (GIMP_OBJECT (channel)));
gtk_widget_show (options->name_entry);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Channel Name:"), 1.0, 0.5,
options->name_entry, 2, FALSE);
/* The opacity scale */
label = gtk_label_new (_("Fill Opacity:"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 1.0);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_widget_show (label);
opacity_scale_data =
gtk_adjustment_new (channel_color.a * 100.0, 0.0, 100.0, 1.0, 1.0, 0.0);
opacity_scale = gtk_hscale_new (GTK_ADJUSTMENT (opacity_scale_data));
gtk_table_attach_defaults (GTK_TABLE (table), opacity_scale, 1, 2, 1, 2);
gtk_scale_set_value_pos (GTK_SCALE (opacity_scale), GTK_POS_TOP);
gtk_widget_show (opacity_scale);
opacity_scale_data = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("Fill Opacity:"), -1, 50,
channel_color.a * 100.0,
0.0, 100.0, 1.0, 10.0, 1,
TRUE, 0.0, 0.0,
NULL, NULL);
g_signal_connect (G_OBJECT (opacity_scale_data), "value_changed",
G_CALLBACK (channels_opacity_update),
......
......@@ -249,8 +249,6 @@ channels_new_channel_query (GimpImage *gimage,
GtkWidget *hbox;
GtkWidget *vbox;
GtkWidget *table;
GtkWidget *label;
GtkWidget *opacity_scale;
GtkObject *opacity_scale_data;
g_return_if_fail (GIMP_IS_IMAGE (gimage));
......@@ -325,38 +323,27 @@ channels_new_channel_query (GimpImage *gimage,
/* The table */
table = gtk_table_new (2, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
gtk_table_set_col_spacings (GTK_TABLE (table), 2);
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
/* The name entry hbox, label and entry */
label = gtk_label_new (_("Channel name:"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (label);
/* The name entry */
options->name_entry = gtk_entry_new ();
gtk_widget_set_size_request (options->name_entry, 150, -1);
gtk_table_attach_defaults (GTK_TABLE (table), options->name_entry,
1, 2, 0, 1);
gtk_entry_set_text (GTK_ENTRY (options->name_entry),
(channel_name ? channel_name : _("New Channel")));
gtk_widget_show (options->name_entry);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Channel Name:"), 1.0, 0.5,
options->name_entry, 2, FALSE);
/* The opacity scale */
label = gtk_label_new (_("Fill Opacity:"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 1.0);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (label);
opacity_scale_data =
gtk_adjustment_new (channel_color.a * 100.0, 0.0, 100.0, 1.0, 1.0, 0.0);
opacity_scale = gtk_hscale_new (GTK_ADJUSTMENT (opacity_scale_data));
gtk_table_attach_defaults (GTK_TABLE (table), opacity_scale, 1, 2, 1, 2);
gtk_scale_set_value_pos (GTK_SCALE (opacity_scale), GTK_POS_TOP);
gtk_widget_show (opacity_scale);
opacity_scale_data = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("Fill Opacity:"), -1, 50,
channel_color.a * 100.0,
0.0, 100.0, 1.0, 10.0, 1,
TRUE, 0.0, 0.0,
NULL, NULL);
g_signal_connect (G_OBJECT (opacity_scale_data), "value_changed",
G_CALLBACK (channels_opacity_update),
......@@ -438,8 +425,6 @@ channels_edit_channel_query (GimpChannel *channel)
GtkWidget *hbox;
GtkWidget *vbox;
GtkWidget *table;
GtkWidget *label;
GtkWidget *opacity_scale;
GtkObject *opacity_scale_data;
options = g_new0 (EditChannelOptions, 1);
......@@ -491,38 +476,27 @@ channels_edit_channel_query (GimpChannel *channel)
/* The table */
table = gtk_table_new (2, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
gtk_table_set_col_spacings (GTK_TABLE (table), 2);
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
/* The name entry */
label = gtk_label_new (_("Channel name:"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_widget_show (label);
options->name_entry = gtk_entry_new ();
gtk_widget_set_size_request (options->name_entry, 150, -1);
gtk_table_attach_defaults (GTK_TABLE (table), options->name_entry,
1, 2, 0, 1);
gtk_entry_set_text (GTK_ENTRY (options->name_entry),
gimp_object_get_name (GIMP_OBJECT (channel)));
gtk_widget_show (options->name_entry);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Channel Name:"), 1.0, 0.5,
options->name_entry, 2, FALSE);
/* The opacity scale */
label = gtk_label_new (_("Fill Opacity:"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 1.0);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_widget_show (label);
opacity_scale_data =
gtk_adjustment_new (channel_color.a * 100.0, 0.0, 100.0, 1.0, 1.0, 0.0);
opacity_scale = gtk_hscale_new (GTK_ADJUSTMENT (opacity_scale_data));
gtk_table_attach_defaults (GTK_TABLE (table), opacity_scale, 1, 2, 1, 2);
gtk_scale_set_value_pos (GTK_SCALE (opacity_scale), GTK_POS_TOP);
gtk_widget_show (opacity_scale);
opacity_scale_data = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("Fill Opacity:"), -1, 50,
channel_color.a * 100.0,
0.0, 100.0, 1.0, 10.0, 1,
TRUE, 0.0, 0.0,
NULL, NULL);
g_signal_connect (G_OBJECT (opacity_scale_data), "value_changed",
G_CALLBACK (channels_opacity_update),
......
......@@ -1413,7 +1413,6 @@ ink_options_new (GimpToolInfo *tool_info)
GtkWidget *hbox2;
GtkWidget *radio_button;
GtkWidget *pixmap_widget;
GtkWidget *slider;
GtkWidget *frame;
GtkWidget *darea;
GdkPixmap *pixmap;
......@@ -1447,35 +1446,31 @@ ink_options_new (GimpToolInfo *tool_info)
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0);
gtk_widget_show (frame);
table = gtk_table_new (2, 2, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
table = gtk_table_new (2, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 2);
gtk_container_set_border_width (GTK_CONTAINER (table), 2);
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_widget_show (table);
/* size slider */
options->size_w =
gtk_adjustment_new (options->size_d, 0.0, 20.0, 1.0, 2.0, 0.0);
slider = gtk_hscale_new (GTK_ADJUSTMENT (options->size_w));
gtk_scale_set_value_pos (GTK_SCALE (slider), GTK_POS_TOP);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Size:"), 1.0, 1.0,
slider, 1, FALSE);
gtk_range_set_update_policy (GTK_RANGE (slider), GTK_UPDATE_DELAYED);
options->size_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("Size:"), -1, 50,
options->size_d,
0.0, 20.0, 1.0, 2.0, 1,
TRUE, 0.0, 0.0,
NULL, NULL);
g_signal_connect (G_OBJECT (options->size_w), "value_changed",
G_CALLBACK (gimp_double_adjustment_update),
&options->size);
/* angle adjust slider */
options->tilt_angle_w =
gtk_adjustment_new (options->tilt_angle_d, -90.0, 90.0, 1, 10.0, 0.0);
slider = gtk_hscale_new (GTK_ADJUSTMENT (options->tilt_angle_w));
gtk_scale_set_value_pos (GTK_SCALE (slider), GTK_POS_TOP);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Angle:"), 1.0, 1.0,
slider, 1, FALSE);
gtk_range_set_update_policy (GTK_RANGE (slider), GTK_UPDATE_DELAYED);
options->tilt_angle_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("Angle:"), -1, 50,
options->tilt_angle_d,
-90.0, 90.0, 1, 10.0, 1,
TRUE, 0.0, 0.0,
NULL, NULL);
g_signal_connect (G_OBJECT (options->tilt_angle_w), "value_changed",
G_CALLBACK (gimp_double_adjustment_update),
......@@ -1487,49 +1482,43 @@ ink_options_new (GimpToolInfo *tool_info)
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0);
gtk_widget_show (frame);
table = gtk_table_new (3, 2, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
table = gtk_table_new (3, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 2);
gtk_container_set_border_width (GTK_CONTAINER (table), 2);
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_widget_show (table);
/* size sens slider */
options->sensitivity_w =
gtk_adjustment_new (options->sensitivity_d, 0.0, 1.0, 0.01, 0.1, 0.0);
slider = gtk_hscale_new (GTK_ADJUSTMENT (options->sensitivity_w));
gtk_scale_set_value_pos (GTK_SCALE (slider), GTK_POS_TOP);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Size:"), 1.0, 1.0,
slider, 1, FALSE);
gtk_range_set_update_policy (GTK_RANGE (slider), GTK_UPDATE_DELAYED);
options->sensitivity_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("Size:"), -1, 50,
options->sensitivity_d,
0.0, 1.0, 0.01, 0.1, 1,
TRUE, 0.0, 0.0,
NULL, NULL);
g_signal_connect (G_OBJECT (options->sensitivity_w), "value_changed",
G_CALLBACK (gimp_double_adjustment_update),
&options->sensitivity);
/* tilt sens slider */
options->tilt_sensitivity_w =
gtk_adjustment_new (options->tilt_sensitivity_d, 0.0, 1.0, 0.01, 0.1, 0.0);
slider = gtk_hscale_new (GTK_ADJUSTMENT (options->tilt_sensitivity_w));
gtk_scale_set_value_pos (GTK_SCALE (slider), GTK_POS_TOP);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 2,
_("Tilt:"), 1.0, 1.0,
slider, 1, FALSE);
gtk_range_set_update_policy (GTK_RANGE (slider), GTK_UPDATE_DELAYED);
options->tilt_sensitivity_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("Tilt:"), -1, 50,
options->tilt_sensitivity_d,
0.0, 1.0, 0.01, 0.1, 1,
TRUE, 0.0, 0.0,
NULL, NULL);
g_signal_connect (G_OBJECT (options->tilt_sensitivity_w), "value_changed",
G_CALLBACK (gimp_double_adjustment_update),
&options->tilt_sensitivity);
/* velocity sens slider */
options->vel_sensitivity_w =
gtk_adjustment_new (options->vel_sensitivity_d, 0.0, 1.0, 0.01, 0.1, 0.0);
slider = gtk_hscale_new (GTK_ADJUSTMENT (options->vel_sensitivity_w));
gtk_scale_set_value_pos (GTK_SCALE (slider), GTK_POS_TOP);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 3,
_("Speed:"), 1.0, 1.0,
slider, 1, FALSE);
gtk_range_set_update_policy (GTK_RANGE (slider), GTK_UPDATE_DELAYED);
options->vel_sensitivity_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 2,
_("Speed:"), -1, 50,
options->vel_sensitivity_d,
0.0, 1.0, 0.01, 0.1, 1,
TRUE, 0.0, 0.0,
NULL, NULL);
g_signal_connect (G_OBJECT (options->vel_sensitivity_w), "value_changed",
G_CALLBACK (gimp_double_adjustment_update),
......
......@@ -128,7 +128,6 @@ airbrush_options_new (GimpToolInfo *tool_info)
GimpAirbrushOptions *options;
GtkWidget *vbox;
GtkWidget *table;
GtkWidget *scale;
options = gimp_airbrush_options_new ();
......@@ -140,37 +139,33 @@ airbrush_options_new (GimpToolInfo *tool_info)
vbox = ((GimpToolOptions *) options)->main_vbox;
/* the rate scale */
table = gtk_table_new (2, 2, FALSE);
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 4);
gtk_table_set_row_spacings (GTK_TABLE (table), 1);
table = gtk_table_new (2, 3, FALSE);
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 2);
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
gtk_widget_show (table);
options->rate_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("Rate:"), -1, 50,
options->rate_d,
0.0, 150.0, 1.0, 1.0, 1,
TRUE, 0.0, 0.0,
NULL, NULL);
options->rate_w =
gtk_adjustment_new (options->rate_d, 0.0, 150.0, 1.0, 1.0, 0.0);
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->rate_w));
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
g_signal_connect (G_OBJECT (options->rate_w), "value_changed",
G_CALLBACK (gimp_double_adjustment_update),
&options->rate);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Rate:"), 1.0, 1.0,
scale, 1, FALSE);
/* the pressure scale */
options->pressure_w =
gtk_adjustment_new (options->pressure_d, 0.0, 100.0, 1.0, 1.0, 0.0);
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->pressure_w));
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
options->pressure_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("Pressure:"), -1, 50,
options->pressure_d,
0.0, 100.0, 1.0, 1.0, 1,
TRUE, 0.0, 0.0,
NULL, NULL);
g_signal_connect (G_OBJECT (options->pressure_w), "value_changed",
G_CALLBACK (gimp_double_adjustment_update),
&options->pressure);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Pressure:"), 1.0, 1.0,
scale, 1, FALSE);
gtk_widget_show (table);
return (GimpToolOptions *) options;
}
......
......@@ -437,7 +437,6 @@ blend_options_new (GimpToolInfo *tool_info)
GtkWidget *vbox;
GtkWidget *table;
GtkWidget *scale;
GtkWidget *frame;
/* the new blend tool options structure */
......@@ -478,83 +477,115 @@ blend_options_new (GimpToolInfo *tool_info)
options);
/* the offset scale */
table = gtk_table_new (4, 2, FALSE);
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 4);
table = gtk_table_new (4, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 2);
gtk_table_set_row_spacings (GTK_TABLE (table), 1);
gtk_table_set_row_spacing (GTK_TABLE (table), 0, 2);
gtk_box_pack_start (GTK_BOX (vbox), table, TRUE, TRUE, 0);
options->offset_w =
gtk_adjustment_new (options->offset_d, 0.0, 100.0, 1.0, 1.0, 0.0);
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->offset_w));
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Offset:"), 1.0, 1.0,
scale, 1, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
gtk_widget_show (table);
options->offset_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("Offset:"), -1, 50,
options->offset_d,
0.0, 100.0, 1.0, 10.0, 1,
TRUE, 0.0, 0.0,
NULL, NULL);
g_signal_connect (G_OBJECT (options->offset_w), "value_changed",
G_CALLBACK (gimp_double_adjustment_update),
&options->offset);
/* the blend mode menu */
options->blend_mode_w = gimp_option_menu_new2
(FALSE,
options->blend_mode_w =
gimp_option_menu_new2 (FALSE,
G_CALLBACK (gimp_menu_item_update),
&options->blend_mode,
GINT_TO_POINTER (options->blend_mode_d),
_("FG to BG (RGB)"), GINT_TO_POINTER (GIMP_FG_BG_RGB_MODE), NULL,
_("FG to BG (HSV)"), GINT_TO_POINTER (GIMP_FG_BG_HSV_MODE), NULL,
_("FG to Transparent"), GINT_TO_POINTER (GIMP_FG_TRANS_MODE), NULL,
_("Custom Gradient"), GINT_TO_POINTER (GIMP_CUSTOM_MODE), NULL,
_("FG to BG (RGB)"),
GINT_TO_POINTER (GIMP_FG_BG_RGB_MODE), NULL,
_("FG to BG (HSV)"),
GINT_TO_POINTER (GIMP_FG_BG_HSV_MODE), NULL,
_("FG to Transparent"),
GINT_TO_POINTER (GIMP_FG_TRANS_MODE), NULL,
_("Custom Gradient"),
GINT_TO_POINTER (GIMP_CUSTOM_MODE), NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Blend:"), 1.0, 0.5,
options->blend_mode_w, 1, TRUE);
options->blend_mode_w, 2, TRUE);
/* the gradient type menu */
options->gradient_type_w = gimp_option_menu_new2
(FALSE,
options->gradient_type_w =
gimp_option_menu_new2 (FALSE,
G_CALLBACK (gradient_type_callback),
options,
GINT_TO_POINTER (options->gradient_type_d),
_("Linear"), GINT_TO_POINTER (GIMP_LINEAR), NULL,
_("Bi-Linear"), GINT_TO_POINTER (GIMP_BILINEAR), NULL,
_("Radial"), GINT_TO_POINTER (GIMP_RADIAL), NULL,
_("Square"), GINT_TO_POINTER (GIMP_SQUARE), NULL,
_("Conical (symmetric)"), GINT_TO_POINTER (GIMP_CONICAL_SYMMETRIC), NULL,
_("Conical (asymmetric)"), GINT_TO_POINTER (GIMP_CONICAL_ASYMMETRIC), NULL,
_("Shapeburst (angular)"), GINT_TO_POINTER (GIMP_SHAPEBURST_ANGULAR), NULL,
_("Shapeburst (spherical)"), GINT_TO_POINTER (GIMP_SHAPEBURST_SPHERICAL), NULL,
_("Shapeburst (dimpled)"), GINT_TO_POINTER (GIMP_SHAPEBURST_DIMPLED), NULL,
_("Spiral (clockwise)"), GINT_TO_POINTER (GIMP_SPIRAL_CLOCKWISE), NULL,
_("Spiral (anticlockwise)"), GINT_TO_POINTER (GIMP_SPIRAL_ANTICLOCKWISE), NULL,
_("Linear"),
GINT_TO_POINTER (GIMP_LINEAR), NULL,
_("Bi-Linear"),
GINT_TO_POINTER (GIMP_BILINEAR), NULL,
_("Radial"),
GINT_TO_POINTER (GIMP_RADIAL), NULL,
_("Square"),
GINT_TO_POINTER (GIMP_SQUARE), NULL,
_("Conical (symmetric)"),
GINT_TO_POINTER (GIMP_CONICAL_SYMMETRIC), NULL,
_("Conical (asymmetric)"),
GINT_TO_POINTER (GIMP_CONICAL_ASYMMETRIC), NULL,
_("Shapeburst (angular)"),
GINT_TO_POINTER (GIMP_SHAPEBURST_ANGULAR), NULL,
_("Shapeburst (spherical)"),
GINT_TO_POINTER (GIMP_SHAPEBURST_SPHERICAL), NULL,
_("Shapeburst (dimpled)"),
GINT_TO_POINTER (GIMP_SHAPEBURST_DIMPLED), NULL,
_("Spiral (clockwise)"),
GINT_TO_POINTER (GIMP_SPIRAL_CLOCKWISE), NULL,
_("Spiral (anticlockwise)"),
GINT_TO_POINTER (GIMP_SPIRAL_ANTICLOCKWISE), NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 2,
_("Gradient:"), 1.0, 0.5,
options->gradient_type_w, 1, TRUE);
options->gradient_type_w, 2, TRUE);
/* the repeat option */
options->repeat_w = gimp_option_menu_new2