[balsa/gtk4: 133/248] Various: Stop using GtkBox child properties
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk4: 133/248] Various: Stop using GtkBox child properties
- Date: Sun, 15 Nov 2020 20:14:02 +0000 (UTC)
commit 39c3158305936d1b2f4c7b9ad5c59f737c3ea426
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Sat Jun 6 17:40:54 2020 -0400
Various: Stop using GtkBox child properties
Stop using GtkBox padding, fill and expand child properties
Apparently, when the child is a GtkScrolledWindow, we must use
container_add(…) instead of pack_start(…, FALSE, FALSE, 0).
* libbalsa/address.c (libbalsa_address_get_edit_widget):
* libbalsa/autocrypt.c (autocrypt_db_dialog_run):
* libbalsa/html.c (libbalsa_html_new):
ChangeLog | 8 ++++++++
libbalsa/address.c | 10 ++++------
libbalsa/autocrypt.c | 1 +
libbalsa/html.c | 2 +-
4 files changed, 14 insertions(+), 7 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index a792d0500..3ee06265e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -622,6 +622,14 @@
* libbalsa/autocrypt.c (autocrypt_db_dialog_run):
* libbalsa/html.c (libbalsa_html_new):
+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/libbalsa/address.c b/libbalsa/address.c
index 23f4f9105..42266df8c 100644
--- a/libbalsa/address.c
+++ b/libbalsa/address.c
@@ -1003,12 +1003,10 @@ libbalsa_address_get_edit_widget(LibBalsaAddress *address,
GtkWidget *tree_view;
entries[cnt] = lba_addr_list_widget(changed_cb, changed_data);
- gtk_widget_set_margin_top(label, 1);
- gtk_widget_set_margin_bottom(label, 1);
- gtk_container_add(GTK_CONTAINER(box), label);
- gtk_widget_set_margin_top(but, 1);
- gtk_widget_set_margin_bottom(but, 1);
- gtk_container_add(GTK_CONTAINER(box), but);
+ g_object_set(label, "margin", 1, NULL);
+ gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 0);
+ g_object_set(but, "margin", 1, NULL);
+ gtk_box_pack_start(GTK_BOX(box), but, FALSE, FALSE, 0);
lhs = box;
tree_view = gtk_frame_get_child(GTK_FRAME(entries[cnt]));
g_signal_connect(but, "clicked", G_CALLBACK(add_row), tree_view);
diff --git a/libbalsa/autocrypt.c b/libbalsa/autocrypt.c
index 247d77ee1..713b02c07 100644
--- a/libbalsa/autocrypt.c
+++ b/libbalsa/autocrypt.c
@@ -444,6 +444,7 @@ autocrypt_db_dialog_run(const gchar *date_string, GtkWindow *parent)
label = gtk_label_new(_("Double-click key to show details"));
gtk_widget_set_halign(label, GTK_ALIGN_START);
+ gtk_widget_set_valign(label, GTK_ALIGN_FILL);
gtk_container_add(GTK_CONTAINER(vbox), label);
scrolled_window = gtk_scrolled_window_new();
diff --git a/libbalsa/html.c b/libbalsa/html.c
index 79773af50..48d91d763 100644
--- a/libbalsa/html.c
+++ b/libbalsa/html.c
@@ -775,7 +775,7 @@ libbalsa_html_new(LibBalsaMessageBody * body,
gtk_widget_set_vexpand(GTK_WIDGET(info->web_view), TRUE);
gtk_widget_set_valign(GTK_WIDGET(info->web_view), GTK_ALIGN_FILL);
- gtk_container_add(GTK_CONTAINER(vbox), GTK_WIDGET(info->web_view));
+ gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(info->web_view), FALSE, FALSE, 0);
webkit_web_view_load_html(info->web_view, text, NULL);
g_free(text);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]