[balsa/wip/gtk4] gtk_box_pack_{start,end} have gone away
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/wip/gtk4] gtk_box_pack_{start,end} have gone away
- Date: Sat, 26 Jan 2019 00:29:40 +0000 (UTC)
commit a598cd4f69fe280abcc3815362f478a0af5d40e3
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Fri Jan 25 19:28:16 2019 -0500
gtk_box_pack_{start,end} have gone away
libbalsa/address.c | 4 +--
libbalsa/identity-widgets.c | 22 +++++++-------
libbalsa/libbalsa-gpgme-cb.c | 20 ++++++-------
libbalsa/libbalsa-gpgme-widgets.c | 22 +++++++-------
libbalsa/libbalsa-progress.c | 8 ++---
libbalsa/libbalsa.c | 6 ++--
libbalsa/smtp-server.c | 6 ++--
libbalsa/source-viewer.c | 4 +--
libinit_balsa/assistant_page_defclient.c | 6 ++--
libinit_balsa/assistant_page_directory.c | 4 +--
libinit_balsa/assistant_page_user.c | 4 +--
src/ab-main.c | 26 ++++++++---------
src/ab-window.c | 22 +++++++-------
src/address-book-config.c | 8 ++---
src/balsa-app.c | 6 ++--
src/balsa-index.c | 4 +--
src/balsa-mblist.c | 2 +-
src/balsa-message.c | 16 +++++-----
src/balsa-mime-widget-crypto.c | 32 ++++++++++----------
src/balsa-mime-widget-message.c | 43 ++++++++-------------------
src/balsa-mime-widget-vcalendar.c | 16 +++++-----
src/balsa-mime-widget.c | 12 ++++----
src/compose-window.c | 48 +++++++++++++++---------------
src/filter-edit-callbacks.c | 22 +++++++-------
src/filter-edit-dialog.c | 42 +++++++++++++--------------
src/filter-export-dialog.c | 2 +-
src/filter-run-dialog.c | 28 +++++++++---------
src/folder-conf.c | 12 ++++----
src/information-dialog.c | 2 +-
src/mailbox-conf.c | 6 ++--
src/main-window.c | 50 ++++++++++++++++----------------
src/message-window.c | 6 ++--
src/pref-manager.c | 16 +++++-----
src/print-gtk.c | 38 ++++++++++++------------
src/spell-check.c | 10 +++----
src/store-address.c | 8 ++---
src/toolbar-prefs.c | 36 +++++++++++------------
37 files changed, 301 insertions(+), 318 deletions(-)
---
diff --git a/libbalsa/address.c b/libbalsa/address.c
index 07f84a011..e76fabdd7 100644
--- a/libbalsa/address.c
+++ b/libbalsa/address.c
@@ -987,8 +987,8 @@ libbalsa_address_get_edit_widget(const LibBalsaAddress *address,
entries[cnt] = lba_addr_list_widget(changed_cb,
changed_data);
- gtk_box_pack_start(GTK_BOX(box), label);
- gtk_box_pack_start(GTK_BOX(box), but);
+ gtk_container_add(GTK_CONTAINER(box), label);
+ gtk_container_add(GTK_CONTAINER(box), but);
lhs = box;
g_signal_connect(but, "clicked", G_CALLBACK(add_row),
entries[cnt]);
diff --git a/libbalsa/identity-widgets.c b/libbalsa/identity-widgets.c
index 01448a39a..066a904de 100644
--- a/libbalsa/identity-widgets.c
+++ b/libbalsa/identity-widgets.c
@@ -245,7 +245,7 @@ libbalsa_identity_select_dialog(GtkWindow * parent,
frame = gtk_frame_new(NULL);
gtk_widget_set_vexpand(frame, TRUE);
- gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))),
+ gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))),
frame);
g_object_set(G_OBJECT(tree), "margin", padding, NULL);
@@ -548,13 +548,13 @@ append_ident_notebook_page(GtkNotebook * notebook,
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
grid = libbalsa_create_grid();
g_object_set(G_OBJECT(grid), "margin", padding, NULL);
- gtk_box_pack_start(GTK_BOX(vbox), grid);
+ gtk_container_add(GTK_CONTAINER(vbox), grid);
if (footnote) {
GtkWidget *label;
label = gtk_label_new(footnote);
gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
- gtk_box_pack_start(GTK_BOX(vbox), label);
+ gtk_container_add(GTK_CONTAINER(vbox), label);
}
gtk_notebook_append_page(notebook, vbox, gtk_label_new(tab_label));
@@ -940,7 +940,7 @@ md_face_path_changed(const gchar * filename, gboolean active,
gtk_container_foreach(GTK_CONTAINER(face_box),
(GtkCallback) gtk_widget_destroy, NULL);
- gtk_box_pack_start(GTK_BOX(face_box), image);
+ gtk_container_add(GTK_CONTAINER(face_box), image);
g_free(content);
}
@@ -1051,10 +1051,10 @@ ident_dialog_add_boxes(GtkWidget * grid, gint row, GtkDialog * dialog,
gtk_grid_attach(GTK_GRID(grid), hbox, 1, row, 1, 1);
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
g_object_set_data(G_OBJECT(dialog), key1, vbox);
- gtk_box_pack_start(GTK_BOX(hbox), vbox);
+ gtk_container_add(GTK_CONTAINER(hbox), vbox);
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
g_object_set_data(G_OBJECT(dialog), key2, vbox);
- gtk_box_pack_start(GTK_BOX(hbox), vbox);
+ gtk_container_add(GTK_CONTAINER(hbox), vbox);
}
/* set_identity_name_in_tree:
@@ -1161,9 +1161,9 @@ ident_dialog_update(GObject * dlg)
libbalsa_identity_set_sig_sending(id,
ident_dialog_get_bool(dlg, "identity-sigappend"));
libbalsa_identity_set_sig_whenforward(id,
- ident_dialog_get_bool(dlg, "identity-sigwhenforward"));
+ ident_dialog_get_bool(dlg, "identity-whenforward"));
libbalsa_identity_set_sig_whenreply(id,
- ident_dialog_get_bool(dlg, "identity-sigwhenreply"));
+ ident_dialog_get_bool(dlg, "identity-whenreply"));
libbalsa_identity_set_sig_separator(id,
ident_dialog_get_bool(dlg, "identity-sigseparator"));
libbalsa_identity_set_sig_prepend(id,
@@ -1432,8 +1432,8 @@ libbalsa_identity_config_dialog(GtkWindow *parent, GList **identities,
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, padding);
gtk_widget_set_vexpand(hbox, TRUE);
- gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), hbox);
- gtk_box_pack_start(GTK_BOX(hbox), frame);
+ gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), hbox);
+ gtk_container_add(GTK_CONTAINER(hbox), frame);
smtp_server_list = g_new(GSList *, 1);
*smtp_server_list = g_slist_copy(smtp_servers);
@@ -1445,7 +1445,7 @@ libbalsa_identity_config_dialog(GtkWindow *parent, GList **identities,
smtp_server_list);
gtk_widget_set_hexpand(display_frame, TRUE);
- gtk_box_pack_start(GTK_BOX(hbox), display_frame);
+ 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 6265199ec..5e2e11daa 100644
--- a/libbalsa/libbalsa-gpgme-cb.c
+++ b/libbalsa/libbalsa-gpgme-cb.c
@@ -186,7 +186,7 @@ lb_gpgme_select_key(const gchar * user_name, lb_key_sel_md_t mode, GList * keys,
#endif
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 12);
gtk_widget_set_vexpand (vbox, TRUE);
- gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), vbox);
+ gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), vbox);
g_object_set(G_OBJECT(vbox), "margin", 12, NULL);
switch (mode) {
case LB_SELECT_PRIVATE_KEY:
@@ -212,11 +212,11 @@ lb_gpgme_select_key(const gchar * user_name, lb_key_sel_md_t mode, GList * keys,
label = gtk_label_new(prompt);
gtk_widget_set_halign(label, GTK_ALIGN_START);
g_free(prompt);
- gtk_box_pack_start(GTK_BOX(vbox), label);
+ 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);
+ gtk_container_add(GTK_CONTAINER(vbox), label);
scrolled_window = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW
@@ -225,7 +225,7 @@ lb_gpgme_select_key(const gchar * user_name, lb_key_sel_md_t mode, GList * keys,
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_widget_set_vexpand(scrolled_window, TRUE);
- gtk_box_pack_start(GTK_BOX(vbox), scrolled_window);
+ gtk_container_add(GTK_CONTAINER(vbox), scrolled_window);
model = gtk_list_store_new(GPG_KEY_NUM_COLUMNS, G_TYPE_STRING, /* user ID */
G_TYPE_POINTER); /* key */
@@ -342,16 +342,16 @@ get_passphrase_real(const gchar * uid_hint, const gchar * passphrase_info,
#endif
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 12);
g_object_set(G_OBJECT(hbox), "margin", 12, NULL);
- gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), hbox);
+ gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), hbox);
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 12);
- gtk_box_pack_start(GTK_BOX(hbox), vbox);
+ gtk_container_add(GTK_CONTAINER(hbox), vbox);
if (!padlock_keyhole)
padlock_keyhole =
gdk_pixbuf_new_from_xpm_data(padlock_keyhole_xpm);
- gtk_box_pack_start(GTK_BOX(vbox), gtk_image_new_from_pixbuf(padlock_keyhole));
+ gtk_container_add(GTK_CONTAINER(vbox), gtk_image_new_from_pixbuf(padlock_keyhole));
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 12);
- gtk_box_pack_start(GTK_BOX(hbox), vbox);
+ gtk_container_add(GTK_CONTAINER(hbox), vbox);
if (prev_was_bad)
prompt =
g_strdup_printf(_
@@ -362,10 +362,10 @@ get_passphrase_real(const gchar * uid_hint, const gchar * passphrase_info,
g_strdup_printf(_
("%s\nPlease enter the passphrase for the secret key!\n\nKey: %s"),
passphrase_info, uid_hint);
- gtk_box_pack_start(GTK_BOX(vbox), gtk_label_new(prompt));
+ gtk_container_add(GTK_CONTAINER(vbox), gtk_label_new(prompt));
g_free(prompt);
entry = gtk_entry_new();
- gtk_box_pack_start(GTK_BOX(vbox), entry);
+ gtk_container_add(GTK_CONTAINER(vbox), entry);
gtk_entry_set_width_chars(GTK_ENTRY(entry), 40);
gtk_entry_set_visibility(GTK_ENTRY(entry), FALSE);
diff --git a/libbalsa/libbalsa-gpgme-widgets.c b/libbalsa/libbalsa-gpgme-widgets.c
index 0205e19f4..eacd7a5d6 100644
--- a/libbalsa/libbalsa-gpgme-widgets.c
+++ b/libbalsa/libbalsa-gpgme-widgets.c
@@ -128,7 +128,7 @@ libbalsa_gpgme_key(gpgme_key_t key,
gtk_widget_set_margin_start(uid_box, 12);
gtk_container_add(GTK_CONTAINER(uid_expander), uid_box);
for (uid = key->uids->next; uid != NULL; uid = uid->next) {
- gtk_box_pack_end(GTK_BOX(uid_box), create_key_uid_widget(uid));
+ gtk_container_add(GTK_CONTAINER(uid_box), create_key_uid_widget(uid));
}
}
@@ -192,13 +192,13 @@ libbalsa_gpgme_key(gpgme_key_t key,
for (subkey = key->subkeys; subkey != NULL; subkey = subkey->next) {
if (fingerprint != NULL) {
if (strcmp(fingerprint, subkey->fpr) == 0) {
- gtk_box_pack_end(GTK_BOX(subkey_box), create_subkey_widget(subkey));
+ gtk_container_add(GTK_CONTAINER(subkey_box),
create_subkey_widget(subkey));
}
} else if ((((subkey_capa & GPG_SUBKEY_CAP_SIGN) != 0U) && (subkey->can_sign != 0)) ||
(((subkey_capa & GPG_SUBKEY_CAP_ENCRYPT) != 0U) &&
(subkey->can_encrypt != 0)) ||
(((subkey_capa & GPG_SUBKEY_CAP_CERTIFY) != 0U) &&
(subkey->can_certify != 0)) ||
(((subkey_capa & GPG_SUBKEY_CAP_AUTH) != 0U) &&
(subkey->can_authenticate != 0))) {
- gtk_box_pack_end(GTK_BOX(subkey_box), create_subkey_widget(subkey));
+ gtk_container_add(GTK_CONTAINER(subkey_box), create_subkey_widget(subkey));
} else {
/* do not print this subkey */
}
@@ -372,17 +372,17 @@ libbalsa_key_dialog(GtkWindow *parent,
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 12);
g_object_set(G_OBJECT(hbox), "margin", 6, NULL);
gtk_widget_set_vexpand(hbox, TRUE);
- gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), hbox);
+ gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), hbox);
gtk_box_set_homogeneous(GTK_BOX(hbox), FALSE);
/* standard key icon; "application-certificate" would be an alternative... */
icon = gtk_image_new_from_icon_name("dialog-password");
- gtk_box_pack_start(GTK_BOX(hbox), icon);
+ gtk_container_add(GTK_CONTAINER(hbox), icon);
gtk_widget_set_valign(icon, GTK_ALIGN_START);
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 6);
gtk_widget_set_hexpand(vbox, TRUE);
- gtk_box_pack_start(GTK_BOX(hbox), vbox);
+ gtk_container_add(GTK_CONTAINER(hbox), vbox);
gtk_box_set_homogeneous(GTK_BOX(vbox), FALSE);
if (message1 != NULL) {
@@ -392,21 +392,21 @@ libbalsa_key_dialog(GtkWindow *parent,
markup = g_markup_printf_escaped("<b><big>%s</big></b>", message1);
gtk_label_set_markup(GTK_LABEL(label), markup);
g_free(markup);
- gtk_box_pack_start(GTK_BOX(vbox), label);
+ gtk_container_add(GTK_CONTAINER(vbox), label);
gtk_label_set_line_wrap(GTK_LABEL(label), FALSE);
}
if (message2 != NULL) {
label = gtk_label_new(message2);
gtk_widget_set_halign(label, GTK_ALIGN_START);
- gtk_box_pack_start(GTK_BOX(vbox), label);
+ gtk_container_add(GTK_CONTAINER(vbox), label);
gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
}
scrolledw = gtk_scrolled_window_new(NULL, NULL);
gtk_widget_set_vexpand(scrolledw, TRUE);
gtk_widget_set_margin_top(scrolledw, 6);
- gtk_box_pack_start(GTK_BOX(vbox), scrolledw);
+ gtk_container_add(GTK_CONTAINER(vbox), scrolledw);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledw), GTK_POLICY_NEVER,
GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_min_content_height(GTK_SCROLLED_WINDOW(scrolledw), 120);
@@ -572,7 +572,7 @@ create_key_label_with_warn(const gchar *text,
result = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
icon = gtk_image_new_from_icon_name("gtk-dialog-warning");
- gtk_box_pack_start(GTK_BOX(result), icon);
+ gtk_container_add(GTK_CONTAINER(result), icon);
buf = g_markup_printf_escaped("<span fgcolor=\"red\">%s</span>", text);
label = gtk_label_new(NULL);
gtk_label_set_markup(GTK_LABEL(label), buf);
@@ -581,7 +581,7 @@ create_key_label_with_warn(const gchar *text,
gtk_widget_set_hexpand(label, TRUE);
gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
gtk_label_set_selectable(GTK_LABEL(label), TRUE);
- gtk_box_pack_start(GTK_BOX(result), label);
+ gtk_container_add(GTK_CONTAINER(result), label);
} else {
result = gtk_label_new(text);
gtk_widget_set_halign(result, GTK_ALIGN_START);
diff --git a/libbalsa/libbalsa-progress.c b/libbalsa/libbalsa-progress.c
index 2356ade37..093e73b6d 100644
--- a/libbalsa/libbalsa-progress.c
+++ b/libbalsa/libbalsa-progress.c
@@ -201,7 +201,7 @@ libbalsa_progress_dialog_ensure_real(ProgressDialog *progress_dialog,
progress_widget = create_progress_widget(progress_id);
gtk_revealer_set_reveal_child(GTK_REVEALER(progress_widget), TRUE);
- gtk_box_pack_start(GTK_BOX(content_box), progress_widget);
+ gtk_container_add(GTK_CONTAINER(content_box), progress_widget);
}
}
@@ -293,16 +293,16 @@ create_progress_widget(const gchar *progress_id)
gtk_container_add(GTK_CONTAINER(widget_data->revealer), box);
label = gtk_label_new(progress_id);
- gtk_box_pack_start(GTK_BOX(box), label);
+ gtk_container_add(GTK_CONTAINER(box), label);
widget_data->label = gtk_label_new(" ");
gtk_label_set_line_wrap(GTK_LABEL(widget_data->label), TRUE);
g_object_set(G_OBJECT(widget_data->label), "margin", 2, NULL);
- gtk_box_pack_start(GTK_BOX(box), widget_data->label);
+ gtk_container_add(GTK_CONTAINER(box), widget_data->label);
widget_data->progress = gtk_progress_bar_new();
g_object_set(G_OBJECT(widget_data->progress), "margin", 2, NULL);
- gtk_box_pack_start(GTK_BOX(box), widget_data->progress);
+ gtk_container_add(GTK_CONTAINER(box), widget_data->progress);
return widget_data->revealer;
}
diff --git a/libbalsa/libbalsa.c b/libbalsa/libbalsa.c
index 4bc5a53c0..6e342bf1d 100644
--- a/libbalsa/libbalsa.c
+++ b/libbalsa/libbalsa.c
@@ -477,10 +477,10 @@ ask_cert_real(void *data)
gtk_label_set_use_markup(GTK_LABEL(label), TRUE);
vbox = GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog)));
gtk_box_set_spacing(vbox, 1);
- gtk_box_pack_start(vbox, label);
+ gtk_container_add(GTK_CONTAINER(vbox), label);
gtk_widget_set_vexpand(cert_widget, TRUE);
- gtk_box_pack_start(vbox, cert_widget);
+ gtk_container_add(GTK_CONTAINER(vbox), cert_widget);
switch(gtk_dialog_run(GTK_DIALOG(dialog))) {
case 0:
@@ -635,7 +635,7 @@ ask_cert_real(void *data)
gtk_box_set_spacing(vbox, 1);
gtk_widget_set_vexpand(label, TRUE);
- gtk_box_pack_start(vbox, label);
+ gtk_container_add(GTK_CONTAINER(vbox), label);
switch(gtk_dialog_run(GTK_DIALOG(dialog))) {
case 0: i = CERT_ACCEPT_SESSION; break;
diff --git a/libbalsa/smtp-server.c b/libbalsa/smtp-server.c
index e5b36b3a9..ea3aac393 100644
--- a/libbalsa/smtp-server.c
+++ b/libbalsa/smtp-server.c
@@ -444,7 +444,7 @@ libbalsa_smtp_server_dialog(LibBalsaSmtpServer * smtp_server,
FALSE);
notebook = gtk_notebook_new();
- gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))),
+ gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))),
notebook);
#define HIG_PADDING 12
@@ -538,9 +538,9 @@ libbalsa_smtp_server_dialog(LibBalsaSmtpServer * smtp_server,
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
sdi->big_message = gtk_spin_button_new_with_range(0.1, 100, 0.1);
gtk_widget_set_hexpand(sdi->big_message, TRUE);
- gtk_box_pack_start(GTK_BOX(hbox), sdi->big_message);
+ gtk_container_add(GTK_CONTAINER(hbox), sdi->big_message);
label = gtk_label_new(_("MB"));
- gtk_box_pack_start(GTK_BOX(hbox), label);
+ gtk_container_add(GTK_CONTAINER(hbox), label);
if (smtp_server->big_message > 0) {
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(sdi->split_button), TRUE);
/* The widget is in MB, but big_message is stored in kB. */
diff --git a/libbalsa/source-viewer.c b/libbalsa/source-viewer.c
index 1583200b3..5b1d1398d 100644
--- a/libbalsa/source-viewer.c
+++ b/libbalsa/source-viewer.c
@@ -286,11 +286,11 @@ libbalsa_show_message_source(GtkApplication * application,
#if HAVE_MACOSX_DESKTOP
libbalsa_macosx_menu(window, GTK_MENU_SHELL(menu_bar));
#else
- gtk_box_pack_start(GTK_BOX(vbox), menu_bar);
+ gtk_container_add(GTK_CONTAINER(vbox), menu_bar);
#endif
gtk_widget_set_vexpand(interior, TRUE);
- gtk_box_pack_start(GTK_BOX(vbox), interior);
+ gtk_container_add(GTK_CONTAINER(vbox), interior);
gtk_container_add(GTK_CONTAINER(window), vbox);
source_viewer->msg = g_object_ref(msg);
diff --git a/libinit_balsa/assistant_page_defclient.c b/libinit_balsa/assistant_page_defclient.c
index adc6e5614..79bc29ab2 100644
--- a/libinit_balsa/assistant_page_defclient.c
+++ b/libinit_balsa/assistant_page_defclient.c
@@ -63,15 +63,15 @@ balsa_druid_page_defclient_init(BalsaDruidPageDefclient * defclient,
gtk_widget_set_margin_top(label, 8);
gtk_widget_set_vexpand(label, TRUE);
- gtk_box_pack_start((GtkBox *) page, label);
+ gtk_container_add((GtkContainer *) page, label);
gtk_widget_set_margin_top(yes, 2);
gtk_widget_set_vexpand(yes, TRUE);
- gtk_box_pack_start((GtkBox *) page, yes);
+ gtk_container_add((GtkContainer *) page, yes);
gtk_widget_set_margin_top(no, 2);
gtk_widget_set_vexpand(no, TRUE);
- gtk_box_pack_start((GtkBox *) page, no);
+ gtk_container_add((GtkContainer *) page, no);
return;
}
diff --git a/libinit_balsa/assistant_page_directory.c b/libinit_balsa/assistant_page_directory.c
index fb5922912..219885d82 100644
--- a/libinit_balsa/assistant_page_directory.c
+++ b/libinit_balsa/assistant_page_directory.c
@@ -300,9 +300,9 @@ balsa_druid_page_directory_init(BalsaDruidPageDirectory * dir,
g_free(preset);
}
- gtk_box_pack_start(GTK_BOX(page), GTK_WIDGET(grid));
+ gtk_container_add(GTK_CONTAINER(page), GTK_WIDGET(grid));
- gtk_box_pack_end(GTK_BOX(page), verify_button(dir));
+ gtk_container_add(GTK_CONTAINER(page), verify_button(dir));
g_signal_connect(G_OBJECT(druid), "prepare",
G_CALLBACK(balsa_druid_page_directory_prepare),
diff --git a/libinit_balsa/assistant_page_user.c b/libinit_balsa/assistant_page_user.c
index 954724338..6ef4948c6 100644
--- a/libinit_balsa/assistant_page_user.c
+++ b/libinit_balsa/assistant_page_user.c
@@ -87,7 +87,7 @@ balsa_druid_page_user_init(BalsaDruidPageUser * user,
user->ed4.master = &(user->emaster);
label = GTK_LABEL(gtk_label_new(_(header2)));
gtk_label_set_line_wrap(label, TRUE);
- gtk_box_pack_start(GTK_BOX(page), GTK_WIDGET(label));
+ gtk_container_add(GTK_CONTAINER(page), GTK_WIDGET(label));
grid = GTK_GRID(gtk_grid_new());
gtk_grid_set_row_spacing(grid, 2);
@@ -151,7 +151,7 @@ balsa_druid_page_user_init(BalsaDruidPageUser * user,
&(user->localmaildir));
g_free(preset);
gtk_widget_set_margin_top(GTK_WIDGET(grid), 3);
- gtk_box_pack_start(GTK_BOX(page), GTK_WIDGET(grid));
+ 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 c7ab8ab59..9eb184c4d 100644
--- a/src/ab-main.c
+++ b/src/ab-main.c
@@ -857,23 +857,23 @@ static GtkWidget*
bab_get_edit_button_box(struct ABMainWindow *abmw)
{
GtkWidget *box_widget;
- GtkBox *box;
+ GtkContainer *box;
box_widget = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL);
- box = GTK_BOX(box_widget);
+ box = GTK_CONTAINER(box_widget);
abmw->apply_button = gtk_button_new_with_mnemonic(_("_Apply"));
- gtk_box_pack_start(box, abmw->apply_button);
+ gtk_container_add(box, abmw->apply_button);
g_signal_connect(abmw->apply_button, "clicked",
G_CALLBACK(apply_button_cb), (gpointer) NULL);
abmw->remove_button = gtk_button_new_with_mnemonic(_("_Remove"));
- gtk_box_pack_start(box, abmw->remove_button);
+ gtk_container_add(box, abmw->remove_button);
g_signal_connect(abmw->remove_button, "clicked",
G_CALLBACK(remove_button_cb), (gpointer) NULL);
abmw->cancel_button = gtk_button_new_with_mnemonic(_("_Cancel"));
- gtk_box_pack_start(box, abmw->cancel_button);
+ gtk_container_add(box, abmw->cancel_button);
g_signal_connect(abmw->cancel_button, "clicked",
G_CALLBACK(cancel_button_cb), abmw);
@@ -902,13 +902,13 @@ bab_get_filter_box(void)
GtkWidget *find_label, *find_entry, *button;
find_label = gtk_label_new_with_mnemonic(_("F_ilter:"));
- gtk_box_pack_start(GTK_BOX(search_hbox), find_label);
+ gtk_container_add(GTK_CONTAINER(search_hbox), find_label);
find_entry = gtk_entry_new();
gtk_widget_set_hexpand(find_entry, TRUE);
- gtk_box_pack_start(GTK_BOX(search_hbox), find_entry);
+ gtk_container_add(GTK_CONTAINER(search_hbox), find_entry);
gtk_label_set_mnemonic_widget(GTK_LABEL(find_label), find_entry);
button = gtk_button_new_from_icon_name("gtk-ok");
- gtk_box_pack_start(GTK_BOX(search_hbox), button);
+ gtk_container_add(GTK_CONTAINER(search_hbox), button);
g_signal_connect(G_OBJECT(find_entry), "activate",
G_CALLBACK(bab_filter_entry_activate),
@@ -961,18 +961,18 @@ bab_window_new(GtkApplication * application)
contacts_app.notebook = gtk_notebook_new();
gtk_widget_set_hexpand(contacts_app.notebook, TRUE);
- gtk_box_pack_start(GTK_BOX(main_vbox), contacts_app.notebook);
+ gtk_container_add(GTK_CONTAINER(main_vbox), contacts_app.notebook);
browse_widget = gtk_box_new(GTK_ORIENTATION_VERTICAL, 1);
/* Entry widget for finding an address */
- gtk_box_pack_start(GTK_BOX(browse_widget), bab_get_filter_box());
+ gtk_container_add(GTK_CONTAINER(browse_widget), bab_get_filter_box());
scroll = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_widget_set_hexpand(scroll, TRUE);
- gtk_box_pack_start(GTK_BOX(browse_widget), scroll);
+ gtk_container_add(GTK_CONTAINER(browse_widget), scroll);
contacts_app.entry_list = bab_window_list_new();
gtk_container_add(GTK_CONTAINER(scroll), contacts_app.entry_list);
@@ -985,8 +985,8 @@ bab_window_new(GtkApplication * application)
libbalsa_address_get_edit_widget(NULL, contacts_app.entries,
G_CALLBACK(address_changed_cb),
&contacts_app);
- gtk_box_pack_start(GTK_BOX(edit_widget), contacts_app.edit_widget);
- gtk_box_pack_start(GTK_BOX(edit_widget), bab_get_edit_button_box(&contacts_app));
+ gtk_container_add(GTK_CONTAINER(edit_widget), contacts_app.edit_widget);
+ gtk_container_add(GTK_CONTAINER(edit_widget), bab_get_edit_button_box(&contacts_app));
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 9b38c0bf6..f1b165f64 100644
--- a/src/ab-window.c
+++ b/src/ab-window.c
@@ -280,14 +280,14 @@ balsa_ab_window_init(BalsaAbWindow *ab)
/* More than one address book. */
gtk_widget_show(ab->combo_box);
- gtk_box_pack_start(vbox, ab->combo_box);
+ gtk_container_add(GTK_CONTAINER(vbox), ab->combo_box);
/* layout grid */
grid = gtk_grid_new();
gtk_grid_set_row_spacing(GTK_GRID(grid), 12);
gtk_grid_set_column_spacing(GTK_GRID(grid), 12);
gtk_widget_set_vexpand(grid, TRUE);
- gtk_box_pack_start(vbox, grid);
+ gtk_container_add(GTK_CONTAINER(vbox), grid);
/* -- grid column 1 -- */
/* Entry widget for finding an address */
@@ -301,9 +301,9 @@ 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);
+ gtk_container_add(GTK_CONTAINER(box2), find_label);
gtk_widget_set_hexpand(ab->filter_entry, TRUE);
- gtk_box_pack_start(GTK_BOX(box2), ab->filter_entry);
+ gtk_container_add(GTK_CONTAINER(box2), ab->filter_entry);
/* A scrolled window for the address list */
@@ -327,13 +327,13 @@ balsa_ab_window_init(BalsaAbWindow *ab)
w = gtk_button_new_with_mnemonic(_("Run _Editor"));
g_signal_connect(w, "clicked",
G_CALLBACK(balsa_ab_window_run_editor), NULL);
- gtk_box_pack_start(GTK_BOX(hbox), w);
+ gtk_container_add(GTK_CONTAINER(hbox), w);
w = gtk_button_new_with_mnemonic(_("_Re-import"));
g_signal_connect(G_OBJECT(w), "clicked",
G_CALLBACK(balsa_ab_window_reload),
ab);
- gtk_box_pack_start(GTK_BOX(hbox), w);
+ gtk_container_add(GTK_CONTAINER(hbox), w);
balsa_ab_window_load(ab);
@@ -346,14 +346,14 @@ balsa_ab_window_init(BalsaAbWindow *ab)
w = gtk_button_new_from_icon_name("go-next-symbolic");
gtk_widget_set_hexpand(w, TRUE);
- gtk_box_pack_start(GTK_BOX(ab->arrow_box), w);
+ gtk_container_add(GTK_CONTAINER(ab->arrow_box), w);
g_signal_connect(G_OBJECT(w), "clicked",
G_CALLBACK(balsa_ab_window_move_to_recipient_list),
ab);
w = gtk_button_new_from_icon_name("go-previous-symbolic");
gtk_widget_set_hexpand(w, TRUE);
- gtk_box_pack_start(GTK_BOX(ab->arrow_box), w);
+ gtk_container_add(GTK_CONTAINER(ab->arrow_box), w);
g_signal_connect(G_OBJECT(w), "clicked",
G_CALLBACK(balsa_ab_window_remove_from_recipient_list),
ab);
@@ -401,9 +401,9 @@ balsa_ab_window_init(BalsaAbWindow *ab)
box2 = gtk_box_new(GTK_ORIENTATION_VERTICAL, 2);
gtk_box_set_homogeneous(GTK_BOX(box2), TRUE);
gtk_container_add(GTK_CONTAINER(frame), box2);
- gtk_box_pack_start(GTK_BOX(box2), ab->single_address_mode_radio);
- gtk_box_pack_start(GTK_BOX(box2), ab->dist_address_mode_radio);
- gtk_box_pack_start(vbox, frame);
+ gtk_container_add(GTK_CONTAINER(box2), ab->single_address_mode_radio);
+ gtk_container_add(GTK_CONTAINER(box2), ab->dist_address_mode_radio);
+ gtk_container_add(GTK_CONTAINER(vbox), frame);
gtk_widget_grab_focus(ab->filter_entry);
}
diff --git a/src/address-book-config.c b/src/address-book-config.c
index e771c2fad..3ea8817b6 100644
--- a/src/address-book-config.c
+++ b/src/address-book-config.c
@@ -394,7 +394,7 @@ create_osmo_dialog(AddressBookConfig *abc)
grid = libbalsa_create_grid();
content_area = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
- gtk_box_pack_start(GTK_BOX(content_area), grid);
+ gtk_container_add(GTK_CONTAINER(content_area), grid);
gtk_file_chooser_set_extra_widget(GTK_FILE_CHOOSER(dialog), grid);
label = libbalsa_create_grid_label(_("A_ddress Book Name:"), grid, 0);
gtk_size_group_add_widget(size_group, label);
@@ -468,7 +468,7 @@ create_externq_dialog(AddressBookConfig * abc)
dialog = create_generic_dialog(abc, "Extern");
g_object_set(G_OBJECT(grid), "margin", 12, NULL);
- gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), grid);
+ gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), grid);
return dialog;
}
@@ -534,7 +534,7 @@ create_ldap_dialog(AddressBookConfig * abc)
dialog = create_generic_dialog(abc, "LDAP");
g_object_set(G_OBJECT(grid), "margin", 12, NULL);
- gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), grid);
+ gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), grid);
return dialog;
}
#endif
@@ -567,7 +567,7 @@ create_gpe_dialog(AddressBookConfig * abc)
dialog = create_generic_dialog(abc, "GPE");
g_object_set(G_OBJECT(grid), "margin", 12, NULL);
- gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), grid);
+ gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), grid);
return dialog;
}
#endif
diff --git a/src/balsa-app.c b/src/balsa-app.c
index 85b3489a4..07b566a79 100644
--- a/src/balsa-app.c
+++ b/src/balsa-app.c
@@ -90,17 +90,17 @@ ask_password_real(LibBalsaServer * server, LibBalsaMailbox * mbox)
#endif
content_area = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
gtk_box_set_spacing(GTK_BOX(content_area), HIG_PADDING);
- gtk_box_pack_start(GTK_BOX(content_area),
+ gtk_container_add(GTK_CONTAINER(content_area),
gtk_label_new_with_mnemonic(prompt));
g_free(prompt);
entry = gtk_entry_new();
- gtk_box_pack_start(GTK_BOX(content_area), entry);
+ gtk_container_add(GTK_CONTAINER(content_area), entry);
gtk_entry_set_width_chars(GTK_ENTRY(entry), 20);
gtk_entry_set_visibility(GTK_ENTRY(entry), FALSE);
rememb = gtk_check_button_new_with_mnemonic(_(remember_password_message));
- gtk_box_pack_start(GTK_BOX(content_area), rememb);
+ gtk_container_add(GTK_CONTAINER(content_area), rememb);
if(libbalsa_server_get_remember_passwd(server))
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rememb), TRUE);
diff --git a/src/balsa-index.c b/src/balsa-index.c
index 75fac6ba3..1b00b4af0 100644
--- a/src/balsa-index.c
+++ b/src/balsa-index.c
@@ -2894,7 +2894,7 @@ balsa_index_pipe(BalsaIndex *index)
gtk_box_set_spacing(GTK_BOX(vbox), HIG_PADDING);
label = gtk_label_new(_("Specify the program to run:"));
- gtk_box_pack_start(GTK_BOX(vbox), label);
+ gtk_container_add(GTK_CONTAINER(vbox), label);
info->entry = entry = gtk_combo_box_text_new_with_entry();
for (list = balsa_app.pipe_cmds; list; list = list->next) {
@@ -2902,7 +2902,7 @@ balsa_index_pipe(BalsaIndex *index)
list->data);
}
gtk_combo_box_set_active(GTK_COMBO_BOX(entry), 0);
- gtk_box_pack_start(GTK_BOX(vbox), entry);
+ gtk_container_add(GTK_CONTAINER(vbox), entry);
gtk_widget_show(label);
gtk_widget_show(entry);
diff --git a/src/balsa-mblist.c b/src/balsa-mblist.c
index 54080db86..df86d68ab 100644
--- a/src/balsa-mblist.c
+++ b/src/balsa-mblist.c
@@ -1816,7 +1816,7 @@ bmbl_mru_show_tree(GtkWidget * widget, gpointer data)
libbalsa_macosx_menu_for_parent(dialog, mru->window);
#endif
gtk_widget_set_vexpand(scroll, TRUE);
- gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), scroll);
+ gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), scroll);
g_signal_connect(dialog, "size-allocate",
G_CALLBACK(bmbl_mru_size_allocate_cb), NULL);
diff --git a/src/balsa-message.c b/src/balsa-message.c
index 7ba3cf355..a14a39dbe 100644
--- a/src/balsa-message.c
+++ b/src/balsa-message.c
@@ -563,7 +563,7 @@ bm_find_bar_new(BalsaMessage * bm)
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:")));
+ gtk_container_add(GTK_CONTAINER(hbox), gtk_label_new(_("Find:")));
bm->find_entry = gtk_entry_new();
/* Make sure we see "Esc" and "Return" key presses: */
@@ -588,7 +588,7 @@ bm_find_bar_new(BalsaMessage * bm)
g_signal_connect(bm->find_entry, "changed",
G_CALLBACK(bm_find_entry_changed_cb), bm);
- gtk_box_pack_start(GTK_BOX(hbox), bm->find_entry);
+ gtk_container_add(GTK_CONTAINER(hbox), bm->find_entry);
tool_item = gtk_tool_item_new();
gtk_container_add(GTK_CONTAINER(tool_item), hbox);
@@ -689,7 +689,7 @@ balsa_message_init(BalsaMessage * bm)
GtkEventController *controller;
bm->switcher = gtk_stack_switcher_new();
- gtk_box_pack_start(GTK_BOX(bm), bm->switcher);
+ gtk_container_add(GTK_CONTAINER(bm), bm->switcher);
bm->stack = gtk_stack_new();
stack = GTK_STACK(bm->stack);
@@ -697,7 +697,7 @@ balsa_message_init(BalsaMessage * bm)
GTK_STACK_TRANSITION_TYPE_SLIDE_UP_DOWN);
gtk_stack_switcher_set_stack(GTK_STACK_SWITCHER(bm->switcher), stack);
gtk_widget_set_vexpand(bm->stack, TRUE);
- gtk_box_pack_start(GTK_BOX(bm), bm->stack);
+ gtk_container_add(GTK_CONTAINER(bm), bm->stack);
/* Box to hold the scrolled window and the find bar */
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
@@ -715,7 +715,7 @@ balsa_message_init(BalsaMessage * bm)
gtk_widget_add_controller(scroll, controller);
gtk_widget_set_vexpand(scroll, TRUE);
- gtk_box_pack_start(GTK_BOX(vbox), scroll);
+ gtk_container_add(GTK_CONTAINER(vbox), scroll);
/* Widget to hold headers */
buttons = bm_header_tl_buttons(bm);
@@ -811,7 +811,7 @@ balsa_message_init(BalsaMessage * bm)
/* Find-in-message toolbar that is hidden by default. */
bm->find_bar = bm_find_bar_new(bm);
- gtk_box_pack_start(GTK_BOX(vbox), bm->find_bar);
+ gtk_container_add(GTK_CONTAINER(vbox), bm->find_bar);
}
static void
@@ -1542,7 +1542,7 @@ display_face(BalsaMessage * bm)
return;
}
- gtk_box_pack_start(GTK_BOX(face_box), image);
+ gtk_container_add(GTK_CONTAINER(face_box), image);
}
static void
@@ -2174,7 +2174,7 @@ add_part(BalsaMessage * bm, BalsaPartInfo * info, GtkWidget * container)
if ((widget = balsa_mime_widget_get_widget(info->mime_widget)) != NULL) {
gtk_widget_set_vexpand(widget, TRUE);
- gtk_box_pack_start(GTK_BOX(container), widget);
+ gtk_container_add(GTK_CONTAINER(container), widget);
}
bm_container = balsa_mime_widget_get_container(info->mime_widget);
diff --git a/src/balsa-mime-widget-crypto.c b/src/balsa-mime-widget-crypto.c
index b7ee09d48..82e993648 100644
--- a/src/balsa-mime-widget-crypto.c
+++ b/src/balsa-mime-widget-crypto.c
@@ -35,7 +35,7 @@
static void on_gpg_key_button(GtkWidget *button, const gchar *fingerprint);
static void on_key_import_button(GtkButton *button, gpointer user_data);
-static gboolean create_import_keys_widget(GtkBox *box, const gchar *key_buf, GError **error);
+static gboolean create_import_keys_widget(GtkContainer *box, const gchar *key_buf, GError **error);
static void show_public_key_data(GtkExpander *expander, gpointer user_data);
@@ -86,7 +86,7 @@ balsa_mime_widget_new_pgpkey(BalsaMessage *bm,
mw = g_object_new(BALSA_TYPE_MIME_WIDGET, NULL);
box = gtk_box_new(GTK_ORIENTATION_VERTICAL, BMW_VBOX_SPACE);
balsa_mime_widget_set_widget(mw, box);
- if (!create_import_keys_widget(GTK_BOX(box), body_buf, &err)) {
+ if (!create_import_keys_widget(GTK_CONTAINER(box), body_buf, &err)) {
balsa_information(LIBBALSA_INFORMATION_ERROR,
_("Could not process GnuPG keys: %s"),
err != NULL ? err->message : "Unknown error");
@@ -130,7 +130,7 @@ balsa_mime_widget_signature_widget(LibBalsaMessageBody * mime_body,
label = gtk_label_new((lines[1] != NULL) ? lines[1] : lines[0]);
gtk_label_set_selectable(GTK_LABEL(label), TRUE);
gtk_widget_set_halign(label, GTK_ALIGN_START);
- gtk_box_pack_start(GTK_BOX(vbox), label);
+ gtk_container_add(GTK_CONTAINER(vbox), label);
if (g_mime_gpgme_sigstat_get_protocol(mime_body->sig_info)
== GPGME_PROTOCOL_OpenPGP) {
GtkWidget *button;
@@ -144,7 +144,7 @@ balsa_mime_widget_signature_widget(LibBalsaMessageBody * mime_body,
G_CALLBACK(on_gpg_key_button),
(gpointer) g_mime_gpgme_sigstat_get_fingerprint
(mime_body->sig_info));
- gtk_box_pack_start(GTK_BOX(vbox), button);
+ gtk_container_add(GTK_CONTAINER(vbox), button);
}
/* Hack alert: if we omit the box below and use the expander as signature widget
@@ -153,7 +153,7 @@ balsa_mime_widget_signature_widget(LibBalsaMessageBody * mime_body,
* the label... */
signature_widget = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
expander = gtk_expander_new(lines[0]);
- gtk_box_pack_start(GTK_BOX(signature_widget), expander);
+ gtk_container_add(GTK_CONTAINER(signature_widget), expander);
gtk_container_add(GTK_CONTAINER(expander), vbox);
/* add a callback to load the key when the user wants to show the details
@@ -164,6 +164,7 @@ balsa_mime_widget_signature_widget(LibBalsaMessageBody * mime_body,
(g_mime_gpgme_sigstat_get_key(mime_body->sig_info) == NULL)) {
g_signal_connect(expander, "activate", (GCallback) show_public_key_data, mime_body);
g_object_set_data(G_OBJECT(expander), "vbox", vbox);
+ g_object_set_data(G_OBJECT(expander), "label", label);
}
g_object_set(G_OBJECT(signature_widget), "margin", BMW_CONTAINER_BORDER, NULL);
@@ -187,7 +188,7 @@ balsa_mime_widget_crypto_frame(LibBalsaMessageBody * mime_body, GtkWidget * chil
gtk_container_add(GTK_CONTAINER(frame), vbox);
icon_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, BMW_VBOX_SPACE);
if (was_encrypted)
- gtk_box_pack_start(GTK_BOX(icon_box),
+ gtk_container_add(GTK_CONTAINER(icon_box),
gtk_image_new_from_icon_name
(balsa_icon_id(BALSA_PIXMAP_ENCR)));
if (!no_signature) {
@@ -195,17 +196,17 @@ balsa_mime_widget_crypto_frame(LibBalsaMessageBody * mime_body, GtkWidget * chil
balsa_mime_widget_signature_icon_name(libbalsa_message_body_protect_state(mime_body));
if (!icon_name)
icon_name = BALSA_PIXMAP_SIGN;
- gtk_box_pack_start(GTK_BOX(icon_box),
+ gtk_container_add(GTK_CONTAINER(icon_box),
gtk_image_new_from_icon_name
(balsa_icon_id(icon_name)));
}
gtk_frame_set_label_widget(GTK_FRAME(frame), icon_box);
g_object_set(G_OBJECT(vbox), "margin", BMW_MESSAGE_PADDING, NULL);
- gtk_box_pack_start(GTK_BOX(vbox), child);
+ gtk_container_add(GTK_CONTAINER(vbox), child);
if (signature) {
- gtk_box_pack_end(GTK_BOX(vbox), signature);
+ gtk_container_add(GTK_CONTAINER(vbox), signature);
}
return frame;
@@ -288,7 +289,7 @@ on_key_import_button(GtkButton *button,
static gboolean
-create_import_keys_widget(GtkBox *box, const gchar *key_buf, GError **error)
+create_import_keys_widget(GtkContainer *box, const gchar *key_buf, GError **error)
{
gboolean success = FALSE;
gpgme_ctx_t ctx;
@@ -321,19 +322,19 @@ create_import_keys_widget(GtkBox *box, const gchar *key_buf, GError **error)
success = FALSE;
} else {
key_widget = libbalsa_gpgme_key(this_key, NULL,
GPG_SUBKEY_CAP_ALL, FALSE);
- gtk_box_pack_start(box, key_widget);
+ gtk_container_add(box, key_widget);
import_btn = gtk_button_new_with_label(_("Import key into the
local key ring"));
g_object_set_data_full(G_OBJECT(import_btn), "keydata",
key_ascii, (GDestroyNotify) g_free);
g_signal_connect(G_OBJECT(import_btn), "clicked", (GCallback)
on_key_import_button, NULL);
- gtk_box_pack_start(box, import_btn);
+ gtk_container_add(box, import_btn);
if (item->next != NULL) {
GtkWidget *separator;
separator =
gtk_separator_new(GTK_ORIENTATION_HORIZONTAL);
gtk_widget_set_margin_top(separator, BMW_VBOX_SPACE);
- gtk_box_pack_start(box, separator);
+ gtk_container_add(box, separator);
}
}
}
@@ -370,14 +371,15 @@ show_public_key_data(GtkExpander *expander,
key != NULL) {
GtkWidget *key_widget;
GtkBox *vbox;
+ GtkWidget *label;
const gchar *fingerprint;
vbox = GTK_BOX(g_object_steal_data(G_OBJECT(expander), "vbox"));
fingerprint =
g_mime_gpgme_sigstat_get_fingerprint(body->sig_info);
key_widget = libbalsa_gpgme_key(key, fingerprint, 0U, FALSE);
- gtk_box_pack_start(vbox, key_widget);
- gtk_box_reorder_child(vbox, key_widget, 1U);
+ label = g_object_get_data(G_OBJECT(expander), "label");
+ gtk_box_insert_child_after(vbox, key_widget, label);
}
}
}
diff --git a/src/balsa-mime-widget-message.c b/src/balsa-mime-widget-message.c
index 459a900d0..809e970f4 100644
--- a/src/balsa-mime-widget-message.c
+++ b/src/balsa-mime-widget-message.c
@@ -138,7 +138,7 @@ balsa_mime_widget_new_message(BalsaMessage * bm,
balsa_mime_widget_set_container(mw, container);
header_widget = bm_header_widget_new(bm, NULL);
- gtk_box_pack_start(GTK_BOX(container), header_widget);
+ gtk_container_add(GTK_CONTAINER(container), header_widget);
balsa_mime_widget_set_header_widget(mw, header_widget);
bmw_message_set_headers(bm, mw, mime_body,
@@ -244,12 +244,12 @@ bmw_message_extbody_url(LibBalsaMessageBody * mime_body,
widget = gtk_box_new(GTK_ORIENTATION_VERTICAL, BMW_VBOX_SPACE);
g_object_set(G_OBJECT(widget), "margin", BMW_CONTAINER_BORDER, NULL);
- gtk_box_pack_start(GTK_BOX(widget), gtk_label_new(msg->str));
+ gtk_container_add(GTK_CONTAINER(widget), 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_box_pack_start(GTK_BOX(widget), button);
+ gtk_container_add(GTK_CONTAINER(widget), button);
g_object_set_data_full(G_OBJECT(button), "call_url", url,
(GDestroyNotify) g_free);
g_signal_connect(G_OBJECT(button), "clicked",
@@ -292,14 +292,14 @@ bmw_message_extbody_mail(LibBalsaMessageBody * mime_body)
widget = gtk_box_new(GTK_ORIENTATION_VERTICAL, BMW_VBOX_SPACE);
g_object_set(G_OBJECT(widget), "margin", BMW_CONTAINER_BORDER, NULL);
- gtk_box_pack_start(GTK_BOX(widget), gtk_label_new(msg->str));
+ gtk_container_add(GTK_CONTAINER(widget), gtk_label_new(msg->str));
g_string_free(msg, TRUE);
button =
gtk_button_new_with_mnemonic(_
("Se_nd message to obtain this part"));
gtk_widget_set_margin_top(button, BMW_BUTTON_PACK_SPACE);
- gtk_box_pack_start(GTK_BOX(widget), button);
+ gtk_container_add(GTK_CONTAINER(widget), button);
g_signal_connect(G_OBJECT(button), "clicked",
G_CALLBACK(extbody_send_mail), (gpointer) mime_body);
@@ -418,14 +418,14 @@ balsa_mime_widget_new_message_tl(BalsaMessage * bm,
headers = bm_header_widget_new(bm, tl_buttons);
balsa_mime_widget_set_header_widget(mw, headers);
- gtk_box_pack_start(GTK_BOX(box), headers);
+ gtk_container_add(GTK_CONTAINER(box), headers);
container = gtk_box_new(GTK_ORIENTATION_VERTICAL, BMW_MESSAGE_PADDING);
balsa_mime_widget_set_container(mw, container);
gtk_widget_set_vexpand(container, TRUE);
gtk_widget_set_margin_top(container,
BMW_CONTAINER_BORDER - BMW_MESSAGE_PADDING);
- gtk_box_pack_start(GTK_BOX(box), container);
+ gtk_container_add(GTK_CONTAINER(box), container);
return mw;
}
@@ -473,13 +473,9 @@ bm_header_widget_new(BalsaMessage * bm, GtkWidget * const * buttons)
{
GtkWidget *grid;
GtkEventController *controller;
-#ifdef GTK_INFO_BAR_WRAPPING_IS_BROKEN
- GtkWidget *hbox;
-#else /* GTK_INFO_BAR_WRAPPING_IS_BROKEN */
GtkWidget *info_bar_widget;
GtkInfoBar *info_bar;
GtkWidget *content_area;
-#endif /* GTK_INFO_BAR_WRAPPING_IS_BROKEN */
GtkWidget *action_area;
GtkWidget *widget;
GtkWidget *face_box;
@@ -495,32 +491,21 @@ bm_header_widget_new(BalsaMessage * bm, GtkWidget * const * buttons)
G_CALLBACK(balsa_mime_widget_key_press_event), bm);
gtk_widget_add_controller(grid, controller);
-#ifdef GTK_INFO_BAR_WRAPPING_IS_BROKEN
- hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
- gtk_box_pack_start(GTK_BOX(hbox), grid);
- g_object_set(G_OBJECT(hbox), "margin", 6, NULL);
-
- action_area = gtk_button_box_new(GTK_ORIENTATION_VERTICAL);
- gtk_button_box_set_layout(GTK_BUTTON_BOX(action_area),
- GTK_BUTTONBOX_START);
- gtk_box_pack_end(GTK_BOX(hbox), action_area);
-#else /* GTK_INFO_BAR_WRAPPING_IS_BROKEN */
info_bar_widget = gtk_info_bar_new();
info_bar = GTK_INFO_BAR(info_bar_widget);
content_area = gtk_info_bar_get_content_area(info_bar);
- gtk_box_pack_start(GTK_BOX(content_area), grid);
+ gtk_container_add(GTK_CONTAINER(content_area), grid);
action_area = gtk_info_bar_get_action_area(info_bar);
gtk_orientable_set_orientation(GTK_ORIENTABLE(action_area),
GTK_ORIENTATION_VERTICAL);
gtk_button_box_set_layout(GTK_BUTTON_BOX(action_area),
GTK_BUTTONBOX_START);
-#endif /* GTK_INFO_BAR_WRAPPING_IS_BROKEN */
face_box = balsa_message_get_face_box(bm);
if (face_box == NULL) {
face_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
- gtk_box_pack_start(GTK_BOX(action_area), face_box);
+ gtk_container_add(GTK_CONTAINER(action_area), face_box);
gtk_button_box_set_child_non_homogeneous(GTK_BUTTON_BOX(action_area),
face_box, TRUE);
balsa_message_set_face_box(bm, face_box);
@@ -528,17 +513,13 @@ bm_header_widget_new(BalsaMessage * bm, GtkWidget * const * buttons)
if (buttons) {
while (*buttons) {
- gtk_box_pack_start(GTK_BOX(action_area), *buttons++);
+ gtk_container_add(GTK_CONTAINER(action_area), *buttons++);
}
}
widget = gtk_frame_new(NULL);
gtk_frame_set_shadow_type(GTK_FRAME(widget), GTK_SHADOW_IN);
-#ifdef GTK_INFO_BAR_WRAPPING_IS_BROKEN
- gtk_container_add(GTK_CONTAINER(widget), hbox);
-#else /* GTK_INFO_BAR_WRAPPING_IS_BROKEN */
gtk_container_add(GTK_CONTAINER(widget), info_bar_widget);
-#endif /* GTK_INFO_BAR_WRAPPING_IS_BROKEN */
g_object_set_data(G_OBJECT(widget), BALSA_MESSAGE_GRID, grid);
@@ -655,8 +636,8 @@ add_header_gchar(GtkGrid * grid, const gchar * header, const gchar * label,
G_CALLBACK(label_size_allocate_cb), expander);
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
- gtk_box_pack_start(GTK_BOX(hbox), value_label);
- gtk_box_pack_start(GTK_BOX(hbox), expander);
+ gtk_container_add(GTK_CONTAINER(hbox), value_label);
+ gtk_container_add(GTK_CONTAINER(hbox), expander);
gtk_grid_attach_next_to(grid, hbox, lab, GTK_POS_RIGHT, 1, 1);
}
diff --git a/src/balsa-mime-widget-vcalendar.c b/src/balsa-mime-widget-vcalendar.c
index 75f0109d3..5c4e7fc08 100644
--- a/src/balsa-mime-widget-vcalendar.c
+++ b/src/balsa-mime-widget-vcalendar.c
@@ -72,7 +72,7 @@ balsa_mime_widget_new_vcalendar(BalsaMessage * bm,
g_free(text);
gtk_widget_set_halign(label, GTK_ALIGN_START);
gtk_widget_set_valign(label, GTK_ALIGN_START);
- gtk_box_pack_start(GTK_BOX(widget), label);
+ gtk_container_add(GTK_CONTAINER(widget), label);
/* a reply may be created only for unread requests */
if ((method == ITIP_REQUEST) &&
@@ -95,7 +95,7 @@ balsa_mime_widget_new_vcalendar(BalsaMessage * bm,
GtkWidget *event =
balsa_vevent_widget((LibBalsaVEvent *) l->data, may_reply,
sender);
- gtk_box_pack_start(GTK_BOX(widget), event);
+ gtk_container_add(GTK_CONTAINER(widget), event);
}
g_object_unref(vcal_obj);
@@ -237,14 +237,14 @@ balsa_vevent_widget(LibBalsaVEvent * event, gboolean may_reply,
(GDestroyNotify) g_object_unref);
/* pack everything into a box */
- gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(grid));
+ gtk_container_add(GTK_CONTAINER(box), GTK_WIDGET(grid));
label =
gtk_label_new(_("The sender asks you for a reply to this request:"));
- gtk_box_pack_start(GTK_BOX(box), label);
+ gtk_container_add(GTK_CONTAINER(box), label);
bbox = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL);
gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox),
GTK_BUTTONBOX_SPREAD);
- gtk_box_pack_start(GTK_BOX(box), bbox);
+ gtk_container_add(GTK_CONTAINER(box), bbox);
button = gtk_button_new_with_label(_("Accept"));
g_object_set_data_full(G_OBJECT(button), "event", event,
@@ -253,7 +253,7 @@ balsa_vevent_widget(LibBalsaVEvent * event, gboolean may_reply,
GINT_TO_POINTER(VCAL_PSTAT_ACCEPTED));
g_signal_connect(G_OBJECT(button), "clicked",
G_CALLBACK(vevent_reply), bbox);
- gtk_box_pack_start(GTK_BOX(bbox), button);
+ gtk_container_add(GTK_CONTAINER(bbox), button);
button = gtk_button_new_with_label(_("Accept tentatively"));
g_object_set_data(G_OBJECT(button), "event", event);
@@ -261,7 +261,7 @@ balsa_vevent_widget(LibBalsaVEvent * event, gboolean may_reply,
GINT_TO_POINTER(VCAL_PSTAT_TENTATIVE));
g_signal_connect(G_OBJECT(button), "clicked",
G_CALLBACK(vevent_reply), bbox);
- gtk_box_pack_start(GTK_BOX(bbox), button);
+ gtk_container_add(GTK_CONTAINER(bbox), button);
button = gtk_button_new_with_label(_("Decline"));
g_object_set_data(G_OBJECT(button), "event", event);
@@ -269,7 +269,7 @@ balsa_vevent_widget(LibBalsaVEvent * event, gboolean may_reply,
GINT_TO_POINTER(VCAL_PSTAT_DECLINED));
g_signal_connect(G_OBJECT(button), "clicked",
G_CALLBACK(vevent_reply), bbox);
- gtk_box_pack_start(GTK_BOX(bbox), button);
+ gtk_container_add(GTK_CONTAINER(bbox), button);
return box;
} else
diff --git a/src/balsa-mime-widget.c b/src/balsa-mime-widget.c
index 35d2a70fb..dc748edee 100644
--- a/src/balsa-mime-widget.c
+++ b/src/balsa-mime-widget.c
@@ -181,7 +181,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(priv->widget), gtk_label_new(msg));
+ gtk_container_add(GTK_CONTAINER(priv->widget), gtk_label_new(msg));
g_free(msg);
}
@@ -235,7 +235,7 @@ balsa_mime_widget_new_unknown(BalsaMessage * bm,
msg_label = gtk_label_new(msg);
g_free(msg);
gtk_label_set_ellipsize(GTK_LABEL(msg_label), PANGO_ELLIPSIZE_END);
- gtk_box_pack_start(GTK_BOX(priv->widget), msg_label);
+ gtk_container_add(GTK_CONTAINER(priv->widget), msg_label);
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, BMW_HBOX_SPACE);
gtk_box_set_homogeneous(GTK_BOX(hbox), TRUE);
@@ -243,9 +243,9 @@ balsa_mime_widget_new_unknown(BalsaMessage * bm,
G_CALLBACK(balsa_mime_widget_ctx_menu_cb),
(gpointer) mime_body))) {
gtk_widget_set_hexpand(button, TRUE);
- gtk_box_pack_start(GTK_BOX(hbox), button);
+ gtk_container_add(GTK_CONTAINER(hbox), button);
} else {
- gtk_box_pack_start(GTK_BOX(priv->widget),
+ gtk_container_add(GTK_CONTAINER(priv->widget),
gtk_label_new(_("No open or view action "
"defined for this content type")));
}
@@ -253,12 +253,12 @@ balsa_mime_widget_new_unknown(BalsaMessage * bm,
button = gtk_button_new_with_mnemonic(_("S_ave part"));
gtk_widget_set_hexpand(button, TRUE);
- gtk_box_pack_start(GTK_BOX(hbox), button);
+ gtk_container_add(GTK_CONTAINER(hbox), button);
g_signal_connect(G_OBJECT(button), "clicked",
G_CALLBACK(balsa_mime_widget_ctx_menu_save),
(gpointer) mime_body);
- gtk_box_pack_start(GTK_BOX(priv->widget), hbox);
+ gtk_container_add(GTK_CONTAINER(priv->widget), hbox);
return mw;
}
diff --git a/src/compose-window.c b/src/compose-window.c
index 981dd5c7d..b71fc8585 100644
--- a/src/compose-window.c
+++ b/src/compose-window.c
@@ -1764,9 +1764,9 @@ sw_get_user_codeset(BalsaComposeWindow *compose_window,
g_free(msg);
content_box = GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog)));
gtk_box_set_spacing(content_box, 5);
- gtk_box_pack_start(content_box, info);
+ gtk_container_add(GTK_CONTAINER(content_box), info);
gtk_widget_set_vexpand(charset_button, TRUE);
- gtk_box_pack_start(content_box, charset_button);
+ gtk_container_add(GTK_CONTAINER(content_box), charset_button);
gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK);
if (change_type) {
@@ -1775,9 +1775,9 @@ sw_get_user_codeset(BalsaComposeWindow *compose_window,
combo_box = gtk_combo_box_text_new();
gtk_widget_set_vexpand(hbox, TRUE);
- gtk_box_pack_start(content_box, hbox);
+ gtk_container_add(GTK_CONTAINER(content_box), hbox);
gtk_widget_set_hexpand(label, TRUE);
- gtk_box_pack_start(GTK_BOX(hbox), label);
+ gtk_container_add(GTK_CONTAINER(hbox), label);
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box),
mime_type);
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box),
@@ -1787,7 +1787,7 @@ sw_get_user_codeset(BalsaComposeWindow *compose_window,
G_CALLBACK(sw_charset_combo_box_changed),
charset_button);
gtk_widget_set_hexpand(combo_box, TRUE);
- gtk_box_pack_start(GTK_BOX(hbox), combo_box);
+ gtk_container_add(GTK_CONTAINER(hbox), combo_box);
}
if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK) {
@@ -3648,14 +3648,14 @@ 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);
- gtk_box_pack_start(GTK_BOX(hbox), image);
+ gtk_container_add(GTK_CONTAINER(vbox), label);
+ gtk_container_add(GTK_CONTAINER(hbox), image);
gtk_widget_set_hexpand(vbox, TRUE);
- gtk_box_pack_start(GTK_BOX(hbox), vbox);
+ gtk_container_add(GTK_CONTAINER(hbox), vbox);
content_box = GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog)));
gtk_widget_set_vexpand(hbox, TRUE);
- gtk_box_pack_start(content_box, hbox);
+ gtk_container_add(GTK_CONTAINER(content_box), hbox);
g_object_set(G_OBJECT(hbox), "margin", 5, NULL);
gtk_box_set_spacing(content_box, 14);
@@ -3667,7 +3667,7 @@ quote_parts_select_dlg(GtkTreeStore *tree_store,
GTK_POLICY_AUTOMATIC);
g_object_set(G_OBJECT(scroll), "margin", 5, NULL);
gtk_widget_set_hexpand(scroll, TRUE);
- gtk_box_pack_start(GTK_BOX(vbox), scroll);
+ gtk_container_add(GTK_CONTAINER(vbox), scroll);
/* add the tree view */
tree_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(tree_store));
@@ -5429,38 +5429,38 @@ subject_not_empty(BalsaComposeWindow *compose_window)
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 12);
gtk_widget_set_vexpand(hbox, TRUE);
- gtk_box_pack_start (GTK_BOX (dialog_vbox), hbox);
+ gtk_container_add (GTK_CONTAINER (dialog_vbox), hbox);
g_object_set(G_OBJECT(hbox), "margin", 6, NULL);
image = gtk_image_new_from_icon_name("dialog-question");
- gtk_box_pack_start (GTK_BOX (hbox), image);
+ gtk_container_add (GTK_CONTAINER (hbox), image);
gtk_widget_set_valign(image, GTK_ALIGN_START);
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 12);
gtk_widget_set_hexpand(vbox, TRUE);
- gtk_box_pack_start (GTK_BOX (hbox), vbox);
+ 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"),
_("If you would like to provide one, enter it below."));
label = gtk_label_new (text_str);
g_free(text_str);
- gtk_box_pack_start (GTK_BOX (vbox), label);
+ gtk_container_add (GTK_CONTAINER (vbox), label);
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
gtk_widget_set_halign(label, GTK_ALIGN_START);
gtk_widget_set_valign(label, GTK_ALIGN_START);
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
- gtk_box_pack_start (GTK_BOX (vbox), hbox);
+ gtk_container_add (GTK_CONTAINER (vbox), hbox);
label = gtk_label_new (_("Subject:"));
- gtk_box_pack_start (GTK_BOX (hbox), label);
+ gtk_container_add (GTK_CONTAINER (hbox), label);
subj_entry = gtk_entry_new ();
gtk_entry_set_text(GTK_ENTRY(subj_entry), _("(no subject)"));
gtk_widget_set_hexpand(subj_entry, TRUE);
- gtk_box_pack_start (GTK_BOX (hbox), subj_entry);
+ gtk_container_add (GTK_CONTAINER (hbox), subj_entry);
gtk_entry_set_activates_default (GTK_ENTRY (subj_entry), TRUE);
gtk_dialog_set_default_response(GTK_DIALOG (no_subj_dialog),
GTK_RESPONSE_OK);
@@ -5556,9 +5556,9 @@ check_suggest_encryption(BalsaComposeWindow *compose_window)
gtk_widget_set_valign(hbox, GTK_ALIGN_CENTER);
gtk_container_add(GTK_CONTAINER(button), hbox);
image = gtk_image_new_from_icon_name(balsa_icon_id(BALSA_PIXMAP_GPG_ENCRYPT));
- gtk_box_pack_start(GTK_BOX(hbox), image);
+ gtk_container_add(GTK_CONTAINER(hbox), image);
label = gtk_label_new_with_mnemonic(_("Send _encrypted"));
- gtk_box_pack_start(GTK_BOX(hbox), label);
+ gtk_container_add(GTK_CONTAINER(hbox), label);
button = gtk_button_new();
gtk_dialog_add_action_widget(GTK_DIALOG(dialog), button, GTK_RESPONSE_NO);
@@ -5569,9 +5569,9 @@ check_suggest_encryption(BalsaComposeWindow *compose_window)
gtk_widget_set_valign(hbox, GTK_ALIGN_CENTER);
gtk_container_add(GTK_CONTAINER(button), hbox);
image = gtk_image_new_from_icon_name(balsa_icon_id(BALSA_PIXMAP_SEND));
- gtk_box_pack_start(GTK_BOX(hbox), image);
+ gtk_container_add(GTK_CONTAINER(hbox), image);
label = gtk_label_new_with_mnemonic(_("Send _unencrypted"));
- gtk_box_pack_start(GTK_BOX(hbox), label);
+ gtk_container_add(GTK_CONTAINER(hbox), label);
button = gtk_button_new_with_mnemonic(_("_Cancel"));
gtk_dialog_add_action_widget(GTK_DIALOG(dialog), button, GTK_RESPONSE_CANCEL);
@@ -7237,7 +7237,7 @@ balsa_compose_window_new()
#if HAVE_MACOSX_DESKTOP
libbalsa_macosx_menu(window, GTK_MENU_SHELL(menubar));
#else
- gtk_box_pack_start(GTK_BOX(main_box), menubar);
+ gtk_container_add(GTK_CONTAINER(main_box), menubar);
#endif
/*
@@ -7251,7 +7251,7 @@ balsa_compose_window_new()
model = balsa_compose_window_get_toolbar_model();
compose_window->toolbar = balsa_toolbar_new(model, G_ACTION_MAP(window));
- gtk_box_pack_start(GTK_BOX(main_box), compose_window->toolbar);
+ gtk_container_add(GTK_CONTAINER(main_box), compose_window->toolbar);
compose_window->flow = !balsa_app.wordwrap;
sw_action_set_enabled(compose_window, "reflow", compose_window->flow);
@@ -7281,7 +7281,7 @@ balsa_compose_window_new()
* bottom: */
compose_window->paned = paned = gtk_paned_new(GTK_ORIENTATION_VERTICAL);
gtk_widget_set_vexpand(paned, TRUE);
- gtk_box_pack_start(GTK_BOX(main_box), paned);
+ gtk_container_add(GTK_CONTAINER(main_box), paned);
/* create the top portion with the to, from, etc in it */
gtk_paned_add1(GTK_PANED(paned), create_info_pane(compose_window));
diff --git a/src/filter-edit-callbacks.c b/src/filter-edit-callbacks.c
index 020a83a85..d790b84be 100644
--- a/src/filter-edit-callbacks.c
+++ b/src/filter-edit-callbacks.c
@@ -1004,7 +1004,7 @@ build_type_notebook()
box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5);
g_object_set(box, "margin", 5, NULL);
gtk_widget_set_vexpand(grid, TRUE);
- gtk_box_pack_start(GTK_BOX(box), grid);
+ gtk_container_add(GTK_CONTAINER(box), grid);
fe_type_simple_label =
gtk_label_new_with_mnemonic(_("One of the specified f_ields contains"));
@@ -1035,7 +1035,7 @@ build_type_notebook()
#if REGULAR_EXPRESSION_FILTERING_IS_IMPLEMENTED
page = gtk_table_new(5, 6, FALSE);
gtk_widget_set_vexpand(page, TRUE);
- gtk_box_pack_start(GTK_BOX(box), page);
+ gtk_container_add(GTK_CONTAINER(box), page);
fe_type_regex_label =
gtk_label_new_with_mnemonic(_("_One of the regular expressions matches"));
@@ -1068,17 +1068,17 @@ build_type_notebook()
GTK_FILL | GTK_SHRINK | GTK_EXPAND, GTK_SHRINK, 2, 2);
button = gtk_button_new_with_mnemonic(_("A_dd"));
gtk_widget_set_vexpand(button, TRUE);
- gtk_box_pack_start(GTK_BOX(box), button);
+ gtk_container_add(GTK_CONTAINER(box), button);
g_signal_connect(G_OBJECT(button), "clicked",
G_CALLBACK(fe_add_pressed), NULL);
fe_regex_remove_button = gtk_button_new_with_mnemonic(_("_Remove"));
gtk_widget_set_vexpand(fe_regex_remove_button, TRUE);
- gtk_box_pack_start(GTK_BOX(box), fe_regex_remove_button);
+ gtk_container_add(GTK_CONTAINER(box), fe_regex_remove_button);
g_signal_connect(G_OBJECT(fe_regex_remove_button), "clicked",
G_CALLBACK(fe_remove_pressed), NULL);
button = gtk_button_new_with_mnemonic(_("One _Matches/None Matches"));
gtk_widget_set_vexpand(button, TRUE);
- gtk_box_pack_start(GTK_BOX(box), button);
+ gtk_container_add(GTK_CONTAINER(box), button);
g_signal_connect(G_OBJECT(button), "clicked",
G_CALLBACK(fe_negate_condition), NULL);
@@ -1091,7 +1091,7 @@ build_type_notebook()
msg = _("Filtering using regular expressions is not yet implemented.");
label = gtk_label_new(msg);
gtk_widget_set_vexpand(label, TRUE);
- gtk_box_pack_start(GTK_BOX(box), label);
+ gtk_container_add(GTK_CONTAINER(box), label);
#endif /* REGULAR_EXPRESSION_FILTERING_IS_IMPLEMENTED */
/* The date page of the notebook */
@@ -1178,23 +1178,23 @@ void build_condition_dialog(GtkWidget * condition_dialog)
* conditions of the filter */
box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5);
label = gtk_label_new_with_mnemonic(_("Search T_ype:"));
- gtk_box_pack_start(GTK_BOX(box), label);
+ 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_box_pack_start(GTK_BOX(box), fe_search_option_menu);
+ 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)));
gtk_widget_set_margin_top(box, 2);
- gtk_box_pack_start(content_box, box);
+ gtk_container_add(GTK_CONTAINER(content_box), box);
gtk_widget_set_margin_top(field_frame, 2);
- gtk_box_pack_start(content_box, field_frame);
+ gtk_container_add(GTK_CONTAINER(content_box), field_frame);
build_type_notebook();
gtk_widget_set_margin_top(fe_type_notebook, 2);
- gtk_box_pack_start(content_box, fe_type_notebook);
+ 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 ea79340e0..5e62e0fc1 100644
--- a/src/filter-edit-dialog.c
+++ b/src/filter-edit-dialog.c
@@ -212,26 +212,26 @@ build_left_side(void)
gtk_container_add(GTK_CONTAINER(sw), GTK_WIDGET(fe_filters_list));
gtk_widget_set_vexpand(sw, TRUE);
- gtk_box_pack_start(GTK_BOX(vbox), sw);
+ gtk_container_add(GTK_CONTAINER(vbox), sw);
/* new and delete buttons */
bbox = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL);
gtk_box_set_spacing(GTK_BOX(bbox), 2);
gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_SPREAD);
- gtk_box_pack_start(GTK_BOX(vbox), bbox);
+ gtk_container_add(GTK_CONTAINER(vbox), bbox);
/* new button */
/* Translators: button "New" filter */
fe_new_button = gtk_button_new_with_mnemonic(C_("filter", "_New"));
g_signal_connect(G_OBJECT(fe_new_button), "clicked",
G_CALLBACK(fe_new_pressed), NULL);
- gtk_box_pack_start(GTK_BOX(bbox), fe_new_button);
+ gtk_container_add(GTK_CONTAINER(bbox), fe_new_button);
/* delete button */
fe_delete_button = gtk_button_new_with_mnemonic(("_Delete"));
g_signal_connect(G_OBJECT(fe_delete_button), "clicked",
G_CALLBACK(fe_delete_pressed), NULL);
- gtk_box_pack_start(GTK_BOX(bbox), fe_delete_button);
+ gtk_container_add(GTK_CONTAINER(bbox), fe_delete_button);
gtk_widget_set_sensitive(fe_delete_button, FALSE);
return vbox;
@@ -284,7 +284,7 @@ build_match_page()
NULL, NULL);
g_signal_connect(fe_op_codes_option_menu, "changed",
G_CALLBACK(fe_action_changed), NULL);
- gtk_box_pack_start(GTK_BOX(box), fe_op_codes_option_menu);
+ gtk_container_add(GTK_CONTAINER(box), fe_op_codes_option_menu);
/* list of conditions defining how this filter matches */
@@ -309,17 +309,17 @@ build_match_page()
gtk_grid_attach(GTK_GRID(page), box, 0, 3, 2, 1);
fe_condition_edit_button = gtk_button_new_with_mnemonic(_("_Edit"));
gtk_widget_set_sensitive(fe_condition_edit_button,FALSE);
- gtk_box_pack_start(GTK_BOX(box), fe_condition_edit_button);
+ gtk_container_add(GTK_CONTAINER(box), fe_condition_edit_button);
g_signal_connect(G_OBJECT(fe_condition_edit_button), "clicked",
G_CALLBACK(fe_edit_condition), GINT_TO_POINTER(0));
/* Translators: button "New" filter match */
button = gtk_button_new_with_mnemonic(C_("filter match", "Ne_w"));
- gtk_box_pack_start(GTK_BOX(box), button);
+ gtk_container_add(GTK_CONTAINER(box), button);
g_signal_connect(G_OBJECT(button), "clicked",
G_CALLBACK(fe_edit_condition), GINT_TO_POINTER(1));
fe_condition_delete_button = gtk_button_new_with_mnemonic(_("_Remove"));
gtk_widget_set_sensitive(fe_condition_delete_button,FALSE);
- gtk_box_pack_start(GTK_BOX(box), fe_condition_delete_button);
+ gtk_container_add(GTK_CONTAINER(box), fe_condition_delete_button);
g_signal_connect(G_OBJECT(fe_condition_delete_button), "clicked",
G_CALLBACK(fe_condition_remove_pressed), NULL);
@@ -385,7 +385,7 @@ build_action_page(GtkWindow * window)
frame = gtk_frame_new(_("Notification:"));
gtk_frame_set_label_align(GTK_FRAME(frame), GTK_POS_LEFT);
gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN);
- gtk_box_pack_start(GTK_BOX(page), frame);
+ gtk_container_add(GTK_CONTAINER(page), frame);
grid = gtk_grid_new();
gtk_grid_set_row_spacing(GTK_GRID(grid), 5);
@@ -437,7 +437,7 @@ build_action_page(GtkWindow * window)
frame = gtk_frame_new(_("Action to perform:"));
gtk_frame_set_label_align(GTK_FRAME(frame), GTK_POS_LEFT);
gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN);
- gtk_box_pack_start(GTK_BOX(page), frame);
+ gtk_container_add(GTK_CONTAINER(page), frame);
box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 2);
gtk_box_set_homogeneous(GTK_BOX(box), TRUE);
@@ -448,7 +448,7 @@ build_action_page(GtkWindow * window)
fe_build_option_menu(fe_actions, G_N_ELEMENTS(fe_actions),
G_CALLBACK(fe_action_selected), NULL);
gtk_widget_set_vexpand(fe_action_option_menu, TRUE);
- gtk_box_pack_start(GTK_BOX(box), fe_action_option_menu);
+ gtk_container_add(GTK_CONTAINER(box), fe_action_option_menu);
/* FIXME : we use the global mru folder list, perhaps we should use
our own. We'll see this later, for now let's make something usable
@@ -460,11 +460,11 @@ build_action_page(GtkWindow * window)
g_signal_connect(G_OBJECT(fe_mailboxes), "changed",
G_CALLBACK(fe_action_changed), NULL);
gtk_widget_set_vexpand(fe_mailboxes, TRUE);
- gtk_box_pack_start(GTK_BOX(box), fe_mailboxes);
+ gtk_container_add(GTK_CONTAINER(box), fe_mailboxes);
fe_color_buttons = fe_make_color_buttons();
gtk_widget_set_vexpand(fe_color_buttons, TRUE);
- gtk_box_pack_start(GTK_BOX(box), fe_color_buttons);
+ gtk_container_add(GTK_CONTAINER(box), fe_color_buttons);
return page;
} /* end build_action_page() */
@@ -487,7 +487,7 @@ build_right_side(GtkWindow * window)
notebook = gtk_notebook_new();
gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_TOP);
gtk_widget_set_vexpand(notebook, TRUE);
- gtk_box_pack_start(GTK_BOX(rightside), notebook);
+ gtk_container_add(GTK_CONTAINER(rightside), notebook);
page = build_match_page();
gtk_notebook_append_page(GTK_NOTEBOOK(notebook),
@@ -498,17 +498,17 @@ build_right_side(GtkWindow * window)
/* button box */
bbox = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL);
- gtk_box_pack_start(GTK_BOX(rightside), bbox);
+ gtk_container_add(GTK_CONTAINER(rightside), bbox);
fe_apply_button = gtk_button_new_with_mnemonic(_("_Apply"));
g_signal_connect(G_OBJECT(fe_apply_button), "clicked",
G_CALLBACK(fe_apply_pressed), NULL);
- gtk_box_pack_start(GTK_BOX(bbox), fe_apply_button);
+ gtk_container_add(GTK_CONTAINER(bbox), fe_apply_button);
fe_revert_button = gtk_button_new_with_mnemonic(_("Re_vert"));
g_signal_connect(G_OBJECT(fe_revert_button), "clicked",
G_CALLBACK(fe_revert_pressed), NULL);
- gtk_box_pack_start(GTK_BOX(bbox), fe_revert_button);
+ gtk_container_add(GTK_CONTAINER(bbox), fe_revert_button);
gtk_widget_set_sensitive(fe_apply_button, FALSE);
gtk_widget_set_sensitive(fe_revert_button, FALSE);
@@ -589,18 +589,18 @@ filters_edit_dialog(GtkWindow * parent)
/* main hbox */
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, FILTER_EDIT_PADDING);
gtk_widget_set_vexpand(hbox, TRUE);
- gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(fe_window))), hbox);
+ gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(fe_window))), hbox);
gtk_widget_set_margin_top(piece, FILTER_EDIT_PADDING);
- gtk_box_pack_start(GTK_BOX(hbox), piece);
+ gtk_container_add(GTK_CONTAINER(hbox), piece);
- gtk_box_pack_start(GTK_BOX(hbox),
+ gtk_container_add(GTK_CONTAINER(hbox),
gtk_separator_new(GTK_ORIENTATION_VERTICAL));
fe_right_page = build_right_side(GTK_WINDOW(fe_window));
gtk_widget_set_sensitive(fe_right_page, FALSE);
gtk_widget_set_hexpand(fe_right_page, TRUE);
gtk_widget_set_margin_top(fe_right_page, FILTER_EDIT_PADDING);
- gtk_box_pack_start(GTK_BOX(hbox), fe_right_page);
+ gtk_container_add(GTK_CONTAINER(hbox), fe_right_page);
fe_user_headers_list = NULL;
diff --git a/src/filter-export-dialog.c b/src/filter-export-dialog.c
index d8eb270d1..6adc2a8b4 100644
--- a/src/filter-export-dialog.c
+++ b/src/filter-export-dialog.c
@@ -93,7 +93,7 @@ filters_export_dialog(GtkWindow * parent)
gtk_container_add(GTK_CONTAINER(sw), GTK_WIDGET(list));
gtk_widget_set_vexpand(sw, TRUE);
gtk_widget_set_margin_top(sw, 2);
- gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(fex_window))), sw);
+ gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(fex_window))), sw);
/* Populate the list of filters */
diff --git a/src/filter-run-dialog.c b/src/filter-run-dialog.c
index e17d37238..e4ad3bbcf 100644
--- a/src/filter-run-dialog.c
+++ b/src/filter-run-dialog.c
@@ -304,11 +304,11 @@ balsa_filter_run_dialog_init(BalsaFilterRunDialog *p)
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
gtk_widget_set_vexpand(hbox, TRUE);
- gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(p))), hbox);
+ gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(p))), hbox);
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 2);
gtk_widget_set_hexpand(vbox, TRUE);
- gtk_box_pack_start(GTK_BOX(hbox), vbox);
+ gtk_container_add(GTK_CONTAINER(hbox), vbox);
p->available_filters =
libbalsa_filter_list_new(TRUE, _("Name"), GTK_SELECTION_MULTIPLE,
@@ -327,13 +327,13 @@ balsa_filter_run_dialog_init(BalsaFilterRunDialog *p)
gtk_container_add(GTK_CONTAINER(sw), GTK_WIDGET(p->available_filters));
gtk_widget_set_vexpand(sw, TRUE);
- gtk_box_pack_start(GTK_BOX(vbox), sw);
+ gtk_container_add(GTK_CONTAINER(vbox), sw);
/* To keep a consistent look, make a button box for a single button. */
bbox = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL);
gtk_box_set_spacing(GTK_BOX(bbox), 2);
gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_SPREAD);
- gtk_box_pack_start(GTK_BOX(vbox), bbox);
+ gtk_container_add(GTK_CONTAINER(vbox), bbox);
/* "Apply selected" button */
p->apply_selected_button = button =
@@ -341,7 +341,7 @@ balsa_filter_run_dialog_init(BalsaFilterRunDialog *p)
gtk_widget_set_sensitive(button, FALSE);
g_signal_connect_swapped(G_OBJECT(button), "clicked",
G_CALLBACK(fr_apply_selected_pressed), p);
- gtk_box_pack_start(GTK_BOX(bbox), button);
+ gtk_container_add(GTK_CONTAINER(bbox), button);
/* Buttons between the 2 lists */
bbox = gtk_button_box_new(GTK_ORIENTATION_VERTICAL);
@@ -356,7 +356,7 @@ balsa_filter_run_dialog_init(BalsaFilterRunDialog *p)
gtk_widget_set_sensitive(button, FALSE);
g_signal_connect_swapped(G_OBJECT(button), "clicked",
G_CALLBACK(fr_add_pressed), G_OBJECT(p));
- gtk_box_pack_start(GTK_BOX(bbox), button);
+ gtk_container_add(GTK_CONTAINER(bbox), button);
/* Left/Remove button */
p->remove_button = button =
gtk_button_new_from_icon_name("go-previous-symbolic");
@@ -365,15 +365,15 @@ balsa_filter_run_dialog_init(BalsaFilterRunDialog *p)
gtk_widget_set_sensitive(button, FALSE);
g_signal_connect_swapped(G_OBJECT(button), "clicked",
G_CALLBACK(fr_remove_pressed), G_OBJECT(p));
- gtk_box_pack_start(GTK_BOX(bbox), button);
+ gtk_container_add(GTK_CONTAINER(bbox), button);
gtk_widget_set_margin_start(bbox, 4);
- gtk_box_pack_start(GTK_BOX(hbox), bbox);
+ gtk_container_add(GTK_CONTAINER(hbox), bbox);
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 2);
gtk_widget_set_hexpand(vbox, TRUE);
- gtk_box_pack_start(GTK_BOX(hbox), vbox);
+ gtk_container_add(GTK_CONTAINER(hbox), vbox);
sw = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
@@ -391,14 +391,14 @@ balsa_filter_run_dialog_init(BalsaFilterRunDialog *p)
gtk_container_add(GTK_CONTAINER(sw), GTK_WIDGET(p->selected_filters));
gtk_widget_set_vexpand(sw, TRUE);
- gtk_box_pack_start(GTK_BOX(vbox), sw);
+ gtk_container_add(GTK_CONTAINER(vbox), sw);
/* up down arrow buttons */
bbox = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL);
gtk_box_set_spacing(GTK_BOX(bbox), 2);
gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_SPREAD);
- gtk_box_pack_start(GTK_BOX(vbox), bbox);
+ gtk_container_add(GTK_CONTAINER(vbox), bbox);
/* up button */
p->move_up_button = button =
@@ -408,7 +408,7 @@ balsa_filter_run_dialog_init(BalsaFilterRunDialog *p)
_("Move selected filter up"));
g_signal_connect(G_OBJECT(button), "clicked",
G_CALLBACK(fr_up_pressed), p);
- gtk_box_pack_start(GTK_BOX(bbox), button);
+ gtk_container_add(GTK_CONTAINER(bbox), button);
/* down button */
p->move_down_button = button =
gtk_button_new_from_icon_name("go-down-symbolic");
@@ -417,14 +417,14 @@ balsa_filter_run_dialog_init(BalsaFilterRunDialog *p)
_("Move selected filter down"));
g_signal_connect(G_OBJECT(button), "clicked",
G_CALLBACK(fr_down_pressed), p);
- gtk_box_pack_start(GTK_BOX(bbox), button);
+ gtk_container_add(GTK_CONTAINER(bbox), button);
p->apply_now_button = button =
gtk_button_new_with_mnemonic(_("A_pply Now!"));
gtk_widget_set_sensitive(button, FALSE);
g_signal_connect_swapped(G_OBJECT(button), "clicked",
G_CALLBACK(fr_apply_now_pressed), G_OBJECT(p));
- gtk_box_pack_start(GTK_BOX(bbox), button);
+ gtk_container_add(GTK_CONTAINER(bbox), button);
p->filters_modified = FALSE;
}
diff --git a/src/folder-conf.c b/src/folder-conf.c
index 45ae93672..6d329a10a 100644
--- a/src/folder-conf.c
+++ b/src/folder-conf.c
@@ -337,7 +337,7 @@ folder_conf_imap_node(BalsaMailboxNode *mn)
notebook = gtk_notebook_new();
gtk_widget_set_vexpand(notebook, TRUE);
- gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(cdd->dialog))), notebook);
+ gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(cdd->dialog))), notebook);
grid = libbalsa_create_grid();
g_object_set(G_OBJECT(grid), "margin", 12, NULL);
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), grid,
@@ -607,7 +607,7 @@ browse_button_cb(GtkWidget * widget, SubfolderDialogData * sdd)
scroll = gtk_scrolled_window_new(NULL, NULL);
gtk_widget_set_vexpand(scroll, TRUE);
- gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), scroll);
+ gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), scroll);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_ALWAYS);
@@ -695,7 +695,7 @@ folder, parent);
#if HAVE_MACOSX_DESKTOP
libbalsa_macosx_menu_for_parent(ask, GTK_WINDOW(cdd->dialog));
#endif
- gtk_box_pack_start(GTK_BOX
+ gtk_container_add(GTK_CONTAINER
(gtk_dialog_get_content_area
(GTK_DIALOG(ask))), gtk_label_new(msg));
g_free(msg);
@@ -874,7 +874,7 @@ folder_conf_imap_sub_node(BalsaMailboxNode * mn)
gtk_container_add(GTK_CONTAINER(content), grid);
}
gtk_widget_set_vexpand(content, TRUE);
- gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(cdd->dialog))), content);
+ gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(cdd->dialog))), content);
row = 0;
/* INPUT FIELD CREATION */
@@ -905,8 +905,8 @@ folder_conf_imap_sub_node(BalsaMailboxNode * mn)
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 12);
gtk_widget_set_hexpand(sdd->parent_folder, TRUE);
- gtk_box_pack_start(GTK_BOX(hbox), sdd->parent_folder);
- gtk_box_pack_start(GTK_BOX(hbox), button);
+ gtk_container_add(GTK_CONTAINER(hbox), sdd->parent_folder);
+ 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/information-dialog.c b/src/information-dialog.c
index 79a510015..240309e6b 100644
--- a/src/information-dialog.c
+++ b/src/information-dialog.c
@@ -258,7 +258,7 @@ balsa_information_list(GtkWindow *parent, LibBalsaInformationType type,
GTK_POLICY_AUTOMATIC);
gtk_widget_set_vexpand(scrolled_window, TRUE);
gtk_widget_set_margin_top(scrolled_window, 1); /* Seriously? */
- gtk_box_pack_start(GTK_BOX
+ gtk_container_add(GTK_CONTAINER
(gtk_dialog_get_content_area
(GTK_DIALOG(information_dialog))),
scrolled_window);
diff --git a/src/mailbox-conf.c b/src/mailbox-conf.c
index 60f5c21f0..0e891c4dd 100644
--- a/src/mailbox-conf.c
+++ b/src/mailbox-conf.c
@@ -190,7 +190,7 @@ balsa_server_conf_get_advanced_widget(BalsaServerConf *bsc)
bsc->grid = GTK_GRID(libbalsa_create_grid());
g_object_set(G_OBJECT(bsc->grid), "margin", 12, NULL);
- gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(bsc->grid));
+ gtk_container_add(GTK_CONTAINER(box), GTK_WIDGET(bsc->grid));
bsc->used_rows = 0U;
@@ -1356,7 +1356,7 @@ create_pop_mailbox_dialog(MailboxConfWindow *mcw)
gtk_widget_grab_focus(mcw->mailbox_name);
dialog = create_generic_dialog(mcw);
- gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))),
+ gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))),
notebook);
return dialog;
}
@@ -1475,7 +1475,7 @@ create_imap_mailbox_dialog(MailboxConfWindow *mcw)
mcw->mailbox_name : mcw->mb_data.imap.bsc.server);
dialog = create_generic_dialog(mcw);
- gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))),
+ gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))),
notebook);
mcw->view_info =
diff --git a/src/main-window.c b/src/main-window.c
index 07843dc6c..9980aea53 100644
--- a/src/main-window.c
+++ b/src/main-window.c
@@ -507,7 +507,7 @@ bw_create_index_widget(BalsaWindow *bw)
gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(priv->filter_choice),
i, view_filters[i].str);
gtk_combo_box_set_active(GTK_COMBO_BOX(priv->filter_choice), 0);
- gtk_box_pack_start(GTK_BOX(priv->sos_bar), priv->filter_choice);
+ gtk_container_add(GTK_CONTAINER(priv->sos_bar), priv->filter_choice);
priv->sos_entry = gtk_entry_new();
/* gtk_label_set_mnemonic_widget(GTK_LABEL(priv->filter_choice),
@@ -515,7 +515,7 @@ bw_create_index_widget(BalsaWindow *bw)
g_signal_connect(G_OBJECT(priv->sos_entry), "notify::has-focus",
G_CALLBACK(bw_check_filter), bw);
gtk_widget_set_hexpand(priv->sos_entry, TRUE);
- gtk_box_pack_start(GTK_BOX(priv->sos_bar), priv->sos_entry);
+ gtk_container_add(GTK_CONTAINER(priv->sos_bar), priv->sos_entry);
button = gtk_button_new_from_icon_name("gtk-ok");
g_signal_connect(G_OBJECT(priv->sos_entry), "activate",
@@ -530,12 +530,12 @@ bw_create_index_widget(BalsaWindow *bw)
g_signal_connect(G_OBJECT(priv->filter_choice), "changed",
G_CALLBACK(bw_filter_entry_changed), button);
gtk_widget_set_sensitive(button, FALSE);
- gtk_box_pack_start(GTK_BOX(priv->sos_bar), button);
+ gtk_container_add(GTK_CONTAINER(priv->sos_bar), button);
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
- gtk_box_pack_start(GTK_BOX(vbox), priv->sos_bar);
+ gtk_container_add(GTK_CONTAINER(vbox), priv->sos_bar);
gtk_widget_set_vexpand(priv->notebook, TRUE);
- gtk_box_pack_start(GTK_BOX(vbox), priv->notebook);
+ gtk_container_add(GTK_CONTAINER(vbox), priv->notebook);
return vbox;
}
@@ -557,7 +557,7 @@ bw_set_panes(BalsaWindow * window)
priv->content);
priv->content = priv->paned_master;
gtk_widget_set_vexpand(priv->content, TRUE);
- gtk_box_pack_start(GTK_BOX(priv->vbox), priv->content);
+ gtk_container_add(GTK_CONTAINER(priv->vbox), priv->content);
gtk_paned_pack1(GTK_PANED(priv->paned_slave),
bw_frame(priv->mblist), TRUE, TRUE);
gtk_paned_pack2(GTK_PANED(priv->paned_slave),
@@ -576,7 +576,7 @@ bw_set_panes(BalsaWindow * window)
priv->content);
priv->content = priv->paned_master;
gtk_widget_set_vexpand(priv->content, TRUE);
- gtk_box_pack_start(GTK_BOX(priv->vbox), priv->content);
+ gtk_container_add(GTK_CONTAINER(priv->vbox), priv->content);
gtk_paned_pack1(GTK_PANED(priv->paned_master),
bw_frame(priv->mblist), TRUE, TRUE);
gtk_paned_pack2(GTK_PANED(priv->paned_master), priv->paned_slave,
@@ -596,7 +596,7 @@ bw_set_panes(BalsaWindow * window)
priv->content);
priv->content = priv->paned_master;
gtk_widget_set_vexpand(priv->content, TRUE);
- gtk_box_pack_start(GTK_BOX(priv->vbox), priv->content);
+ gtk_container_add(GTK_CONTAINER(priv->vbox), priv->content);
gtk_paned_pack1(GTK_PANED(priv->paned_master),
bw_frame(priv->mblist), TRUE, TRUE);
gtk_paned_pack2(GTK_PANED(priv->paned_master), priv->paned_slave,
@@ -2126,7 +2126,7 @@ bw_set_menus(BalsaWindow * window)
#if HAVE_MACOSX_DESKTOP
libbalsa_macosx_menu(window, GTK_MENU_SHELL(menubar));
#else
- gtk_box_pack_start(GTK_BOX(priv->vbox), menubar);
+ gtk_container_add(GTK_CONTAINER(priv->vbox), menubar);
#endif
}
#endif /* SET_MENUBAR_SETS_A_VISIBLE_MENUBAR */
@@ -2290,20 +2290,20 @@ 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);
+ gtk_container_add(GTK_CONTAINER(priv->vbox), priv->toolbar);
priv->bottom_bar = hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
- gtk_box_pack_end(GTK_BOX(priv->vbox), hbox);
+ gtk_container_add(GTK_CONTAINER(priv->vbox), hbox);
priv->progress_bar = gtk_progress_bar_new();
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_widget_set_size_request(priv->progress_bar, balsa_app.mblist_width, -1);
- gtk_box_pack_start(GTK_BOX(hbox), priv->progress_bar);
+ gtk_container_add(GTK_CONTAINER(hbox), priv->progress_bar);
priv->statusbar = gtk_statusbar_new();
gtk_widget_set_hexpand(priv->statusbar, TRUE);
- gtk_box_pack_start(GTK_BOX(hbox), priv->statusbar);
+ gtk_container_add(GTK_CONTAINER(hbox), priv->statusbar);
gtk_window_set_resizable(GTK_WINDOW(window), TRUE);
gtk_window_set_default_size(GTK_WINDOW(window), balsa_app.mw_width,
@@ -2854,14 +2854,14 @@ bw_notebook_label_new(BalsaMailboxNode * mbnode)
g_signal_connect_object(mailbox, "changed",
G_CALLBACK(bw_mailbox_changed), lab, 0);
gtk_widget_set_hexpand(lab, TRUE);
- gtk_box_pack_start(GTK_BOX(box), lab);
+ gtk_container_add(GTK_CONTAINER(box), lab);
but = gtk_button_new_from_icon_name("window-close-symbolic");
gtk_widget_set_focus_on_click(but, FALSE);
gtk_button_set_relief(GTK_BUTTON(but), GTK_RELIEF_NONE);
g_signal_connect(but, "clicked",
G_CALLBACK(bw_mailbox_tab_close_cb), mbnode);
- gtk_box_pack_start(GTK_BOX(box), but);
+ gtk_container_add(GTK_CONTAINER(box), but);
gtk_widget_set_tooltip_text(box, libbalsa_mailbox_get_url(mailbox));
return box;
@@ -3840,7 +3840,7 @@ bw_find_real(BalsaWindow * window, BalsaIndex * bindex, gboolean again)
gtk_grid_attach(GTK_GRID(page),search_entry,1, 0, 1, 1);
gtk_label_set_mnemonic_widget(GTK_LABEL(w), search_entry);
gtk_widget_set_margin_top(page, 2);
- gtk_box_pack_start(GTK_BOX(vbox), page);
+ gtk_container_add(GTK_CONTAINER(vbox), page);
/* builds the toggle buttons to specify fields concerned by
* the search. */
@@ -3849,7 +3849,7 @@ bw_find_real(BalsaWindow * window, BalsaIndex * bindex, gboolean again)
gtk_frame_set_label_align(GTK_FRAME(frame), GTK_POS_LEFT);
gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN);
gtk_widget_set_margin_top(frame, 2);
- gtk_box_pack_start(GTK_BOX(vbox), frame);
+ gtk_container_add(GTK_CONTAINER(vbox), frame);
grid = gtk_grid_new();
gtk_grid_set_column_homogeneous(GTK_GRID(grid), TRUE);
@@ -3865,7 +3865,7 @@ bw_find_real(BalsaWindow * window, BalsaIndex * bindex, gboolean again)
frame = gtk_frame_new(_("Show only matching messages"));
gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN);
gtk_widget_set_margin_top(frame, 2);
- gtk_box_pack_start(GTK_BOX(vbox), frame);
+ gtk_container_add(GTK_CONTAINER(vbox), frame);
/* Button box */
box = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL);
@@ -3875,14 +3875,14 @@ bw_find_real(BalsaWindow * window, BalsaIndex * bindex, gboolean again)
G_CALLBACK(bw_find_button_clicked),
GINT_TO_POINTER(FIND_RESPONSE_FILTER));
g_object_set(G_OBJECT(button), "margin", 6, NULL);
- gtk_box_pack_start(GTK_BOX(box), button);
+ gtk_container_add(GTK_CONTAINER(box), button);
button = gtk_button_new_with_mnemonic(_("_Clear"));
g_signal_connect(G_OBJECT(button), "clicked",
G_CALLBACK(bw_find_button_clicked),
GINT_TO_POINTER(FIND_RESPONSE_RESET));
g_object_set(G_OBJECT(button), "margin", 6, NULL);
- gtk_box_pack_start(GTK_BOX(box), button);
+ gtk_container_add(GTK_CONTAINER(box), button);
g_object_set(G_OBJECT(box), "margin", 6, NULL);
gtk_container_add(GTK_CONTAINER(frame), box);
@@ -3891,7 +3891,7 @@ bw_find_real(BalsaWindow * window, BalsaIndex * bindex, gboolean again)
frame = gtk_frame_new(_("Open next matching message"));
gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN);
gtk_widget_set_margin_top(frame, 2);
- gtk_box_pack_start(GTK_BOX(vbox), frame);
+ gtk_container_add(GTK_CONTAINER(vbox), frame);
/* Reverse and Wrap checkboxes */
box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
@@ -3904,18 +3904,18 @@ bw_find_real(BalsaWindow * window, BalsaIndex * bindex, gboolean again)
gtk_check_button_new_with_mnemonic(_("_Reverse search"));
g_object_set(G_OBJECT(reverse_button), "margin", 6, NULL);
gtk_widget_set_vexpand(reverse_button, TRUE);
- gtk_box_pack_start(GTK_BOX(w), reverse_button);
+ gtk_container_add(GTK_CONTAINER(w), reverse_button);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(reverse_button),
reverse);
wrap_button =
gtk_check_button_new_with_mnemonic(_("_Wrap around"));
g_object_set(G_OBJECT(wrap_button), "margin", 6, NULL);
gtk_widget_set_vexpand(wrap_button, TRUE);
- gtk_box_pack_start(GTK_BOX(w), wrap_button);
+ gtk_container_add(GTK_CONTAINER(w), wrap_button);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(wrap_button),
wrap);
gtk_widget_set_hexpand(w, TRUE);
- gtk_box_pack_start(GTK_BOX(box), w);
+ gtk_container_add(GTK_CONTAINER(box), w);
button = gtk_button_new_with_mnemonic(_("_OK"));
g_signal_connect(G_OBJECT(button), "clicked",
@@ -3923,7 +3923,7 @@ bw_find_real(BalsaWindow * window, BalsaIndex * bindex, gboolean again)
GINT_TO_POINTER(GTK_RESPONSE_OK));
gtk_widget_set_valign(button, GTK_ALIGN_CENTER);
gtk_widget_set_hexpand(button, TRUE);
- gtk_box_pack_start(GTK_BOX(box), button);
+ gtk_container_add(GTK_CONTAINER(box), button);
if (cnd->match.string.string)
gtk_entry_set_text(GTK_ENTRY(search_entry),
diff --git a/src/message-window.c b/src/message-window.c
index 39ad0c72e..6705904a4 100644
--- a/src/message-window.c
+++ b/src/message-window.c
@@ -888,7 +888,7 @@ message_window_new(LibBalsaMailbox * mailbox, guint msgno)
#if HAVE_MACOSX_DESKTOP
libbalsa_macosx_menu(window, GTK_MENU_SHELL(menubar));
#else
- gtk_box_pack_start(GTK_BOX(vbox), menubar);
+ gtk_container_add(GTK_CONTAINER(vbox), menubar);
#endif
libbalsa_window_add_accelerator(GTK_APPLICATION_WINDOW(mw),
@@ -900,7 +900,7 @@ message_window_new(LibBalsaMailbox * mailbox, guint msgno)
model = message_window_get_toolbar_model();
mw->toolbar = balsa_toolbar_new(model, G_ACTION_MAP(mw));
- gtk_box_pack_start(GTK_BOX(vbox), mw->toolbar);
+ gtk_container_add(GTK_CONTAINER(vbox), mw->toolbar);
gtk_window_set_role(GTK_WINDOW(window), "message");
@@ -931,7 +931,7 @@ message_window_new(LibBalsaMailbox * mailbox, guint msgno)
mw->bmessage = balsa_message_new();
g_object_add_weak_pointer(G_OBJECT(mw->bmessage), (gpointer) &mw->bmessage);
gtk_widget_set_vexpand(mw->bmessage, TRUE);
- gtk_box_pack_start(GTK_BOX(vbox), mw->bmessage);
+ gtk_container_add(GTK_CONTAINER(vbox), mw->bmessage);
g_signal_connect(mw->bmessage, "select-part",
G_CALLBACK(mw_select_part_cb), mw);
diff --git a/src/pref-manager.c b/src/pref-manager.c
index 5247a10ef..6de342e03 100644
--- a/src/pref-manager.c
+++ b/src/pref-manager.c
@@ -999,7 +999,7 @@ add_button_to_box(const gchar * label, GCallback cb, gpointer cb_data,
{
GtkWidget *button = gtk_button_new_with_mnemonic(label);
g_signal_connect_swapped(button, "clicked", cb, cb_data);
- gtk_box_pack_start(GTK_BOX(box), button);
+ gtk_container_add(GTK_CONTAINER(box), button);
return button;
}
@@ -2141,19 +2141,19 @@ pm_grid_add_checking_group(GtkWidget * grid_widget)
label = gtk_label_new(_("When mail arrives:"));
gtk_widget_set_halign(label, GTK_ALIGN_START);
- gtk_box_pack_start(GTK_BOX(hbox), label);
+ gtk_container_add(GTK_CONTAINER(hbox), label);
pui->notify_new_mail_dialog =
gtk_check_button_new_with_label(_("Display message"));
- gtk_box_pack_start(GTK_BOX(hbox), pui->notify_new_mail_dialog);
+ gtk_container_add(GTK_CONTAINER(hbox), pui->notify_new_mail_dialog);
pui->notify_new_mail_sound =
gtk_check_button_new_with_label(_("Play sound"));
- gtk_box_pack_start(GTK_BOX(hbox), pui->notify_new_mail_sound);
+ gtk_container_add(GTK_CONTAINER(hbox), pui->notify_new_mail_sound);
pui->notify_new_mail_icon =
gtk_check_button_new_with_label(_("Show icon"));
- gtk_box_pack_start(GTK_BOX(hbox), pui->notify_new_mail_icon);
+ gtk_container_add(GTK_CONTAINER(hbox), pui->notify_new_mail_icon);
pm_grid_attach(grid, hbox, 1, ++row, 3, 1);
@@ -3261,7 +3261,7 @@ open_preferences_manager(GtkWidget * widget, gpointer data)
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
content_area = gtk_dialog_get_content_area(GTK_DIALOG(property_box));
- gtk_box_pack_start(GTK_BOX(content_area), hbox);
+ gtk_container_add(GTK_CONTAINER(content_area), hbox);
store = gtk_tree_store_new(PM_NUM_COLS,
G_TYPE_STRING, /* PM_TEXT_COL */
@@ -3270,7 +3270,7 @@ open_preferences_manager(GtkWidget * widget, gpointer data)
);
pui->view = view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
g_object_set(view, "margin", BORDER_WIDTH, NULL);
- gtk_box_pack_start(GTK_BOX(hbox), view);
+ gtk_container_add(GTK_CONTAINER(hbox), view);
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(view), FALSE);
renderer = gtk_cell_renderer_text_new();
@@ -3284,7 +3284,7 @@ open_preferences_manager(GtkWidget * widget, gpointer data)
gtk_stack_set_transition_type((GtkStack *) stack,
GTK_STACK_TRANSITION_TYPE_SLIDE_UP_DOWN);
gtk_stack_set_transition_duration((GtkStack *) stack, 400);
- gtk_box_pack_start(GTK_BOX(hbox), stack);
+ gtk_container_add(GTK_CONTAINER(hbox), stack);
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(view));
g_signal_connect(selection, "changed",
diff --git a/src/print-gtk.c b/src/print-gtk.c
index d3b382a36..a639e6b53 100644
--- a/src/print-gtk.c
+++ b/src/print-gtk.c
@@ -502,7 +502,7 @@ message_prefs_widget(GtkPrintOperation * operation,
group = gtk_box_new(GTK_ORIENTATION_VERTICAL, 12);
g_object_set(G_OBJECT(group), "margin", 12, NULL);
- gtk_box_pack_start(GTK_BOX(page), group);
+ gtk_container_add(GTK_CONTAINER(page), group);
label = gtk_label_new(NULL);
markup = g_strdup_printf("<b>%s</b>", _("Fonts"));
@@ -510,22 +510,22 @@ message_prefs_widget(GtkPrintOperation * operation,
g_free(markup);
gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
gtk_widget_set_halign(label, GTK_ALIGN_START);
- gtk_box_pack_start(GTK_BOX(group), label);
+ gtk_container_add(GTK_CONTAINER(group), label);
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_widget_set_vexpand(hbox, TRUE);
- gtk_box_pack_start(GTK_BOX(group), hbox);
- gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new(" "));
+ gtk_container_add(GTK_CONTAINER(group), hbox);
+ gtk_container_add(GTK_CONTAINER(hbox), gtk_label_new(" "));
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 6);
gtk_widget_set_hexpand(vbox, TRUE);
- gtk_box_pack_start(GTK_BOX(hbox), vbox);
+ gtk_container_add(GTK_CONTAINER(hbox), vbox);
grid = gtk_grid_new();
gtk_grid_set_row_spacing(GTK_GRID(grid), 6);
gtk_grid_set_column_spacing(GTK_GRID(grid), 6);
- gtk_box_pack_start(GTK_BOX(vbox), grid);
+ gtk_container_add(GTK_CONTAINER(vbox), grid);
print_prefs->header_font =
add_font_button(_("_Header Font:"), balsa_app.print_header_font,
@@ -538,7 +538,7 @@ message_prefs_widget(GtkPrintOperation * operation,
GTK_GRID(grid), 2);
group = gtk_box_new(GTK_ORIENTATION_VERTICAL, 12);
- gtk_box_pack_start(GTK_BOX(page), group);
+ gtk_container_add(GTK_CONTAINER(page), group);
label = gtk_label_new(NULL);
markup = g_strdup_printf("<b>%s</b>", _("Highlighting"));
@@ -546,23 +546,23 @@ message_prefs_widget(GtkPrintOperation * operation,
g_free(markup);
gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
gtk_widget_set_halign(label, GTK_ALIGN_START);
- gtk_box_pack_start(GTK_BOX(group), label);
+ gtk_container_add(GTK_CONTAINER(group), label);
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_widget_set_vexpand(hbox, TRUE);
- gtk_box_pack_start(GTK_BOX(group), hbox);
- gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new(" "));
+ gtk_container_add(GTK_CONTAINER(group), hbox);
+ gtk_container_add(GTK_CONTAINER(hbox), gtk_label_new(" "));
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 6);
gtk_widget_set_hexpand(vbox, TRUE);
- gtk_box_pack_start(GTK_BOX(hbox), vbox);
+ gtk_container_add(GTK_CONTAINER(hbox), vbox);
print_prefs->highlight_cited =
gtk_check_button_new_with_mnemonic(_("Highlight _cited text"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
(print_prefs->highlight_cited),
balsa_app.print_highlight_cited);
- gtk_box_pack_start(GTK_BOX(vbox), print_prefs->highlight_cited);
+ gtk_container_add(GTK_CONTAINER(vbox), print_prefs->highlight_cited);
print_prefs->highlight_phrases =
gtk_check_button_new_with_mnemonic(_
@@ -570,10 +570,10 @@ message_prefs_widget(GtkPrintOperation * operation,
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
(print_prefs->highlight_phrases),
balsa_app.print_highlight_phrases);
- gtk_box_pack_start(GTK_BOX(vbox), print_prefs->highlight_phrases);
+ gtk_container_add(GTK_CONTAINER(vbox), print_prefs->highlight_phrases);
group = gtk_box_new(GTK_ORIENTATION_VERTICAL, 12);
- gtk_box_pack_start(GTK_BOX(page), group);
+ gtk_container_add(GTK_CONTAINER(page), group);
label = gtk_label_new(NULL);
markup = g_strdup_printf("<b>%s</b>", _("Margins"));
@@ -581,22 +581,22 @@ message_prefs_widget(GtkPrintOperation * operation,
g_free(markup);
gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
gtk_widget_set_halign(label, GTK_ALIGN_START);
- gtk_box_pack_start(GTK_BOX(group), label);
+ gtk_container_add(GTK_CONTAINER(group), label);
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_widget_set_vexpand(hbox, TRUE);
- gtk_box_pack_start(GTK_BOX(group), hbox);
- gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new(" "));
+ gtk_container_add(GTK_CONTAINER(group), hbox);
+ gtk_container_add(GTK_CONTAINER(hbox), gtk_label_new(" "));
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 6);
gtk_widget_set_hexpand(vbox, TRUE);
- gtk_box_pack_start(GTK_BOX(hbox), vbox);
+ gtk_container_add(GTK_CONTAINER(hbox), vbox);
grid = gtk_grid_new();
gtk_grid_set_row_spacing(GTK_GRID(grid), 6);
gtk_grid_set_column_spacing(GTK_GRID(grid), 6);
- gtk_box_pack_start(GTK_BOX(vbox), grid);
+ gtk_container_add(GTK_CONTAINER(vbox), grid);
pg_setup = gtk_print_operation_get_default_page_setup(operation);
print_prefs->margin_top =
diff --git a/src/spell-check.c b/src/spell-check.c
index 2cd897e34..7621e72ae 100644
--- a/src/spell-check.c
+++ b/src/spell-check.c
@@ -293,7 +293,7 @@ balsa_spell_check_init(BalsaSpellCheck *spell_check)
GtkTreeViewColumn *column;
GtkTreeSelection *selection;
GtkWidget *box_widget;
- GtkBox *box;
+ GtkContainer *box;
/* Set spell checker */
@@ -310,15 +310,15 @@ balsa_spell_check_init(BalsaSpellCheck *spell_check)
g_object_set(G_OBJECT(box_widget), "margin", BALSA_SPELL_CHECK_PADDING, NULL);
gtk_container_add((GtkContainer *) spell_check, box_widget);
- box = (GtkBox *) box_widget;
- gtk_box_pack_start(box, widget);
+ box = (GtkContainer *) box_widget;
+ gtk_container_add(box, widget);
sw = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
gtk_widget_set_vexpand(sw, TRUE);
- gtk_box_pack_start(box, sw);
+ gtk_container_add(box, sw);
/* setup suggestion list */
store = gtk_list_store_new(1, G_TYPE_STRING);
@@ -342,7 +342,7 @@ balsa_spell_check_init(BalsaSpellCheck *spell_check)
/* setup buttons to perform actions */
widget = gtk_grid_new();
- gtk_box_pack_start(box, widget);
+ gtk_container_add(box, widget);
grid = GTK_GRID(widget);
gtk_grid_set_row_spacing(grid, BALSA_SPELL_CHECK_PADDING);
diff --git a/src/store-address.c b/src/store-address.c
index e29812300..a2f1f0d72 100644
--- a/src/store-address.c
+++ b/src/store-address.c
@@ -220,12 +220,12 @@ store_address_dialog(StoreAddressInfo * info)
if (balsa_app.address_book_list && balsa_app.address_book_list->next) {
/* User has more than one address book, so show the options */
frame = store_address_book_frame(info);
- gtk_box_pack_start(GTK_BOX(vbox), frame);
+ gtk_container_add(GTK_CONTAINER(vbox), frame);
}
frame = store_address_note_frame(info);
gtk_widget_set_vexpand(frame, TRUE);
- gtk_box_pack_start(GTK_BOX(vbox), frame);
+ gtk_container_add(GTK_CONTAINER(vbox), frame);
return dialog;
}
@@ -285,7 +285,7 @@ store_address_book_frame(StoreAddressInfo * info)
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 12);
g_object_set(G_OBJECT(hbox), "margin", 4, NULL);
- gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new(_("Address Book:")));
+ gtk_container_add(GTK_CONTAINER(hbox), gtk_label_new(_("Address Book:")));
combo_box = gtk_combo_box_text_new();
g_signal_connect(combo_box, "changed",
@@ -312,7 +312,7 @@ store_address_book_frame(StoreAddressInfo * info)
gtk_combo_box_set_active(GTK_COMBO_BOX(combo_box), default_ab_offset);
gtk_widget_set_hexpand(combo_box, TRUE);
- gtk_box_pack_start(GTK_BOX(hbox), combo_box);
+ gtk_container_add(GTK_CONTAINER(hbox), combo_box);
return hbox;
}
diff --git a/src/toolbar-prefs.c b/src/toolbar-prefs.c
index 206fdcc38..dc9f15913 100644
--- a/src/toolbar-prefs.c
+++ b/src/toolbar-prefs.c
@@ -152,7 +152,7 @@ customize_dialog_cb(GtkWidget * widget, gpointer data)
content_area =
gtk_dialog_get_content_area(GTK_DIALOG(customize_widget));
gtk_widget_set_vexpand(notebook, TRUE);
- gtk_box_pack_start(GTK_BOX(content_area), notebook);
+ 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);
@@ -193,7 +193,7 @@ customize_dialog_cb(GtkWidget * widget, gpointer data)
gtk_label_new(_("Message window")));
option_frame = gtk_frame_new(_("Toolbar options"));
- gtk_box_pack_start(GTK_BOX(content_area), option_frame);
+ gtk_container_add(GTK_CONTAINER(content_area), option_frame);
option_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 6);
g_object_set(G_OBJECT(option_box), "margin", 6, NULL);
@@ -206,7 +206,7 @@ customize_dialog_cb(GtkWidget * widget, gpointer data)
g_signal_connect(G_OBJECT(wrap_button), "toggled",
G_CALLBACK(wrap_toggled_cb), notebook);
g_object_set(G_OBJECT(wrap_button), "margin", 6, NULL);
- gtk_box_pack_start(GTK_BOX(option_box), wrap_button);
+ gtk_container_add(GTK_CONTAINER(option_box), wrap_button);
gtk_widget_show(customize_widget);
@@ -413,7 +413,7 @@ create_toolbar_page(BalsaToolbarModel * model, GActionMap * map)
/* Preview display */
toolbar_frame=gtk_frame_new(_("Preview"));
g_object_set((GObject *) toolbar_frame, "margin", 5, NULL);
- gtk_box_pack_start(GTK_BOX(outer_box), toolbar_frame);
+ gtk_container_add(GTK_CONTAINER(outer_box), toolbar_frame);
toolbar_ctlbox=gtk_box_new(GTK_ORIENTATION_VERTICAL, 5);
g_object_set(G_OBJECT(toolbar_ctlbox), "margin", 5, NULL);
@@ -430,7 +430,7 @@ create_toolbar_page(BalsaToolbarModel * model, GActionMap * map)
GTK_POLICY_NEVER);
g_object_set(G_OBJECT(toolbar_scroll), "margin", 5, NULL);
- gtk_box_pack_start(GTK_BOX(toolbar_ctlbox), toolbar_scroll);
+ gtk_container_add(GTK_CONTAINER(toolbar_ctlbox), toolbar_scroll);
gtk_container_add(GTK_CONTAINER(toolbar_scroll), page->toolbar);
@@ -438,16 +438,16 @@ create_toolbar_page(BalsaToolbarModel * model, GActionMap * map)
button_box = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL);
gtk_box_set_spacing(GTK_BOX(button_box), 5);
g_object_set(G_OBJECT(button_box), "margin", 5, NULL);
- gtk_box_pack_start(GTK_BOX(toolbar_ctlbox), button_box);
+ gtk_container_add(GTK_CONTAINER(toolbar_ctlbox), button_box);
/* Standard button */
page->standard_button =
gtk_button_new_with_mnemonic(_("_Restore toolbar to standard buttons"));
- gtk_box_pack_start(GTK_BOX(button_box), page->standard_button);
+ gtk_container_add(GTK_CONTAINER(button_box), page->standard_button);
/* Style button */
style_button = gtk_button_new_with_mnemonic(_("Toolbar _style…"));
- gtk_box_pack_start(GTK_BOX(button_box), style_button);
+ gtk_container_add(GTK_CONTAINER(button_box), style_button);
/* Done with preview */
@@ -456,7 +456,7 @@ create_toolbar_page(BalsaToolbarModel * model, GActionMap * map)
g_object_set(G_OBJECT(lower_ctlbox), "margin", 5, NULL);
gtk_widget_set_vexpand(lower_ctlbox, TRUE);
- gtk_box_pack_start(GTK_BOX(outer_box), lower_ctlbox);
+ gtk_container_add(GTK_CONTAINER(outer_box), lower_ctlbox);
/* A list to show the available items */
list_scroll=gtk_scrolled_window_new(NULL, NULL);
@@ -468,7 +468,7 @@ create_toolbar_page(BalsaToolbarModel * model, GActionMap * map)
page->available = tp_list_new();
gtk_widget_set_hexpand(list_frame, TRUE);
- gtk_box_pack_start(GTK_BOX(lower_ctlbox), list_frame);
+ gtk_container_add(GTK_CONTAINER(lower_ctlbox), list_frame);
gtk_container_add(GTK_CONTAINER(list_frame), list_scroll);
gtk_container_add(GTK_CONTAINER(list_scroll), page->available);
@@ -491,36 +491,36 @@ create_toolbar_page(BalsaToolbarModel * model, GActionMap * map)
button_box=gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
- gtk_box_pack_start(GTK_BOX(lower_ctlbox), center_button_box);
+ gtk_container_add(GTK_CONTAINER(lower_ctlbox), center_button_box);
- gtk_box_pack_start(GTK_BOX(center_button_box), button_box);
+ gtk_container_add(GTK_CONTAINER(center_button_box), button_box);
page->back_button = gtk_button_new_from_icon_name("go-up-symbolic");
gtk_widget_set_tooltip_text(page->back_button,
_("Move selected item up"));
- gtk_box_pack_start(GTK_BOX(button_box), page->back_button);
+ gtk_container_add(GTK_CONTAINER(button_box), page->back_button);
move_button_box=gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
- gtk_box_pack_start(GTK_BOX(button_box), move_button_box);
+ gtk_container_add(GTK_CONTAINER(button_box), move_button_box);
page->remove_button = gtk_button_new_from_icon_name("go-previous-symbolic");
gtk_widget_set_tooltip_text(page->remove_button,
_("Remove selected item from toolbar"));
- gtk_box_pack_start(GTK_BOX(move_button_box), page->remove_button);
+ gtk_container_add(GTK_CONTAINER(move_button_box), page->remove_button);
page->add_button = gtk_button_new_from_icon_name("go-next-symbolic");
gtk_widget_set_tooltip_text(page->add_button,
_("Add selected item to toolbar"));
- gtk_box_pack_start(GTK_BOX(move_button_box), page->add_button);
+ gtk_container_add(GTK_CONTAINER(move_button_box), page->add_button);
page->forward_button = gtk_button_new_from_icon_name("go-down-symbolic");
gtk_widget_set_tooltip_text(page->forward_button,
_("Move selected item down"));
- gtk_box_pack_start(GTK_BOX(button_box), page->forward_button);
+ gtk_container_add(GTK_CONTAINER(button_box), page->forward_button);
/* Pack destination list */
gtk_widget_set_hexpand(destination_frame, TRUE);
- gtk_box_pack_start(GTK_BOX(lower_ctlbox), destination_frame);
+ gtk_container_add(GTK_CONTAINER(lower_ctlbox), destination_frame);
gtk_container_add(GTK_CONTAINER(destination_frame), destination_scroll);
gtk_container_add(GTK_CONTAINER(destination_scroll), page->current);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]