[gimp/gtk3-port: 422/451] file-raw-data: kill GtkTable



commit 72baf50e8ab2473fdb0db607446bef849d9dfae8
Author: Simon Budig <simon budig de>
Date:   Fri May 11 12:09:47 2018 +0200

    file-raw-data: kill GtkTable

 plug-ins/common/file-raw-data.c |   86 +++++++++++++++++++-------------------
 1 files changed, 43 insertions(+), 43 deletions(-)
---
diff --git a/plug-ins/common/file-raw-data.c b/plug-ins/common/file-raw-data.c
index df99765..e1d4a67 100644
--- a/plug-ins/common/file-raw-data.c
+++ b/plug-ins/common/file-raw-data.c
@@ -1819,7 +1819,7 @@ load_dialog (const gchar *filename,
   GtkWidget     *sw;
   GtkWidget     *viewport;
   GtkWidget     *frame;
-  GtkWidget     *table;
+  GtkWidget     *grid;
   GtkWidget     *combo;
   GtkWidget     *button;
   GtkAdjustment *adj;
@@ -1892,11 +1892,11 @@ load_dialog (const gchar *filename,
   gtk_box_pack_start (GTK_BOX (main_vbox), frame, FALSE, FALSE, 0);
   gtk_widget_show (frame);
 
-  table = gtk_table_new (4, 3, FALSE);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 6);
-  gtk_table_set_row_spacings (GTK_TABLE (table), 4);
-  gtk_container_add (GTK_CONTAINER (frame), table);
-  gtk_widget_show (table);
+  grid = gtk_grid_new ();
+  gtk_grid_set_row_spacing (GTK_GRID (grid), 4);
+  gtk_grid_set_column_spacing (GTK_GRID (grid), 6);
+  gtk_container_add (GTK_CONTAINER (frame), grid);
+  gtk_widget_show (grid);
 
   combo = NULL;
   if (is_hgt                       &&
@@ -1920,9 +1920,9 @@ load_dialog (const gchar *filename,
       combo = gimp_int_combo_box_new (_("SRTM-1 (1 arc-second)"),  3601,
                                       _("SRTM-3 (3 arc-seconds)"), 1201,
                                       NULL);
-      gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
-                                 _("_Sample Spacing:"), 0.0, 0.5,
-                                 combo, 2, FALSE);
+      gimp_grid_attach_aligned (GTK_GRID (grid), 0, 0,
+                                _("_Sample Spacing:"), 0.0, 0.5,
+                                combo, 2);
 
       g_signal_connect (combo, "changed",
                         G_CALLBACK (gimp_int_combo_box_get_active),
@@ -1958,9 +1958,9 @@ load_dialog (const gchar *filename,
                                       NULL);
       gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (combo),
                                      runtime->image_type);
-      gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
-                                 _("Image _Type:"), 0.0, 0.5,
-                                 combo, 2, FALSE);
+      gimp_grid_attach_aligned (GTK_GRID (grid), 0, 0,
+                                _("Image _Type:"), 0.0, 0.5,
+                                combo, 2);
 
       g_signal_connect (combo, "changed",
                         G_CALLBACK (gimp_int_combo_box_get_active),
@@ -1971,11 +1971,11 @@ load_dialog (const gchar *filename,
                               G_CALLBACK (preview_update),
                               preview);
 
-  adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
-                              _("O_ffset:"), -1, 9,
-                              runtime->file_offset, 0, file_size, 1, 1000, 0,
-                              TRUE, 0.0, 0.0,
-                              NULL, NULL);
+  adj = gimp_scale_entry_new_grid (GTK_GRID (grid), 0, 1,
+                                   _("O_ffset:"), -1, 9,
+                                   runtime->file_offset, 0, file_size, 1, 1000, 0,
+                                   TRUE, 0.0, 0.0,
+                                   NULL, NULL);
 
   g_signal_connect (adj, "value-changed",
                     G_CALLBACK (gimp_int_adjustment_update),
@@ -1986,11 +1986,11 @@ load_dialog (const gchar *filename,
 
   if (! is_hgt)
     {
-      adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 2,
-                                  _("_Width:"), -1, 9,
-                                  runtime->image_width, 1, file_size, 1, 10, 0,
-                                  TRUE, 0.0, 0.0,
-                                  NULL, NULL);
+      adj = gimp_scale_entry_new_grid (GTK_GRID (grid), 0, 2,
+                                       _("_Width:"), -1, 9,
+                                       runtime->image_width, 1, file_size, 1, 10, 0,
+                                       TRUE, 0.0, 0.0,
+                                       NULL, NULL);
 
       g_signal_connect (adj, "value-changed",
                         G_CALLBACK (gimp_int_adjustment_update),
@@ -2002,11 +2002,11 @@ load_dialog (const gchar *filename,
                                 G_CALLBACK (preview_update),
                                 preview);
 
-      adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 3,
-                                  _("_Height:"), -1, 9,
-                                  runtime->image_height, 1, file_size, 1, 10, 0,
-                                  TRUE, 0.0, 0.0,
-                                  NULL, NULL);
+      adj = gimp_scale_entry_new_grid (GTK_GRID (grid), 0, 3,
+                                       _("_Height:"), -1, 9,
+                                       runtime->image_height, 1, file_size, 1, 10, 0,
+                                       TRUE, 0.0, 0.0,
+                                       NULL, NULL);
 
       g_signal_connect (adj, "value-changed",
                         G_CALLBACK (gimp_int_adjustment_update),
@@ -2024,20 +2024,20 @@ load_dialog (const gchar *filename,
   gtk_box_pack_start (GTK_BOX (main_vbox), frame, FALSE, FALSE, 0);
   gtk_widget_show (frame);
 
-  table = gtk_table_new (3, 3, FALSE);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 6);
-  gtk_table_set_row_spacings (GTK_TABLE (table), 4);
-  gtk_container_add (GTK_CONTAINER (frame), table);
-  gtk_widget_show (table);
+  grid = gtk_grid_new ();
+  gtk_grid_set_row_spacing (GTK_GRID (grid), 4);
+  gtk_grid_set_column_spacing (GTK_GRID (grid), 6);
+  gtk_container_add (GTK_CONTAINER (frame), grid);
+  gtk_widget_show (grid);
 
   combo = gimp_int_combo_box_new (_("R, G, B (normal)"),       RAW_PALETTE_RGB,
                                   _("B, G, R, X (BMP style)"), RAW_PALETTE_BGR,
                                   NULL);
   gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (combo),
                                  runtime->palette_type);
-  gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
-                             _("_Palette Type:"), 0.0, 0.5,
-                             combo, 2, FALSE);
+  gimp_grid_attach_aligned (GTK_GRID (grid), 0, 0,
+                            _("_Palette Type:"), 0.0, 0.5,
+                            combo, 2);
 
   g_signal_connect (combo, "changed",
                     G_CALLBACK (gimp_int_combo_box_get_active),
@@ -2046,11 +2046,11 @@ load_dialog (const gchar *filename,
                             G_CALLBACK (palette_update),
                             preview);
 
-  adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
-                              _("Off_set:"), -1, 0,
-                              runtime->palette_offset, 0, 1 << 24, 1, 768, 0,
-                              TRUE, 0.0, 0.0,
-                              NULL, NULL);
+  adj = gimp_scale_entry_new_grid (GTK_GRID (grid), 0, 1,
+                                   _("Off_set:"), -1, 0,
+                                   runtime->palette_offset, 0, 1 << 24, 1, 768, 0,
+                                   TRUE, 0.0, 0.0,
+                                   NULL, NULL);
 
   g_signal_connect (adj, "value-changed",
                     G_CALLBACK (gimp_int_adjustment_update),
@@ -2064,9 +2064,9 @@ load_dialog (const gchar *filename,
   if (palfile)
     gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (button), palfile);
 
-  gimp_table_attach_aligned (GTK_TABLE (table), 0, 2,
-                             _("Pal_ette File:"), 0.0, 0.5,
-                             button, 2, FALSE);
+  gimp_grid_attach_aligned (GTK_GRID (grid), 0, 2,
+                            _("Pal_ette File:"), 0.0, 0.5,
+                            button, 2);
 
   g_signal_connect (button, "selection-changed",
                     G_CALLBACK (palette_callback),


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