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




commit 9443a8c7d50d2bb0fa71d8799e9ff6e87e782188
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Mon Jun 8 15:25:45 2020 -0400

    Various: Stop using GtkBox child properties
    
    Stop using GtkBox padding, fill and expand child properties.
    
    * src/filter-edit-callbacks.c (build_type_notebook), (build_condition_dialog):
    * src/filter-edit-dialog.c (build_left_side), (build_match_page),
      (build_action_page), (build_right_side), (filters_edit_dialog):
    * src/filter-export-dialog.c (filters_export_dialog):
    * src/filter-run-dialog.c (available_list_selection_changed),
      (selected_list_selection_changed), (balsa_filter_run_dialog_init):

 ChangeLog                   | 66 ---------------------------------------------
 src/filter-edit-callbacks.c | 21 ++++++++-------
 src/filter-edit-dialog.c    | 12 ++++++---
 src/filter-export-dialog.c  |  2 +-
 src/filter-run-dialog.c     | 10 +++----
 5 files changed, 25 insertions(+), 86 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index dda54f47e..3ec0f18a4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -723,72 +723,6 @@
        * libbalsa/autocrypt.c (autocrypt_db_dialog_run):
        * libbalsa/html.c (libbalsa_html_new):
 
-2020-06-07  Peter Bloomfield  <pbloomfield bellsouth net>
-
-       Various: Stop using GtkBox padding, fill and expand child properties
-
-       * src/filter-edit-callbacks.c (build_type_notebook):
-
-2020-06-07  Peter Bloomfield  <pbloomfield bellsouth net>
-
-       Various: Stop using GtkBox padding, fill and expand child properties
-
-       * src/ab-main.c (bab_get_filter_box), (bab_window_new):
-       * src/ab-window.c (balsa_ab_window_init):
-       * src/balsa-mblist.c (bmbl_mru_show_tree):
-       * src/balsa-message.c (bm_find_bar_new), (balsa_message_init),
-       (add_part):
-       * src/balsa-mime-widget-crypto.c
-       (balsa_mime_widget_signature_widget), (create_import_keys_widget):
-       * src/balsa-mime-widget-message.c (bmw_message_extbody_url),
-       (bmw_message_extbody_mail), (balsa_mime_widget_new_message_tl),
-       (bm_header_widget_new):
-       * src/balsa-mime-widget.c (balsa_mime_widget_new_unknown):
-
-2020-06-07  Peter Bloomfield  <pbloomfield bellsouth net>
-
-       Various: Stop using GtkBox padding, fill and expand child properties
-
-       * libinit_balsa/assistant_page_defclient.c
-       (balsa_druid_page_defclient_init):
-       * libinit_balsa/assistant_page_directory.c
-       (balsa_druid_page_directory_init):
-       * libinit_balsa/assistant_page_user.c (balsa_druid_page_user_init):
-
-2020-06-07  Peter Bloomfield  <pbloomfield bellsouth net>
-
-       Various: Stop using GtkBox padding, fill and expand child properties
-
-       * libbalsa/address.c (libbalsa_address_get_edit_widget):
-       * libbalsa/identity.c (libbalsa_identity_select_dialog),
-       (libbalsa_identity_config_dialog):
-       * libbalsa/libbalsa-gpgme-widgets.c (libbalsa_key_dialog),
-       (create_subkey_widget), (smime_show_chain):
-       * libbalsa/libbalsa.c (ask_cert_real):
-       * libbalsa/smtp-server.c (libbalsa_smtp_server_dialog):
-       * libbalsa/source-viewer.c (libbalsa_show_message_source):
-       * libbalsa/x509-cert-widget.c (create_chain_widget):
-
-2020-06-07  Peter Bloomfield  <pbloomfield bellsouth net>
-
-       Various: Stop using GtkBox padding, fill and expand child properties
-
-       * libbalsa/identity.c (libbalsa_identity_select_dialog),
-       (libbalsa_identity_config_dialog):
-       * libbalsa/libbalsa-gpgme-cb.c (lb_gpgme_select_key):
-       * libbalsa/libbalsa-gpgme-widgets.c (libbalsa_gpgme_key),
-       (libbalsa_key_dialog), (create_key_label_with_warn),
-       (create_subkey_widget), (smime_show_chain):
-       * libbalsa/libbalsa.c (ask_cert_real):
-
-2020-06-06  Peter Bloomfield  <pbloomfield bellsouth net>
-
-       Various: Stop using GtkBox padding, fill and expand child properties
-
-       * libbalsa/address.c (libbalsa_address_get_edit_widget):
-       * libbalsa/autocrypt.c (autocrypt_db_dialog_run):
-       * libbalsa/html.c (libbalsa_html_new):
-
 2020-06-06  Peter Bloomfield  <pbloomfield bellsouth net>
 
        balsa-message: Do not crash
