[gimp/gtk3-port: 357/454] gimpressionist: re-enable (without real changes) and kill GtkTable



commit f972ae18360c18f6f714779ca7f4abf2952c3b24
Author: Simon Budig <simon budig de>
Date:   Sat May 5 23:37:02 2018 +0200

    gimpressionist: re-enable (without real changes) and kill GtkTable

 plug-ins/Makefile.am                  |    2 +-
 plug-ins/gimpressionist/brush.c       |   43 ++++++++---------
 plug-ins/gimpressionist/color.c       |   24 +++++-----
 plug-ins/gimpressionist/general.c     |   82 ++++++++++++++++----------------
 plug-ins/gimpressionist/orientation.c |   54 +++++++++++-----------
 plug-ins/gimpressionist/orientmap.c   |   84 ++++++++++++++++-----------------
 plug-ins/gimpressionist/paper.c       |   40 ++++++++--------
 plug-ins/gimpressionist/placement.c   |   24 +++++-----
 plug-ins/gimpressionist/size.c        |   54 +++++++++++-----------
 plug-ins/gimpressionist/sizemap.c     |   70 ++++++++++++++--------------
 10 files changed, 236 insertions(+), 241 deletions(-)
---
diff --git a/plug-ins/Makefile.am b/plug-ins/Makefile.am
index 40dc563..03e04aa 100644
--- a/plug-ins/Makefile.am
+++ b/plug-ins/Makefile.am
@@ -47,7 +47,7 @@ SUBDIRS = \
        flame                   \
        fractal-explorer        \
        gfig                    \
-##     gimpressionist          \
+       gimpressionist          \
        gradient-flare          \
        help                    \
        $(help_browser)         \
diff --git a/plug-ins/gimpressionist/brush.c b/plug-ins/gimpressionist/brush.c
index 42f7f2a..6aa1e4d 100644
--- a/plug-ins/gimpressionist/brush.c
+++ b/plug-ins/gimpressionist/brush.c
@@ -24,9 +24,6 @@
 
 #include <libgimpmath/gimpmath.h>
 
-#include <gtk/gtklist.h>
-#include <gtk/gtkpreview.h>
-
 #include "gimpressionist.h"
 #include "ppmtool.h"
 #include "brush.h"
@@ -497,7 +494,7 @@ create_brushpage (GtkNotebook *notebook)
 {
   GtkWidget        *box1, *box2, *box3, *thispage;
   GtkWidget        *view;
-  GtkWidget        *tmpw, *table;
+  GtkWidget        *tmpw, *grid;
   GtkWidget        *frame;
   GtkWidget        *combo;
   GtkWidget        *label;
@@ -588,33 +585,33 @@ create_brushpage (GtkNotebook *notebook)
   g_signal_connect (tmpw, "clicked", G_CALLBACK (savebrush), NULL);
   gtk_widget_show (tmpw);
 
-  table = gtk_table_new (2, 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 (thispage), 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 (thispage), grid, FALSE, FALSE, 0);
+  gtk_widget_show (grid);
 
   brush_aspect_adjust = (GtkAdjustment *)
-    gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
-                          _("Aspect ratio:"),
-                          150, -1, pcvals.brush_aspect,
-                          -1.0, 1.0, 0.1, 0.1, 2,
-                          TRUE, 0, 0,
-                          _("Specifies the aspect ratio of the brush"),
-                          NULL);
+    gimp_scale_entry_new_grid (GTK_GRID (grid), 0, 0,
+                               _("Aspect ratio:"),
+                               150, -1, pcvals.brush_aspect,
+                               -1.0, 1.0, 0.1, 0.1, 2,
+                               TRUE, 0, 0,
+                               _("Specifies the aspect ratio of the brush"),
+                               NULL);
   gtk_size_group_add_widget (group,
                              GIMP_SCALE_ENTRY_LABEL (brush_aspect_adjust));
   g_signal_connect (brush_aspect_adjust, "value-changed",
                     G_CALLBACK (brush_asepct_adjust_cb), &pcvals.brush_aspect);
 
   brush_relief_adjust = (GtkAdjustment *)
