[balsa/gtk4: 122/294] Various: Stop using GtkBox child properties
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk4: 122/294] Various: Stop using GtkBox child properties
- Date: Sun, 10 Oct 2021 00:03:00 +0000 (UTC)
commit f2f9a33f8a831568d4310992872d559056aba814
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Tue Jun 9 16:48:29 2020 -0400
Various: Stop using GtkBox child properties
Stop using GtkBox padding, fill and expand child properties
* src/main-window.c (bw_notebook_label_new): use container-add
instead of box-pack, to avoid ridiculously wide tabs;
* src/sendmsg-window.c (sw_get_user_codeset),
(quote_parts_select_dlg), (subject_not_empty),
(sendmsg_window_new):
ChangeLog | 10 ++++++++++
src/main-window.c | 4 +---
src/sendmsg-window.c | 16 ++++++++--------
3 files changed, 19 insertions(+), 11 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index fc62eac1d..c595794b6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -627,6 +627,16 @@
* src/main-window.c (bw_create_index_widget), (bw_set_panes),
(balsa_window_new), (bw_notebook_label_new), (bw_find_real):
+2020-06-09 Peter Bloomfield <pbloomfield bellsouth net>
+
+ Various: Stop using GtkBox padding, fill and expand child properties
+
+ * src/main-window.c (bw_notebook_label_new): use container-add
+ instead of box-pack, to avoid ridiculously wide tabs;
+ * src/sendmsg-window.c (sw_get_user_codeset),
+ (quote_parts_select_dlg), (subject_not_empty),
+ (sendmsg_window_new):
+
2020-06-09 Peter Bloomfield <pbloomfield bellsouth net>
Various: Stop using GtkBox padding, fill and expand child properties
diff --git a/src/main-window.c b/src/main-window.c
index 19159c084..fdcb6e0b4 100644
--- a/src/main-window.c
+++ b/src/main-window.c
@@ -2847,9 +2847,7 @@ bw_notebook_label_new(BalsaMailboxNode * mbnode)
libbalsa_mailbox_get_unread(balsa_mailbox_node_get_mailbox(mbnode)) > 0);
g_signal_connect_object(balsa_mailbox_node_get_mailbox(mbnode), "changed",
G_CALLBACK(bw_mailbox_changed), lab, 0);
- gtk_widget_set_hexpand(lab, TRUE);
- gtk_widget_set_halign(lab, GTK_ALIGN_FILL);
- gtk_box_pack_start(GTK_BOX(box), lab, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(box), lab);
but = gtk_button_new();
gtk_widget_set_focus_on_click(but, FALSE);
diff --git a/src/sendmsg-window.c b/src/sendmsg-window.c
index 1d4e962cb..f8be466f3 100644
--- a/src/sendmsg-window.c
+++ b/src/sendmsg-window.c
@@ -1499,7 +1499,7 @@ sw_get_user_codeset(BalsaSendmsg * bsmsg, gboolean * change_type,
#endif
g_free(msg);
- content_box = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
+ content_box = GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog)));
gtk_widget_set_margin_top(info, 5);
gtk_widget_set_margin_bottom(info, 5);
@@ -3380,17 +3380,17 @@ quote_parts_select_dlg(GtkTreeStore *tree_store,
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 12);
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 12);
- gtk_container_add(GTK_CONTAINER(vbox), label);
- gtk_container_add(GTK_CONTAINER(hbox), image);
+ gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(hbox), image, FALSE, FALSE, 0);
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);
- content_box = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
+ content_box = GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog)));
gtk_widget_set_vexpand(hbox, TRUE);
gtk_widget_set_valign(hbox, GTK_ALIGN_FILL);
- gtk_container_add(GTK_CONTAINER(content_box), hbox);
+ gtk_box_pack_start(content_box, hbox, FALSE, FALSE, 0);
if (stats->decrypted > 0U) {
GtkWidget *warning;
@@ -5147,7 +5147,7 @@ subject_not_empty(BalsaSendmsg * bsmsg)
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 12);
gtk_widget_set_vexpand(hbox, TRUE);
gtk_widget_set_valign(hbox, GTK_ALIGN_FILL);
- gtk_container_add(GTK_CONTAINER(dialog_vbox), hbox);
+ gtk_box_pack_start(GTK_BOX(dialog_vbox), hbox, FALSE, FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 6);
image = gtk_image_new_from_icon_name("dialog-question",
@@ -5158,7 +5158,7 @@ subject_not_empty(BalsaSendmsg * bsmsg)
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 12);
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);
text_str = g_strdup_printf("<span weight=\"bold\" size=\"larger\">%s</span>\n\n%s",
_("You did not specify a subject for this message"),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]