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> 2002-03-08 Sven Neumann <sven@gimp.org>
* configure.in: reorder AC_OUTPUT to make intltool happy, check * configure.in: reorder AC_OUTPUT to make intltool happy, check
......
...@@ -249,8 +249,6 @@ channels_new_channel_query (GimpImage *gimage, ...@@ -249,8 +249,6 @@ channels_new_channel_query (GimpImage *gimage,
GtkWidget *hbox; GtkWidget *hbox;
GtkWidget *vbox; GtkWidget *vbox;
GtkWidget *table; GtkWidget *table;
GtkWidget *label;
GtkWidget *opacity_scale;
GtkObject *opacity_scale_data; GtkObject *opacity_scale_data;
g_return_if_fail (GIMP_IS_IMAGE (gimage)); g_return_if_fail (GIMP_IS_IMAGE (gimage));
...@@ -325,38 +323,27 @@ channels_new_channel_query (GimpImage *gimage, ...@@ -325,38 +323,27 @@ channels_new_channel_query (GimpImage *gimage,
/* The table */ /* The table */
table = gtk_table_new (2, 3, FALSE); 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_table_set_row_spacings (GTK_TABLE (table), 2);
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
/* The name entry hbox, label and entry */ /* 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_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (label);
options->name_entry = gtk_entry_new (); options->name_entry = gtk_entry_new ();
gtk_widget_set_size_request (options->name_entry, 150, -1); 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), gtk_entry_set_text (GTK_ENTRY (options->name_entry),
(channel_name ? channel_name : _("New Channel"))); (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 */ /* The opacity scale */
label = gtk_label_new (_("Fill Opacity:")); opacity_scale_data = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 1.0); _("Fill Opacity:"), -1, 50,
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, channel_color.a * 100.0,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0); 0.0, 100.0, 1.0, 10.0, 1,
gtk_widget_show (label); TRUE, 0.0, 0.0,
NULL, NULL);
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);
g_signal_connect (G_OBJECT (opacity_scale_data), "value_changed", g_signal_connect (G_OBJECT (opacity_scale_data), "value_changed",
G_CALLBACK (channels_opacity_update), G_CALLBACK (channels_opacity_update),
...@@ -438,8 +425,6 @@ channels_edit_channel_query (GimpChannel *channel) ...@@ -438,8 +425,6 @@ channels_edit_channel_query (GimpChannel *channel)
GtkWidget *hbox; GtkWidget *hbox;
GtkWidget *vbox; GtkWidget *vbox;
GtkWidget *table; GtkWidget *table;
GtkWidget *label;
GtkWidget *opacity_scale;
GtkObject *opacity_scale_data; GtkObject *opacity_scale_data;
options = g_new0 (EditChannelOptions, 1); options = g_new0 (EditChannelOptions, 1);
...@@ -491,38 +476,27 @@ channels_edit_channel_query (GimpChannel *channel) ...@@ -491,38 +476,27 @@ channels_edit_channel_query (GimpChannel *channel)
/* The table */ /* The table */
table = gtk_table_new (2, 3, FALSE); 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_table_set_row_spacings (GTK_TABLE (table), 2);
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
/* The name entry */ /* 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 (); options->name_entry = gtk_entry_new ();
gtk_widget_set_size_request (options->name_entry, 150, -1); 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), gtk_entry_set_text (GTK_ENTRY (options->name_entry),
gimp_object_get_name (GIMP_OBJECT (channel))); 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 */ /* The opacity scale */
label = gtk_label_new (_("Fill Opacity:")); opacity_scale_data = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 1.0); _("Fill Opacity:"), -1, 50,
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, channel_color.a * 100.0,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); 0.0, 100.0, 1.0, 10.0, 1,
gtk_widget_show (label); TRUE, 0.0, 0.0,
NULL, NULL);
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);
g_signal_connect (G_OBJECT (opacity_scale_data), "value_changed", g_signal_connect (G_OBJECT (opacity_scale_data), "value_changed",
G_CALLBACK (channels_opacity_update), G_CALLBACK (channels_opacity_update),
......
...@@ -249,8 +249,6 @@ channels_new_channel_query (GimpImage *gimage, ...@@ -249,8 +249,6 @@ channels_new_channel_query (GimpImage *gimage,
GtkWidget *hbox; GtkWidget *hbox;
GtkWidget *vbox; GtkWidget *vbox;
GtkWidget *table; GtkWidget *table;
GtkWidget *label;
GtkWidget *opacity_scale;
GtkObject *opacity_scale_data; GtkObject *opacity_scale_data;
g_return_if_fail (GIMP_IS_IMAGE (gimage)); g_return_if_fail (GIMP_IS_IMAGE (gimage));
...@@ -325,38 +323,27 @@ channels_new_channel_query (GimpImage *gimage, ...@@ -325,38 +323,27 @@ channels_new_channel_query (GimpImage *gimage,
/* The table */ /* The table */
table = gtk_table_new (2, 3, FALSE); 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_table_set_row_spacings (GTK_TABLE (table), 2);
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
/* The name entry hbox, label and entry */ /* 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_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (label);
options->name_entry = gtk_entry_new (); options->name_entry = gtk_entry_new ();
gtk_widget_set_size_request (options->name_entry, 150, -1); 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), gtk_entry_set_text (GTK_ENTRY (options->name_entry),
(channel_name ? channel_name : _("New Channel"))); (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 */ /* The opacity scale */
label = gtk_label_new (_("Fill Opacity:")); opacity_scale_data = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 1.0); _("Fill Opacity:"), -1, 50,
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, channel_color.a * 100.0,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0); 0.0, 100.0, 1.0, 10.0, 1,
gtk_widget_show (label); TRUE, 0.0, 0.0,
NULL, NULL);
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);
g_signal_connect (G_OBJECT (opacity_scale_data), "value_changed", g_signal_connect (G_OBJECT (opacity_scale_data), "value_changed",
G_CALLBACK (channels_opacity_update), G_CALLBACK (channels_opacity_update),
...@@ -438,8 +425,6 @@ channels_edit_channel_query (GimpChannel *channel) ...@@ -438,8 +425,6 @@ channels_edit_channel_query (GimpChannel *channel)
GtkWidget *hbox; GtkWidget *hbox;
GtkWidget *vbox; GtkWidget *vbox;
GtkWidget *table; GtkWidget *table;
GtkWidget *label;
GtkWidget *opacity_scale;
GtkObject *opacity_scale_data; GtkObject *opacity_scale_data;
options = g_new0 (EditChannelOptions, 1); options = g_new0 (EditChannelOptions, 1);
...@@ -491,38 +476,27 @@ channels_edit_channel_query (GimpChannel *channel) ...@@ -491,38 +476,27 @@ channels_edit_channel_query (GimpChannel *channel)
/* The table */ /* The table */
table = gtk_table_new (2, 3, FALSE); 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_table_set_row_spacings (GTK_TABLE (table), 2);
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
/* The name entry */ /* 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 (); options->name_entry = gtk_entry_new ();
gtk_widget_set_size_request (options->name_entry, 150, -1); 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), gtk_entry_set_text (GTK_ENTRY (options->name_entry),
gimp_object_get_name (GIMP_OBJECT (channel))); 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 */ /* The opacity scale */
label = gtk_label_new (_("Fill Opacity:")); opacity_scale_data = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 1.0); _("Fill Opacity:"), -1, 50,
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, channel_color.a * 100.0,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); 0.0, 100.0, 1.0, 10.0, 1,
gtk_widget_show (label); TRUE, 0.0, 0.0,
NULL, NULL);
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);
g_signal_connect (G_OBJECT (opacity_scale_data), "value_changed", g_signal_connect (G_OBJECT (opacity_scale_data), "value_changed",
G_CALLBACK (channels_opacity_update), G_CALLBACK (channels_opacity_update),
......
...@@ -1413,7 +1413,6 @@ ink_options_new (GimpToolInfo *tool_info) ...@@ -1413,7 +1413,6 @@ ink_options_new (GimpToolInfo *tool_info)
GtkWidget *hbox2; GtkWidget *hbox2;
GtkWidget *radio_button; GtkWidget *radio_button;
GtkWidget *pixmap_widget; GtkWidget *pixmap_widget;
GtkWidget *slider;
GtkWidget *frame; GtkWidget *frame;
GtkWidget *darea; GtkWidget *darea;
GdkPixmap *pixmap; GdkPixmap *pixmap;
...@@ -1447,35 +1446,31 @@ ink_options_new (GimpToolInfo *tool_info) ...@@ -1447,35 +1446,31 @@ ink_options_new (GimpToolInfo *tool_info)
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0);
gtk_widget_show (frame); gtk_widget_show (frame);
table = gtk_table_new (2, 2, FALSE); 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_container_set_border_width (GTK_CONTAINER (table), 2); gtk_container_set_border_width (GTK_CONTAINER (table), 2);
gtk_container_add (GTK_CONTAINER (frame), table); gtk_container_add (GTK_CONTAINER (frame), table);
gtk_widget_show (table); gtk_widget_show (table);
/* size slider */ /* size slider */
options->size_w = options->size_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
gtk_adjustment_new (options->size_d, 0.0, 20.0, 1.0, 2.0, 0.0); _("Size:"), -1, 50,
slider = gtk_hscale_new (GTK_ADJUSTMENT (options->size_w)); options->size_d,
gtk_scale_set_value_pos (GTK_SCALE (slider), GTK_POS_TOP); 0.0, 20.0, 1.0, 2.0, 1,
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0, TRUE, 0.0, 0.0,
_("Size:"), 1.0, 1.0, NULL, NULL);
slider, 1, FALSE);
gtk_range_set_update_policy (GTK_RANGE (slider), GTK_UPDATE_DELAYED);
g_signal_connect (G_OBJECT (options->size_w), "value_changed", g_signal_connect (G_OBJECT (options->size_w), "value_changed",
G_CALLBACK (gimp_double_adjustment_update), G_CALLBACK (gimp_double_adjustment_update),
&options->size); &options->size);
/* angle adjust slider */ /* angle adjust slider */
options->tilt_angle_w = options->tilt_angle_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
gtk_adjustment_new (options->tilt_angle_d, -90.0, 90.0, 1, 10.0, 0.0); _("Angle:"), -1, 50,
slider = gtk_hscale_new (GTK_ADJUSTMENT (options->tilt_angle_w)); options->tilt_angle_d,
gtk_scale_set_value_pos (GTK_SCALE (slider), GTK_POS_TOP); -90.0, 90.0, 1, 10.0, 1,
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1, TRUE, 0.0, 0.0,
_("Angle:"), 1.0, 1.0, NULL, NULL);
slider, 1, FALSE);
gtk_range_set_update_policy (GTK_RANGE (slider), GTK_UPDATE_DELAYED);
g_signal_connect (G_OBJECT (options->tilt_angle_w), "value_changed", g_signal_connect (G_OBJECT (options->tilt_angle_w), "value_changed",
G_CALLBACK (gimp_double_adjustment_update), G_CALLBACK (gimp_double_adjustment_update),
...@@ -1487,49 +1482,43 @@ ink_options_new (GimpToolInfo *tool_info) ...@@ -1487,49 +1482,43 @@ ink_options_new (GimpToolInfo *tool_info)
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0);
gtk_widget_show (frame); gtk_widget_show (frame);
table = gtk_table_new (3, 2, FALSE); table = gtk_table_new (3, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 4); gtk_table_set_col_spacings (GTK_TABLE (table), 2);
gtk_container_set_border_width (GTK_CONTAINER (table), 2); gtk_container_set_border_width (GTK_CONTAINER (table), 2);
gtk_container_add (GTK_CONTAINER (frame), table); gtk_container_add (GTK_CONTAINER (frame), table);
gtk_widget_show (table); gtk_widget_show (table);
/* size sens slider */ /* size sens slider */
options->sensitivity_w = options->sensitivity_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
gtk_adjustment_new (options->sensitivity_d, 0.0, 1.0, 0.01, 0.1, 0.0); _("Size:"), -1, 50,
slider = gtk_hscale_new (GTK_ADJUSTMENT (options->sensitivity_w)); options->sensitivity_d,
gtk_scale_set_value_pos (GTK_SCALE (slider), GTK_POS_TOP); 0.0, 1.0, 0.01, 0.1, 1,
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1, TRUE, 0.0, 0.0,
_("Size:"), 1.0, 1.0, NULL, NULL);
slider, 1, FALSE);
gtk_range_set_update_policy (GTK_RANGE (slider), GTK_UPDATE_DELAYED);
g_signal_connect (G_OBJECT (options->sensitivity_w), "value_changed", g_signal_connect (G_OBJECT (options->sensitivity_w), "value_changed",
G_CALLBACK (gimp_double_adjustment_update), G_CALLBACK (gimp_double_adjustment_update),
&options->sensitivity); &options->sensitivity);
/* tilt sens slider */ /* tilt sens slider */
options->tilt_sensitivity_w = options->tilt_sensitivity_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
gtk_adjustment_new (options->tilt_sensitivity_d, 0.0, 1.0, 0.01, 0.1, 0.0); _("Tilt:"), -1, 50,
slider = gtk_hscale_new (GTK_ADJUSTMENT (options->tilt_sensitivity_w)); options->tilt_sensitivity_d,
gtk_scale_set_value_pos (GTK_SCALE (slider), GTK_POS_TOP); 0.0, 1.0, 0.01, 0.1, 1,
gimp_table_attach_aligned (GTK_TABLE (table), 0, 2, TRUE, 0.0, 0.0,
_("Tilt:"), 1.0, 1.0, NULL, NULL);
slider, 1, FALSE);
gtk_range_set_update_policy (GTK_RANGE (slider), GTK_UPDATE_DELAYED);
g_signal_connect (G_OBJECT (options->tilt_sensitivity_w), "value_changed", g_signal_connect (G_OBJECT (options->tilt_sensitivity_w), "value_changed",
G_CALLBACK (gimp_double_adjustment_update), G_CALLBACK (gimp_double_adjustment_update),
&options->tilt_sensitivity); &options->tilt_sensitivity);
/* velocity sens slider */ /* velocity sens slider */
options->vel_sensitivity_w = options->vel_sensitivity_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 2,
gtk_adjustment_new (options->vel_sensitivity_d, 0.0, 1.0, 0.01, 0.1, 0.0); _("Speed:"), -1, 50,
slider = gtk_hscale_new (GTK_ADJUSTMENT (options->vel_sensitivity_w)); options->vel_sensitivity_d,
gtk_scale_set_value_pos (GTK_SCALE (slider), GTK_POS_TOP); 0.0, 1.0, 0.01, 0.1, 1,
gimp_table_attach_aligned (GTK_TABLE (table), 0, 3, TRUE, 0.0, 0.0,
_("Speed:"), 1.0, 1.0, NULL, NULL);
slider, 1, FALSE);
gtk_range_set_update_policy (GTK_RANGE (slider), GTK_UPDATE_DELAYED);
g_signal_connect (G_OBJECT (options->vel_sensitivity_w), "value_changed", g_signal_connect (G_OBJECT (options->vel_sensitivity_w), "value_changed",
G_CALLBACK (gimp_double_adjustment_update), G_CALLBACK (gimp_double_adjustment_update),
......
...@@ -128,7 +128,6 @@ airbrush_options_new (GimpToolInfo *tool_info) ...@@ -128,7 +128,6 @@ airbrush_options_new (GimpToolInfo *tool_info)
GimpAirbrushOptions *options; GimpAirbrushOptions *options;
GtkWidget *vbox; GtkWidget *vbox;
GtkWidget *table; GtkWidget *table;
GtkWidget *scale;
options = gimp_airbrush_options_new (); options = gimp_airbrush_options_new ();
...@@ -140,37 +139,33 @@ airbrush_options_new (GimpToolInfo *tool_info) ...@@ -140,37 +139,33 @@ airbrush_options_new (GimpToolInfo *tool_info)
vbox = ((GimpToolOptions *) options)->main_vbox; vbox = ((GimpToolOptions *) options)->main_vbox;
/* the rate scale */ /* the rate scale */
table = gtk_table_new (2, 2, FALSE); table = gtk_table_new (2, 3, FALSE);
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 4); gtk_table_set_col_spacing (GTK_TABLE (table), 0, 2);
gtk_table_set_row_spacings (GTK_TABLE (table), 1);
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0); 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_signal_connect (G_OBJECT (options->rate_w), "value_changed",
G_CALLBACK (gimp_double_adjustment_update), G_CALLBACK (gimp_double_adjustment_update),
&options->rate); &options->rate);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Rate:"), 1.0, 1.0,
scale, 1, FALSE);
/* the pressure scale */ /* the pressure scale */
options->pressure_w = options->pressure_w = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
gtk_adjustment_new (options->pressure_d, 0.0, 100.0, 1.0, 1.0, 0.0); _("Pressure:"), -1, 50,
scale = gtk_hscale_new (GTK_ADJUSTMENT (options->pressure_w)); options->pressure_d,
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP); 0.0, 100.0, 1.0, 1.0, 1,
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED); TRUE, 0.0, 0.0,
NULL, NULL);
g_signal_connect (G_OBJECT (options->pressure_w), "value_changed", g_signal_connect (G_OBJECT (options->pressure_w), "value_changed",
G_CALLBACK (gimp_double_adjustment_update), G_CALLBACK (gimp_double_adjustment_update),
&options->pressure); &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; return (GimpToolOptions *) options;
} }
......
...@@ -437,7 +437,6 @@ blend_options_new (GimpToolInfo *tool_info) ...@@ -437,7 +437,6 @@ blend_options_new (GimpToolInfo *tool_info)
GtkWidget *vbox; GtkWidget *vbox;
GtkWidget *table; GtkWidget *table;
GtkWidget *scale;
GtkWidget *frame; GtkWidget *frame;
/* the new blend tool options structure */ /* the new blend tool options structure */
...@@ -478,83 +477,115 @@ blend_options_new (GimpToolInfo *tool_info) ...@@ -478,83 +477,115 @@ blend_options_new (GimpToolInfo *tool_info)
options); options);
/* the offset scale */ /* the offset scale */
table = gtk_table_new (4, 2, FALSE); table = gtk_table_new (4, 3, FALSE);
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 4); gtk_table_set_col_spacings (GTK_TABLE (table), 2);