[gimp/gtk3-port: 402/460] align-layers: kill GtkTable
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gtk3-port: 402/460] align-layers: kill GtkTable
- Date: Sun, 20 May 2018 15:45:23 +0000 (UTC)
commit 98c55f4b54f1b8549b791e86285d356264fdffdd
Author: Simon Budig <simon budig de>
Date: Wed May 9 01:26:01 2018 +0200
align-layers: kill GtkTable
plug-ins/common/align-layers.c | 52 ++++++++++++++++++++--------------------
1 files changed, 26 insertions(+), 26 deletions(-)
---
diff --git a/plug-ins/common/align-layers.c b/plug-ins/common/align-layers.c
index 2cafbb0..0b8db95 100644
--- a/plug-ins/common/align-layers.c
+++ b/plug-ins/common/align-layers.c
@@ -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,
- _("_Horizontal style:"), 0.0, 0.5,
- combo, 2, FALSE);
+ gimp_grid_attach_aligned (GTK_GRID (grid), 0, 0,
+ _("_Horizontal style:"), 0.0, 0.5,
+ 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,
- _("Ho_rizontal base:"), 0.0, 0.5,
- combo, 2, FALSE);
+ gimp_grid_attach_aligned (GTK_GRID (grid), 0, 1,
+ _("Ho_rizontal base:"), 0.0, 0.5,
+ 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,
- _("_Vertical style:"), 0.0, 0.5,
- combo, 2, FALSE);
+ gimp_grid_attach_aligned (GTK_GRID (grid), 0, 2,
+ _("_Vertical style:"), 0.0, 0.5,
+ combo, 2);
combo = gimp_int_combo_box_new (_("Top edge"), V_BASE_TOP,
_("Center"), V_BASE_CENTER,
@@ -704,15 +704,15 @@ align_layers_dialog (void)
G_CALLBACK (gimp_int_combo_box_get_active),
&VALS.v_base);
- gimp_table_attach_aligned (GTK_TABLE (table), 0, 3,
- _("Ver_tical base:"), 0.0, 0.5,
- combo, 2, FALSE);
+ gimp_grid_attach_aligned (GTK_GRID (grid), 0, 3,
+ _("Ver_tical base:"), 0.0, 0.5,
+ combo, 2);
- adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 4,
- _("_Grid size:"), SCALE_WIDTH, 0,
- VALS.grid_size, 1, 200, 1, 10, 0,
- TRUE, 0, 0,
- NULL, NULL);
+ 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,
+ NULL, NULL);
g_signal_connect (adj, "value-changed",
G_CALLBACK (gimp_int_adjustment_update),
&VALS.grid_size);
@@ -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",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]