-    gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
-                          _("Relief:"),
-                          150, -1, pcvals.brush_relief,
-                          0.0, 100.0, 1.0, 10.0, 1,
-                          TRUE, 0, 0,
-                          _("Specifies the amount of embossing to apply to the image (in percent)"),
-                          NULL);
+    gimp_scale_entry_new_grid (GTK_GRID (grid), 0, 1,
+                               _("Relief:"),
+                               150, -1, pcvals.brush_relief,
+                               0.0, 100.0, 1.0, 10.0, 1,
+                               TRUE, 0, 0,
+                               _("Specifies the amount of embossing to apply to the image (in percent)"),
+                               NULL);
   gtk_size_group_add_widget (group,
                              GIMP_SCALE_ENTRY_LABEL (brush_relief_adjust));
   g_signal_connect (brush_relief_adjust, "value-changed",
diff --git a/plug-ins/gimpressionist/color.c b/plug-ins/gimpressionist/color.c
index e9f80bd..2fa4387 100644
--- a/plug-ins/gimpressionist/color.c
+++ b/plug-ins/gimpressionist/color.c
@@ -53,7 +53,7 @@ void
 create_colorpage (GtkNotebook *notebook)
 {
   GtkWidget *vbox;
-  GtkWidget *label, *table;
+  GtkWidget *label, *grid;
   GtkWidget *frame;
 
   label = gtk_label_new_with_mnemonic (_("Co_lor"));
@@ -83,19 +83,19 @@ create_colorpage (GtkNotebook *notebook)
   gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
   gtk_widget_show (frame);
 
-  table = gtk_table_new (1, 3, 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);
 
   colornoiseadjust =
-    gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
-                          _("Color _noise:"),
-                          100, -1, pcvals.color_noise,
-                          0.0, 100.0, 1.0, 5.0, 0,
-                          TRUE, 0, 0,
-                          _("Adds random noise to the color"),
-                          NULL);
+    gimp_scale_entry_new_grid (GTK_GRID (grid), 0, 0,
+                               _("Color _noise:"),
+                               100, -1, pcvals.color_noise,
+                               0.0, 100.0, 1.0, 5.0, 0,
+                               TRUE, 0, 0,
+                               _("Adds random noise to the color"),
+                               NULL);
   g_signal_connect (colornoiseadjust, "value-changed",
                     G_CALLBACK (gimp_double_adjustment_update),
                     &pcvals.color_noise);
diff --git a/plug-ins/gimpressionist/general.c b/plug-ins/gimpressionist/general.c
index 222b200..044a2fd 100644
--- a/plug-ins/gimpressionist/general.c
+++ b/plug-ins/gimpressionist/general.c
@@ -127,7 +127,7 @@ void
 create_generalpage (GtkNotebook *notebook)
 {
   GtkWidget *box1, *box2, *box3, *box4, *thispage;
-  GtkWidget *label, *tmpw, *frame, *table;
+  GtkWidget *label, *tmpw, *frame, *grid;
   GSList    * radio_group = NULL;
 
   label = gtk_label_new_with_mnemonic (_("_General"));
@@ -228,56 +228,56 @@ create_generalpage (GtkNotebook *notebook)
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw),
                                 pcvals.general_drop_shadow);
 
-  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 (box1), 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 (box1), grid, FALSE, FALSE, 0);
+  gtk_widget_show (grid);
 
   general_dark_edge_adjust =
-    gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
-                          _("Edge darken:"),
-                          150, 6, pcvals.general_dark_edge,
-                          0.0, 1.0, 0.01, 0.1, 2,
-                          TRUE, 0, 0,
-                          _("How much to \"darken\" the edges of each brush stroke"),
-                          NULL);
+    gimp_scale_entry_new_grid (GTK_GRID (grid), 0, 0,
+                               _("Edge darken:"),
+                               150, 6, pcvals.general_dark_edge,
+                               0.0, 1.0, 0.01, 0.1, 2,
+                               TRUE, 0, 0,
+                               _("How much to \"darken\" the edges of each brush stroke"),
+                               NULL);
 
   general_shadow_adjust =
-    gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
-                          _("Shadow darken:"),
-                          150, 6, pcvals.general_shadow_darkness,
-                          0.0, 99.0, 0.1, 1, 2,
-                          TRUE, 0, 0,
-                          _("How much to \"darken\" the drop shadow"),
-                          NULL);
+    gimp_scale_entry_new_grid (GTK_GRID (grid), 0, 1,
+                               _("Shadow darken:"),
+                               150, 6, pcvals.general_shadow_darkness,
+                               0.0, 99.0, 0.1, 1, 2,
+                               TRUE, 0, 0,
+                               _("How much to \"darken\" the drop shadow"),
+                               NULL);
 
   general_shadow_depth =
