[balsa/gtk4: 131/196] Various: Replace gtk_box_pack_{start,end}()
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk4: 131/196] Various: Replace gtk_box_pack_{start,end}()
- Date: Fri, 16 Oct 2020 22:50:01 +0000 (UTC)
commit e7f1a5a54763a1f3cc602bd635635bba5ad10253
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Thu Aug 27 14:46:50 2020 -0400
Various: Replace gtk_box_pack_{start,end}()
with gtk_container_add().
libbalsa/address.c
libbalsa/html.c
libbalsa/identity.c
libbalsa/libbalsa-gpgme-cb.c
libbalsa/libbalsa-gpgme-widgets.c
libbalsa/libbalsa-progress.c
libbalsa/libbalsa.c
libbalsa/smtp-server.c
libbalsa/source-viewer.c
libbalsa/x509-cert-widget.c
libinit_balsa/assistant_page_defclient.c
libinit_balsa/assistant_page_directory.c
libinit_balsa/assistant_page_user.c
src/ab-main.c
src/ab-window.c
src/balsa-message.c
src/balsa-mime-widget-crypto.c
src/balsa-mime-widget-message.c
src/balsa-mime-widget.c
src/filter-edit-callbacks.c
src/filter-edit-dialog.c
src/filter-run-dialog.c
src/folder-conf.c
src/main-window.c
src/message-window.c
src/pref-manager.c
src/print-gtk.c
src/sendmsg-window.c
src/spell-check.c
src/store-address.c
src/toolbar-prefs.c
libbalsa/address.c | 4 ++--
libbalsa/html.c | 2 +-
libbalsa/identity.c | 10 +++++-----
libbalsa/libbalsa-gpgme-cb.c | 4 ++--
libbalsa/libbalsa-gpgme-widgets.c | 10 +++++-----
libbalsa/libbalsa.c | 4 ++--
libbalsa/smtp-server.c | 2 +-
libbalsa/source-viewer.c | 2 +-
libbalsa/x509-cert-widget.c | 2 +-
libinit_balsa/assistant_page_defclient.c | 6 +++---
libinit_balsa/assistant_page_user.c | 4 ++--
src/ab-main.c | 12 ++++++------
src/ab-window.c | 16 ++++++++--------
src/balsa-message.c | 14 ++------------
src/balsa-mime-widget-crypto.c | 6 +++---
src/balsa-mime-widget-message.c | 10 +++++-----
src/balsa-mime-widget.c | 7 +++----
src/filter-edit-callbacks.c | 25 ++++++++++++-------------
src/filter-edit-dialog.c | 13 ++++---------
src/filter-run-dialog.c | 10 +++++-----
src/folder-conf.c | 4 ++--
src/main-window.c | 22 +++++++++++-----------
src/sendmsg-window.c | 18 +++++++++---------
src/toolbar-prefs.c | 8 ++++----
24 files changed, 99 insertions(+), 116 deletions(-)
---
diff --git a/libbalsa/address.c b/libbalsa/address.c
index 54e480702..23f4f9105 100644
--- a/libbalsa/address.c
+++ b/libbalsa/address.c
@@ -1005,10 +1005,10 @@ libbalsa_address_get_edit_widget(LibBalsaAddress *address,
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_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(box), label);
gtk_widget_set_margin_top(but, 1);
gtk_widget_set_margin_bottom(but, 1);
- gtk_box_pack_start(GTK_BOX(box), but, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(box), but);
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/html.c b/libbalsa/html.c
index 48d91d763..79773af50 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_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(info->web_view), FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(vbox), GTK_WIDGET(info->web_view));
webkit_web_view_load_html(info->web_view, text, NULL);
g_free(text);
diff --git a/libbalsa/identity.c b/libbalsa/identity.c
index c88fce3bd..84dfb2256 100644
--- a/libbalsa/identity.c
+++ b/libbalsa/identity.c
@@ -386,9 +386,9 @@ libbalsa_identity_select_dialog(GtkWindow * parent,
frame = gtk_frame_new(NULL);
gtk_widget_set_vexpand(frame, TRUE);
gtk_widget_set_valign(frame, GTK_ALIGN_FILL);
- gtk_box_pack_start(GTK_BOX
+ gtk_container_add(GTK_CONTAINER
(gtk_dialog_get_content_area(GTK_DIALOG(dialog))),
- frame, FALSE, FALSE, 0);
+ frame);
gtk_container_add(GTK_CONTAINER(frame), tree);
gtk_container_set_border_width(GTK_CONTAINER(frame), padding);
@@ -1677,9 +1677,9 @@ libbalsa_identity_config_dialog(GtkWindow *parent, GList **identities,
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, padding);
gtk_widget_set_vexpand(hbox, TRUE);
gtk_widget_set_valign(hbox, GTK_ALIGN_FILL);
- gtk_box_pack_start(GTK_BOX
+ gtk_container_add(GTK_CONTAINER
(gtk_dialog_get_content_area(GTK_DIALOG(dialog))),
- hbox, FALSE, FALSE, 0);
+ hbox);
gtk_container_add(GTK_CONTAINER(hbox), frame);
@@ -1694,7 +1694,7 @@ libbalsa_identity_config_dialog(GtkWindow *parent, GList **identities,
gtk_widget_set_hexpand(display_frame, TRUE);
gtk_widget_set_halign(display_frame, GTK_ALIGN_FILL);
- gtk_box_pack_start(GTK_BOX(hbox), display_frame, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(hbox), display_frame);
select = gtk_tree_view_get_selection(tree);
g_signal_connect(select, "changed",
diff --git a/libbalsa/libbalsa-gpgme-cb.c b/libbalsa/libbalsa-gpgme-cb.c
index 44fc079bf..d06aef9eb 100644
--- a/libbalsa/libbalsa-gpgme-cb.c
+++ b/libbalsa/libbalsa-gpgme-cb.c
@@ -219,11 +219,11 @@ lb_gpgme_select_key(const gchar * user_name, lb_key_sel_md_t mode, GList * keys,
}
label = libbalsa_create_wrap_label(prompt, FALSE);
g_free(prompt);
- gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(vbox), label);
label = gtk_label_new(_("Double-click key to show details"));
gtk_widget_set_halign(label, GTK_ALIGN_START);
- gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(vbox), label);
scrolled_window = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW
diff --git a/libbalsa/libbalsa-gpgme-widgets.c b/libbalsa/libbalsa-gpgme-widgets.c
index 77fdf8de4..244499f30 100644
--- a/libbalsa/libbalsa-gpgme-widgets.c
+++ b/libbalsa/libbalsa-gpgme-widgets.c
@@ -222,7 +222,7 @@ libbalsa_gpgme_key(const gpgme_key_t key,
gtk_widget_set_margin_top(subkey_widget, 2);
gtk_widget_set_margin_bottom(subkey_widget, 2);
- gtk_box_pack_start(GTK_BOX(subkey_box), subkey_widget, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(subkey_box), subkey_widget);
}
} else if ((((subkey_capa & GPG_SUBKEY_CAP_SIGN) != 0U) && (subkey->can_sign != 0)) ||
(((subkey_capa & GPG_SUBKEY_CAP_ENCRYPT) != 0U) &&
(subkey->can_encrypt != 0)) ||
@@ -232,7 +232,7 @@ libbalsa_gpgme_key(const gpgme_key_t key,
gtk_widget_set_margin_top(subkey_widget, 2);
gtk_widget_set_margin_bottom(subkey_widget, 2);
- gtk_box_pack_start(GTK_BOX(subkey_box), subkey_widget, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(subkey_box), subkey_widget);
} else {
/* do not print this subkey */
}
@@ -415,7 +415,7 @@ libbalsa_key_dialog(GtkWindow *parent,
gtk_container_set_border_width(GTK_CONTAINER(hbox), 6);
gtk_widget_set_vexpand(hbox, TRUE);
gtk_widget_set_valign(hbox, GTK_ALIGN_FILL);
- gtk_box_pack_start(GTK_BOX(content_area), hbox, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(content_area), hbox);
gtk_box_set_homogeneous(GTK_BOX(hbox), FALSE);
/* standard key icon; "application-certificate" would be an alternative... */
@@ -426,7 +426,7 @@ libbalsa_key_dialog(GtkWindow *parent,
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 6);
gtk_widget_set_hexpand(vbox, TRUE);
gtk_widget_set_halign(vbox, GTK_ALIGN_FILL);
- gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(hbox), vbox);
gtk_box_set_homogeneous(GTK_BOX(vbox), FALSE);
if (message1 != NULL) {
@@ -791,7 +791,7 @@ smime_show_chain(GtkWidget *button, gpointer G_GNUC_UNUSED user_data)
gtk_widget_set_valign(chain, GTK_ALIGN_FILL);
gtk_widget_set_margin_top(chain, 6);
gtk_widget_set_margin_bottom(chain, 6);
- gtk_box_pack_start(GTK_BOX(vbox), chain, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(vbox), chain);
gtk_widget_show_all(vbox);
gtk_dialog_run(GTK_DIALOG(dialog));
diff --git a/libbalsa/libbalsa.c b/libbalsa/libbalsa.c
index 003d6c7b9..e4c76d5e0 100644
--- a/libbalsa/libbalsa.c
+++ b/libbalsa/libbalsa.c
@@ -421,14 +421,14 @@ ask_cert_real(void *data)
gtk_label_set_use_markup(GTK_LABEL(label), TRUE);
gtk_widget_set_margin_top(label, 1);
gtk_widget_set_margin_bottom(label, 1);
- gtk_box_pack_start(GTK_BOX(content_area), label, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(content_area), label);
gtk_widget_show(label);
gtk_widget_set_vexpand(cert_widget, TRUE);
gtk_widget_set_valign(cert_widget, GTK_ALIGN_FILL);
gtk_widget_set_margin_top(cert_widget, 1);
gtk_widget_set_margin_bottom(cert_widget, 1);
- gtk_box_pack_start(GTK_BOX(content_area), cert_widget, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(content_area), cert_widget);
gtk_widget_show_all(cert_widget);
switch(gtk_dialog_run(GTK_DIALOG(dialog))) {
diff --git a/libbalsa/smtp-server.c b/libbalsa/smtp-server.c
index 122673780..d1f3c1461 100644
--- a/libbalsa/smtp-server.c
+++ b/libbalsa/smtp-server.c
@@ -352,7 +352,7 @@ libbalsa_smtp_server_dialog(LibBalsaSmtpServer * smtp_server,
sdi->big_message = gtk_spin_button_new_with_range(0.1, 100, 0.1);
gtk_widget_set_hexpand(sdi->big_message, TRUE);
gtk_widget_set_halign(sdi->big_message, GTK_ALIGN_FILL);
- gtk_box_pack_start(GTK_BOX(hbox), sdi->big_message, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(hbox), sdi->big_message);
label = gtk_label_new(_("MB"));
gtk_container_add(GTK_CONTAINER(hbox), label);
if (smtp_server->big_message > 0) {
diff --git a/libbalsa/source-viewer.c b/libbalsa/source-viewer.c
index ee30c4c6b..8873f16f0 100644
--- a/libbalsa/source-viewer.c
+++ b/libbalsa/source-viewer.c
@@ -238,7 +238,7 @@ libbalsa_show_message_source(GtkApplication * application,
#else
gtk_widget_set_margin_top(menu_bar, 1);
gtk_widget_set_margin_bottom(menu_bar, 1);
- gtk_box_pack_start(GTK_BOX(vbox), menu_bar, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(vbox), menu_bar);
#endif
gtk_widget_set_vexpand(interior, TRUE);
diff --git a/libbalsa/x509-cert-widget.c b/libbalsa/x509-cert-widget.c
index 6e8df2299..c4653586e 100644
--- a/libbalsa/x509-cert-widget.c
+++ b/libbalsa/x509-cert-widget.c
@@ -185,7 +185,7 @@ create_chain_widget(GList *cert_list)
gtk_widget_set_valign(stack, GTK_ALIGN_FILL);
gtk_widget_set_margin_top(stack, 6U);
gtk_widget_set_margin_bottom(stack, 6U);
- gtk_box_pack_start(GTK_BOX(vbox), stack, FALSE, FALSE, 0U);
+ gtk_container_add(GTK_CONTAINER(vbox), stack);
g_signal_connect(tree_view, "row-activated", G_CALLBACK(cert_selected_cb), stack);
is_root = TRUE;
diff --git a/libinit_balsa/assistant_page_defclient.c b/libinit_balsa/assistant_page_defclient.c
index cf0cf9c88..0ee710d71 100644
--- a/libinit_balsa/assistant_page_defclient.c
+++ b/libinit_balsa/assistant_page_defclient.c
@@ -69,21 +69,21 @@ balsa_druid_page_defclient_init(BalsaDruidPageDefclient * defclient,
gtk_widget_set_valign(widget, GTK_ALIGN_FILL);
gtk_widget_set_margin_top(widget, 8);
gtk_widget_set_margin_bottom(widget, 8);
- gtk_box_pack_start(GTK_BOX(page), widget, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(page), widget);
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_widget_set_margin_bottom(widget, 2);
- gtk_box_pack_start(GTK_BOX(page), widget, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(page), widget);
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_widget_set_margin_bottom(widget, 2);
- gtk_box_pack_start(GTK_BOX(page), widget, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(page), widget);
return;
}
diff --git a/libinit_balsa/assistant_page_user.c b/libinit_balsa/assistant_page_user.c
index e6aef96f4..303b4d1b8 100644
--- a/libinit_balsa/assistant_page_user.c
+++ b/libinit_balsa/assistant_page_user.c
@@ -89,7 +89,7 @@ balsa_druid_page_user_init(BalsaDruidPageUser * user,
gtk_label_set_line_wrap(label, TRUE);
gtk_widget_set_vexpand(GTK_WIDGET(label), TRUE);
gtk_widget_set_valign(GTK_WIDGET(label), GTK_ALIGN_FILL);
- gtk_box_pack_start(GTK_BOX(page), GTK_WIDGET(label), FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(page), GTK_WIDGET(label));
grid = GTK_GRID(gtk_grid_new());
gtk_grid_set_row_spacing(grid, 2);
@@ -155,7 +155,7 @@ balsa_druid_page_user_init(BalsaDruidPageUser * user,
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);
+ gtk_container_add(GTK_CONTAINER(page), GTK_WIDGET(grid));
user->need_set = FALSE;
}
diff --git a/src/ab-main.c b/src/ab-main.c
index 3f6ac5de0..7e7afc545 100644
--- a/src/ab-main.c
+++ b/src/ab-main.c
@@ -878,7 +878,7 @@ bab_get_filter_box(void)
widget = find_label;
gtk_widget_set_margin_start(widget, 1);
gtk_widget_set_margin_end(widget, 1);
- gtk_box_pack_start(GTK_BOX(search_hbox), widget, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(search_hbox), widget);
find_entry = gtk_entry_new();
gtk_widget_show(find_entry);
@@ -888,7 +888,7 @@ bab_get_filter_box(void)
gtk_widget_set_halign(widget, GTK_ALIGN_FILL);
gtk_widget_set_margin_start(widget, 1);
gtk_widget_set_margin_end(widget, 1);
- gtk_box_pack_start(GTK_BOX(search_hbox), widget, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(search_hbox), widget);
gtk_widget_show(search_hbox);
gtk_label_set_mnemonic_widget(GTK_LABEL(find_label), find_entry);
@@ -901,7 +901,7 @@ bab_get_filter_box(void)
widget = button;
gtk_widget_set_margin_start(widget, 1);
gtk_widget_set_margin_end(widget, 1);
- gtk_box_pack_start(GTK_BOX(search_hbox), widget, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(search_hbox), widget);
g_signal_connect(find_entry, "activate",
G_CALLBACK(bab_filter_entry_activate),
@@ -968,7 +968,7 @@ bab_window_new(GtkApplication * application)
widget = bab_get_filter_box();
gtk_widget_set_margin_top(widget, 1);
gtk_widget_set_margin_bottom(widget, 1);
- gtk_box_pack_start(GTK_BOX(browse_widget), widget, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(browse_widget), widget);
scroll = gtk_scrolled_window_new(NULL, NULL);
gtk_widget_show(scroll);
@@ -997,12 +997,12 @@ bab_window_new(GtkApplication * application)
widget = contacts_app.edit_widget;
gtk_widget_set_margin_top(widget, 1);
gtk_widget_set_margin_bottom(widget, 1);
- gtk_box_pack_start(GTK_BOX(edit_widget), widget, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(edit_widget), widget);
widget = bab_get_edit_button_box(&contacts_app);
gtk_widget_set_margin_top(widget, 1);
gtk_widget_set_margin_bottom(widget, 1);
- gtk_box_pack_start(GTK_BOX(edit_widget), widget, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(edit_widget), widget);
gtk_notebook_append_page(GTK_NOTEBOOK(contacts_app.notebook), edit_widget,
gtk_label_new(_("Edit")));
diff --git a/src/ab-window.c b/src/ab-window.c
index d0c8bacd3..c19884cb0 100644
--- a/src/ab-window.c
+++ b/src/ab-window.c
@@ -287,7 +287,7 @@ balsa_ab_window_init(BalsaAbWindow *ab)
gtk_grid_set_column_spacing(GTK_GRID(grid), 12);
gtk_widget_set_vexpand(grid, TRUE);
gtk_widget_set_valign(grid, GTK_ALIGN_FILL);
- gtk_box_pack_start(GTK_BOX(vbox), grid, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(vbox), grid);
gtk_widget_show(grid);
/* -- grid column 1 -- */
@@ -304,10 +304,10 @@ balsa_ab_window_init(BalsaAbWindow *ab)
/* Pack the find stuff into the grid */
box2 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 1);
gtk_grid_attach(GTK_GRID(grid), box2, 0, 0, 1, 1);
- gtk_box_pack_start(GTK_BOX(box2), find_label, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(box2), find_label);
gtk_widget_set_vexpand(ab->filter_entry, TRUE);
gtk_widget_set_valign(ab->filter_entry, GTK_ALIGN_FILL);
- gtk_box_pack_start(GTK_BOX(box2), ab->filter_entry, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(box2), ab->filter_entry);
gtk_widget_show(GTK_WIDGET(box2));
@@ -350,7 +350,7 @@ balsa_ab_window_init(BalsaAbWindow *ab)
w = gtk_button_new_from_icon_name("go-next-symbolic",
GTK_ICON_SIZE_BUTTON);
gtk_widget_set_vexpand(w, TRUE);
- gtk_box_pack_start(GTK_BOX(ab->arrow_box), w, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(ab->arrow_box), w);
gtk_widget_show(w);
g_signal_connect(w, "clicked",
G_CALLBACK(balsa_ab_window_move_to_recipient_list),
@@ -359,7 +359,7 @@ balsa_ab_window_init(BalsaAbWindow *ab)
w = gtk_button_new_from_icon_name("go-previous-symbolic",
GTK_ICON_SIZE_BUTTON);
gtk_widget_set_vexpand(w, TRUE);
- gtk_box_pack_start(GTK_BOX(ab->arrow_box), w, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(ab->arrow_box), w);
gtk_widget_show(w);
g_signal_connect(w, "clicked",
G_CALLBACK(balsa_ab_window_remove_from_recipient_list),
@@ -408,11 +408,11 @@ balsa_ab_window_init(BalsaAbWindow *ab)
gtk_widget_set_margin_top(ab->single_address_mode_radio, 1);
gtk_widget_set_margin_bottom(ab->single_address_mode_radio, 1);
- gtk_box_pack_start(GTK_BOX(box2), ab->single_address_mode_radio, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(box2), ab->single_address_mode_radio);
gtk_widget_set_margin_top(ab->dist_address_mode_radio, 1);
gtk_widget_set_margin_bottom(ab->dist_address_mode_radio, 1);
- gtk_box_pack_start(GTK_BOX(box2), ab->dist_address_mode_radio, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(box2), ab->dist_address_mode_radio);
gtk_widget_show(box2);
@@ -422,7 +422,7 @@ balsa_ab_window_init(BalsaAbWindow *ab)
gtk_widget_set_margin_top(frame, 1);
gtk_widget_set_margin_bottom(frame, 1);
- gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(vbox), frame);
gtk_widget_grab_focus(ab->filter_entry);
}
diff --git a/src/balsa-message.c b/src/balsa-message.c
index be32586eb..c6a7ed8f5 100644
--- a/src/balsa-message.c
+++ b/src/balsa-message.c
@@ -550,7 +550,7 @@ bm_find_bar_new(BalsaMessage * balsa_message)
gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_BOTH_HORIZ);
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
- gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new(_("Find:")), FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(hbox), gtk_label_new(_("Find:")));
balsa_message->find_entry = gtk_search_entry_new();
g_signal_connect(balsa_message->find_entry, "search-changed",
G_CALLBACK(bm_find_entry_changed_cb), balsa_message);
@@ -1007,16 +1007,6 @@ balsa_message_init(BalsaMessage * balsa_message)
balsa_message->find_bar = bm_find_bar_new(balsa_message);
gtk_container_add(GTK_CONTAINER(vbox), balsa_message->find_bar);
- /* The context menu that is popped up when more than one part is selected */
- balsa_message_add_actions(balsa_message, "message-menu");
-
- menu = g_menu_new();
- g_menu_append(menu, _("Save selected as…"), "save-selected");
- g_menu_append(menu, _("Save selected to folder…"), "save-selected-to-folder");
- balsa_message->save_all_popup =
- libbalsa_popup_widget_new(balsa_message->treeview, G_MENU_MODEL(menu), "message-menu");
- g_object_unref(menu);
-
gtk_widget_show_all(GTK_WIDGET(balsa_message));
}
@@ -2300,7 +2290,7 @@ add_part(BalsaMessage * balsa_message, BalsaPartInfo * info, GtkWidget * contain
if (info->mime_widget == NULL)
part_info_init(balsa_message, info);
- gtk_box_pack_start(GTK_BOX(container), GTK_WIDGET(info->mime_widget), FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(container), GTK_WIDGET(info->mime_widget));
info_container = balsa_mime_widget_get_container(info->mime_widget);
body = add_multipart(balsa_message, info->body,
diff --git a/src/balsa-mime-widget-crypto.c b/src/balsa-mime-widget-crypto.c
index f7d2690d4..3fb97d80d 100644
--- a/src/balsa-mime-widget-crypto.c
+++ b/src/balsa-mime-widget-crypto.c
@@ -136,7 +136,7 @@ balsa_mime_widget_signature_widget(LibBalsaMessageBody * mime_body,
gtk_widget_set_vexpand(hbox, TRUE);
gtk_widget_set_valign(hbox, GTK_ALIGN_FILL);
- gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(vbox), hbox);
if (g_mime_gpgme_sigstat_status(mime_body->sig_info) == GPG_ERR_NO_PUBKEY) {
#ifdef ENABLE_AUTOCRYPT
GBytes *autocrypt_key;
@@ -149,7 +149,7 @@ balsa_mime_widget_signature_widget(LibBalsaMessageBody * mime_body,
g_signal_connect(button, "clicked", G_CALLBACK(on_key_import_button), NULL);
gtk_widget_set_hexpand(button, TRUE);
gtk_widget_set_halign(button, GTK_ALIGN_FILL);
- gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(hbox), button);
}
#endif
button = libbalsa_add_mnemonic_button_to_box(_("_Search key server for this key"),
@@ -375,7 +375,7 @@ create_import_keys_widget(BalsaMimeWidget *mw, const gchar *key_buf, GError **er
BMW_VBOX_SPACE);
gtk_widget_set_margin_bottom(separator,
BMW_VBOX_SPACE);
- gtk_box_pack_start(box, separator, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(mw), separator);
}
}
}
diff --git a/src/balsa-mime-widget-message.c b/src/balsa-mime-widget-message.c
index 316e7c09a..34e464660 100644
--- a/src/balsa-mime-widget-message.c
+++ b/src/balsa-mime-widget-message.c
@@ -245,13 +245,13 @@ bmw_message_extbody_url(LibBalsaMessageBody * mime_body,
gtk_container_set_border_width(GTK_CONTAINER(mw),
BMW_CONTAINER_BORDER);
- gtk_box_pack_start(GTK_BOX(mw), gtk_label_new(msg->str), FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(mw), gtk_label_new(msg->str));
g_string_free(msg, TRUE);
button = gtk_button_new_with_label(url);
gtk_widget_set_margin_top(button, BMW_BUTTON_PACK_SPACE);
gtk_widget_set_margin_bottom(button, BMW_BUTTON_PACK_SPACE);
- gtk_box_pack_start(GTK_BOX(mw), button, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(mw), button);
g_object_set_data_full(G_OBJECT(button), "call_url", url,
(GDestroyNotify) g_free);
@@ -292,7 +292,7 @@ bmw_message_extbody_mail(LibBalsaMessageBody * mime_body)
gtk_container_set_border_width(GTK_CONTAINER(mw),
BMW_CONTAINER_BORDER);
- gtk_box_pack_start(GTK_BOX(mw), gtk_label_new(msg->str), FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(mw), gtk_label_new(msg->str));
g_string_free(msg, TRUE);
button =
@@ -300,7 +300,7 @@ bmw_message_extbody_mail(LibBalsaMessageBody * mime_body)
("Se_nd message to obtain this part"));
gtk_widget_set_margin_top(button, BMW_BUTTON_PACK_SPACE);
gtk_widget_set_margin_bottom(button, BMW_BUTTON_PACK_SPACE);
- gtk_box_pack_start(GTK_BOX(mw), button, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(mw), button);
g_signal_connect(button, "clicked",
G_CALLBACK(extbody_send_mail), (gpointer) mime_body);
@@ -424,7 +424,7 @@ balsa_mime_widget_new_message_tl(BalsaMessage * bm,
gtk_widget_set_valign(container, GTK_ALIGN_FILL);
gtk_widget_set_margin_top(container, BMW_CONTAINER_BORDER - BMW_MESSAGE_PADDING);
gtk_widget_set_margin_bottom(container, BMW_CONTAINER_BORDER - BMW_MESSAGE_PADDING);
- gtk_box_pack_start(GTK_BOX(mw), container, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(mw), container);
return mw;
}
diff --git a/src/balsa-mime-widget.c b/src/balsa-mime-widget.c
index f91912c98..e8682a261 100644
--- a/src/balsa-mime-widget.c
+++ b/src/balsa-mime-widget.c
@@ -204,7 +204,7 @@ balsa_mime_widget_new_unknown(BalsaMessage * bm,
if (mime_body->filename) {
msg = g_strdup_printf(_("File name: %s"), mime_body->filename);
- gtk_box_pack_start(GTK_BOX(mw), gtk_label_new(msg), FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(mw), gtk_label_new(msg));
g_free(msg);
}
@@ -269,10 +269,9 @@ balsa_mime_widget_new_unknown(BalsaMessage * bm,
gtk_widget_set_halign(button, GTK_ALIGN_FILL);
gtk_container_add(GTK_CONTAINER(hbox), button);
} else {
- gtk_box_pack_start(GTK_BOX(mw),
+ gtk_container_add(GTK_CONTAINER(mw),
gtk_label_new(_("No open or view action "
- "defined for this content type")),
- FALSE, FALSE, 0);
+ "defined for this content type")));
}
g_free(use_content_type);
diff --git a/src/filter-edit-callbacks.c b/src/filter-edit-callbacks.c
index f2e0fb68d..a54888770 100644
--- a/src/filter-edit-callbacks.c
+++ b/src/filter-edit-callbacks.c
@@ -1006,7 +1006,7 @@ build_type_notebook()
g_object_set(box, "margin", 5, NULL);
gtk_widget_set_vexpand(grid, TRUE);
gtk_widget_set_valign(grid, GTK_ALIGN_FILL);
- gtk_box_pack_start(GTK_BOX(box), grid, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(box), grid);
fe_type_simple_label =
gtk_label_new_with_mnemonic(_("One of the specified f_ields contains"));
@@ -1038,7 +1038,7 @@ build_type_notebook()
page = gtk_table_new(5, 6, FALSE);
gtk_widget_set_vexpand(page, TRUE);
gtk_widget_set_valign(page, GTK_ALIGN_FILL);
- gtk_box_pack_start(GTK_BOX(box), page, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(box), page);
fe_type_regex_label =
gtk_label_new_with_mnemonic(_("_One of the regular expressions matches"));
@@ -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_box_pack_start(GTK_BOX(box), button, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(box), button);
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_box_pack_start(GTK_BOX(box), fe_regex_remove_button, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(box), fe_regex_remove_button);
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_box_pack_start(GTK_BOX(box), button, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(box), button);
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_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(box), label);
#endif /* REGULAR_EXPRESSION_FILTERING_IS_IMPLEMENTED */
/* The date page of the notebook */
@@ -1191,31 +1191,30 @@ 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_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(box), label);
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_box_pack_start(GTK_BOX(box), fe_search_option_menu, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(box), fe_search_option_menu);
gtk_label_set_mnemonic_widget(GTK_LABEL(label), fe_search_option_menu);
- content_box =
- GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(condition_dialog)));
+ content_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_box_pack_start(content_box, box, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(content_box), box);
gtk_widget_set_margin_top(field_frame, 2);
gtk_widget_set_margin_bottom(field_frame, 2);
- gtk_box_pack_start(content_box, field_frame, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(content_box), field_frame);
build_type_notebook();
gtk_widget_set_margin_top(fe_type_notebook, 2);
gtk_widget_set_margin_bottom(fe_type_notebook, 2);
- gtk_box_pack_start(content_box, fe_type_notebook, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(content_box), fe_type_notebook);
}
/*
diff --git a/src/filter-edit-dialog.c b/src/filter-edit-dialog.c
index 7d060b2b9..c9bbb5933 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_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(vbox), bbox);
/* 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_box_pack_start(GTK_BOX(box), fe_op_codes_option_menu, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(box), fe_op_codes_option_menu);
/* list of conditions defining how this filter matches */
@@ -503,7 +503,7 @@ build_right_side(GtkWindow * window)
page, gtk_label_new(_("Action")));
/* button box */
- bbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
+ bbox = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL);
gtk_container_add(GTK_CONTAINER(rightside), bbox);
fe_apply_button = libbalsa_add_mnemonic_button_to_box(_("_Apply"), bbox, GTK_ALIGN_START);
@@ -601,11 +601,6 @@ filters_edit_dialog(GtkWindow * parent)
gtk_widget_set_margin_end(hbox, FILTER_EDIT_PADDING);
gtk_container_add(GTK_CONTAINER(content_area), 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_hexpand(piece, FALSE);
gtk_widget_set_margin_start(piece, FILTER_EDIT_PADDING);
gtk_widget_set_margin_end(piece, FILTER_EDIT_PADDING);
gtk_container_add(GTK_CONTAINER(hbox), piece);
@@ -620,7 +615,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_box_pack_start(GTK_BOX(hbox), fe_right_page, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(hbox), fe_right_page);
fe_user_headers_list = NULL;
diff --git a/src/filter-run-dialog.c b/src/filter-run-dialog.c
index e610847a4..17b110021 100644
--- a/src/filter-run-dialog.c
+++ b/src/filter-run-dialog.c
@@ -317,7 +317,7 @@ balsa_filter_run_dialog_init(BalsaFilterRunDialog *p)
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 2);
gtk_widget_set_hexpand(vbox, TRUE);
gtk_widget_set_halign(vbox, GTK_ALIGN_FILL);
- gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(hbox), vbox);
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_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(vbox), bbox);
/* "Apply selected" button */
p->apply_selected_button = button =
@@ -384,13 +384,13 @@ balsa_filter_run_dialog_init(BalsaFilterRunDialog *p)
gtk_widget_set_margin_start(bbox, 6);
gtk_widget_set_margin_end(bbox, 6);
- gtk_box_pack_start(GTK_BOX(hbox), bbox, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(hbox), bbox);
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 2);
gtk_widget_set_hexpand(vbox, TRUE);
gtk_widget_set_halign(vbox, GTK_ALIGN_FILL);
- gtk_box_pack_start(GTK_BOX(hbox),vbox, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(hbox),vbox);
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_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(vbox), bbox);
/* up button */
p->move_up_button = button =
diff --git a/src/folder-conf.c b/src/folder-conf.c
index b3d5e1175..285d05386 100644
--- a/src/folder-conf.c
+++ b/src/folder-conf.c
@@ -355,7 +355,7 @@ create_imap_folder_dialog(LibBalsaServer *server,
gtk_widget_set_vexpand(vbox, TRUE);
label = libbalsa_create_wrap_label(message, FALSE);
- gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(vbox), label);
scrolled_wind = gtk_scrolled_window_new(NULL,NULL);
gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled_wind),
@@ -915,7 +915,7 @@ folder_conf_imap_sub_node(BalsaMailboxNode * mn)
gtk_widget_set_hexpand(sub_folder_data->parent_folder, TRUE);
gtk_widget_set_halign(sub_folder_data->parent_folder, GTK_ALIGN_FILL);
gtk_container_add(GTK_CONTAINER(hbox), sub_folder_data->parent_folder);
- gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(hbox), button);
gtk_widget_set_hexpand(hbox, TRUE);
gtk_grid_attach(GTK_GRID(grid), hbox, 1, row, 1, 1);
diff --git a/src/main-window.c b/src/main-window.c
index 17f284520..e61a32eab 100644
--- a/src/main-window.c
+++ b/src/main-window.c
@@ -569,7 +569,7 @@ bw_create_index_widget(BalsaWindow *bw)
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_widget_show(priv->sos_bar);
- gtk_box_pack_start(GTK_BOX(vbox), priv->sos_bar, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(vbox), priv->sos_bar);
gtk_widget_set_vexpand(priv->notebook, TRUE);
gtk_widget_set_valign(priv->notebook, GTK_ALIGN_FILL);
@@ -2250,7 +2250,7 @@ balsa_window_new(GtkApplication *application)
model = balsa_window_get_toolbar_model();
priv->toolbar = balsa_toolbar_new(model, G_ACTION_MAP(window));
- gtk_box_pack_start(GTK_BOX(priv->vbox), priv->toolbar, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(priv->vbox), priv->toolbar);
priv->content_area = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_widget_show(priv->content_area);
@@ -2259,7 +2259,7 @@ balsa_window_new(GtkApplication *application)
gtk_container_add(GTK_CONTAINER(priv->vbox), priv->content_area);
priv->bottom_bar = hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
- gtk_box_pack_start(GTK_BOX(priv->vbox), hbox, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(priv->vbox), hbox);
priv->progress_bar = gtk_progress_bar_new();
g_object_add_weak_pointer(G_OBJECT(priv->progress_bar),
@@ -2267,7 +2267,7 @@ balsa_window_new(GtkApplication *application)
gtk_widget_set_valign(priv->progress_bar, GTK_ALIGN_CENTER);
gtk_progress_bar_set_pulse_step(GTK_PROGRESS_BAR(priv->progress_bar),
0.01);
- gtk_box_pack_start(GTK_BOX(hbox), priv->progress_bar, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(hbox), priv->progress_bar);
priv->statusbar = gtk_statusbar_new();
gtk_widget_set_hexpand(priv->statusbar, TRUE);
@@ -3839,7 +3839,7 @@ bw_find_real(BalsaWindow * window, BalsaIndex * bindex, gboolean again)
gtk_widget_set_margin_top(page, 2);
gtk_widget_set_margin_bottom(page, 2);
- gtk_box_pack_start(GTK_BOX(vbox), page, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(vbox), page);
/* builds the toggle buttons to specify fields concerned by
* the search. */
@@ -3852,7 +3852,7 @@ bw_find_real(BalsaWindow * window, BalsaIndex * bindex, gboolean again)
gtk_widget_set_margin_top(frame, 2);
gtk_widget_set_margin_bottom(frame, 2);
- gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(vbox), frame);
grid = gtk_grid_new();
gtk_grid_set_column_homogeneous(GTK_GRID(grid), TRUE);
@@ -3870,7 +3870,7 @@ bw_find_real(BalsaWindow * window, BalsaIndex * bindex, gboolean again)
gtk_widget_set_margin_top(frame, 2);
gtk_widget_set_margin_bottom(frame, 2);
- gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(vbox), frame);
/* Button box */
box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
@@ -3892,7 +3892,7 @@ bw_find_real(BalsaWindow * window, BalsaIndex * bindex, gboolean again)
gtk_widget_set_margin_top(frame, 2);
gtk_widget_set_margin_bottom(frame, 2);
- gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(vbox), frame);
/* Reverse and Wrap checkboxes */
box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
@@ -3910,7 +3910,7 @@ bw_find_real(BalsaWindow * window, BalsaIndex * bindex, gboolean again)
gtk_widget_set_vexpand(reverse_button, TRUE);
gtk_widget_set_valign(reverse_button, GTK_ALIGN_FILL);
- gtk_box_pack_start(GTK_BOX(w), reverse_button, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(w), reverse_button);
wrap_button =
gtk_check_button_new_with_mnemonic(_("_Wrap around"));
@@ -3919,11 +3919,11 @@ bw_find_real(BalsaWindow * window, BalsaIndex * bindex, gboolean again)
gtk_widget_set_vexpand(wrap_button, TRUE);
gtk_widget_set_valign(wrap_button, GTK_ALIGN_FILL);
- gtk_box_pack_start(GTK_BOX(w), wrap_button, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(w), wrap_button);
gtk_widget_set_hexpand(w, TRUE);
gtk_widget_set_halign(w, GTK_ALIGN_FILL);
- gtk_box_pack_start(GTK_BOX(box), w, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(box), w);
button = gtk_button_new_with_mnemonic(_("_OK"));
g_signal_connect(button, "clicked",
diff --git a/src/sendmsg-window.c b/src/sendmsg-window.c
index d16c5376b..a5de60f81 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_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog)));
+ content_box = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
gtk_widget_set_margin_top(info, 5);
gtk_widget_set_margin_bottom(info, 5);
@@ -3377,17 +3377,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_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
- gtk_box_pack_start(GTK_BOX(hbox), image, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(vbox), label);
+ gtk_container_add(GTK_CONTAINER(hbox), image);
gtk_widget_set_hexpand(vbox, TRUE);
gtk_widget_set_halign(vbox, GTK_ALIGN_FILL);
- gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(hbox), vbox);
- content_box = GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog)));
+ content_box = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
gtk_widget_set_vexpand(hbox, TRUE);
gtk_widget_set_valign(hbox, GTK_ALIGN_FILL);
- gtk_box_pack_start(content_box, hbox, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(content_box), hbox);
if (stats->decrypted > 0U) {
GtkWidget *warning;
@@ -3485,7 +3485,7 @@ show_decrypted_warning(GtkWindow *parent)
remind_btn = gtk_check_button_new_with_label(_("Do not remind me again."));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(remind_btn), FALSE);
gtk_widget_show(remind_btn);
- gtk_box_pack_end(GTK_BOX(message_area), remind_btn, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(message_area), remind_btn);
gtk_dialog_run(GTK_DIALOG(dialog));
balsa_app.warn_reply_decrypted = !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(remind_btn));
gtk_widget_destroy(dialog);
@@ -5144,7 +5144,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_box_pack_start(GTK_BOX(dialog_vbox), hbox, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(dialog_vbox), hbox);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 6);
image = gtk_image_new_from_icon_name("dialog-question",
@@ -5155,7 +5155,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_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(hbox), vbox);
text_str = g_strdup_printf("<span weight=\"bold\" size=\"larger\">%s</span>\n\n%s",
_("You did not specify a subject for this message"),
diff --git a/src/toolbar-prefs.c b/src/toolbar-prefs.c
index c4f031d99..c9eaf87d2 100644
--- a/src/toolbar-prefs.c
+++ b/src/toolbar-prefs.c
@@ -409,7 +409,8 @@ create_toolbar_page(BalsaToolbarModel * model, GActionMap * map)
gtk_container_add(GTK_CONTAINER(toolbar_scroll), page->toolbar);
/* Button box */
- button_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5);
+ button_box = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL);
+ gtk_box_set_spacing(GTK_BOX(button_box), 5);
gtk_container_add(GTK_CONTAINER(toolbar_ctlbox), button_box);
/* Standard button */
@@ -459,9 +460,8 @@ create_toolbar_page(BalsaToolbarModel * model, GActionMap * map)
center_button_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add(GTK_CONTAINER(lower_ctlbox), center_button_box);
- button_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
- gtk_widget_set_vexpand(button_box, TRUE);
- gtk_widget_set_valign(button_box, GTK_ALIGN_CENTER);
+ gtk_container_add(GTK_CONTAINER(lower_ctlbox), center_button_box);
+
gtk_container_add(GTK_CONTAINER(center_button_box), button_box);
page->back_button =
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]