[gimp/gtk3-port: 425/444] van-gogh-lic: kill GtkTable



commit 8742ae2bf388ebe4b5190f9fa80220e140cb6754
Author: Simon Budig <simon budig de>
Date:   Fri May 11 12:25:40 2018 +0200

    van-gogh-lic: kill GtkTable

 plug-ins/common/van-gogh-lic.c |   74 ++++++++++++++++++++--------------------
 1 files changed, 37 insertions(+), 37 deletions(-)
---
diff --git a/plug-ins/common/van-gogh-lic.c b/plug-ins/common/van-gogh-lic.c
index 7f01177..1a6d517 100644
--- a/plug-ins/common/van-gogh-lic.c
+++ b/plug-ins/common/van-gogh-lic.c
@@ -632,7 +632,7 @@ create_main_dialog (void)
   GtkWidget     *vbox;
   GtkWidget     *hbox;
   GtkWidget     *frame;
-  GtkWidget     *table;
+  GtkWidget     *grid;
   GtkWidget     *combo;
   GtkAdjustment *scale_data;
   gint           row;
@@ -704,10 +704,10 @@ create_main_dialog (void)
   gtk_widget_show (frame);
 
   /* Effect image menu */
-  table = gtk_table_new (1, 2, FALSE);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 6);
-  gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
-  gtk_widget_show (table);
+  grid = gtk_grid_new ();
+  gtk_grid_set_column_spacing (GTK_GRID (grid), 6);
+  gtk_box_pack_start (GTK_BOX (vbox), grid, FALSE, FALSE, 0);
+  gtk_widget_show (grid);
 
   combo = gimp_drawable_combo_box_new (effect_image_constrain, NULL);
   gimp_int_combo_box_connect (GIMP_INT_COMBO_BOX (combo),
@@ -715,58 +715,58 @@ create_main_dialog (void)
                               G_CALLBACK (gimp_int_combo_box_get_active),
                               &licvals.effect_image_id);
 
-  gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
-                             _("_Effect image:"), 0.0, 0.5, combo, 2, TRUE);
+  gimp_grid_attach_aligned (GTK_GRID (grid), 0, 0,
+                            _("_Effect image:"), 0.0, 0.5, combo, 2);
 
-  table = gtk_table_new (5, 3, FALSE);
-  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);
+  grid = gtk_grid_new ();
+  gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
+  gtk_grid_set_column_spacing (GTK_GRID (grid), 6);
+  gtk_box_pack_start (GTK_BOX (vbox), grid, FALSE, FALSE, 0);
+  gtk_widget_show (grid);
 
   row = 0;
 
-  scale_data = gimp_scale_entry_new (GTK_TABLE (table), 0, row++,
-                                     _("_Filter length:"), 0, 6,
-                                     licvals.filtlen, 0.1, 64, 1.0, 8.0, 1,
-                                     TRUE, 0, 0,
-                                     NULL, NULL);
+  scale_data = gimp_scale_entry_new_grid (GTK_GRID (grid), 0, row++,
+                                          _("_Filter length:"), 0, 6,
+                                          licvals.filtlen, 0.1, 64, 1.0, 8.0, 1,
+                                          TRUE, 0, 0,
+                                          NULL, NULL);
   g_signal_connect (scale_data, "value-changed",
                     G_CALLBACK (gimp_double_adjustment_update),
                     &licvals.filtlen);
 
-  scale_data = gimp_scale_entry_new (GTK_TABLE (table), 0, row++,
-                                     _("_Noise magnitude:"), 0, 6,
-                                     licvals.noisemag, 1, 5, 0.1, 1.0, 1,
-                                     TRUE, 0, 0,
-                                     NULL, NULL);
+  scale_data = gimp_scale_entry_new_grid (GTK_GRID (grid), 0, row++,
+                                          _("_Noise magnitude:"), 0, 6,
+                                          licvals.noisemag, 1, 5, 0.1, 1.0, 1,
+                                          TRUE, 0, 0,
+                                          NULL, NULL);
   g_signal_connect (scale_data, "value-changed",
                     G_CALLBACK (gimp_double_adjustment_update),
                     &licvals.noisemag);
 
-  scale_data = gimp_scale_entry_new (GTK_TABLE (table), 0, row++,
-                                     _("In_tegration steps:"), 0, 6,
-                                     licvals.intsteps, 1, 40, 1.0, 5.0, 1,
-                                     TRUE, 0, 0,
-                                     NULL, NULL);
+  scale_data = gimp_scale_entry_new_grid (GTK_GRID (grid), 0, row++,
+                                          _("In_tegration steps:"), 0, 6,
+                                          licvals.intsteps, 1, 40, 1.0, 5.0, 1,
+                                          TRUE, 0, 0,
+                                          NULL, NULL);
   g_signal_connect (scale_data, "value-changed",
                     G_CALLBACK (gimp_double_adjustment_update),
                     &licvals.intsteps);
 
-  scale_data = gimp_scale_entry_new (GTK_TABLE (table), 0, row++,
-                                     _("_Minimum value:"), 0, 6,
-                                     licvals.minv, -100, 0, 1, 10, 1,
-                                     TRUE, 0, 0,
-                                     NULL, NULL);
+  scale_data = gimp_scale_entry_new_grid (GTK_GRID (grid), 0, row++,
+                                          _("_Minimum value:"), 0, 6,
+                                          licvals.minv, -100, 0, 1, 10, 1,
+                                          TRUE, 0, 0,
+                                          NULL, NULL);
   g_signal_connect (scale_data, "value-changed",
                     G_CALLBACK (gimp_double_adjustment_update),
                     &licvals.minv);
 
-  scale_data = gimp_scale_entry_new (GTK_TABLE (table), 0, row++,
-                                     _("M_aximum value:"), 0, 6,
-                                     licvals.maxv, 0, 100, 1, 10, 1,
-                                     TRUE, 0, 0,
-                                     NULL, NULL);
+  scale_data = gimp_scale_entry_new_grid (GTK_GRID (grid), 0, row++,
+                                          _("M_aximum value:"), 0, 6,
+                                          licvals.maxv, 0, 100, 1, 10, 1,
+                                          TRUE, 0, 0,
+                                          NULL, NULL);
   g_signal_connect (scale_data, "value-changed",
                     G_CALLBACK (gimp_double_adjustment_update),
                     &licvals.maxv);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]