-    gimp_scale_entry_new (GTK_TABLE (table), 0, 2,
-                          _("Shadow depth:"),
-                          150, 6, pcvals.general_shadow_depth,
-                          0, 99, 1, 5, 0,
-                          TRUE, 0, 0,
-                          _("The depth of the drop shadow, i.e. how far apart from the object it should be"),
-                          NULL);
+    gimp_scale_entry_new_grid (GTK_GRID (grid), 0, 2,
+                               _("Shadow depth:"),
+                               150, 6, pcvals.general_shadow_depth,
+                               0, 99, 1, 5, 0,
+                               TRUE, 0, 0,
+                               _("The depth of the drop shadow, i.e. how far apart from the object it should 
be"),
+                               NULL);
 
   general_shadow_blur =
-    gimp_scale_entry_new (GTK_TABLE (table), 0, 3,
-                          _("Shadow blur:"),
-                          150, 6, pcvals.general_shadow_blur,
-                          0, 99, 1, 5, 0,
-                          TRUE, 0, 0,
-                          _("How much to blur the drop shadow"),
-                          NULL);
+    gimp_scale_entry_new_grid (GTK_GRID (grid), 0, 3,
+                               _("Shadow blur:"),
+                               150, 6, pcvals.general_shadow_blur,
+                               0, 99, 1, 5, 0,
+                               TRUE, 0, 0,
+                               _("How much to blur the drop shadow"),
+                               NULL);
 
   dev_thresh_adjust =
-    gimp_scale_entry_new (GTK_TABLE (table), 0, 4,
-                          _("Deviation threshold:"),
-                          150, 6, pcvals.devthresh,
-                          0.0, 1.0, 0.01, 0.01, 2,
-                          TRUE, 0, 0,
-                          _("A bailout-value for adaptive selections"),
-                          NULL);
+    gimp_scale_entry_new_grid (GTK_GRID (grid), 0, 4,
+                               _("Deviation threshold:"),
+                               150, 6, pcvals.devthresh,
+                               0.0, 1.0, 0.01, 0.01, 2,
+                               TRUE, 0, 0,
+                               _("A bailout-value for adaptive selections"),
+                               NULL);
 
   gtk_notebook_append_page_menu (notebook, thispage, label, NULL);
 }
diff --git a/plug-ins/gimpressionist/orientation.c b/plug-ins/gimpressionist/orientation.c
index 2951c42..3e3347e 100644
--- a/plug-ins/gimpressionist/orientation.c
+++ b/plug-ins/gimpressionist/orientation.c
@@ -85,7 +85,7 @@ void
 create_orientationpage (GtkNotebook *notebook)
 {
   GtkWidget *box2, *box3, *box4, *thispage;
-  GtkWidget *label, *tmpw, *table;
+  GtkWidget *label, *tmpw, *grid;
   GSList *radio_group = NULL;
 
   label = gtk_label_new_with_mnemonic (_("Or_ientation"));
@@ -94,44 +94,44 @@ create_orientationpage (GtkNotebook *notebook)
   gtk_container_set_border_width (GTK_CONTAINER (thispage), 12);
   gtk_widget_show (thispage);
 
-  table = gtk_table_new (3, 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 (thispage), 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 (thispage), grid, FALSE, FALSE, 0);
+  gtk_widget_show (grid);
 
   orient_num_adjust =
-    gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
-                          _("Directions:"),
-                          150, -1, pcvals.orient_num,
-                          1.0, 30.0, 1.0, 1.0, 0,
-                          TRUE, 0, 0,
-                          _("The number of directions (i.e. brushes) to use"),
-                          NULL);
+    gimp_scale_entry_new_grid (GTK_GRID (grid), 0, 0,
+                               _("Directions:"),
+                               150, -1, pcvals.orient_num,
+                               1.0, 30.0, 1.0, 1.0, 0,
+                               TRUE, 0, 0,
+                               _("The number of directions (i.e. brushes) to use"),
+                               NULL);
   g_signal_connect (orient_num_adjust, "value-changed",
                     G_CALLBACK (gimp_int_adjustment_update),
                     &pcvals.orient_num);
 
   orient_first_adjust =
-    gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
-                          _("Start angle:"),
-                          150, -1, pcvals.orient_first,
-                          0.0, 360.0, 1.0, 10.0, 0,
-                          TRUE, 0, 0,
-                          _("The starting angle of the first brush to create"),
-                          NULL);
+    gimp_scale_entry_new_grid (GTK_GRID (grid), 0, 1,
+                               _("Start angle:"),
+                               150, -1, pcvals.orient_first,
+                               0.0, 360.0, 1.0, 10.0, 0,
+                               TRUE, 0, 0,
+                               _("The starting angle of the first brush to create"),
+                               NULL);
   g_signal_connect (orient_first_adjust, "value-changed",
                     G_CALLBACK (gimp_double_adjustment_update),
                     &pcvals.orient_first);
 
   orient_last_adjust =