diff --git a/src/filter-edit-callbacks.c b/src/filter-edit-callbacks.c
index 0551c29b9..f2e0fb68d 100644
--- a/src/filter-edit-callbacks.c
+++ b/src/filter-edit-callbacks.c
@@ -1073,21 +1073,21 @@ build_type_notebook()
     button = gtk_button_new_with_mnemonic(_("A_dd"));
     gtk_widget_set_hexpand(button, TRUE);
     gtk_widget_set_halign(button, GTK_ALIGN_FILL);
-    gtk_container_add(GTK_CONTAINER(box), button);
+    gtk_box_pack_start(GTK_BOX(box), button, FALSE, FALSE, 0);
     g_signal_connect(button, "clicked",
                      G_CALLBACK(fe_add_pressed), NULL);
 
     fe_regex_remove_button = gtk_button_new_with_mnemonic(_("_Remove"));
     gtk_widget_set_hexpand(fe_regex_remove_button, TRUE);
     gtk_widget_set_halign(fe_regex_remove_button, GTK_ALIGN_FILL);
-    gtk_container_add(GTK_CONTAINER(box), fe_regex_remove_button);
+    gtk_box_pack_start(GTK_BOX(box), fe_regex_remove_button, FALSE, FALSE, 0);
     g_signal_connect(fe_regex_remove_button, "clicked",
                      G_CALLBACK(fe_remove_pressed), NULL);
 
     button = gtk_button_new_with_mnemonic(_("One _Matches/None Matches"));
     gtk_widget_set_hexpand(button, TRUE);
     gtk_widget_set_halign(button, GTK_ALIGN_FILL);
-    gtk_container_add(GTK_CONTAINER(box), button);
+    gtk_box_pack_start(GTK_BOX(box), button, FALSE, FALSE, 0);
     g_signal_connect(button, "clicked",
                      G_CALLBACK(fe_negate_condition), NULL);
 
@@ -1101,7 +1101,7 @@ build_type_notebook()
     label = gtk_label_new(msg);
     gtk_widget_set_hexpand(label, TRUE);
     gtk_widget_set_halign(label, GTK_ALIGN_FILL);
-    gtk_container_add(GTK_CONTAINER(box), label);
+    gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 0);
 #endif                  /* REGULAR_EXPRESSION_FILTERING_IS_IMPLEMENTED */
 
     /* The date page of the notebook */
@@ -1191,30 +1191,31 @@ void build_condition_dialog(GtkWidget * condition_dialog)
     label = gtk_label_new_with_mnemonic(_("Search T_ype:"));
     gtk_widget_set_margin_start(label, 5);
     gtk_widget_set_margin_end(label, 5);
-    gtk_container_add(GTK_CONTAINER(box), label);
+    gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 0);
 
     fe_search_option_menu =
         fe_build_option_menu(fe_search_type, G_N_ELEMENTS(fe_search_type),
                              G_CALLBACK(fe_typesmenu_cb), field_frame);
     gtk_widget_set_margin_start(fe_search_option_menu, 5);
     gtk_widget_set_margin_end(fe_search_option_menu, 5);
-    gtk_container_add(GTK_CONTAINER(box), fe_search_option_menu);
+    gtk_box_pack_start(GTK_BOX(box), fe_search_option_menu, FALSE, FALSE, 0);
     gtk_label_set_mnemonic_widget(GTK_LABEL(label), fe_search_option_menu);
 
-    content_box = gtk_dialog_get_content_area(GTK_DIALOG(condition_dialog));
+    content_box =
+        GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(condition_dialog)));
 
     gtk_widget_set_margin_top(box, 2);
     gtk_widget_set_margin_bottom(box, 2);
-    gtk_container_add(GTK_CONTAINER(content_box), box);
+    gtk_box_pack_start(content_box, box, FALSE, FALSE, 0);
 
     gtk_widget_set_margin_top(field_frame, 2);
     gtk_widget_set_margin_bottom(field_frame, 2);
-    gtk_container_add(GTK_CONTAINER(content_box), field_frame);
+    gtk_box_pack_start(content_box, field_frame, FALSE, FALSE, 0);
 
     build_type_notebook();
     gtk_widget_set_margin_top(fe_type_notebook, 2);
     gtk_widget_set_margin_bottom(fe_type_notebook, 2);
-    gtk_container_add(GTK_CONTAINER(content_box), fe_type_notebook);
+    gtk_box_pack_start(content_box, fe_type_notebook, FALSE, FALSE, 0);
 }
 
 /*
diff --git a/src/filter-edit-dialog.c b/src/filter-edit-dialog.c
index c9bbb5933..f5b73d9ab 100644
--- a/src/filter-edit-dialog.c
+++ b/src/filter-edit-dialog.c
@@ -219,7 +219,7 @@ build_left_side(void)
     /* new and delete buttons */
     bbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
 
-    gtk_container_add(GTK_CONTAINER(vbox), bbox);
+    gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
 
     /* new button */
     /* Translators: button "New" filter */
