align-layers: kill GtkTable

This commit is contained in:
Simon Budig 2018-05-09 01:26:01 +02:00 committed by Michael Natterer
parent 3e45263bc7
commit 71dec60d8c
1 changed files with 26 additions and 26 deletions

View File

@ -615,7 +615,7 @@ static int
align_layers_dialog (void)
{
GtkWidget *dialog;
GtkWidget *table;
GtkWidget *grid;
GtkWidget *combo;
GtkWidget *toggle;
GtkAdjustment *adj;
@ -639,13 +639,13 @@ align_layers_dialog (void)
gimp_window_set_transient (GTK_WINDOW (dialog));
table = gtk_table_new (7, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_container_set_border_width (GTK_CONTAINER (table), 12);
grid = gtk_grid_new ();
gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
gtk_grid_set_column_spacing (GTK_GRID (grid), 6);
gtk_container_set_border_width (GTK_CONTAINER (grid), 12);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
table, FALSE, FALSE, 0);
gtk_widget_show (table);
grid, FALSE, FALSE, 0);
gtk_widget_show (grid);
combo = gimp_int_combo_box_new (C_("align-style", "None"), H_NONE,
_("Collect"), H_COLLECT,
@ -659,9 +659,9 @@ align_layers_dialog (void)
G_CALLBACK (gimp_int_combo_box_get_active),
&VALS.h_style);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 0,
_("_Horizontal style:"), 0.0, 0.5,
combo, 2, FALSE);
combo, 2);
combo = gimp_int_combo_box_new (_("Left edge"), H_BASE_LEFT,
@ -674,9 +674,9 @@ align_layers_dialog (void)
G_CALLBACK (gimp_int_combo_box_get_active),
&VALS.h_base);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 1,
_("Ho_rizontal base:"), 0.0, 0.5,
combo, 2, FALSE);
combo, 2);
combo = gimp_int_combo_box_new (C_("align-style", "None"), V_NONE,
_("Collect"), V_COLLECT,
@ -690,9 +690,9 @@ align_layers_dialog (void)
G_CALLBACK (gimp_int_combo_box_get_active),
&VALS.v_style);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 2,
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 2,
_("_Vertical style:"), 0.0, 0.5,
combo, 2, FALSE);
combo, 2);
combo = gimp_int_combo_box_new (_("Top edge"), V_BASE_TOP,
_("Center"), V_BASE_CENTER,
@ -704,11 +704,11 @@ align_layers_dialog (void)
G_CALLBACK (gimp_int_combo_box_get_active),
&VALS.v_base);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 3,
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 3,
_("Ver_tical base:"), 0.0, 0.5,
combo, 2, FALSE);
combo, 2);
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 4,
adj = gimp_scale_entry_new_grid (GTK_GRID (grid), 0, 4,
_("_Grid size:"), SCALE_WIDTH, 0,
VALS.grid_size, 1, 200, 1, 10, 0,
TRUE, 0, 0,
@ -720,7 +720,7 @@ align_layers_dialog (void)
toggle = gtk_check_button_new_with_mnemonic
(_("_Ignore the bottom layer even if visible"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), VALS.ignore_bottom);
gtk_table_attach_defaults (GTK_TABLE (table), toggle, 0, 3, 5, 6);
gtk_grid_attach (GTK_GRID (grid), toggle, 0, 5, 3, 1);
gtk_widget_show (toggle);
g_signal_connect (toggle, "toggled",
@ -731,7 +731,7 @@ align_layers_dialog (void)
(_("_Use the (invisible) bottom layer as the base"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
VALS.base_is_bottom_layer);
gtk_table_attach_defaults (GTK_TABLE (table), toggle, 0, 3, 6, 7);
gtk_grid_attach (GTK_GRID (grid), toggle, 0, 6, 3, 1);
gtk_widget_show (toggle);
g_signal_connect (toggle, "toggled",