-    gimp_scale_entry_new (GTK_TABLE (table), 0, 2,
-                          _("Angle span:"),
-                          150, -1, pcvals.orient_last,
-                          0.0, 360.0, 1.0, 10.0, 0,
-                          TRUE, 0, 0,
-                          _("The angle span of the first brush to create"),
-                          NULL);
+    gimp_scale_entry_new_grid (GTK_GRID (grid), 0, 2,
+                               _("Angle span:"),
+                               150, -1, pcvals.orient_last,
+                               0.0, 360.0, 1.0, 10.0, 0,
+                               TRUE, 0, 0,
+                               _("The angle span of the first brush to create"),
+                               NULL);
   g_signal_connect (orient_last_adjust, "value-changed",
                     G_CALLBACK (gimp_double_adjustment_update),
                     &pcvals.orient_last);
diff --git a/plug-ins/gimpressionist/orientmap.c b/plug-ins/gimpressionist/orientmap.c
index 815b92c..39d439c 100644
--- a/plug-ins/gimpressionist/orientmap.c
+++ b/plug-ins/gimpressionist/orientmap.c
@@ -505,7 +505,7 @@ void
 create_orientmap_dialog (GtkWidget *parent)
 {
   GtkWidget *tmpw, *tmpw2;
-  GtkWidget *table1, *table2;
+  GtkWidget *grid1, *grid2;
   GtkWidget *frame;
   GtkWidget *ebox, *hbox, *vbox;
 
@@ -543,16 +543,15 @@ create_orientmap_dialog (GtkWidget *parent)
                     G_CALLBACK (gtk_widget_destroyed),
                     &orient_map_window);
 
-  table1 = gtk_table_new (2, 5, FALSE);
-  gtk_container_set_border_width (GTK_CONTAINER (table1), 6);
+  grid1 = gtk_grid_new ();
+  gtk_container_set_border_width (GTK_CONTAINER (grid1), 6);
   gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (orient_map_window))),
-                      table1, TRUE, TRUE, 0);
-  gtk_widget_show (table1);
+                      grid1, TRUE, TRUE, 0);
+  gtk_widget_show (grid1);
 
   frame = gtk_frame_new (_("Vectors"));
   gtk_container_set_border_width (GTK_CONTAINER (frame), 2);
-  gtk_table_attach (GTK_TABLE (table1), frame, 0, 1, 0, 1,
-                    GTK_EXPAND, GTK_EXPAND, 0, 0);
+  gtk_grid_attach (GTK_GRID (grid1), frame, 0, 0, 1, 1);
   gtk_widget_show (frame);
 
   hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
@@ -589,8 +588,7 @@ create_orientmap_dialog (GtkWidget *parent)
 
   tmpw2 = tmpw = gtk_frame_new (_("Preview"));
   gtk_container_set_border_width (GTK_CONTAINER (tmpw), 2);
-  gtk_table_attach (GTK_TABLE (table1), tmpw, 1,2, 0,1,
-                    GTK_EXPAND, GTK_EXPAND, 0, 0);
+  gtk_grid_attach (GTK_GRID (grid1), tmpw, 1, 0, 1, 1);
   gtk_widget_show (tmpw);
 
   tmpw = orient_map_preview_prev = gimp_preview_area_new ();
@@ -601,7 +599,7 @@ create_orientmap_dialog (GtkWidget *parent)
   hbox = tmpw = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
   gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE);
   gtk_container_set_border_width (GTK_CONTAINER (tmpw), 2);
-  gtk_table_attach_defaults (GTK_TABLE (table1), tmpw, 0,1, 1,2);
+  gtk_grid_attach (GTK_GRID (grid1), tmpw, 0, 1, 1, 1);
   gtk_widget_show (tmpw);
 
   prev_button = tmpw = gtk_button_new_with_mnemonic ("_<<");
@@ -630,7 +628,7 @@ create_orientmap_dialog (GtkWidget *parent)
 
   hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
   gtk_box_set_spacing (GTK_BOX (hbox), 12);
-  gtk_table_attach_defaults (GTK_TABLE (table1), hbox, 0, 2, 2, 3);
+  gtk_grid_attach (GTK_GRID (grid1), hbox, 0, 2, 2, 1);
   gtk_widget_show (hbox);
 
   vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
@@ -661,52 +659,52 @@ create_orientmap_dialog (GtkWidget *parent)
                           _("Voronoi-mode makes only the vector closest to the given point have any 
influence"),
                           NULL);
 