@@ -284,7 +284,7 @@ build_match_page()
                      G_CALLBACK(fe_action_changed), NULL);
     gtk_widget_set_margin_top(fe_op_codes_option_menu, 2);
     gtk_widget_set_margin_bottom(fe_op_codes_option_menu, 2);
-    gtk_container_add(GTK_CONTAINER(box), fe_op_codes_option_menu);
+    gtk_box_pack_start(GTK_BOX(box), fe_op_codes_option_menu, FALSE, FALSE, 0);
 
     /* list of conditions defining how this filter matches */
 
@@ -599,7 +599,11 @@ filters_edit_dialog(GtkWindow * parent)
     gtk_widget_set_halign(hbox, GTK_ALIGN_FILL);
     gtk_widget_set_margin_start(hbox, FILTER_EDIT_PADDING);
     gtk_widget_set_margin_end(hbox, FILTER_EDIT_PADDING);
-    gtk_container_add(GTK_CONTAINER(content_area), hbox);
+    gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(fe_window))), hbox);
+
+    gtk_widget_set_margin_start(piece, FILTER_EDIT_PADDING);
+    gtk_widget_set_margin_end(piece, FILTER_EDIT_PADDING);
+    gtk_box_pack_start(GTK_BOX(hbox), piece, FALSE, FALSE, 0);
 
     gtk_widget_set_margin_start(piece, FILTER_EDIT_PADDING);
     gtk_widget_set_margin_end(piece, FILTER_EDIT_PADDING);
@@ -615,7 +619,7 @@ filters_edit_dialog(GtkWindow * parent)
     gtk_widget_set_halign(fe_right_page, GTK_ALIGN_FILL);
     gtk_widget_set_margin_start(fe_right_page, FILTER_EDIT_PADDING);
     gtk_widget_set_margin_end(fe_right_page, FILTER_EDIT_PADDING);
-    gtk_container_add(GTK_CONTAINER(hbox), fe_right_page);
+    gtk_box_pack_start(GTK_BOX(hbox), fe_right_page, FALSE, FALSE, 0);
 
     fe_user_headers_list = NULL;
 
diff --git a/src/filter-export-dialog.c b/src/filter-export-dialog.c
index 815bdadaa..66093a43e 100644
--- a/src/filter-export-dialog.c
+++ b/src/filter-export-dialog.c
@@ -98,7 +98,7 @@ filters_export_dialog(GtkWindow * parent)
     gtk_widget_set_valign(sw, GTK_ALIGN_FILL);
     gtk_widget_set_margin_top(sw, 2);
     gtk_widget_set_margin_bottom(sw, 2);
-    gtk_container_add(GTK_CONTAINER(content_area), sw);
+    gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(fex_window))), sw);
 
     /* Populate the list of filters */
 
diff --git a/src/filter-run-dialog.c b/src/filter-run-dialog.c
index 17b110021..b386a377d 100644
--- a/src/filter-run-dialog.c
+++ b/src/filter-run-dialog.c
@@ -312,12 +312,12 @@ balsa_filter_run_dialog_init(BalsaFilterRunDialog *p)
 
     gtk_widget_set_vexpand(hbox, TRUE);
     gtk_widget_set_valign(hbox, GTK_ALIGN_FILL);
-    gtk_container_add(GTK_CONTAINER(content_area), hbox);
+    gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(p))), hbox);
 
     vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 2);
     gtk_widget_set_hexpand(vbox, TRUE);
     gtk_widget_set_halign(vbox, GTK_ALIGN_FILL);
-    gtk_container_add(GTK_CONTAINER(hbox), vbox);
+    gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0);
 
     p->available_filters =
         libbalsa_filter_list_new(TRUE, _("Name"), GTK_SELECTION_MULTIPLE,
@@ -345,7 +345,7 @@ balsa_filter_run_dialog_init(BalsaFilterRunDialog *p)
     gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_SPREAD);
     gtk_widget_set_margin_top(bbox, 2);
     gtk_widget_set_margin_bottom(bbox, 2);
-    gtk_container_add(GTK_CONTAINER(vbox), bbox);
+    gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
 
     /* "Apply selected" button */
     p->apply_selected_button = button =
@@ -390,7 +390,7 @@ balsa_filter_run_dialog_init(BalsaFilterRunDialog *p)
 
     gtk_widget_set_hexpand(vbox, TRUE);
     gtk_widget_set_halign(vbox, GTK_ALIGN_FILL);
-    gtk_container_add(GTK_CONTAINER(hbox),vbox);
+    gtk_box_pack_start(GTK_BOX(hbox),vbox, FALSE, FALSE, 0);
 
     sw = gtk_scrolled_window_new(NULL, NULL);
     gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
@@ -416,7 +416,7 @@ balsa_filter_run_dialog_init(BalsaFilterRunDialog *p)
 
     gtk_widget_set_margin_top(bbox, 2);
     gtk_widget_set_margin_bottom(bbox, 2);
-    gtk_container_add(GTK_CONTAINER(vbox), bbox);
+    gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
 
     /* up button */
     p->move_up_button = button =


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