Commit b298b90c authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

return the created label widget so that it can for example be put into a

2004-05-18  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpsizeentry.[ch] (gimp_size_entry_attach_label):
	return the created label widget so that it can for example be put
	into a GtkSizeGroup.

	* plug-ins/libgimpoldpreview/gimpoldpreview.[ch]: removed the
	optional "Preview" frame. Always put the preview into a sunken
	frame.

	* plug-ins/common/AlienMap2.c
	* plug-ins/common/blinds.c
	* plug-ins/common/flarefx.c
	* plug-ins/common/glasstile.c
	* plug-ins/common/grid.c
	* plug-ins/common/illusion.c
	* plug-ins/common/jigsaw.c
	* plug-ins/common/max_rgb.c
	* plug-ins/common/nlfilt.c
	* plug-ins/common/noisify.c
	* plug-ins/common/nova.c
	* plug-ins/common/plasma.c
	* plug-ins/common/polar.c
	* plug-ins/common/waves.c
	* plug-ins/common/wind.c: changed accordingly, HIG-ified.
parent 7ccf507f
2004-05-18 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpsizeentry.[ch] (gimp_size_entry_attach_label):
return the created label widget so that it can for example be put
into a GtkSizeGroup.
* plug-ins/libgimpoldpreview/gimpoldpreview.[ch]: removed the
optional "Preview" frame. Always put the preview into a sunken
frame.
* plug-ins/common/AlienMap2.c
* plug-ins/common/blinds.c
* plug-ins/common/flarefx.c
* plug-ins/common/glasstile.c
* plug-ins/common/grid.c
* plug-ins/common/illusion.c
* plug-ins/common/jigsaw.c
* plug-ins/common/max_rgb.c
* plug-ins/common/nlfilt.c
* plug-ins/common/noisify.c
* plug-ins/common/nova.c
* plug-ins/common/plasma.c
* plug-ins/common/polar.c
* plug-ins/common/waves.c
* plug-ins/common/wind.c: changed accordingly, HIG-ified.
2004-05-18 Sven Neumann <sven@gimp.org>
* plug-ins/common/aa.c
......
......@@ -473,8 +473,10 @@ gimp_size_entry_add_field (GimpSizeEntry *gse,
* @alignment: The horizontal alignment of the label.
*
* Attaches a #GtkLabel to the #GimpSizeEntry (which is a #GtkTable).
*
* Returns: A pointer to the new #GtkLabel widget.
**/
void
GtkWidget *
gimp_size_entry_attach_label (GimpSizeEntry *gse,
const gchar *text,
gint row,
......@@ -483,8 +485,8 @@ gimp_size_entry_attach_label (GimpSizeEntry *gse,
{
GtkWidget *label;
g_return_if_fail (GIMP_IS_SIZE_ENTRY (gse));
g_return_if_fail (text != NULL);
g_return_val_if_fail (GIMP_IS_SIZE_ENTRY (gse), NULL);
g_return_val_if_fail (text != NULL, NULL);
label = gtk_label_new_with_mnemonic (text);
......@@ -511,6 +513,8 @@ gimp_size_entry_attach_label (GimpSizeEntry *gse,
gtk_table_attach (GTK_TABLE (gse), label, column, column+1, row, row+1,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (label);
return label;
}
......
......@@ -90,7 +90,7 @@ void gimp_size_entry_add_field (GimpSizeEntry *gse,
GtkSpinButton *value_spinbutton,
GtkSpinButton *refval_spinbutton);
void gimp_size_entry_attach_label (GimpSizeEntry *gse,
GtkWidget * gimp_size_entry_attach_label (GimpSizeEntry *gse,
const gchar *text,
gint row,
gint column,
......
......@@ -79,7 +79,7 @@ gimp_radio_group_new (gboolean in_frame,
va_list args;
vbox = gtk_vbox_new (FALSE, 1);
vbox = gtk_vbox_new (FALSE, 2);
group = NULL;
......@@ -187,7 +187,7 @@ gimp_radio_group_new2 (gboolean in_frame,
va_list args;
vbox = gtk_vbox_new (FALSE, 1);
vbox = gtk_vbox_new (FALSE, 2);
group = NULL;
......@@ -297,7 +297,7 @@ gimp_int_radio_group_new (gboolean in_frame,
va_list args;
vbox = gtk_vbox_new (FALSE, 1);
vbox = gtk_vbox_new (FALSE, 2);
group = NULL;
......
......@@ -434,15 +434,10 @@ alienmap2_dialog (void)
GTK_FILL, GTK_FILL, 0, 0);
gtk_widget_show (align);
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_container_add (GTK_CONTAINER (align), frame);
gtk_widget_show (frame);
preview = gimp_old_preview_new (NULL, FALSE);
preview = gimp_old_preview_new (NULL);
gimp_old_preview_fill_scaled (preview, drawable);
gtk_container_add (GTK_CONTAINER (frame), preview->widget);
gtk_widget_show (preview->widget);
gtk_container_add (GTK_CONTAINER (align), preview->frame);
gtk_widget_show (preview->frame);
/* Controls */
table = gtk_table_new (6, 3, FALSE);
......
......@@ -108,7 +108,7 @@ static void run (const gchar *name,
gint *nreturn_vals,
GimpParam **return_vals);
static gint blinds_dialog (void);
static gboolean blinds_dialog (void);
static void blinds_scale_update (GtkAdjustment *adjustment,
gint *size_val);
......@@ -254,16 +254,15 @@ run (const gchar *name,
}
/* Build the dialog up. This was the hard part! */
static gint
static gboolean
blinds_dialog (void)
{
GtkWidget *dlg;
GtkWidget *main_vbox;
GtkWidget *hbox;
GtkWidget *vbox;
GtkWidget *align;
GtkWidget *frame;
GtkWidget *toggle_vbox;
GtkWidget *table;
GtkObject *size_data;
GtkWidget *toggle;
......@@ -282,21 +281,25 @@ blinds_dialog (void)
NULL);
main_vbox = gtk_vbox_new (FALSE, 4);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 6);
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dlg)->vbox), main_vbox);
gtk_widget_show (main_vbox);
hbox = gtk_hbox_new (FALSE, 6);
hbox = gtk_hbox_new (FALSE, 12);
gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
preview = gimp_old_preview_new (NULL, TRUE);
align = gtk_alignment_new (0.0, 0.0, 0.0, 0.0);
gtk_box_pack_start (GTK_BOX (hbox), align, FALSE, FALSE, 0);
gtk_widget_show (align);
preview = gimp_old_preview_new (NULL);
gimp_old_preview_fill_scaled (preview, blindsdrawable);
gtk_box_pack_start (GTK_BOX (hbox), preview->frame, FALSE, FALSE, 0);
gtk_widget_show (preview->widget);
gtk_container_add (GTK_CONTAINER (align), preview->frame);
gtk_widget_show (preview->frame);
vbox = gtk_vbox_new (FALSE, 4);
vbox = gtk_vbox_new (FALSE, 12);
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
gtk_widget_show (vbox);
......@@ -309,20 +312,15 @@ blinds_dialog (void)
_("_Vertical"), VERTICAL, NULL,
NULL);
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
frame = gtk_frame_new (_("Background"));
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
frame = gimp_frame_new (_("Background"));
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
toggle_vbox = gtk_vbox_new (FALSE, 2);
gtk_container_set_border_width (GTK_CONTAINER (toggle_vbox), 2);
gtk_container_add (GTK_CONTAINER (frame), toggle_vbox);
gtk_widget_show (toggle_vbox);
toggle = gtk_check_button_new_with_mnemonic (_("_Transparent"));
gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0);
gtk_container_add (GTK_CONTAINER (frame), toggle);
gtk_widget_show (toggle);
g_signal_connect (toggle, "toggled",
......@@ -337,15 +335,10 @@ blinds_dialog (void)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), FALSE);
}
frame = gtk_frame_new (_("Parameter Settings"));
gtk_box_pack_start (GTK_BOX (main_vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
table = gtk_table_new (2, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
gtk_container_set_border_width (GTK_CONTAINER (table), 4);
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_box_pack_start (GTK_BOX (main_vbox), table, FALSE, FALSE, 0);
gtk_widget_show (table);
size_data = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
......
......@@ -163,7 +163,7 @@ static gint numref;
static RGBfloat color, glow, inner, outer, halo;
static Reflect ref1[19];
static GimpOldPreview *preview;
static gboolean show_cursor = FALSE;
static gboolean show_cursor = TRUE;
/* --- Functions --- */
MAIN ()
......@@ -292,7 +292,6 @@ static gint
flare_dialog (GimpDrawable *drawable)
{
GtkWidget *dlg;
GtkWidget *main_vbox;
GtkWidget *frame;
FlareCenter *center;
gboolean run;
......@@ -308,19 +307,12 @@ flare_dialog (GimpDrawable *drawable)
NULL);
/* parameter settings */
main_vbox = gtk_vbox_new (FALSE, 2);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 0);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), main_vbox, TRUE, TRUE, 0);
gtk_widget_show (main_vbox);
frame = flare_center_create (drawable);
center = g_object_get_data (G_OBJECT (frame), "center");
gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
gtk_box_pack_start (GTK_BOX (main_vbox), frame, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (frame), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), frame, TRUE, TRUE, 0);
gtk_widget_show (frame);
gtk_widget_show (dlg);
run = (gimp_dialog_run (GIMP_DIALOG (dlg)) == GTK_RESPONSE_OK);
......@@ -707,7 +699,6 @@ flare_center_create (GimpDrawable *drawable)
GtkWidget *frame;
GtkWidget *table;
GtkWidget *label;
GtkWidget *pframe;
GtkWidget *spinbutton;
GtkWidget *check;
......@@ -725,22 +716,19 @@ flare_center_create (GimpDrawable *drawable)
center->oldy = 0;
center->in_call = TRUE; /* to avoid side effects while initialization */
frame = gtk_frame_new (_("Center of FlareFX"));
gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
frame = gimp_frame_new (_("Center of Flare Effect"));
g_signal_connect (frame, "destroy",
G_CALLBACK (flare_center_destroy),
center);
table = gtk_table_new (3, 4, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
gtk_table_set_row_spacings (GTK_TABLE (table), 4);
gtk_table_set_col_spacing (GTK_TABLE (table), 1, 6);
gtk_container_set_border_width (GTK_CONTAINER (table), 4);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_container_add (GTK_CONTAINER (frame), table);
label = gtk_label_new_with_mnemonic (_("_X:"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5 );
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5 );
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1,
GTK_SHRINK | GTK_FILL, GTK_FILL, 0, 0);
gtk_widget_show (label);
......@@ -781,16 +769,11 @@ flare_center_create (GimpDrawable *drawable)
G_CALLBACK (flare_center_adjustment_update),
&fvals.posy);
/* frame (shadow_in) that contains preview */
pframe = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (pframe), GTK_SHADOW_IN);
gtk_table_attach (GTK_TABLE (table), pframe, 0, 4, 1, 2, 0, 0, 0, 0);
/* PREVIEW */
preview = gimp_old_preview_new (drawable, FALSE);
gtk_widget_set_events (GTK_WIDGET (preview->widget), PREVIEW_MASK);
gtk_container_add (GTK_CONTAINER (pframe), preview->widget);
gtk_widget_show (preview->widget);
preview = gimp_old_preview_new (drawable);
gtk_widget_add_events (GTK_WIDGET (preview->widget), PREVIEW_MASK);
gtk_table_attach (GTK_TABLE (table), preview->frame, 0, 4, 1, 2, 0, 0, 0, 0);
gtk_widget_show (preview->frame);
g_object_set_data (G_OBJECT (preview->widget), "center", center);
......@@ -801,7 +784,6 @@ flare_center_create (GimpDrawable *drawable)
G_CALLBACK (flare_center_preview_events),
center);
gtk_widget_show (pframe);
gtk_widget_show (table);
g_object_set_data (G_OBJECT (frame), "center", center);
gtk_widget_show (frame);
......
......@@ -222,8 +222,8 @@ static gint
glass_dialog (GimpDrawable *drawable)
{
GtkWidget *dlg;
GtkWidget *main_vbox;
GtkWidget *frame;
GtkWidget *vbox;
GtkWidget *hbox;
GtkWidget *table;
GtkObject *adj;
gboolean run;
......@@ -239,27 +239,26 @@ glass_dialog (GimpDrawable *drawable)
NULL);
main_vbox = gtk_vbox_new (FALSE, 4);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 6);
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox),
main_vbox, TRUE, TRUE, 0);
gtk_widget_show (main_vbox);
vbox, TRUE, TRUE, 0);
gtk_widget_show (vbox);
preview = gimp_old_preview_new (drawable, TRUE);
gtk_box_pack_start (GTK_BOX (main_vbox), preview->frame, FALSE, FALSE, 0);
gtk_widget_show (preview->widget);
hbox = gtk_hbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
preview = gimp_old_preview_new (drawable);
gtk_box_pack_start (GTK_BOX (hbox), preview->frame, FALSE, FALSE, 0);
gtk_widget_show (preview->frame);
glasstile (drawable, TRUE); /* filter routine, initial pass */
/* Parameter settings */
frame = gtk_frame_new (_("Parameter Settings"));
gtk_box_pack_start (GTK_BOX (main_vbox), frame, TRUE, TRUE, 0);
gtk_widget_show (frame);
table = gtk_table_new (2, 3, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (table), 4);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
gtk_widget_show (table);
/* Horizontal scale - Width */
......
......@@ -612,19 +612,18 @@ dialog (gint32 image_ID,
GimpDrawable *drawable)
{
GtkWidget *dlg;
GtkWidget *main_hbox;
GtkWidget *main_vbox;
GtkWidget *frame;
GtkWidget *abox;
GtkWidget *hbox;
GtkWidget *vbox;
GtkSizeGroup *group;
GtkWidget *label;
GtkWidget *button;
GtkWidget *hbox;
GtkWidget *width;
GtkWidget *space;
GtkWidget *offset;
GtkWidget *chain_button;
GtkWidget *table;
GtkWidget *align;
GimpUnit unit;
gdouble xres;
gdouble yres;
......@@ -648,49 +647,26 @@ dialog (gint32 image_ID,
unit = gimp_image_get_unit (image_ID);
/* main hbox: [ ][ ] */
main_hbox = gtk_hbox_new (FALSE, 2);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox),
main_hbox, FALSE, FALSE, 4);
/* hbox created and packed into the dialog */
/* make a nice frame */
frame = gtk_frame_new (_("Preview"));
gtk_container_set_border_width (GTK_CONTAINER (frame), 4);
gtk_box_pack_start (GTK_BOX (main_hbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
hbox = gtk_vbox_new (FALSE, 2);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 0);
gtk_container_add (GTK_CONTAINER (frame), hbox);
hbox = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
abox = gtk_alignment_new (0.5, 0.0, 0.0, 0.0);
gtk_container_set_border_width (GTK_CONTAINER (abox), 4);
gtk_box_pack_start (GTK_BOX (hbox), abox, TRUE, TRUE, 0);
gtk_widget_show (abox);
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_container_add (GTK_CONTAINER (abox), frame);
gtk_widget_show (frame);
vbox = gtk_vbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 0);
gtk_widget_show (vbox);
preview = gimp_old_preview_new (NULL, FALSE);
preview = gimp_old_preview_new (NULL);
gimp_old_preview_fill (preview, drawable);
gtk_container_add (GTK_CONTAINER (frame), preview->widget);
doit (image_ID, drawable, TRUE); /* render preview */
gtk_widget_show (preview->widget);
gtk_box_pack_start (GTK_BOX (vbox), preview->frame, FALSE, FALSE, 0);
gtk_widget_show (preview->frame);
/* left side of the UI is done */
doit (image_ID, drawable, TRUE); /* render preview */
/* right side */
frame = gtk_frame_new (_("Parameter Settings"));
gtk_container_set_border_width (GTK_CONTAINER (frame), 4);
gtk_box_pack_start (GTK_BOX (main_hbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
main_vbox = gtk_vbox_new (FALSE, 4);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 6);
gtk_container_add (GTK_CONTAINER (frame), main_vbox);
gtk_widget_show (main_vbox);
vbox = gtk_vbox_new (FALSE, 6);
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
gtk_widget_show (vbox);
/* The width entries */
width = gimp_size_entry_new (3, /* number_of_fields */
......@@ -702,6 +678,10 @@ dialog (gint32 image_ID,
SPIN_BUTTON_WIDTH, /* spinbutton_usize */
GIMP_SIZE_ENTRY_UPDATE_SIZE); /* update_policy */
gtk_box_pack_start (GTK_BOX (vbox), width, FALSE, FALSE, 0);
gtk_widget_show (width);
/* set the unit back to pixels, since most times we will want pixels */
gimp_size_entry_set_unit (GIMP_SIZE_ENTRY (width), GIMP_UNIT_PIXEL);
......@@ -722,8 +702,9 @@ dialog (gint32 image_ID,
drawable->height);
gimp_size_entry_set_refval_boundaries (GIMP_SIZE_ENTRY (width), 2, 0.0,
MAX (drawable->width, drawable->height));
gtk_table_set_row_spacing (GTK_TABLE (width), 0, 6);
gtk_table_set_col_spacings (GTK_TABLE (width), 6);
gtk_table_set_col_spacing (GTK_TABLE (width), 2, 12);
gtk_table_set_col_spacing (GTK_TABLE (width), 3, 12);
/* initialize the values */
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (width), 0, grid_cfg.hwidth);
......@@ -737,8 +718,13 @@ dialog (gint32 image_ID,
0, 2, 0.0);
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (width), _("Intersection"),
0, 3, 0.0);
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (width), _("Width:"),
1, 0, 0.0);
label = gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (width), _("Width:"),
1, 0, 0.0);
group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
gtk_size_group_add_widget (group, label);
g_object_unref (group);
/* put a chain_button under the size_entries */
chain_button = gimp_chain_button_new (GIMP_CHAIN_BOTTOM);
......@@ -754,12 +740,6 @@ dialog (gint32 image_ID,
G_CALLBACK (entry_callback),
chain_button);
abox = gtk_alignment_new (1.0, 0.5, 0.0, 0.0);
gtk_container_add (GTK_CONTAINER (abox), width);
gtk_box_pack_start (GTK_BOX (main_vbox), abox, FALSE, FALSE, 4);
gtk_widget_show (width);
gtk_widget_show (abox);
/* The spacing entries */
space = gimp_size_entry_new (3, /* number_of_fields */
unit, /* unit */
......@@ -769,6 +749,10 @@ dialog (gint32 image_ID,
FALSE, /* show_refval */
SPIN_BUTTON_WIDTH, /* spinbutton_usize */
GIMP_SIZE_ENTRY_UPDATE_SIZE); /* update_policy */
gtk_box_pack_start (GTK_BOX (vbox), space, FALSE, FALSE, 0);
gtk_widget_show (space);
gimp_size_entry_set_unit (GIMP_SIZE_ENTRY (space), GIMP_UNIT_PIXEL);
/* set the resolution to the image resolution */
......@@ -788,8 +772,8 @@ dialog (gint32 image_ID,
drawable->height);
gimp_size_entry_set_refval_boundaries (GIMP_SIZE_ENTRY (space), 2, 0.0,
MAX (drawable->width, drawable->height));
gtk_table_set_col_spacings (GTK_TABLE (space), 6);
gtk_table_set_col_spacing (GTK_TABLE (space), 2, 12);
gtk_table_set_col_spacing (GTK_TABLE (space), 3, 12);
/* initialize the values */
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (space), 0, grid_cfg.hspace);
......@@ -797,8 +781,9 @@ dialog (gint32 image_ID,
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (space), 2, grid_cfg.ispace);
/* attach labels */
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (space), _("Spacing:"),
1, 0, 0.0);
label = gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (space), _("Spacing:"),
1, 0, 0.0);
gtk_size_group_add_widget (group, label);
/* put a chain_button under the spacing_entries */
chain_button = gimp_chain_button_new (GIMP_CHAIN_BOTTOM);
......@@ -818,12 +803,6 @@ dialog (gint32 image_ID,
G_CALLBACK (entry_callback),
chain_button);
abox = gtk_alignment_new (1.0, 0.5, 0.0, 0.0);
gtk_container_add (GTK_CONTAINER (abox), space);
gtk_box_pack_start (GTK_BOX (main_vbox), abox, FALSE, FALSE, 4);
gtk_widget_show (space);
gtk_widget_show (abox);
/* The offset entries */
offset = gimp_size_entry_new (3, /* number_of_fields */
unit, /* unit */
......@@ -833,6 +812,10 @@ dialog (gint32 image_ID,
FALSE, /* show_refval */
SPIN_BUTTON_WIDTH, /* spinbutton_usize */
GIMP_SIZE_ENTRY_UPDATE_SIZE); /* update_policy */
gtk_box_pack_start (GTK_BOX (vbox), offset, FALSE, FALSE, 0);
gtk_widget_show (offset);
gimp_size_entry_set_unit (GIMP_SIZE_ENTRY (offset), GIMP_UNIT_PIXEL);
/* set the resolution to the image resolution */
......@@ -852,8 +835,8 @@ dialog (gint32 image_ID,
drawable->height);
gimp_size_entry_set_refval_boundaries (GIMP_SIZE_ENTRY (offset), 2, 0.0,
MAX (drawable->width, drawable->height));
gtk_table_set_col_spacings (GTK_TABLE (offset), 6);
gtk_table_set_col_spacing (GTK_TABLE (offset), 2, 12);
gtk_table_set_col_spacing (GTK_TABLE (offset), 3, 12);
/* initialize the values */
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (offset), 0, grid_cfg.hoffset);
......@@ -861,8 +844,9 @@ dialog (gint32 image_ID,
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (offset), 2, grid_cfg.ioffset);
/* attach labels */
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (offset), _("Offset:"),
1, 0, 0.0);
label = gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (offset), _("Offset:"),
1, 0, 0.0);
gtk_size_group_add_widget (group, label);
/* this is a weird hack: we put a table into the offset table */
table = gtk_table_new (3, 3, FALSE);
......@@ -896,16 +880,12 @@ dialog (gint32 image_ID,
gtk_widget_show (chain_button);
/* attach color selectors */
align = gtk_alignment_new (0.0, 0.5, 0, 0);
gtk_table_attach_defaults (GTK_TABLE (table), align, 0, 1, 1, 2);
gtk_widget_show (align);
hcolor_button = gimp_color_button_new (_("Horizontal Color"),
COLOR_BUTTON_WIDTH, 16,
&grid_cfg.hcolor,
GIMP_COLOR_AREA_SMALL_CHECKS);
gimp_color_button_set_update (GIMP_COLOR_BUTTON (hcolor_button), TRUE);
gtk_container_add (GTK_CONTAINER (align), hcolor_button);
gtk_table_attach_defaults (GTK_TABLE (table), hcolor_button, 0, 1, 1, 2);
gtk_widget_show (hcolor_button);
g_signal_connect (hcolor_button, "color_changed",
......@@ -915,16 +895,12 @@ dialog (gint32 image_ID,
G_CALLBACK (color_callback),
chain_button);
align = gtk_alignment_new (0.0, 0.5, 0, 0);
gtk_table_attach_defaults (GTK_TABLE (table), align, 1, 2, 1, 2);
gtk_widget_show (align);
vcolor_button = gimp_color_button_new (_("Vertical Color"),
COLOR_BUTTON_WIDTH, 16,
&grid_cfg.vcolor,
GIMP_COLOR_AREA_SMALL_CHECKS);
gimp_color_button_set_update (GIMP_COLOR_BUTTON (vcolor_button), TRUE);
gtk_container_add (GTK_CONTAINER (align), vcolor_button);
gtk_table_attach_defaults (GTK_TABLE (table), vcolor_button, 1, 2, 1, 2);
gtk_widget_show (vcolor_button);
g_signal_connect (vcolor_button, "color_changed",
......@@ -934,16 +910,12 @@ dialog (gint32 image_ID,
G_CALLBACK (color_callback),
chain_button);
align = gtk_alignment_new (0.0, 0.5, 0, 0);
gtk_table_attach_defaults (GTK_TABLE (table), align, 2, 3, 1, 2);
gtk_widget_show (align);
button = gimp_color_button_new (_("Intersection Color"),