[balsa/stop-using-gtkbox-child-properties: 14/15] Various: Stop using GtkBox child properties
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/stop-using-gtkbox-child-properties: 14/15] Various: Stop using GtkBox child properties
- Date: Sun, 28 Jun 2020 15:41:00 +0000 (UTC)
commit 6ec0c56d9297c7ff3e2163f705c6dff49a10b522
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 58108fbbe..ba09f2cae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -34,6 +34,15 @@
* libbalsa/libbalsa-gpgme-cb.c (row_activated_cb),
(lb_gpgme_select_key):
+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 800c7e8e7..8d5fe3229 100644
--- a/src/toolbar-prefs.c
+++ b/src/toolbar-prefs.c
@@ -141,7 +141,9 @@ customize_dialog_cb(GtkWidget * widget, gpointer data)
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);
@@ -392,7 +394,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);
@@ -408,9 +410,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 */
@@ -433,7 +433,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]