-  table2 = gtk_table_new (4, 3, FALSE);
-  gtk_table_set_col_spacings (GTK_TABLE (table2), 4);
-  gtk_box_pack_start (GTK_BOX (hbox), table2, TRUE, TRUE, 0);
-  gtk_widget_show (table2);
+  grid2 = gtk_grid_new ();
+  gtk_grid_set_column_spacing (GTK_GRID (grid2), 4);
+  gtk_box_pack_start (GTK_BOX (hbox), grid2, TRUE, TRUE, 0);
+  gtk_widget_show (grid2);
 
   angle_adjust = (GtkAdjustment *)
-    gimp_scale_entry_new (GTK_TABLE (table2), 0, 0,
-                          _("A_ngle:"),
-                          150, 6, 0.0,
-                          0.0, 360.0, 1.0, 10.0, 1,
-                          TRUE, 0, 0,
-                          _("Change the angle of the selected vector"),
-                          NULL);
+    gimp_scale_entry_new_grid (GTK_GRID (grid2), 0, 0,
+                               _("A_ngle:"),
+                               150, 6, 0.0,
+                               0.0, 360.0, 1.0, 10.0, 1,
+                               TRUE, 0, 0,
+                               _("Change the angle of the selected vector"),
+                               NULL);
   g_signal_connect (angle_adjust, "value-changed",
                     G_CALLBACK (angle_adjust_move_callback), NULL);
 
   angle_offset_adjust = (GtkAdjustment *)
-    gimp_scale_entry_new (GTK_TABLE (table2), 0, 1,
-                          _("Ang_le offset:"),
-                          150, 6, 0.0,
-                          0.0, 360.0, 1.0, 10.0, 1,
-                          TRUE, 0, 0,
-                          _("Offset all vectors with a given angle"),
-                          NULL);
+    gimp_scale_entry_new_grid (GTK_GRID (grid2), 0, 1,
+                               _("Ang_le offset:"),
+                               150, 6, 0.0,
+                               0.0, 360.0, 1.0, 10.0, 1,
+                               TRUE, 0, 0,
+                               _("Offset all vectors with a given angle"),
+                               NULL);
   g_signal_connect (angle_offset_adjust, "value-changed",
                     G_CALLBACK (angle_offset_adjust_move_callback), NULL);
 
   strength_adjust = (GtkAdjustment *)
-    gimp_scale_entry_new (GTK_TABLE (table2), 0, 2,
-                          _("_Strength:"),
-                          150, 6, 1.0,
-                          0.1, 5.0, 0.1, 1.0, 1,
-                          TRUE, 0, 0,
-                          _("Change the strength of the selected vector"),
-                          NULL);
+    gimp_scale_entry_new_grid (GTK_GRID (grid2), 0, 2,
+                               _("_Strength:"),
+                               150, 6, 1.0,
+                               0.1, 5.0, 0.1, 1.0, 1,
+                               TRUE, 0, 0,
+                               _("Change the strength of the selected vector"),
+                               NULL);
   g_signal_connect (strength_adjust, "value-changed",
                     G_CALLBACK (strength_adjust_move_callback), NULL);
 
   orient_map_str_exp_adjust = (GtkAdjustment *)
-    gimp_scale_entry_new (GTK_TABLE (table2), 0, 3,
-                          _("S_trength exp.:"),
-                          150, 6, 1.0,
-                          0.1, 10.9, 0.1, 1.0, 1,
-                          TRUE, 0, 0,
-                          _("Change the exponent of the strength"),
-                          NULL);
+    gimp_scale_entry_new_grid (GTK_GRID (grid2), 0, 3,
+                               _("S_trength exp.:"),
+                               150, 6, 1.0,
+                               0.1, 10.9, 0.1, 1.0, 1,
+                               TRUE, 0, 0,
+                               _("Change the exponent of the strength"),
+                               NULL);
   g_signal_connect (orient_map_str_exp_adjust, "value-changed",
                     G_CALLBACK (strength_exponent_adjust_move_callback), NULL);
 
diff --git a/plug-ins/gimpressionist/paper.c b/plug-ins/gimpressionist/paper.c
index a4d25e5..a777403 100644
--- a/plug-ins/gimpressionist/paper.c
+++ b/plug-ins/gimpressionist/paper.c
@@ -127,7 +127,7 @@ void
 create_paperpage (GtkNotebook *notebook)
 {
   GtkWidget         *box1, *thispage, *box2;
-  GtkWidget        *label, *tmpw, *table;
+  GtkWidget        *label, *tmpw, *grid;
   GtkWidget        *view;
   GtkWidget        *frame;
   GtkTreeSelection *selection;
@@ -182,32 +182,32 @@ create_paperpage (GtkNotebook *notebook)
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw),
                                 pcvals.paper_overlay);
 
