[balsa/gtk4: 73/283] Various: Stop using GtkBox child properties
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk4: 73/283] Various: Stop using GtkBox child properties
- Date: Sun, 3 Jan 2021 00:24:35 +0000 (UTC)
commit f4606c2421b3e968ca37eda4c81dcefaa22159d9
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Sun Jun 7 14:25:32 2020 -0400
Various: Stop using GtkBox child properties
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):
ChangeLog | 10 ++++++++++
libinit_balsa/assistant_page_defclient.c | 23 +++++++++++++++++++----
libinit_balsa/assistant_page_directory.c | 4 ++--
libinit_balsa/assistant_page_user.c | 8 ++++++--
4 files changed, 37 insertions(+), 8 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 175e8aea7..8825a7345 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -515,6 +515,16 @@
* src/filter-run-dialog.c (balsa_filter_run_dialog_new): call
prepare-threading to get ready for filtering.
+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
diff --git a/libinit_balsa/assistant_page_defclient.c b/libinit_balsa/assistant_page_defclient.c
index 9f1d8921b..92c6b2f3c 100644
--- a/libinit_balsa/assistant_page_defclient.c
+++ b/libinit_balsa/assistant_page_defclient.c
@@ -45,6 +45,7 @@ balsa_druid_page_defclient_init(BalsaDruidPageDefclient * defclient,
{
GtkLabel *label;
GtkWidget *yes, *no;
+ GtkWidget *widget;
defclient->default_client = 1;
balsa_app.default_client = defclient->default_client;
@@ -57,15 +58,29 @@ balsa_druid_page_defclient_init(BalsaDruidPageDefclient * defclient,
yes = gtk_radio_button_new_with_mnemonic(NULL, _("_Yes"));
no = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(yes),
- _("_No"));
+ _("_No"));
g_signal_connect(yes, "toggled",
G_CALLBACK(balsa_druid_page_defclient_toggle),
defclient);
- gtk_box_pack_start(GTK_BOX(page), GTK_WIDGET(label), TRUE, TRUE, 8);
- gtk_box_pack_start(GTK_BOX(page), GTK_WIDGET(yes), TRUE, TRUE, 2);
- gtk_box_pack_start(GTK_BOX(page), GTK_WIDGET(no), TRUE, TRUE, 2);
+ widget = GTK_WIDGET(label);
+ gtk_widget_set_vexpand(widget, TRUE);
+ gtk_widget_set_valign(widget, GTK_ALIGN_FILL);
+ gtk_widget_set_margin_top(widget, 8);
+ gtk_box_pack_start(GTK_BOX(page), widget, FALSE, FALSE, 0);
+
+ widget = GTK_WIDGET(yes);
+ gtk_widget_set_vexpand(widget, TRUE);
+ gtk_widget_set_valign(widget, GTK_ALIGN_FILL);
+ gtk_widget_set_margin_top(widget, 2);
+ gtk_box_pack_start(GTK_BOX(page), widget, FALSE, FALSE, 0);
+
+ widget = GTK_WIDGET(no);
+ gtk_widget_set_vexpand(widget, TRUE);
+ gtk_widget_set_valign(widget, GTK_ALIGN_FILL);
+ gtk_widget_set_margin_top(widget, 2);
+ gtk_box_pack_start(GTK_BOX(page), widget, FALSE, FALSE, 0);
return;
}
diff --git a/libinit_balsa/assistant_page_directory.c b/libinit_balsa/assistant_page_directory.c
index dda56c2b4..b2ff30d00 100644
--- a/libinit_balsa/assistant_page_directory.c
+++ b/libinit_balsa/assistant_page_directory.c
@@ -301,8 +301,8 @@ balsa_druid_page_directory_init(BalsaDruidPageDirectory * dir,
g_free(preset);
}
- gtk_box_pack_start(GTK_BOX(page), GTK_WIDGET(grid), FALSE, TRUE,
- 0);
+ gtk_widget_set_valign(GTK_WIDGET(grid), GTK_ALIGN_FILL);
+ gtk_box_pack_start(GTK_BOX(page), GTK_WIDGET(grid), FALSE, FALSE, 0);
gtk_widget_show_all(GTK_WIDGET(grid));
gtk_box_pack_end(GTK_BOX(page), verify_button(dir), FALSE, FALSE, 0);
diff --git a/libinit_balsa/assistant_page_user.c b/libinit_balsa/assistant_page_user.c
index c8f3160f2..09f7bc3a4 100644
--- a/libinit_balsa/assistant_page_user.c
+++ b/libinit_balsa/assistant_page_user.c
@@ -87,7 +87,8 @@ balsa_druid_page_user_init(BalsaDruidPageUser * user,
user->ed4.controller = &(user->econtroller);
label = GTK_LABEL(gtk_label_new(_(header2)));
gtk_label_set_line_wrap(label, TRUE);
- gtk_box_pack_start(GTK_BOX(page), GTK_WIDGET(label), FALSE, TRUE, 0);
+ gtk_widget_set_valign(GTK_WIDGET(label), GTK_ALIGN_FILL);
+ gtk_box_pack_start(GTK_BOX(page), GTK_WIDGET(label), FALSE, FALSE, 0);
grid = GTK_GRID(gtk_grid_new());
gtk_grid_set_row_spacing(grid, 2);
@@ -150,7 +151,10 @@ balsa_druid_page_user_init(BalsaDruidPageUser * user,
&(user->ed4), druid, page,
&(user->localmaildir));
g_free(preset);
- gtk_box_pack_start(GTK_BOX(page), GTK_WIDGET(grid), FALSE, FALSE, 3);
+
+ gtk_widget_set_margin_top(GTK_WIDGET(grid), 3);
+ gtk_widget_set_margin_bottom(GTK_WIDGET(grid), 3);
+ gtk_box_pack_start(GTK_BOX(page), GTK_WIDGET(grid), FALSE, FALSE, 0);
user->need_set = FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]