[balsa/gtk4: 92/311] Various: Stop using GtkBox child properties




commit 6db874251ff3f8f3d97219f22402c56d13364773
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Tue Jun 9 17:14:38 2020 -0400

    Various: Stop using GtkBox child properties
    
    Stop using GtkBox padding, fill and expand child properties
    
    * src/spell-check.c (balsa_spell_check_init):
    * src/store-address.c (store_address_dialog), (store_address_book_frame):
    * src/toolbar-prefs.c (customize_dialog_cb), (create_toolbar_page):

 ChangeLog           |  9 +++++++++
 src/spell-check.c   |  4 +++-
 src/store-address.c |  9 +++++++--
 src/toolbar-prefs.c | 14 ++++++++------
 4 files changed, 27 insertions(+), 9 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 71453840b..4b3aa91da 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -565,6 +565,15 @@
        (open_with_change_state), (copy_part_change_state),
        (part_create_menu):
 
+2020-06-09  Peter Bloomfield  <pbloomfield bellsouth net>
+
+       Various: Stop using GtkBox padding, fill and expand child properties
+
+       * src/spell-check.c (balsa_spell_check_init):
+       * src/store-address.c (store_address_dialog),
+       (store_address_book_frame):
+       * src/toolbar-prefs.c (customize_dialog_cb), (create_toolbar_page):
+
 2020-06-09  Peter Bloomfield  <pbloomfield bellsouth net>
 
        Various: Stop using GtkBox padding, fill and expand child properties
diff --git a/src/spell-check.c b/src/spell-check.c
index 844495e07..a54072159 100644
--- a/src/spell-check.c
+++ b/src/spell-check.c
@@ -319,7 +319,9 @@ balsa_spell_check_init(BalsaSpellCheck *spell_check)
     gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
                                   GTK_POLICY_AUTOMATIC,
                                   GTK_POLICY_AUTOMATIC);
-    gtk_box_pack_start(box, sw, TRUE, TRUE, 0);
+    gtk_widget_set_vexpand(sw, TRUE);
+    gtk_widget_set_valign(sw, GTK_ALIGN_FILL);
+    gtk_container_add(GTK_CONTAINER(box), sw);
 
     /* setup suggestion list */
     store  = gtk_list_store_new(1, G_TYPE_STRING);
diff --git a/src/store-address.c b/src/store-address.c
index 257a8ce13..5ed347810 100644
--- a/src/store-address.c
+++ b/src/store-address.c
@@ -227,7 +227,10 @@ store_address_dialog(StoreAddressInfo * info)
 
     frame = store_address_note_frame(info);
     gtk_widget_show_all(frame);
-    gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0);
+
+    gtk_widget_set_vexpand(frame, TRUE);
+    gtk_widget_set_valign(frame, GTK_ALIGN_FILL);
+    gtk_container_add(GTK_CONTAINER(vbox), frame);
 
     return dialog;
 }
@@ -313,7 +316,9 @@ store_address_book_frame(StoreAddressInfo * info)
     }
     gtk_combo_box_set_active(GTK_COMBO_BOX(combo_box), default_ab_offset);
 
-    gtk_box_pack_start(GTK_BOX(hbox), combo_box, TRUE, TRUE, 0);
+    gtk_widget_set_vexpand(combo_box, TRUE);
+    gtk_widget_set_valign(combo_box, GTK_ALIGN_FILL);
+    gtk_container_add(GTK_CONTAINER(hbox), combo_box);
 
     return hbox;
 }
diff --git a/src/toolbar-prefs.c b/src/toolbar-prefs.c
index 50eb071b3..6916c2682 100644
--- a/src/toolbar-prefs.c
+++ b/src/toolbar-prefs.c
@@ -139,7 +139,9 @@ balsa_toolbar_customize(GtkWindow * active_window, BalsaToolbarType type)
     notebook = gtk_notebook_new();
     content_area =
         gtk_dialog_get_content_area(GTK_DIALOG(customize_widget));
-    gtk_box_pack_start(GTK_BOX(content_area), notebook, TRUE, TRUE, 0);
+    gtk_widget_set_vexpand(notebook, TRUE);
+    gtk_widget_set_valign(notebook, GTK_ALIGN_FILL);
+    gtk_container_add(GTK_CONTAINER(content_area), notebook);
 
     gtk_window_set_role(GTK_WINDOW(customize_widget), "customize");
     gtk_window_set_default_size(GTK_WINDOW(customize_widget), 600, 440);
@@ -387,7 +389,7 @@ create_toolbar_page(BalsaToolbarModel * model, GActionMap * map)
     /* Preview display */
     toolbar_frame=gtk_frame_new(_("Preview"));
     gtk_container_set_border_width(GTK_CONTAINER(toolbar_frame), 5);
-    gtk_box_pack_start(GTK_BOX(outer_box), toolbar_frame, FALSE, FALSE, 0);
+    gtk_container_add(GTK_CONTAINER(outer_box), toolbar_frame);
 
     toolbar_ctlbox=gtk_box_new(GTK_ORIENTATION_VERTICAL, 5);
     gtk_container_add(GTK_CONTAINER(toolbar_frame), toolbar_ctlbox);
@@ -403,9 +405,7 @@ create_toolbar_page(BalsaToolbarModel * model, GActionMap * map)
                                   GTK_POLICY_AUTOMATIC,
                                    GTK_POLICY_NEVER);
 
-    gtk_box_pack_start(GTK_BOX(toolbar_ctlbox), toolbar_scroll,
-                       TRUE, TRUE, 0);
-
+    gtk_container_add(GTK_CONTAINER(toolbar_ctlbox), toolbar_scroll);
     gtk_container_add(GTK_CONTAINER(toolbar_scroll), page->toolbar);
 
     /* Button box */
@@ -428,7 +428,9 @@ create_toolbar_page(BalsaToolbarModel * model, GActionMap * map)
     lower_ctlbox=gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5);
     gtk_container_set_border_width(GTK_CONTAINER(lower_ctlbox), 5);
 
-    gtk_box_pack_start(GTK_BOX(outer_box), lower_ctlbox, TRUE, TRUE, 0);
+    gtk_widget_set_vexpand(lower_ctlbox, TRUE);
+    gtk_widget_set_valign(lower_ctlbox, GTK_ALIGN_FILL);
+    gtk_container_add(GTK_CONTAINER(outer_box), lower_ctlbox);
 
     /* A list to show the available items */
     list_scroll=gtk_scrolled_window_new(NULL, NULL);


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