-  table = gtk_table_new (2, 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 (thispage), 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 (thispage), grid, FALSE, FALSE, 0);
+  gtk_widget_show (grid);
 
   paper_scale_adjust =
-    gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
-                          _("Scale:"),
-                          150, -1, pcvals.paper_scale,
-                          3.0, 150.0, 1.0, 10.0, 1,
-                          TRUE, 0, 0,
-                          _("Specifies the scale of the texture (in percent of original file)"),
-                          NULL);
+    gimp_scale_entry_new_grid (GTK_GRID (grid), 0, 0,
+                               _("Scale:"),
+                               150, -1, pcvals.paper_scale,
+                               3.0, 150.0, 1.0, 10.0, 1,
+                               TRUE, 0, 0,
+                               _("Specifies the scale of the texture (in percent of original file)"),
+                               NULL);
   g_signal_connect (paper_scale_adjust, "value-changed",
                     G_CALLBACK (gimp_double_adjustment_update),
                     &pcvals.paper_scale);
 
   paper_relief_adjust =
-    gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
-                          _("Relief:"),
-                          150, -1, pcvals.paper_relief,
-                          0.0, 100.0, 1.0, 10.0, 1,
-                          TRUE, 0, 0,
-                          _("Specifies the amount of embossing to apply to the image (in percent)"),
-                          NULL);
+    gimp_scale_entry_new_grid (GTK_GRID (grid), 0, 1,
+                               _("Relief:"),
+                               150, -1, pcvals.paper_relief,
+                               0.0, 100.0, 1.0, 10.0, 1,
+                               TRUE, 0, 0,
+                               _("Specifies the amount of embossing to apply to the image (in percent)"),
+                               NULL);
   g_signal_connect (paper_relief_adjust, "value-changed",
                     G_CALLBACK (gimp_double_adjustment_update),
                     &pcvals.paper_relief);
diff --git a/plug-ins/gimpressionist/placement.c b/plug-ins/gimpressionist/placement.c
index 078d492..5645e88 100644
--- a/plug-ins/gimpressionist/placement.c
+++ b/plug-ins/gimpressionist/placement.c
@@ -61,7 +61,7 @@ void
 create_placementpage (GtkNotebook *notebook)
 {
   GtkWidget *vbox;
-  GtkWidget *label, *tmpw, *table, *frame;
+  GtkWidget *label, *tmpw, *grid, *frame;
 
   label = gtk_label_new_with_mnemonic (_("Pl_acement"));
 
@@ -109,19 +109,19 @@ create_placementpage (GtkNotebook *notebook)
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw),
                                 pcvals.placement_center);
 
-  table = gtk_table_new (1, 3, 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);
 
   brush_density_adjust =
-    gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
-                          _("Stroke _density:"),
-                          100, -1, pcvals.brush_density,
-                          1.0, 50.0, 1.0, 5.0, 0,
-                          TRUE, 0, 0,
-                          _("The relative density of the brush strokes"),
-                          NULL);
+    gimp_scale_entry_new_grid (GTK_GRID (grid), 0, 0,
+                               _("Stroke _density:"),
+                               100, -1, pcvals.brush_density,
+                               1.0, 50.0, 1.0, 5.0, 0,
+                               TRUE, 0, 0,
+                               _("The relative density of the brush strokes"),
+                               NULL);
   g_signal_connect (brush_density_adjust, "value-changed",
                     G_CALLBACK (gimp_double_adjustment_update),
                     &pcvals.brush_density);
diff --git a/plug-ins/gimpressionist/size.c b/plug-ins/gimpressionist/size.c
index dadb19f..0da12d8 100644
--- a/plug-ins/gimpressionist/size.c
+++ b/plug-ins/gimpressionist/size.c
@@ -88,7 +88,7 @@ void
 create_sizepage (GtkNotebook *notebook)
 {
   GtkWidget *box2, *box3, *box4, *thispage;
-  GtkWidget *label, *tmpw, *table;
+  GtkWidget *label, *tmpw, *grid;
   GSList    *radio_group = NULL;
 
   label = gtk_label_new_with_mnemonic (_("_Size"));
@@ -97,44 +97,44 @@ create_sizepage (GtkNotebook *notebook)
   gtk_container_set_border_width (GTK_CONTAINER (thispage), 12);
   gtk_widget_show (thispage);
 
-  table = gtk_table_new (3, 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 (thispage), 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 (thispage), grid, FALSE, FALSE, 0);
+  gtk_widget_show (grid);
 
   sizenumadjust =
-    gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
-                          _("Size variants:"),
-                          150, -1, pcvals.size_num,
-                          1.0, 30.0, 1.0, 1.0, 0,
-                          TRUE, 0, 0,
-                          _("The number of sizes of brushes to use"),
-                          NULL);
+    gimp_scale_entry_new_grid (GTK_GRID (grid), 0, 0,
+                               _("Size variants:"),
+                               150, -1, pcvals.size_num,
+                               1.0, 30.0, 1.0, 1.0, 0,
+                               TRUE, 0, 0,
+                               _("The number of sizes of brushes to use"),
+                               NULL);
   g_signal_connect (sizenumadjust, "value-changed",
                     G_CALLBACK (gimp_int_adjustment_update),
                     &pcvals.size_num);
 
   sizefirstadjust =
-    gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
-                          _("Minimum size:"),
-                          150, -1, pcvals.size_first,
-                          0.0, 360.0, 1.0, 10.0, 0,
-                          TRUE, 0, 0,
-                          _("The smallest brush to create"),
-                          NULL);
+    gimp_scale_entry_new_grid (GTK_GRID (grid), 0, 1,
+                               _("Minimum size:"),
+                               150, -1, pcvals.size_first,
+                               0.0, 360.0, 1.0, 10.0, 0,
+                               TRUE, 0, 0,
+                               _("The smallest brush to create"),
+                               NULL);
   g_signal_connect (sizefirstadjust, "value-changed",
                     G_CALLBACK (gimp_double_adjustment_update),
                     &pcvals.size_first);
 
   sizelastadjust =
-    gimp_scale_entry_new (GTK_TABLE (table), 0, 2,
-                          _("Maximum size:"),
-                          150, -1, pcvals.size_last,
-                          0.0, 360.0, 1.0, 10.0, 0,
-                          TRUE, 0, 0,
-                          _("The largest brush to create"),
-                          NULL);
+    gimp_scale_entry_new_grid (GTK_GRID (grid), 0, 2,
+                               _("Maximum size:"),
+                               150, -1, pcvals.size_last,
+                               0.0, 360.0, 1.0, 10.0, 0,
+                               TRUE, 0, 0,
+                               _("The largest brush to create"),
+                               NULL);
   g_signal_connect (sizelastadjust, "value-changed",
                     G_CALLBACK (gimp_double_adjustment_update),
                     &pcvals.size_last);
diff --git a/plug-ins/gimpressionist/sizemap.c b/plug-ins/gimpressionist/sizemap.c
index 9044ffc..2649b6e 100644
--- a/plug-ins/gimpressionist/sizemap.c
+++ b/plug-ins/gimpressionist/sizemap.c
@@ -379,8 +379,8 @@ void
 create_sizemap_dialog (GtkWidget *parent)
 {
   GtkWidget *tmpw, *tmpw2;
-  GtkWidget *table1;
-  GtkWidget *table2;
+  GtkWidget *grid1;
+  GtkWidget *grid2;
   GtkWidget *hbox;
 
   initsmvectors ();
@@ -416,15 +416,15 @@ create_sizemap_dialog (GtkWidget *parent)
                     G_CALLBACK (gtk_widget_destroyed),
                     &smwindow);
 
-  table1 = gtk_table_new (2, 5, FALSE);
-  gtk_container_set_border_width (GTK_CONTAINER (table1), 6);
+  grid1 = gtk_grid_new ();
+  gtk_container_set_border_width (GTK_CONTAINER (grid1), 6);
   gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (smwindow))),
-                      table1, TRUE, TRUE, 0);
-  gtk_widget_show (table1);
+                      grid1, TRUE, TRUE, 0);
+  gtk_widget_show (grid1);
 
   tmpw2 = tmpw = gtk_frame_new (_("Smvectors"));
   gtk_container_set_border_width (GTK_CONTAINER (tmpw), 2);
-  gtk_table_attach (GTK_TABLE (table1), tmpw, 0,1,0,1,GTK_EXPAND,GTK_EXPAND,0,0);
+  gtk_grid_attach (GTK_GRID (grid1), tmpw, 0, 0, 1, 1);
   gtk_widget_show (tmpw);
 
   tmpw = hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL,0);
@@ -457,7 +457,7 @@ create_sizemap_dialog (GtkWidget *parent)
 
   tmpw2 = tmpw = gtk_frame_new (_("Preview"));
   gtk_container_set_border_width (GTK_CONTAINER (tmpw), 2);
-  gtk_table_attach (GTK_TABLE (table1), tmpw, 1,2,0,1,GTK_EXPAND,GTK_EXPAND,0,0);
+  gtk_grid_attach (GTK_GRID (grid1), tmpw, 1, 0, 1, 1);
   gtk_widget_show (tmpw);
 
   tmpw = smpreviewprev = gimp_preview_area_new ();
@@ -468,7 +468,7 @@ create_sizemap_dialog (GtkWidget *parent)
   hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
   gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE);
   gtk_container_set_border_width (GTK_CONTAINER (hbox), 2);
-  gtk_table_attach_defaults (GTK_TABLE (table1), hbox, 0, 1, 1, 2);
+  gtk_grid_attach (GTK_GRID (grid1), hbox, 0, 1, 1, 1);
   gtk_widget_show (hbox);
 
   prev_button = tmpw = gtk_button_new_with_mnemonic ("_<<");
@@ -499,46 +499,46 @@ create_sizemap_dialog (GtkWidget *parent)
                     G_CALLBACK (smdeleteclick), NULL);
   gimp_help_set_help_data (tmpw, _("Delete selected smvector"), NULL);
 
-  table2 = gtk_table_new (3, 4, FALSE);
-  gtk_table_set_col_spacings (GTK_TABLE (table2), 4);
-  gtk_table_attach_defaults (GTK_TABLE (table1), table2, 0, 2, 2, 3);
-  gtk_widget_show (table2);
+  grid2 = gtk_grid_new ();
+  gtk_grid_set_column_spacing (GTK_GRID (grid2), 4);
+  gtk_grid_attach (GTK_GRID (grid1), grid2, 0, 2, 2, 1);
+  gtk_widget_show (grid2);
 
   sizadjust = (GtkAdjustment *)
-    gimp_scale_entry_new (GTK_TABLE (table2), 0, 0,
-                          _("_Size:"),
-                          150, 6, 50.0,
-                          0.0, 100.0, 1.0, 10.0, 1,
-                          TRUE, 0, 0,
-                          _("Change the angle of the selected smvector"),
-                          NULL);
+    gimp_scale_entry_new_grid (GTK_GRID (grid2), 0, 0,
+                               _("_Size:"),
+                               150, 6, 50.0,
+                               0.0, 100.0, 1.0, 10.0, 1,
+                               TRUE, 0, 0,
+                               _("Change the angle of the selected smvector"),
+                               NULL);
   g_signal_connect (sizadjust, "value-changed",
                     G_CALLBACK (angsmadjmove), NULL);
 
   smstradjust = (GtkAdjustment *)
-    gimp_scale_entry_new (GTK_TABLE (table2), 0, 1,
-                          _("S_trength:"),
-                          150, 6, 1.0,
-                          0.1, 5.0, 0.1, 0.5, 1,
-                          TRUE, 0, 0,
-                          _("Change the strength of the selected smvector"),
-                          NULL);
+    gimp_scale_entry_new_grid (GTK_GRID (grid2), 0, 1,
+                               _("S_trength:"),
+                               150, 6, 1.0,
+                               0.1, 5.0, 0.1, 0.5, 1,
+                               TRUE, 0, 0,
+                               _("Change the strength of the selected smvector"),
+                               NULL);
   g_signal_connect (smstradjust, "value-changed",
                     G_CALLBACK (strsmadjmove), NULL);
 
   smstrexpadjust = (GtkAdjustment *)
-    gimp_scale_entry_new (GTK_TABLE (table2), 0, 2,
-                          _("St_rength exp.:"),
-                          150, 6, 1.0,
-                          0.1, 10.9, 0.1, 0.5, 1,
-                          TRUE, 0, 0,
-                          _("Change the exponent of the strength"),
-                          NULL);
+    gimp_scale_entry_new_grid (GTK_GRID (grid2), 0, 2,
+                               _("St_rength exp.:"),
+                               150, 6, 1.0,
+                               0.1, 10.9, 0.1, 0.5, 1,
+                               TRUE, 0, 0,
+                               _("Change the exponent of the strength"),
+                               NULL);
   g_signal_connect (smstrexpadjust, "value-changed",
                     G_CALLBACK (smstrexpsmadjmove), NULL);
 
   size_voronoi = tmpw = gtk_check_button_new_with_mnemonic ( _("_Voronoi"));
-  gtk_table_attach_defaults (GTK_TABLE (table2), tmpw, 3, 4, 0, 1);
+  gtk_grid_attach (GTK_GRID (grid2), tmpw, 3, 0, 1, 1);
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw), FALSE);
   gtk_widget_show (tmpw);
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmpw), pcvals.size_voronoi);


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