[balsa/gtk4: 283/314] Do not cast GtkCheckButton to GtkToggleButton




commit 54d941fdfa954e000b52492fe990365b86625ecf
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Thu Nov 19 17:02:39 2020 -0500

    Do not cast GtkCheckButton to GtkToggleButton
    
    GtkCheckButton is no longer a subclass of GtkToggleButton
    
    modified:   libbalsa/misc.c
    modified:   libbalsa/server-config.c
    modified:   libbalsa/smtp-server.c
    modified:   libinit_balsa/assistant_helper.c
    modified:   src/address-book-config.c
    modified:   src/balsa-app.c
    modified:   src/balsa-message.c
    modified:   src/balsa-mime-widget-message.c
    modified:   src/balsa-mime-widget-text.c
    modified:   src/balsa-mime-widget.c
    modified:   src/filter-edit-callbacks.c
    modified:   src/filter-edit-dialog.c
    modified:   src/filter-edit.h
    modified:   src/folder-conf.c
    modified:   src/mailbox-conf.c
    modified:   src/main-window.c
    modified:   src/message-window.c
    modified:   src/pref-manager.c
    modified:   src/print-gtk.c
    modified:   src/sendmsg-window.c
    modified:   src/toolbar-prefs.c

 libbalsa/misc.c                  |   2 +-
 libbalsa/server-config.c         |  12 +--
 libbalsa/smtp-server.c           |   8 +-
 libinit_balsa/assistant_helper.c |   4 +-
 src/address-book-config.c        |   6 +-
 src/balsa-app.c                  |  21 ++--
 src/balsa-message.c              |  11 +-
 src/balsa-mime-widget-message.c  |  12 +--
 src/balsa-mime-widget-text.c     |  16 +--
 src/balsa-mime-widget.c          |  39 ++-----
 src/filter-edit-callbacks.c      |  82 +++++++-------
 src/filter-edit-dialog.c         |   4 +-
 src/filter-edit.h                |   2 +-
 src/folder-conf.c                |  22 ++--
 src/mailbox-conf.c               |  22 ++--
 src/main-window.c                |  48 ++++-----
 src/message-window.c             |   5 +-
 src/pref-manager.c               | 224 +++++++++++++++++++--------------------
 src/print-gtk.c                  |  12 +--
 src/sendmsg-window.c             |   4 +-
 src/toolbar-prefs.c              |   4 +-
 21 files changed, 255 insertions(+), 305 deletions(-)
---
diff --git a/libbalsa/misc.c b/libbalsa/misc.c
index 9ddd7d96e..6cf795ca6 100644
--- a/libbalsa/misc.c
+++ b/libbalsa/misc.c
@@ -956,7 +956,7 @@ libbalsa_create_grid_check(const gchar * text, GtkWidget * grid, gint row,
     gtk_grid_attach(GTK_GRID(grid), check_button, 0, row, 2, 1);
 
     if (initval)
-        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_button),
+        gtk_check_button_set_active(GTK_CHECK_BUTTON(check_button),
                                      TRUE);
 
     return check_button;
diff --git a/libbalsa/server-config.c b/libbalsa/server-config.c
index 22a84e9f9..cd6ad92cd 100644
--- a/libbalsa/server-config.c
+++ b/libbalsa/server-config.c
@@ -292,16 +292,16 @@ libbalsa_server_cfg_assign_server(LibBalsaServerCfg *server_cfg, LibBalsaServer
 
     /* authentication stuff */
     if (server_cfg->require_auth != NULL) {
-        libbalsa_server_set_try_anonymous(server, 
!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(server_cfg->require_auth)));
+        libbalsa_server_set_try_anonymous(server, 
!gtk_check_button_get_active(GTK_CHECK_BUTTON(server_cfg->require_auth)));
     } else {
         libbalsa_server_set_try_anonymous(server, FALSE);
     }
     libbalsa_server_set_username(server, gtk_editable_get_text(GTK_EDITABLE(server_cfg->username)));
     libbalsa_server_set_password(server, gtk_editable_get_text(GTK_EDITABLE(server_cfg->password)), FALSE);
-    libbalsa_server_set_remember_password(server, 
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(server_cfg->remember_pass)));
+    libbalsa_server_set_remember_password(server, 
gtk_check_button_get_active(GTK_CHECK_BUTTON(server_cfg->remember_pass)));
 
     /* client certificate */
-    libbalsa_server_set_client_cert(server, 
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(server_cfg->require_cert)));
+    libbalsa_server_set_client_cert(server, 
gtk_check_button_get_active(GTK_CHECK_BUTTON(server_cfg->require_cert)));
 
     file = gtk_file_chooser_get_file(GTK_FILE_CHOOSER(server_cfg->cert_file));
     cert_file = g_file_get_path(file);
@@ -311,7 +311,7 @@ libbalsa_server_cfg_assign_server(LibBalsaServerCfg *server_cfg, LibBalsaServer
     g_free(cert_file);
 
     libbalsa_server_set_password(server, gtk_editable_get_text(GTK_EDITABLE(server_cfg->cert_pass)), TRUE);
-    libbalsa_server_set_remember_cert_passphrase(server, 
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(server_cfg->remember_cert_pass)));
+    libbalsa_server_set_remember_cert_passphrase(server, 
gtk_check_button_get_active(GTK_CHECK_BUTTON(server_cfg->remember_cert_pass)));
 }
 
 
@@ -409,7 +409,7 @@ on_server_cfg_changed(GtkWidget *widget, LibBalsaServerCfg *server_cfg)
 
        /* user name/password only if authentication is required */
        if (server_cfg->require_auth != NULL) {
-               sensitive = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(server_cfg->require_auth));
+               sensitive = gtk_check_button_get_active(GTK_CHECK_BUTTON(server_cfg->require_auth));
        } else {
                sensitive = TRUE;
        }
@@ -426,7 +426,7 @@ on_server_cfg_changed(GtkWidget *widget, LibBalsaServerCfg *server_cfg)
        sensitive = (NetClientCryptMode) (gtk_combo_box_get_active(GTK_COMBO_BOX(server_cfg->security)) + 1) 
!= NET_CLIENT_CRYPT_NONE;
        gtk_widget_set_sensitive(server_cfg->require_cert, sensitive);
        if (sensitive) {
-               sensitive = sensitive && 
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(server_cfg->require_cert));
+               sensitive = sensitive && 
gtk_check_button_get_active(GTK_CHECK_BUTTON(server_cfg->require_cert));
        }
 
        gtk_widget_set_sensitive(server_cfg->cert_file, sensitive);
diff --git a/libbalsa/smtp-server.c b/libbalsa/smtp-server.c
index d236cd847..043cc55b3 100644
--- a/libbalsa/smtp-server.c
+++ b/libbalsa/smtp-server.c
@@ -259,7 +259,7 @@ smtp_server_response(GtkDialog * dialog, gint response,
     case GTK_RESPONSE_OK:
         libbalsa_smtp_server_set_name(sdi->smtp_server, libbalsa_server_cfg_get_name(sdi->server_cfg));
         libbalsa_server_cfg_assign_server(sdi->server_cfg, server);
-        if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(sdi->split_button))) {
+        if (gtk_check_button_get_active(GTK_CHECK_BUTTON(sdi->split_button))) {
             /* big_message is stored in kB, but the widget is in MB. */
                sdi->smtp_server->big_message =
                 gtk_spin_button_get_value(GTK_SPIN_BUTTON(sdi->big_message)) * 1024.0;
@@ -290,7 +290,7 @@ smtp_server_changed(GtkWidget G_GNUC_UNUSED *widget,
 
        /* split big messages */
        if ((sdi->big_message != NULL) && (sdi->split_button != NULL)) {
-               sensitive = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(sdi->split_button));
+               sensitive = gtk_check_button_get_active(GTK_CHECK_BUTTON(sdi->split_button));
            gtk_widget_set_sensitive(sdi->big_message, sensitive);
        }
 
@@ -365,12 +365,12 @@ libbalsa_smtp_server_dialog(LibBalsaSmtpServer * smtp_server,
     label = gtk_label_new(_("MB"));
     gtk_box_append(GTK_BOX(hbox), label);
     if (smtp_server->big_message > 0) {
-        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(sdi->split_button), TRUE);
+        gtk_check_button_set_active(GTK_CHECK_BUTTON(sdi->split_button), TRUE);
         /* The widget is in MB, but big_message is stored in kB. */
         gtk_spin_button_set_value(GTK_SPIN_BUTTON(sdi->big_message),
                                   ((gdouble) smtp_server->big_message) / 1024.0);
     } else {
-        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(sdi->split_button), FALSE);
+        gtk_check_button_set_active(GTK_CHECK_BUTTON(sdi->split_button), FALSE);
         gtk_spin_button_set_value(GTK_SPIN_BUTTON(sdi->big_message), 1);
     }
     libbalsa_server_cfg_add_row(sdi->server_cfg, FALSE, sdi->split_button, hbox);
diff --git a/libinit_balsa/assistant_helper.c b/libinit_balsa/assistant_helper.c
index b75c942ab..aa9cbc1b7 100644
--- a/libinit_balsa/assistant_helper.c
+++ b/libinit_balsa/assistant_helper.c
@@ -151,8 +151,8 @@ balsa_init_add_grid_checkbox(GtkGrid *grid, guint num,
 
     *dest = gtk_check_button_new();
     gtk_grid_attach(grid, *dest, 1, num + 1, 1, 1);
-    if(defval)
-        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(*dest), TRUE);
+    if (defval)
+        gtk_check_button_set_active(GTK_CHECK_BUTTON(*dest), TRUE);
     gtk_label_set_mnemonic_widget(GTK_LABEL(l), *dest);
 }
 
diff --git a/src/address-book-config.c b/src/address-book-config.c
index b02f24267..c25a294f5 100644
--- a/src/address-book-config.c
+++ b/src/address-book-config.c
@@ -847,8 +847,7 @@ create_book(AddressBookConfig * abc)
         const gchar *book_dn =
             gtk_editable_get_text(GTK_EDITABLE(abc->ab_specific.ldap.book_dn));
         gboolean enable_tls =
-            gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
-                                         (abc->ab_specific.ldap.enable_tls));
+            gtk_check_button_get_active(GTK_CHECK_BUTTON(abc->ab_specific.ldap.enable_tls));
         address_book =
             libbalsa_address_book_ldap_new(name, host, base_dn,
                                            bind_dn, passwd, book_dn,
@@ -954,8 +953,7 @@ modify_book(AddressBookConfig * abc)
         const gchar *book_dn =
             gtk_editable_get_text(GTK_EDITABLE(abc->ab_specific.ldap.book_dn));
         gboolean enable_tls =
-            gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
-                                         (abc->ab_specific.ldap.enable_tls));
+            gtk_check_button_get_active(GTK_CHECK_BUTTON(abc->ab_specific.ldap.enable_tls));
 
         ldap = LIBBALSA_ADDRESS_BOOK_LDAP(address_book);
 
diff --git a/src/balsa-app.c b/src/balsa-app.c
index 66aadd909..3c2421814 100644
--- a/src/balsa-app.c
+++ b/src/balsa-app.c
@@ -174,7 +174,7 @@ ask_password_response(GtkDialog *dialog,
 
         old_remember = apd->remember;
         passwd = g_strdup(gtk_editable_get_text(GTK_EDITABLE(apd->entry)));
-        apd->remember = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(apd->rememb_check));
+        apd->remember = gtk_check_button_get_active(GTK_CHECK_BUTTON(apd->rememb_check));
         if (apd->cert_subject != NULL)
             libbalsa_server_set_remember_cert_passphrase(apd->server, apd->remember);
         else
@@ -920,9 +920,9 @@ balsa_remove_children_mailbox_nodes(BalsaMailboxNode * mbnode)
 BalsaIndex*
 balsa_find_index_by_mailbox(LibBalsaMailbox * mailbox)
 {
+    unsigned i;
     GtkWidget *page;
-    GtkWidget *child;
-    guint i;
+    BalsaIndex *bindex = NULL;
 
     g_return_val_if_fail(LIBBALSA_IS_MAILBOX(mailbox), NULL);
     g_return_val_if_fail(GTK_IS_NOTEBOOK(balsa_app.notebook), NULL);
@@ -930,18 +930,17 @@ balsa_find_index_by_mailbox(LibBalsaMailbox * mailbox)
     for (i = 0;
         (page = gtk_notebook_get_nth_page((GtkNotebook *) balsa_app.notebook, i)) != NULL;
         i++) {
-        child = gtk_notebook_page_get_child(GTK_NOTEBOOK_PAGE(page));
-       if (child != NULL) {
-            BalsaIndex *bindex = BALSA_INDEX(child);
-            LibBalsaMailbox *this_mailbox = balsa_index_get_mailbox(bindex);
+        GtkWidget *child = gtk_scrolled_window_get_child(GTK_SCROLLED_WINDOW(page));
+        BalsaIndex *this_bindex = BALSA_INDEX(child);
+        LibBalsaMailbox *this_mailbox = balsa_index_get_mailbox(this_bindex);
 
-            if (this_mailbox == mailbox)
-                return bindex;
+        if (mailbox == this_mailbox) {
+            bindex = this_bindex;
+            break;
         }
     }
 
-    /* didn't find a matching mailbox */
-    return NULL;
+    return bindex;
 }
 
 GRegex *
diff --git a/src/balsa-message.c b/src/balsa-message.c
index a1f2c87ef..edec1a33d 100644
--- a/src/balsa-message.c
+++ b/src/balsa-message.c
@@ -948,11 +948,11 @@ balsa_message_init(BalsaMessage * balsa_message)
     gtk_scrolled_window_set_child(GTK_SCROLLED_WINDOW(scroll), viewport);
 
     /* structure view */
-    model = gtk_tree_store_new (NUM_COLUMNS,
-                                TYPE_BALSA_PART_INFO,
-                               G_TYPE_STRING,
-                                GDK_TYPE_PIXBUF,
-                                G_TYPE_STRING);
+    model = gtk_tree_store_new(NUM_COLUMNS,
+                               TYPE_BALSA_PART_INFO,
+                               G_TYPE_STRING,
+                               G_TYPE_STRING,
+                               G_TYPE_STRING);
     balsa_message->treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL(model));
     selection = gtk_tree_view_get_selection(GTK_TREE_VIEW (balsa_message->treeview));
     g_signal_connect(balsa_message->treeview, "row-activated",
@@ -1347,7 +1347,6 @@ balsa_message_set(BalsaMessage * balsa_message, LibBalsaMailbox * mailbox, guint
 
     display_headers(balsa_message);
     display_content(balsa_message);
-    gtk_widget_show(GTK_WIDGET(balsa_message));
 
     if (balsa_message->info_count > 1)
         gtk_widget_show(balsa_message->switcher);
diff --git a/src/balsa-mime-widget-message.c b/src/balsa-mime-widget-message.c
index ba786cbb8..a7101a20a 100644
--- a/src/balsa-mime-widget-message.c
+++ b/src/balsa-mime-widget-message.c
@@ -572,8 +572,8 @@ bm_header_widget_new(BalsaMessage * bm, GtkWidget * const * buttons)
 }
 
 static gboolean
-label_size_allocate_cb(GtkLabel * label, GdkRectangle * rectangle,
-                       GtkWidget * expander)
+label_map_cb(GtkLabel  *label,
+             GtkWidget *expander)
 {
     PangoLayout *layout;
 
@@ -613,7 +613,7 @@ add_header_gchar(GtkGrid * grid, const gchar * header, const gchar * label,
     if (balsa_app.use_system_fonts) {
         if (strcmp(header, "subject") == 0)
             /* Use bold for the subject line */
-            css = g_strdup("#" BALSA_MESSAGE_HEADER " {font-weight:bold}");
+            css = g_strdup("#" BALSA_MESSAGE_HEADER " {font-weight: bold;}");
         else
             css = g_strdup("");
     } else {
@@ -673,10 +673,8 @@ add_header_gchar(GtkGrid * grid, const gchar * header, const gchar * label,
             gtk_label_set_ellipsize(GTK_LABEL(value_label), PANGO_ELLIPSIZE_END);
             gtk_expander_set_expanded(GTK_EXPANDER(expander), FALSE);
         }
-        g_signal_connect(expander, "notify::expanded",
-                         G_CALLBACK(expanded_cb), value_label);
-        g_signal_connect(value_label, "size-allocate",
-                         G_CALLBACK(label_size_allocate_cb), expander);
+        g_signal_connect(expander, "notify::expanded", G_CALLBACK(expanded_cb), value_label);
+        g_signal_connect(value_label, "map", G_CALLBACK(label_map_cb), expander);
 
         hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
         gtk_box_append(GTK_BOX(hbox), value_label);
diff --git a/src/balsa-mime-widget-text.c b/src/balsa-mime-widget-text.c
index b76c9ea1e..6ae10d303 100644
--- a/src/balsa-mime-widget-text.c
+++ b/src/balsa-mime-widget-text.c
@@ -117,9 +117,8 @@ static void bm_widget_on_url(const gchar *url);
 static void phrase_highlight(GtkTextBuffer * buffer, const gchar * id,
                             gunichar tag_char, const gchar * property,
                             gint value);
-static gboolean draw_cite_bars(GtkWidget *widget,
-                               cairo_t   *cr,
-                               gpointer   user_data);
+static void draw_cite_bars(GtkWidget *widget,
+                           gpointer   user_data);
 static gchar *check_text_encoding(BalsaMessage * bm, gchar *text_buf);
 static void fill_text_buf_cited(BalsaMimeWidgetText *mwt,
                                 GtkWidget           *widget,
@@ -1085,16 +1084,13 @@ draw_cite_bar_real(gpointer data, gpointer user_data)
 }
 
 
-static gboolean
+static void
 draw_cite_bars(GtkWidget *widget,
-               cairo_t   *cr,
                gpointer   user_data)
 {
     BalsaMimeWidgetText *mwt = user_data;
 
     g_list_foreach(mwt->cite_bar_list, draw_cite_bar_real, mwt);
-
-    return G_SOURCE_REMOVE;
 }
 
 
@@ -1641,10 +1637,8 @@ fill_text_buf_cited(BalsaMimeWidgetText *mwt,
     }
 
     /* add list of citation bars(if any) */
-    if (mwt->cite_bar_list != NULL) {
-        g_signal_connect_after(widget, "draw",
-                               G_CALLBACK(draw_cite_bars), mwt);
-    }
+    if (mwt->cite_bar_list != NULL)
+        g_signal_connect_after(widget, "map", G_CALLBACK(draw_cite_bars), mwt);
 
     if (rex != NULL)
         g_regex_unref(rex);
diff --git a/src/balsa-mime-widget.c b/src/balsa-mime-widget.c
index b3ed5ab79..b70ee906c 100644
--- a/src/balsa-mime-widget.c
+++ b/src/balsa-mime-widget.c
@@ -43,8 +43,6 @@ static BalsaMimeWidget *balsa_mime_widget_new_unknown(BalsaMessage * bm,
                                                      const gchar *
                                                      content_type);
 
-static void vadj_change_cb(GtkAdjustment *vadj, GtkWidget *widget);
-
 typedef struct {
     /* container widget if more sub-parts can be added */
     GtkWidget *container;
@@ -108,8 +106,7 @@ balsa_mime_widget_new(BalsaMessage * bm, LibBalsaMessageBody * mime_body, gpoint
     BalsaMimeWidget *mw = NULL;
     gchar *content_type;
     mime_delegate_t *delegate;
-    GtkEventController *key_controller;
-    GtkAdjustment *vadj;
+    GtkEventController *controller;
 
     g_return_val_if_fail(bm != NULL, NULL);
     g_return_val_if_fail(mime_body != NULL, NULL);
@@ -130,12 +127,11 @@ balsa_mime_widget_new(BalsaMessage * bm, LibBalsaMessageBody * mime_body, gpoint
     if (mw == NULL)
        mw = balsa_mime_widget_new_unknown(bm, mime_body, content_type);
 
-    key_controller = gtk_event_controller_key_new();
-    gtk_widget_add_controller(GTK_WIDGET(mw), key_controller);
-    g_signal_connect(key_controller, "focus-in",
-                     G_CALLBACK(balsa_mime_widget_limit_focus), bm);
-    g_signal_connect(key_controller, "focus-out",
-                     G_CALLBACK(balsa_mime_widget_unlimit_focus), bm);
+    controller = gtk_event_controller_focus_new();
+    gtk_widget_add_controller(GTK_WIDGET(mw), controller);
+    g_signal_connect(controller, "enter", G_CALLBACK(balsa_mime_widget_limit_focus), bm);
+    g_signal_connect(controller, "leave", G_CALLBACK(balsa_mime_widget_unlimit_focus), bm);
+
     if (mime_body->sig_info != NULL &&
         strcmp("application/pgp-signature", content_type) != 0 &&
         strcmp("application/pkcs7-signature", content_type) != 0 &&
@@ -170,12 +166,6 @@ balsa_mime_widget_new(BalsaMessage * bm, LibBalsaMessageBody * mime_body, gpoint
     }
     g_free(content_type);
 
-    g_object_get(mw, "vadjustment", &vadj, NULL);
-    if (vadj != NULL) {
-        g_signal_connect(vadj, "changed", G_CALLBACK(vadj_change_cb), mw);
-        g_object_unref(vadj);
-    }
-
     return mw;
 }
 
@@ -317,23 +307,6 @@ balsa_mime_widget_schedule_resize(GtkWidget * widget)
 }
 
 
-static void
-vadj_change_cb(GtkAdjustment *vadj, GtkWidget *widget)
-{
-    double upper = gtk_adjustment_get_upper(vadj);
-
-    /* do nothing if it's the same widget and the height hasn't changed
-     *
-     * an HtmlView widget seems to grow by 4 pixels each time we resize
-     * it, whence the following unobvious test: */
-    if (widget == old_widget
-        && upper >= old_upper && upper <= old_upper + 4)
-        return;
-    new_widget = widget;
-    new_upper = upper;
-    balsa_mime_widget_schedule_resize(widget);
-}
-
 /*
  * Getters
  */
diff --git a/src/filter-edit-callbacks.c b/src/filter-edit-callbacks.c
index 393e0fa58..f2a742872 100644
--- a/src/filter-edit-callbacks.c
+++ b/src/filter-edit-callbacks.c
@@ -419,20 +419,20 @@ fe_match_fields_buttons_cb(GtkWidget * widget, gpointer data)
     gboolean active = GPOINTER_TO_INT(data) != 3;  /* 3 ==uncheck all buttons */
 
     condition_has_changed = TRUE;
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(fe_matching_fields_body),active);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(fe_matching_fields_to),active);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(fe_matching_fields_from),active);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(fe_matching_fields_subject),active);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(fe_matching_fields_cc),active);
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(fe_matching_fields_body),active);
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(fe_matching_fields_to),active);
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(fe_matching_fields_from),active);
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(fe_matching_fields_subject),active);
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(fe_matching_fields_cc),active);
 }                       /* end fe_match_fields_buttons_cb */
 
 static void
 fe_match_field_user_header_cb(GtkWidget * widget)
 {
-    GtkToggleButton *button =
-        GTK_TOGGLE_BUTTON(fe_matching_fields_us_head);
+    GtkCheckButton *button =
+        GTK_CHECK_BUTTON(fe_matching_fields_us_head);
     gtk_widget_set_sensitive(fe_user_header,
-                             gtk_toggle_button_get_active(button));
+                             gtk_check_button_get_active(button));
     condition_has_changed = TRUE;
 }
 
@@ -517,17 +517,17 @@ condition_validate(LibBalsaCondition* new_cnd)
     /* Retrieve matching fields only if they are meaningful
        for the condition type */
     if (new_cnd->type != CONDITION_DATE && new_cnd->type != CONDITION_FLAG) {
-        if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(fe_matching_fields_body)))
+        if (gtk_check_button_get_active(GTK_CHECK_BUTTON(fe_matching_fields_body)))
             CONDITION_SETMATCH(new_cnd,CONDITION_MATCH_BODY);
-        if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(fe_matching_fields_to)))
+        if (gtk_check_button_get_active(GTK_CHECK_BUTTON(fe_matching_fields_to)))
             CONDITION_SETMATCH(new_cnd,CONDITION_MATCH_TO);
-        if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(fe_matching_fields_subject)))
+        if (gtk_check_button_get_active(GTK_CHECK_BUTTON(fe_matching_fields_subject)))
             CONDITION_SETMATCH(new_cnd,CONDITION_MATCH_SUBJECT);
-        if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(fe_matching_fields_from)))
+        if (gtk_check_button_get_active(GTK_CHECK_BUTTON(fe_matching_fields_from)))
             CONDITION_SETMATCH(new_cnd,CONDITION_MATCH_FROM);
-        if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(fe_matching_fields_cc)))
+        if (gtk_check_button_get_active(GTK_CHECK_BUTTON(fe_matching_fields_cc)))
             CONDITION_SETMATCH(new_cnd,CONDITION_MATCH_CC);
-        if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(fe_matching_fields_us_head))) {
+        if (gtk_check_button_get_active(GTK_CHECK_BUTTON(fe_matching_fields_us_head))) {
            CONDITION_SETMATCH(new_cnd,CONDITION_MATCH_US_HEAD);
             c_str = 
gtk_editable_get_text(GTK_EDITABLE(gtk_combo_box_get_child(GTK_COMBO_BOX(fe_user_header))));
            if (c_str[0] == '\0') {
@@ -637,7 +637,7 @@ condition_validate(LibBalsaCondition* new_cnd)
         for (row = 0;row<2;row++)
             for (col = 0;col<2;col++)
                 new_cnd->match.flags |=
-                    gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(fe_type_flag_buttons[row*2+col])) ? 1 << 
(row*2+col): 0;
+                    gtk_check_button_get_active(GTK_CHECK_BUTTON(fe_type_flag_buttons[row*2+col])) ? 1 << 
(row*2+col): 0;
 
     case CONDITION_NONE:
     case CONDITION_AND: /*FIXME: verify this! */
@@ -739,17 +739,17 @@ fill_condition_widgets(LibBalsaCondition* cnd)
     /* First update matching fields
      * but if type is date or flag, these are meaning less so we disable them */
     andmask = (cnd->type != CONDITION_FLAG && cnd->type != CONDITION_DATE);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(fe_matching_fields_body),
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(fe_matching_fields_body),
                                  CONDITION_CHKMATCH(cnd,CONDITION_MATCH_BODY) && andmask);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(fe_matching_fields_to),
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(fe_matching_fields_to),
                                  CONDITION_CHKMATCH(cnd,CONDITION_MATCH_TO) && andmask);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(fe_matching_fields_from),
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(fe_matching_fields_from),
                                  CONDITION_CHKMATCH(cnd,CONDITION_MATCH_FROM) && andmask);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(fe_matching_fields_subject),
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(fe_matching_fields_subject),
                                  CONDITION_CHKMATCH(cnd,CONDITION_MATCH_SUBJECT) && andmask);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(fe_matching_fields_cc),
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(fe_matching_fields_cc),
                                  CONDITION_CHKMATCH(cnd,CONDITION_MATCH_CC) && andmask);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(fe_matching_fields_us_head),
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(fe_matching_fields_us_head),
                                  CONDITION_CHKMATCH(cnd,CONDITION_MATCH_US_HEAD) && andmask);
     if (CONDITION_CHKMATCH(cnd,CONDITION_MATCH_US_HEAD) && andmask) {
        gtk_widget_set_sensitive(fe_user_header, TRUE);
@@ -809,7 +809,7 @@ fill_condition_widgets(LibBalsaCondition* cnd)
     case CONDITION_FLAG:
         for (row = 0;row<2;row++)
             for (col = 0;col<2;col++)
-                gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(fe_type_flag_buttons[row*2+col]),
+                gtk_check_button_set_active(GTK_CHECK_BUTTON(fe_type_flag_buttons[row*2+col]),
                                              cnd->match.flags & (1 << (row*2+col)));
         fe_update_label(fe_type_flag_label,   &flags_label);
         break;
@@ -1595,8 +1595,8 @@ fe_action_selected(GtkWidget * widget, gpointer data)
 void
 fe_button_toggled(GtkWidget * widget, gpointer data)
 {
-    GtkToggleButton *button = GTK_TOGGLE_BUTTON(widget);
-    gboolean active = gtk_toggle_button_get_active(button);
+    GtkCheckButton *button = GTK_CHECK_BUTTON(widget);
+    gboolean active = gtk_check_button_get_active(button);
     GtkWidget *child;
 
     child = gtk_widget_get_first_child(GTK_WIDGET(data));
@@ -1850,8 +1850,8 @@ fe_delete_pressed(GtkWidget * widget, gpointer data)
         gtk_list_store_clear(GTK_LIST_STORE
                              (gtk_tree_view_get_model
                               (fe_conditions_list)));
-        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(fe_sound_button),FALSE);
-        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(fe_popup_button),FALSE);
+        gtk_check_button_set_active(GTK_CHECK_BUTTON(fe_sound_button),FALSE);
+        gtk_check_button_set_active(GTK_CHECK_BUTTON(fe_popup_button),FALSE);
         /* We make the filters delete,revert,apply buttons unsensitive */
         gtk_widget_set_sensitive(fe_delete_button,FALSE);
         set_button_sensitivities(FALSE);
@@ -1962,21 +1962,21 @@ fe_apply_pressed(GtkWidget * widget, gpointer data)
     if (fil->action == FILTER_COLOR) {
         GdkRGBA rgba;
         GString *string = g_string_new(NULL);
-        GtkToggleButton *toggle_button;
+        GtkCheckButton *check_button;
         gchar *color_string;
 
-        toggle_button = (GTK_TOGGLE_BUTTON(fe_foreground_set));
-        if (gtk_toggle_button_get_active(toggle_button)) {
+        check_button = (GTK_CHECK_BUTTON(fe_foreground_set));
+        if (gtk_check_button_get_active(check_button)) {
             gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(fe_foreground),
                                        &rgba);
             color_string = gdk_rgba_to_string(&rgba);
             g_string_append_printf(string, "foreground:%s", color_string);
             g_free(color_string);
-            gtk_toggle_button_set_active(toggle_button, FALSE);
+            gtk_check_button_set_active(check_button, FALSE);
         }
 
-        toggle_button = (GTK_TOGGLE_BUTTON(fe_background_set));
-        if (gtk_toggle_button_get_active(toggle_button)) {
+        check_button = (GTK_CHECK_BUTTON(fe_background_set));
+        if (gtk_check_button_get_active(check_button)) {
             gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(fe_background),
                                        &rgba);
             color_string = gdk_rgba_to_string(&rgba);
@@ -1984,13 +1984,13 @@ fe_apply_pressed(GtkWidget * widget, gpointer data)
                 g_string_append_c(string, ';');
             g_string_append_printf(string, "background:%s", color_string);
             g_free(color_string);
-            gtk_toggle_button_set_active(toggle_button, FALSE);
+            gtk_check_button_set_active(check_button, FALSE);
         }
 
         fil->action_string = g_string_free(string, FALSE);
     } else if (fil->action != FILTER_TRASH)
         fil->action_string = g_strdup(balsa_mblist_mru_option_menu_get(fe_mailboxes));
-    if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(fe_popup_button))) {
+    if (gtk_check_button_get_active(GTK_CHECK_BUTTON(fe_popup_button))) {
         static gchar defstring[] = N_("Filter has matched");
         const gchar *tmpstr;
 
@@ -2002,7 +2002,7 @@ fe_apply_pressed(GtkWidget * widget, gpointer data)
     }
 
 /* FIXME never defined?? #ifdef HAVE_LIBESD */
-    if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(fe_sound_button))) {
+    if (gtk_check_button_get_active(GTK_CHECK_BUTTON(fe_sound_button))) {
         GFile *file;
         gchar *tmpstr;
 
@@ -2108,12 +2108,12 @@ fe_filters_list_selection_changed(GtkTreeSelection * selection,
 
     /* Populate all fields with filter data */
     gtk_editable_set_text(GTK_EDITABLE(fe_name_entry),fil->name);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(fe_popup_button),
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(fe_popup_button),
                                  fil->popup_text != NULL);
     gtk_editable_set_text(GTK_EDITABLE(fe_popup_entry),
                        fil->popup_text != NULL
                        ? fil->popup_text : "");
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(fe_sound_button),
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(fe_sound_button),
                                  fil->sound != NULL);
     if (fil->sound != NULL) {
         GFile *file;
@@ -2140,14 +2140,14 @@ fe_filters_list_selection_changed(GtkTreeSelection * selection,
                 gdk_rgba_parse(&rgba, (*p) + 11);
                 gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(fe_foreground),
                                            &rgba);
-                gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+                gtk_check_button_set_active(GTK_CHECK_BUTTON
                                              (fe_foreground_set), TRUE);
             }
             if (g_str_has_prefix(*p, "background:")) {
                 gdk_rgba_parse(&rgba, (*p) + 11);
                 gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(fe_background),
                                            &rgba);
-                gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+                gtk_check_button_set_active(GTK_CHECK_BUTTON
                                              (fe_background_set), TRUE);
             }
         }
@@ -2218,11 +2218,11 @@ fe_sound_response(GtkDialog * dialog, gint response)
 
 /* Callback for color check-buttons' "toggled" signal */
 void
-fe_color_check_toggled(GtkToggleButton * check_button, gpointer data)
+fe_color_check_toggled(GtkCheckButton * check_button, gpointer data)
 {
     GtkWidget *color_button = GTK_WIDGET(data);
     gtk_widget_set_sensitive(color_button,
-                             gtk_toggle_button_get_active(check_button));
+                             gtk_check_button_get_active(check_button));
     set_button_sensitivities(TRUE);
 }
 
diff --git a/src/filter-edit-dialog.c b/src/filter-edit-dialog.c
index d5fc3ebce..9b4bcc4d5 100644
--- a/src/filter-edit-dialog.c
+++ b/src/filter-edit-dialog.c
@@ -416,7 +416,7 @@ build_action_page(GtkWindow * window)
     gtk_grid_attach(GTK_GRID(grid), fe_sound_entry, 1, 0, 1, 1);
     /* fe_sound_entry is initially sensitive, so to be consistent
      * we must make fe_sound_button active */
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(fe_sound_button), TRUE);
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(fe_sound_button), TRUE);
     g_signal_connect(fe_sound_button, "toggled",
                      G_CALLBACK(fe_button_toggled), fe_sound_entry);
     g_signal_connect(dialog, "response",
@@ -432,7 +432,7 @@ build_action_page(GtkWindow * window)
     gtk_grid_attach(GTK_GRID(grid), fe_popup_entry, 1, 1, 1, 1);
     /* fe_popup_entry is initially sensitive, so to be consistent
      * we must make fe_popup_button active */
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(fe_popup_button), TRUE);
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(fe_popup_button), TRUE);
     g_signal_connect(fe_popup_button, "toggled",
                      G_CALLBACK(fe_button_toggled), fe_popup_entry);
     g_signal_connect(fe_popup_entry, "changed",
diff --git a/src/filter-edit.h b/src/filter-edit.h
index ede929f88..2eb4d8443 100644
--- a/src/filter-edit.h
+++ b/src/filter-edit.h
@@ -98,7 +98,7 @@ void fe_sound_response(GtkDialog * dialog, gint response);
 void fe_add_new_user_header(const gchar *);
 
 /* Callbacks for color button signals */
-void fe_color_check_toggled(GtkToggleButton * check_button, gpointer data);
+void fe_color_check_toggled(GtkCheckButton * check_button, gpointer data);
 void fe_color_set(GtkColorButton * color_button, gpointer data);
 
 #endif /*__FILTER_EDIT_H__ */
diff --git a/src/folder-conf.c b/src/folder-conf.c
index 85f151d12..a5d8d2f4f 100644
--- a/src/folder-conf.c
+++ b/src/folder-conf.c
@@ -263,13 +263,13 @@ folder_conf_clicked_ok_idle(gpointer user_data)
     libbalsa_imap_server_set_max_connections
         (imap, gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(folder_data->connection_limit)));
     libbalsa_imap_server_enable_persistent_cache
-        (imap, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(folder_data->enable_persistent)));
+        (imap, gtk_check_button_get_active(GTK_CHECK_BUTTON(folder_data->enable_persistent)));
     libbalsa_imap_server_set_use_idle
-        (imap, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(folder_data->use_idle)));
+        (imap, gtk_check_button_get_active(GTK_CHECK_BUTTON(folder_data->use_idle)));
     libbalsa_imap_server_set_bug
-        (imap, ISBUG_FETCH, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(folder_data->has_bugs)));
+        (imap, ISBUG_FETCH, gtk_check_button_get_active(GTK_CHECK_BUTTON(folder_data->has_bugs)));
     libbalsa_imap_server_set_use_status
-        (imap, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(folder_data->use_status)));
+        (imap, gtk_check_button_get_active(GTK_CHECK_BUTTON(folder_data->use_status)));
 
     if (mbnode == NULL) {
        folder_data->common_data.mbnode = mbnode =
@@ -288,9 +288,9 @@ folder_conf_clicked_ok_idle(gpointer user_data)
     balsa_mailbox_node_set_dir(mbnode,
                                gtk_editable_get_text(GTK_EDITABLE(folder_data->prefix)));
     balsa_mailbox_node_set_subscribed(mbnode,
-                                      
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(folder_data->subscribed)));
+                                      
gtk_check_button_get_active(GTK_CHECK_BUTTON(folder_data->subscribed)));
     balsa_mailbox_node_set_list_inbox(mbnode,
-                                      
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(folder_data->list_inbox)));
+                                      
gtk_check_button_get_active(GTK_CHECK_BUTTON(folder_data->list_inbox)));
 
     libbalsa_server_config_changed(folder_data->server); /* trigger config save */
     imap_update_subscriptions(folder_data);
@@ -475,10 +475,10 @@ folder_conf_imap_subscriptions(GtkButton        *widget,
 }
 
 static void
-folder_data_subscribed_toggled(GtkToggleButton *toggle,
-                                          GtkWidget       *button)
+folder_data_subscribed_toggled(GtkCheckButton *check,
+                               GtkWidget       *button)
 {
-       gtk_widget_set_sensitive(button, gtk_toggle_button_get_active(toggle));
+       gtk_widget_set_sensitive(button, gtk_check_button_get_active(check));
 }
 
 /* folder_conf_imap_node:
@@ -558,10 +558,10 @@ folder_conf_imap_node(BalsaMailboxNode *mn)
     g_signal_connect(button, "clicked", G_CALLBACK(folder_conf_imap_subscriptions), folder_data);
     if (mn != NULL) {
         gboolean subscribed = balsa_mailbox_node_get_subscribed(mn);
-       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(folder_data->subscribed), subscribed);
+       gtk_check_button_set_active(GTK_CHECK_BUTTON(folder_data->subscribed), subscribed);
        gtk_widget_set_sensitive(button, subscribed);
     } else {
-       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(folder_data->subscribed), FALSE);
+       gtk_check_button_set_active(GTK_CHECK_BUTTON(folder_data->subscribed), FALSE);
        gtk_widget_set_sensitive(button, FALSE);
     }
     gtk_box_append(GTK_BOX(box), button);
diff --git a/src/mailbox-conf.c b/src/mailbox-conf.c
index 4cf4ac9a3..2089811cb 100644
--- a/src/mailbox-conf.c
+++ b/src/mailbox-conf.c
@@ -463,7 +463,7 @@ check_for_blank_fields(GtkWidget G_GNUC_UNUSED *widget,
         sensitive = libbalsa_server_cfg_valid(mcw->mb_data.pop3.server_cfg);
 
         /* procmail filter */
-        enable_filter = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mcw->mb_data.pop3.filter));
+        enable_filter = gtk_check_button_get_active(GTK_CHECK_BUTTON(mcw->mb_data.pop3.filter));
         gtk_widget_set_sensitive(mcw->mb_data.pop3.filter_cmd, enable_filter);
         if (enable_filter) {
             sensitive = sensitive
@@ -514,14 +514,14 @@ update_pop_mailbox(MailboxConfWindow *mcw)
        libbalsa_server_cfg_assign_server(mcw->mb_data.pop3.server_cfg, server);
        libbalsa_server_config_changed(server);
 
-       libbalsa_mailbox_pop3_set_check(mailbox_pop3, 
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mcw->mb_data.pop3.check)));
-       libbalsa_mailbox_pop3_set_delete_from_server(mailbox_pop3, 
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (mcw->mb_data.pop3.delete_from_server)));
-       libbalsa_mailbox_pop3_set_filter(mailbox_pop3, 
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mcw->mb_data.pop3.filter)));
+       libbalsa_mailbox_pop3_set_check(mailbox_pop3, 
gtk_check_button_get_active(GTK_CHECK_BUTTON(mcw->mb_data.pop3.check)));
+       libbalsa_mailbox_pop3_set_delete_from_server(mailbox_pop3, 
gtk_check_button_get_active(GTK_CHECK_BUTTON (mcw->mb_data.pop3.delete_from_server)));
+       libbalsa_mailbox_pop3_set_filter(mailbox_pop3, 
gtk_check_button_get_active(GTK_CHECK_BUTTON(mcw->mb_data.pop3.filter)));
        libbalsa_mailbox_pop3_set_filter_cmd(mailbox_pop3, 
gtk_editable_get_text(GTK_EDITABLE(mcw->mb_data.pop3.filter_cmd)));
 
        /* advanced settings */
-       libbalsa_mailbox_pop3_set_disable_apop(mailbox_pop3, 
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mcw->mb_data.pop3.disable_apop)));
-       libbalsa_mailbox_pop3_set_enable_pipe(mailbox_pop3, 
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mcw->mb_data.pop3.enable_pipe)));
+       libbalsa_mailbox_pop3_set_disable_apop(mailbox_pop3, 
gtk_check_button_get_active(GTK_CHECK_BUTTON(mcw->mb_data.pop3.disable_apop)));
+       libbalsa_mailbox_pop3_set_enable_pipe(mailbox_pop3, 
gtk_check_button_get_active(GTK_CHECK_BUTTON(mcw->mb_data.pop3.enable_pipe)));
 }
 
 /* conf_update_mailbox:
@@ -896,7 +896,7 @@ thread_messages_toggled(GtkWidget * widget,
 {
     gboolean thread_messages;
 
-    thread_messages = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
+    thread_messages = gtk_check_button_get_active(GTK_CHECK_BUTTON(widget));
     gtk_widget_set_sensitive(view_info->subject_gather, thread_messages);
 }
 
@@ -1072,14 +1072,14 @@ mailbox_conf_view_check(BalsaMailboxConfView * view_info,
         changed = TRUE;
     }
 
-    active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+    active = gtk_check_button_get_active(GTK_CHECK_BUTTON
                                           (view_info->show_to));
     if (libbalsa_mailbox_set_show(mailbox, active ?
                                   LB_MAILBOX_SHOW_TO :
                                   LB_MAILBOX_SHOW_FROM))
         changed = TRUE;
 
-    active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+    active = gtk_check_button_get_active(GTK_CHECK_BUTTON
                                           (view_info->subscribe));
     if (libbalsa_mailbox_set_subscribe(mailbox, active ?
                                       LB_MAILBOX_SUBSCRIBE_YES :
@@ -1088,12 +1088,12 @@ mailbox_conf_view_check(BalsaMailboxConfView * view_info,
 
     /* Threading */
 
-    active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+    active = gtk_check_button_get_active(GTK_CHECK_BUTTON
                                           (view_info->subject_gather));
     libbalsa_mailbox_set_subject_gather(mailbox, active);
     threading_type = active ? LB_MAILBOX_THREADING_JWZ : LB_MAILBOX_THREADING_SIMPLE;
 
-    active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+    active = gtk_check_button_get_active(GTK_CHECK_BUTTON
                                           (view_info->thread_messages));
     /* Set the threading type directly, not through the UI: */
     libbalsa_mailbox_set_threading_type(mailbox,
diff --git a/src/main-window.c b/src/main-window.c
index 57e17d85d..9ddba10da 100644
--- a/src/main-window.c
+++ b/src/main-window.c
@@ -3785,13 +3785,13 @@ balsa_window_find_current_index(BalsaWindow * window)
     return priv->current_index;
 }
 
-static GtkToggleButton*
+static GtkCheckButton*
 bw_add_check_button(GtkWidget* grid, const gchar* label, gint x, gint y)
 {
     GtkWidget* res = gtk_check_button_new_with_mnemonic(label);
     gtk_widget_set_hexpand(res, TRUE);
     gtk_grid_attach(GTK_GRID(grid), res, x, y, 1, 1);
-    return GTK_TOGGLE_BUTTON(res);
+    return GTK_CHECK_BUTTON(res);
 }
 
 enum {
@@ -3816,11 +3816,11 @@ typedef struct {
     GtkWidget *reverse_button;
     GtkWidget *wrap_button;
     GtkWidget *search_entry;
-    GtkToggleButton *matching_body;
-    GtkToggleButton *matching_from;
-    GtkToggleButton *matching_to;
-    GtkToggleButton *matching_cc;
-    GtkToggleButton *matching_subject;
+    GtkCheckButton *matching_body;
+    GtkCheckButton *matching_from;
+    GtkCheckButton *matching_to;
+    GtkCheckButton *matching_cc;
+    GtkCheckButton *matching_subject;
 } bw_find_real_data;
 
 static void
@@ -3839,22 +3839,22 @@ bw_find_real_response(GtkDialog *dia,
 
     case GTK_RESPONSE_OK:
     case FIND_RESPONSE_FILTER:
-        data->reverse = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(data->reverse_button));
-        data->wrap = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(data->wrap_button));
+        data->reverse = gtk_check_button_get_active(GTK_CHECK_BUTTON(data->reverse_button));
+        data->wrap = gtk_check_button_get_active(GTK_CHECK_BUTTON(data->wrap_button));
         g_free(data->cnd->match.string.string);
         data->cnd->match.string.string =
             g_strdup(gtk_editable_get_text(GTK_EDITABLE(data->search_entry)));
         data->cnd->match.string.fields = CONDITION_EMPTY;
 
-        if (gtk_toggle_button_get_active(data->matching_body))
+        if (gtk_check_button_get_active(data->matching_body))
             CONDITION_SETMATCH(data->cnd, CONDITION_MATCH_BODY);
-        if (gtk_toggle_button_get_active(data->matching_to))
+        if (gtk_check_button_get_active(data->matching_to))
             CONDITION_SETMATCH(data->cnd, CONDITION_MATCH_TO);
-        if (gtk_toggle_button_get_active(data->matching_subject))
+        if (gtk_check_button_get_active(data->matching_subject))
             CONDITION_SETMATCH(data->cnd, CONDITION_MATCH_SUBJECT);
-        if (gtk_toggle_button_get_active(data->matching_from))
+        if (gtk_check_button_get_active(data->matching_from))
             CONDITION_SETMATCH(data->cnd, CONDITION_MATCH_FROM);
-        if (gtk_toggle_button_get_active(data->matching_cc))
+        if (gtk_check_button_get_active(data->matching_cc))
             CONDITION_SETMATCH(data->cnd, CONDITION_MATCH_CC);
         if (!(data->cnd->match.string.fields != CONDITION_EMPTY && data->cnd->match.string.string[0]))
             /* FIXME : We should print error messages, but for
@@ -4040,7 +4040,7 @@ bw_find_real(BalsaWindow * window, BalsaIndex * bindex, gboolean again)
 
        data.reverse_button =
             gtk_check_button_new_with_mnemonic(_("_Reverse search"));
-       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data.reverse_button),
+       gtk_check_button_set_active(GTK_CHECK_BUTTON(data.reverse_button),
                                      data.reverse);
 
         gtk_widget_set_vexpand(data.reverse_button, TRUE);
@@ -4049,7 +4049,7 @@ bw_find_real(BalsaWindow * window, BalsaIndex * bindex, gboolean again)
 
        data.wrap_button =
             gtk_check_button_new_with_mnemonic(_("_Wrap around"));
-       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data.wrap_button),
+       gtk_check_button_set_active(GTK_CHECK_BUTTON(data.wrap_button),
                                      data.wrap);
 
         gtk_widget_set_vexpand(data.wrap_button, TRUE);
@@ -4073,17 +4073,15 @@ bw_find_real(BalsaWindow * window, BalsaIndex * bindex, gboolean again)
        if (data.cnd->match.string.string)
            gtk_editable_set_text(GTK_EDITABLE(data.search_entry),
                                   data.cnd->match.string.string);
-       gtk_toggle_button_set_active(data.matching_body,
-                                    CONDITION_CHKMATCH(data.cnd,
-                                                       CONDITION_MATCH_BODY));
-       gtk_toggle_button_set_active(data.matching_to,
-                                    CONDITION_CHKMATCH(data.cnd,
-                                                        CONDITION_MATCH_TO));
-       gtk_toggle_button_set_active(data.matching_from,
+       gtk_check_button_set_active(data.matching_body,
+                                    CONDITION_CHKMATCH(data.cnd, CONDITION_MATCH_BODY));
+       gtk_check_button_set_active(data.matching_to,
+                                    CONDITION_CHKMATCH(data.cnd, CONDITION_MATCH_TO));
+       gtk_check_button_set_active(data.matching_from,
                                     CONDITION_CHKMATCH(data.cnd,CONDITION_MATCH_FROM));
-       gtk_toggle_button_set_active(data.matching_subject,
+       gtk_check_button_set_active(data.matching_subject,
                                     CONDITION_CHKMATCH(data.cnd,CONDITION_MATCH_SUBJECT));
-       gtk_toggle_button_set_active(data.matching_cc,
+       gtk_check_button_set_active(data.matching_cc,
                                     CONDITION_CHKMATCH(data.cnd,CONDITION_MATCH_CC));
 
         gtk_widget_grab_focus(data.search_entry);
diff --git a/src/message-window.c b/src/message-window.c
index 70a343991..f8096e7c1 100644
--- a/src/message-window.c
+++ b/src/message-window.c
@@ -858,9 +858,8 @@ message_window_new(LibBalsaMailbox * mailbox, guint msgno)
        return;
 
     message = libbalsa_mailbox_get_message(mailbox, msgno);
-    if (message != NULL
-        && (mw = g_object_get_data(G_OBJECT(message),
-                                   BALSA_MESSAGE_WINDOW_KEY)) != NULL) {
+    if (message != NULL &&
+        (mw = g_object_get_data(G_OBJECT(message), BALSA_MESSAGE_WINDOW_KEY)) != NULL) {
         gtk_window_present(GTK_WINDOW(mw->window));
         g_object_unref(message);
         return;
diff --git a/src/pref-manager.c b/src/pref-manager.c
index 02ef1604e..5de648044 100644
--- a/src/pref-manager.c
+++ b/src/pref-manager.c
@@ -344,8 +344,7 @@ update_view_defaults(const gchar * group, const gchar * url,
     if (view->sort_field == libbalsa_mailbox_get_sort_field(NULL))
         view->sort_field = pui->sort_field_index;
     if (view->threading_type == libbalsa_mailbox_get_threading_type(NULL)) {
-        if (gtk_toggle_button_get_active
-            (GTK_TOGGLE_BUTTON(pui->thread_messages_check))) {
+        if (gtk_check_button_get_active(GTK_CHECK_BUTTON(pui->thread_messages_check))) {
             view->threading_type = LB_MAILBOX_THREADING_SIMPLE;
         } else {
             view->threading_type = LB_MAILBOX_THREADING_FLAT;
@@ -369,8 +368,7 @@ check_font_button(GtkWidget * button, gchar ** font)
         fontname = gtk_font_chooser_get_font(GTK_FONT_CHOOSER(button));
 
         g_free(*font);
-        if (!gtk_toggle_button_get_active
-            (GTK_TOGGLE_BUTTON(pui->use_default_font_size))) {
+        if (!gtk_check_button_get_active(GTK_CHECK_BUTTON(pui->use_default_font_size))) {
             *font = fontname;
         } else {
             PangoFontDescription *desc;
@@ -412,11 +410,11 @@ apply_prefs(GtkDialog * pbox)
     /*
      * display page
      */
-    balsa_app.recv_progress_dialog = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pui->recv_progress_dlg));
-    balsa_app.send_progress_dialog = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pui->send_progress_dlg));
+    balsa_app.recv_progress_dialog = gtk_check_button_get_active(GTK_CHECK_BUTTON(pui->recv_progress_dlg));
+    balsa_app.send_progress_dialog = gtk_check_button_get_active(GTK_CHECK_BUTTON(pui->send_progress_dlg));
 
     balsa_app.previewpane =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pui->previewpane));
+        gtk_check_button_get_active(GTK_CHECK_BUTTON(pui->previewpane));
 
     save_enum = balsa_app.layout_type;
     balsa_app.layout_type =
@@ -425,19 +423,19 @@ apply_prefs(GtkDialog * pbox)
         balsa_change_window_layout(balsa_app.main_window);
 
     balsa_app.view_message_on_open =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+        gtk_check_button_get_active(GTK_CHECK_BUTTON
                                      (pui->view_message_on_open));
     balsa_app.ask_before_select =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+        gtk_check_button_get_active(GTK_CHECK_BUTTON
                                      (pui->ask_before_select));
     balsa_app.pgdownmod =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pui->pgdownmod));
+        gtk_check_button_get_active(GTK_CHECK_BUTTON(pui->pgdownmod));
     balsa_app.pgdown_percent =
         gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON
                                          (pui->pgdown_percent));
 
     if (balsa_app.mblist_show_mb_content_info !=
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+        gtk_check_button_get_active(GTK_CHECK_BUTTON
                                      (pui->mblist_show_mb_content_info))) {
         balsa_app.mblist_show_mb_content_info =
             !balsa_app.mblist_show_mb_content_info;
@@ -446,30 +444,30 @@ apply_prefs(GtkDialog * pbox)
     }
 
     balsa_app.check_mail_auto =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+        gtk_check_button_get_active(GTK_CHECK_BUTTON
                                      (pui->check_mail_auto));
     balsa_app.check_mail_timer =
         gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON
                                          (pui->check_mail_minutes));
     balsa_app.quiet_background_check =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+        gtk_check_button_get_active(GTK_CHECK_BUTTON
                                      (pui->quiet_background_check));
     balsa_app.msg_size_limit =
         gtk_spin_button_get_value(GTK_SPIN_BUTTON(pui->msg_size_limit)) *
         1024;
     balsa_app.check_imap =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pui->check_imap));
+        gtk_check_button_get_active(GTK_CHECK_BUTTON(pui->check_imap));
     balsa_app.check_imap_inbox =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+        gtk_check_button_get_active(GTK_CHECK_BUTTON
                                      (pui->check_imap_inbox));
     balsa_app.notify_new_mail_dialog =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+        gtk_check_button_get_active(GTK_CHECK_BUTTON
                                      (pui->notify_new_mail_dialog));
     balsa_app.notify_new_mail_sound =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+        gtk_check_button_get_active(GTK_CHECK_BUTTON
                                      (pui->notify_new_mail_sound));
     balsa_app.notify_new_mail_icon =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+        gtk_check_button_get_active(GTK_CHECK_BUTTON
                                      (pui->notify_new_mail_icon));
     balsa_app.mdn_reply_clean =
         pm_combo_box_get_level(pui->mdn_reply_clean_menu);
@@ -482,38 +480,38 @@ apply_prefs(GtkDialog * pbox)
         update_timer(FALSE, 0);
 
     balsa_app.wordwrap =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pui->wordwrap));
+        gtk_check_button_get_active(GTK_CHECK_BUTTON(pui->wordwrap));
     balsa_app.wraplength =
         gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(pui->wraplength));
     balsa_app.autoquote =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pui->autoquote));
+        gtk_check_button_get_active(GTK_CHECK_BUTTON(pui->autoquote));
     balsa_app.reply_strip_html =
-        !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+        !gtk_check_button_get_active(GTK_CHECK_BUTTON
                                       (pui->reply_include_html_parts));
     balsa_app.forward_attached =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+        gtk_check_button_get_active(GTK_CHECK_BUTTON
                                      (pui->forward_attached));
 
     save_setting = balsa_app.always_queue_sent_mail;
     balsa_app.always_queue_sent_mail =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+        gtk_check_button_get_active(GTK_CHECK_BUTTON
                                      (pui->always_queue_sent_mail));
     if (balsa_app.always_queue_sent_mail != save_setting) {
         balsa_toolbar_model_changed(balsa_window_get_toolbar_model());
     }
 
        balsa_app.send_mail_auto =
-               gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pui->send_mail_auto));
+               gtk_check_button_get_active(GTK_CHECK_BUTTON(pui->send_mail_auto));
        balsa_app.send_mail_timer =
                gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(pui->send_mail_minutes));
        libbalsa_auto_send_config(balsa_app.send_mail_auto, balsa_app.send_mail_timer);
 
     balsa_app.copy_to_sentbox =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+        gtk_check_button_get_active(GTK_CHECK_BUTTON
                                      (pui->copy_to_sentbox));
 
     balsa_app.close_mailbox_auto =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+        gtk_check_button_get_active(GTK_CHECK_BUTTON
                                      (pui->close_mailbox_auto));
     balsa_app.close_mailbox_timeout =
         gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON
@@ -522,10 +520,10 @@ apply_prefs(GtkDialog * pbox)
 
     libbalsa_mailbox_set_filter(NULL, pui->filter);
     balsa_app.expunge_on_close =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+        gtk_check_button_get_active(GTK_CHECK_BUTTON
                                      (pui->expunge_on_close));
     balsa_app.expunge_auto =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pui->expunge_auto));
+        gtk_check_button_get_active(GTK_CHECK_BUTTON(pui->expunge_auto));
     balsa_app.expunge_timeout =
         gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON
                                          (pui->expunge_minutes)) * 60;
@@ -534,7 +532,7 @@ apply_prefs(GtkDialog * pbox)
 
     /* external editor */
     balsa_app.edit_headers =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pui->edit_headers));
+        gtk_check_button_get_active(GTK_CHECK_BUTTON(pui->edit_headers));
 
     /* arp */
     g_free(balsa_app.quote_str);
@@ -543,20 +541,20 @@ apply_prefs(GtkDialog * pbox)
 
     /* fonts */
     balsa_app.use_system_fonts =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+        gtk_check_button_get_active(GTK_CHECK_BUTTON
                                      (pui->use_system_fonts));
     check_font_button(pui->message_font_button, &balsa_app.message_font);
     check_font_button(pui->subject_font_button, &balsa_app.subject_font);
 
     balsa_app.mark_quoted =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+        gtk_check_button_get_active(GTK_CHECK_BUTTON
                                      (pui->mark_quoted));
     g_free(balsa_app.quote_regex);
     tmp = gtk_editable_get_text(GTK_EDITABLE(pui->quote_pattern));
     balsa_app.quote_regex = g_strcompress(tmp);
 
     balsa_app.browse_wrap =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pui->browse_wrap));
+        gtk_check_button_get_active(GTK_CHECK_BUTTON(pui->browse_wrap));
     /* main window view menu can also toggle balsa_app.browse_wrap
      * update_view_menu lets it know we've made a change */
     update_view_menu(balsa_app.main_window);
@@ -565,17 +563,17 @@ apply_prefs(GtkDialog * pbox)
                                          (pui->browse_wrap_length));
 
     balsa_app.display_alt_plain =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+        gtk_check_button_get_active(GTK_CHECK_BUTTON
                                      (pui->display_alt_plain));
 
     balsa_app.open_inbox_upon_startup =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+        gtk_check_button_get_active(GTK_CHECK_BUTTON
                                      (pui->open_inbox_upon_startup));
     balsa_app.check_mail_upon_startup =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+        gtk_check_button_get_active(GTK_CHECK_BUTTON
                                      (pui->check_mail_upon_startup));
     balsa_app.remember_open_mboxes =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+        gtk_check_button_get_active(GTK_CHECK_BUTTON
                                      (pui->remember_open_mboxes));
     balsa_app.local_scan_depth =
         gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON
@@ -584,15 +582,15 @@ apply_prefs(GtkDialog * pbox)
         gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON
                                          (pui->imap_scan_depth));
     balsa_app.empty_trash_on_exit =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pui->empty_trash));
+        gtk_check_button_get_active(GTK_CHECK_BUTTON(pui->empty_trash));
 
 #if !(HAVE_GSPELL || HAVE_GTKSPELL)
     /* spell checking */
     balsa_app.check_sig =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+        gtk_check_button_get_active(GTK_CHECK_BUTTON
                                      (pui->spell_check_sig));
     balsa_app.check_quoted =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+        gtk_check_button_get_active(GTK_CHECK_BUTTON
                                      (pui->spell_check_quoted));
 #endif                          /* !(HAVE_GSPELL || HAVE_GTKSPELL) */
 
@@ -621,14 +619,14 @@ apply_prefs(GtkDialog * pbox)
 
     { /* Scope */
         gboolean thread_messages =
-            gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pui->thread_messages_check));
+            gtk_check_button_get_active(GTK_CHECK_BUTTON(pui->thread_messages_check));
         libbalsa_mailbox_set_threading_type(NULL, thread_messages ?
                                             LB_MAILBOX_THREADING_SIMPLE :
                                             LB_MAILBOX_THREADING_FLAT);
     }
 
     balsa_app.expand_tree =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+        gtk_check_button_get_active(GTK_CHECK_BUTTON
                                      (pui->tree_expand_check));
 
     /* Information dialogs */
@@ -645,7 +643,7 @@ apply_prefs(GtkDialog * pbox)
 
     /* handling of 8-bit message parts without codeset header */
     balsa_app.convert_unknown_8bit =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+        gtk_check_button_get_active(GTK_CHECK_BUTTON
                                      (pui->convert_unknown_8bit[1]));
     balsa_app.convert_unknown_8bit_codeset =
         gtk_combo_box_get_active(GTK_COMBO_BOX
@@ -672,56 +670,55 @@ set_prefs(void)
     unsigned i;
     gchar *tmp;
 
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->recv_progress_dlg),
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(pui->recv_progress_dlg),
                                  balsa_app.recv_progress_dialog);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->send_progress_dlg),
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(pui->send_progress_dlg),
                                  balsa_app.send_progress_dialog);
 
     file = g_file_new_for_path(balsa_app.local_mail_directory);
     gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(pui->mail_directory), file, NULL);
     g_object_unref(file);
 
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->previewpane),
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(pui->previewpane),
                                  balsa_app.previewpane);
     pm_combo_box_set_level(pui->layout_type, balsa_app.layout_type);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+    gtk_check_button_set_active(GTK_CHECK_BUTTON
                                  (pui->view_message_on_open),
                                  balsa_app.view_message_on_open);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+    gtk_check_button_set_active(GTK_CHECK_BUTTON
                                  (pui->ask_before_select),
                                  balsa_app.ask_before_select);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->pgdownmod),
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(pui->pgdownmod),
                                  balsa_app.pgdownmod);
     gtk_spin_button_set_value(GTK_SPIN_BUTTON(pui->pgdown_percent),
                               (float) balsa_app.pgdown_percent);
     gtk_widget_set_sensitive(pui->pgdown_percent,
-                             gtk_toggle_button_get_active
-                             (GTK_TOGGLE_BUTTON(pui->pgdownmod)));
+                             gtk_check_button_get_active(GTK_CHECK_BUTTON(pui->pgdownmod)));
 
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+    gtk_check_button_set_active(GTK_CHECK_BUTTON
                                  (pui->mblist_show_mb_content_info),
                                  balsa_app.mblist_show_mb_content_info);
 
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->check_mail_auto),
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(pui->check_mail_auto),
                                  balsa_app.check_mail_auto);
     gtk_spin_button_set_value(GTK_SPIN_BUTTON(pui->check_mail_minutes),
                               (float) balsa_app.check_mail_timer);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+    gtk_check_button_set_active(GTK_CHECK_BUTTON
                                  (pui->quiet_background_check),
                                  balsa_app.quiet_background_check);
     gtk_spin_button_set_value(GTK_SPIN_BUTTON(pui->msg_size_limit),
                               ((float) balsa_app.msg_size_limit) / 1024);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->check_imap),
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(pui->check_imap),
                                  balsa_app.check_imap);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->check_imap_inbox),
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(pui->check_imap_inbox),
                                  balsa_app.check_imap_inbox);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+    gtk_check_button_set_active(GTK_CHECK_BUTTON
                                  (pui->notify_new_mail_dialog),
                                  balsa_app.notify_new_mail_dialog);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+    gtk_check_button_set_active(GTK_CHECK_BUTTON
                                  (pui->notify_new_mail_sound),
                                  balsa_app.notify_new_mail_sound);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+    gtk_check_button_set_active(GTK_CHECK_BUTTON
                                  (pui->notify_new_mail_icon),
                                  balsa_app.notify_new_mail_icon);
     if (!balsa_app.check_imap)
@@ -732,68 +729,66 @@ set_prefs(void)
     pm_combo_box_set_level(pui->mdn_reply_notclean_menu,
                            balsa_app.mdn_reply_notclean);
 
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+    gtk_check_button_set_active(GTK_CHECK_BUTTON
                                  (pui->close_mailbox_auto),
                                  balsa_app.close_mailbox_auto);
     gtk_spin_button_set_value(GTK_SPIN_BUTTON(pui->close_mailbox_minutes),
                               (float) balsa_app.close_mailbox_timeout /
                               60);
     gtk_widget_set_sensitive(pui->close_mailbox_minutes,
-                             gtk_toggle_button_get_active
-                             (GTK_TOGGLE_BUTTON(pui->close_mailbox_auto)));
+                             gtk_check_button_get_active(GTK_CHECK_BUTTON(pui->close_mailbox_auto)));
 
     pui->filter = libbalsa_mailbox_get_filter(NULL);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->hide_deleted),
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(pui->hide_deleted),
                                  pui->filter & (1 << 0));
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->expunge_on_close),
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(pui->expunge_on_close),
                                  balsa_app.expunge_on_close);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->expunge_auto),
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(pui->expunge_auto),
                                  balsa_app.expunge_auto);
     gtk_spin_button_set_value(GTK_SPIN_BUTTON(pui->expunge_minutes),
                               (float) balsa_app.expunge_timeout / 60);
     gtk_widget_set_sensitive(pui->expunge_minutes,
-                             gtk_toggle_button_get_active
-                             (GTK_TOGGLE_BUTTON(pui->expunge_auto)));
+                             gtk_check_button_get_active
+                             (GTK_CHECK_BUTTON(pui->expunge_auto)));
     gtk_widget_set_sensitive(pui->check_mail_minutes,
-                             gtk_toggle_button_get_active
-                             (GTK_TOGGLE_BUTTON(pui->check_mail_auto)));
+                             gtk_check_button_get_active
+                             (GTK_CHECK_BUTTON(pui->check_mail_auto)));
     pm_combo_box_set_level(pui->action_after_move_menu,
                            balsa_app.mw_action_after_move);
 
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->wordwrap),
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(pui->wordwrap),
                                  balsa_app.wordwrap);
     gtk_spin_button_set_value(GTK_SPIN_BUTTON(pui->wraplength),
                               (float) balsa_app.wraplength);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+    gtk_check_button_set_active(GTK_CHECK_BUTTON
                                  (pui->always_queue_sent_mail),
                                  balsa_app.always_queue_sent_mail);
-       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->send_mail_auto),
+       gtk_check_button_set_active(GTK_CHECK_BUTTON(pui->send_mail_auto),
                                                                 balsa_app.send_mail_auto);
        gtk_spin_button_set_value(GTK_SPIN_BUTTON(pui->send_mail_minutes),
                                                          (float) balsa_app.send_mail_timer);
        gtk_widget_set_sensitive(pui->send_mail_minutes,
-                                                        
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pui->send_mail_auto)));
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->copy_to_sentbox),
+                                                        
gtk_check_button_get_active(GTK_CHECK_BUTTON(pui->send_mail_auto)));
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(pui->copy_to_sentbox),
                                  balsa_app.copy_to_sentbox);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->autoquote),
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(pui->autoquote),
                                  balsa_app.autoquote);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+    gtk_check_button_set_active(GTK_CHECK_BUTTON
                                  (pui->reply_include_html_parts),
                                  !balsa_app.reply_strip_html);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->forward_attached),
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(pui->forward_attached),
                                  balsa_app.forward_attached);
 
     gtk_widget_set_sensitive(pui->wraplength,
-                             gtk_toggle_button_get_active
-                             (GTK_TOGGLE_BUTTON(pui->wordwrap)));
+                             gtk_check_button_get_active(GTK_CHECK_BUTTON(pui->wordwrap)));
 
     /* external editor */
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->edit_headers),
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(pui->edit_headers),
                                  balsa_app.edit_headers);
 
     /* arp */
     gtk_editable_set_text(GTK_EDITABLE(pui->quote_str), balsa_app.quote_str);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->mark_quoted),
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(pui->mark_quoted),
                                  balsa_app.mark_quoted);
     gtk_widget_set_sensitive(pui->quote_pattern, balsa_app.mark_quoted);
     tmp = g_strescape(balsa_app.quote_regex, NULL);
@@ -801,7 +796,7 @@ set_prefs(void)
     g_free(tmp);
 
     /* wrap incoming text/plain */
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->browse_wrap),
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(pui->browse_wrap),
                                  balsa_app.browse_wrap);
     gtk_widget_set_sensitive(pui->browse_wrap_length,
                              balsa_app.browse_wrap);
@@ -809,42 +804,42 @@ set_prefs(void)
                               (float) balsa_app.browse_wrap_length);
 
     /* how to treat multipart/alternative */
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+    gtk_check_button_set_active(GTK_CHECK_BUTTON
                                  (pui->display_alt_plain),
                                  balsa_app.display_alt_plain);
 
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+    gtk_check_button_set_active(GTK_CHECK_BUTTON
                                  (pui->open_inbox_upon_startup),
                                  balsa_app.open_inbox_upon_startup);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+    gtk_check_button_set_active(GTK_CHECK_BUTTON
                                  (pui->check_mail_upon_startup),
                                  balsa_app.check_mail_upon_startup);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+    gtk_check_button_set_active(GTK_CHECK_BUTTON
                                  (pui->remember_open_mboxes),
                                  balsa_app.remember_open_mboxes);
     gtk_spin_button_set_value(GTK_SPIN_BUTTON(pui->local_scan_depth),
                               balsa_app.local_scan_depth);
     gtk_spin_button_set_value(GTK_SPIN_BUTTON(pui->imap_scan_depth),
                               balsa_app.imap_scan_depth);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->empty_trash),
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(pui->empty_trash),
                                  balsa_app.empty_trash_on_exit);
 
     /* sorting and threading */
     pui->sort_field_index = libbalsa_mailbox_get_sort_field(NULL);
     pm_combo_box_set_level(pui->default_sort_field, pui->sort_field_index);
 
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->thread_messages_check),
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(pui->thread_messages_check),
                                  libbalsa_mailbox_get_threading_type(NULL)
                                  != LB_MAILBOX_THREADING_FLAT);
 
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->tree_expand_check),
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(pui->tree_expand_check),
                                  balsa_app.expand_tree);
 
 #if !(HAVE_GSPELL || HAVE_GTKSPELL)
     /* spelling */
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->spell_check_sig),
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(pui->spell_check_sig),
                                  balsa_app.check_sig);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+    gtk_check_button_set_active(GTK_CHECK_BUTTON
                                  (pui->spell_check_quoted),
                                  balsa_app.check_quoted);
 #endif                          /* !(HAVE_GSPELL || HAVE_GTKSPELL) */
@@ -878,7 +873,7 @@ set_prefs(void)
                            balsa_app.debug_message);
 
     /* handling of 8-bit message parts without codeset header */
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+    gtk_check_button_set_active(GTK_CHECK_BUTTON
                                  (pui->convert_unknown_8bit[1]),
                                  balsa_app.convert_unknown_8bit);
     gtk_widget_set_sensitive(pui->convert_unknown_8bit_codeset,
@@ -1762,7 +1757,7 @@ static void
 timer_modified_cb(GtkWidget * widget, GtkWidget * pbox)
 {
     gboolean newstate = 
-       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+       gtk_check_button_get_active(GTK_CHECK_BUTTON
                                      (pui->check_mail_auto));
 
     gtk_widget_set_sensitive(GTK_WIDGET(pui->check_mail_minutes), newstate);
@@ -1772,7 +1767,7 @@ timer_modified_cb(GtkWidget * widget, GtkWidget * pbox)
 static void
 send_timer_modified_cb(GtkWidget * widget, GtkWidget * pbox)
 {
-       gboolean newstate = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pui->send_mail_auto));
+       gboolean newstate = gtk_check_button_get_active(GTK_CHECK_BUTTON(pui->send_mail_auto));
 
        gtk_widget_set_sensitive(GTK_WIDGET(pui->send_mail_minutes), newstate);
        properties_modified_cb(widget, pbox);
@@ -1782,7 +1777,7 @@ static void
 browse_modified_cb(GtkWidget * widget, GtkWidget * pbox)
 {
     gboolean newstate =
-       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pui->browse_wrap));
+       gtk_check_button_get_active(GTK_CHECK_BUTTON(pui->browse_wrap));
 
     gtk_widget_set_sensitive(GTK_WIDGET(pui->browse_wrap_length), newstate);
     properties_modified_cb(widget, pbox);
@@ -1792,7 +1787,7 @@ static void
 mark_quoted_modified_cb(GtkWidget * widget, GtkWidget * pbox)
 {
     gboolean newstate =
-       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pui->mark_quoted));
+       gtk_check_button_get_active(GTK_CHECK_BUTTON(pui->mark_quoted));
 
     gtk_widget_set_sensitive(GTK_WIDGET(pui->quote_pattern), newstate);
     properties_modified_cb(widget, pbox);
@@ -1802,7 +1797,7 @@ static void
 wrap_modified_cb(GtkWidget * widget, GtkWidget * pbox)
 {
     gboolean newstate =
-       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pui->wordwrap));
+       gtk_check_button_get_active(GTK_CHECK_BUTTON(pui->wordwrap));
 
     gtk_widget_set_sensitive(GTK_WIDGET(pui->wraplength), newstate);
     properties_modified_cb(widget, pbox);
@@ -1812,7 +1807,7 @@ static void
 pgdown_modified_cb(GtkWidget * widget, GtkWidget * pbox)
 {
     gboolean newstate =
-       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pui->pgdownmod));
+       gtk_check_button_get_active(GTK_CHECK_BUTTON(pui->pgdownmod));
 
     gtk_widget_set_sensitive(GTK_WIDGET(pui->pgdown_percent), newstate);
     properties_modified_cb(widget, pbox);
@@ -1822,7 +1817,7 @@ static void
 mailbox_close_timer_modified_cb(GtkWidget * widget, GtkWidget * pbox)
 {
     gboolean newstate =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+        gtk_check_button_get_active(GTK_CHECK_BUTTON
                                      (pui->close_mailbox_auto));
 
     gtk_widget_set_sensitive(GTK_WIDGET(pui->close_mailbox_minutes),
@@ -1834,7 +1829,7 @@ mailbox_close_timer_modified_cb(GtkWidget * widget, GtkWidget * pbox)
 static void
 filter_modified_cb(GtkWidget * widget, GtkWidget * pbox)
 {
-    if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pui->hide_deleted)))
+    if (gtk_check_button_get_active(GTK_CHECK_BUTTON(pui->hide_deleted)))
        pui->filter |= (1 << 0);
     else
        pui->filter &= ~(1 << 0);
@@ -1846,10 +1841,10 @@ static void
 expunge_on_close_cb(GtkWidget * widget, GtkWidget * pbox)
 {
     gboolean newstate =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+        gtk_check_button_get_active(GTK_CHECK_BUTTON
                                      (pui->expunge_on_close));
     gtk_widget_set_sensitive(GTK_WIDGET(pui->expunge_auto), newstate);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->expunge_auto),
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(pui->expunge_auto),
                                  newstate);
 
     properties_modified_cb(widget, pbox);
@@ -1859,7 +1854,7 @@ static void
 expunge_auto_cb(GtkWidget * widget, GtkWidget * pbox)
 {
     gboolean newstate =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pui->expunge_auto));
+        gtk_check_button_get_active(GTK_CHECK_BUTTON(pui->expunge_auto));
     gtk_widget_set_sensitive(GTK_WIDGET(pui->expunge_minutes), newstate);
 
     properties_modified_cb(widget, pbox);
@@ -1870,11 +1865,10 @@ imap_toggled_cb(GtkWidget * widget, GtkWidget * pbox)
 {
     properties_modified_cb(widget, pbox);
 
-    if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pui->check_imap)))
+    if (gtk_check_button_get_active(GTK_CHECK_BUTTON(pui->check_imap))) {
        gtk_widget_set_sensitive(GTK_WIDGET(pui->check_imap_inbox), TRUE);
-    else {
-       gtk_toggle_button_set_active(
-           GTK_TOGGLE_BUTTON(pui->check_imap_inbox), FALSE);
+    } else {
+       gtk_check_button_set_active(GTK_CHECK_BUTTON(pui->check_imap_inbox), FALSE);
        gtk_widget_set_sensitive(GTK_WIDGET(pui->check_imap_inbox), FALSE);
     }
 }
@@ -1884,10 +1878,8 @@ convert_8bit_cb(GtkWidget * widget, GtkWidget * pbox)
 {
     properties_modified_cb(widget, pbox);
 
-    gtk_widget_set_sensitive
-        (pui->convert_unknown_8bit_codeset,
-         gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
-                                      (pui->convert_unknown_8bit[1])));
+    gtk_widget_set_sensitive(pui->convert_unknown_8bit_codeset,
+            gtk_check_button_get_active(GTK_CHECK_BUTTON(pui->convert_unknown_8bit[1])));
 }
 
 /*
@@ -1898,7 +1890,7 @@ static void
 use_system_fonts_cb(GtkWidget * widget, GtkWidget * pbox)
 {
     gboolean use_custom_fonts =
-        !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
+        !gtk_check_button_get_active(GTK_CHECK_BUTTON(widget));
 
     properties_modified_cb(widget, pbox);
 
@@ -1913,7 +1905,7 @@ static void
 font_modified_cb(GtkWidget * widget, GtkWidget * pbox)
 {
     gboolean show_size =
-        !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pui->use_default_font_size));
+        !gtk_check_button_get_active(GTK_CHECK_BUTTON(pui->use_default_font_size));
     GtkFontChooserLevel level =
         gtk_font_chooser_get_level(GTK_FONT_CHOOSER(widget));
 
@@ -1932,7 +1924,7 @@ font_modified_cb(GtkWidget * widget, GtkWidget * pbox)
 static void
 default_font_size_cb(GtkWidget * widget, GtkWidget * pbox)
 {
-    if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) {
+    if (!gtk_check_button_get_active(GTK_CHECK_BUTTON(widget))) {
         /* Changing from default font size to user-specified font size;
          * we make sure the font size is not initially zero. */
         font_button_check_font_size(pui->message_font_button, widget);
@@ -2466,7 +2458,7 @@ pm_grid_add_preview_font_group(GtkWidget * grid_widget)
 
     pui->use_system_fonts =
         gtk_check_button_new_with_label(_("Use system fonts"));
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->use_system_fonts),
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(pui->use_system_fonts),
                                  balsa_app.use_system_fonts);
     gtk_widget_set_hexpand(pui->use_system_fonts, TRUE);
     pm_grid_attach(grid, pui->use_system_fonts,
@@ -2503,7 +2495,7 @@ pm_grid_add_preview_font_group(GtkWidget * grid_widget)
         level &= ~GTK_FONT_CHOOSER_LEVEL_SIZE;
         gtk_font_chooser_set_level(GTK_FONT_CHOOSER(pui->subject_font_button), level);
 
-        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->use_default_font_size), TRUE);
+        gtk_check_button_set_active(GTK_CHECK_BUTTON(pui->use_default_font_size), TRUE);
     }
 
     if (balsa_app.use_system_fonts) {
@@ -3607,7 +3599,7 @@ refresh_preferences_manager(void)
 {
     if (pui == NULL)
         return;
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->browse_wrap),
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(pui->browse_wrap),
                                  balsa_app.browse_wrap);
 }
 
diff --git a/src/print-gtk.c b/src/print-gtk.c
index f00e29f37..259fc8314 100644
--- a/src/print-gtk.c
+++ b/src/print-gtk.c
@@ -602,11 +602,11 @@ message_prefs_widget(GtkPrintOperation * operation,
 
     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_check_button_set_active(GTK_CHECK_BUTTON(print_prefs->highlight_cited), 
balsa_app.print_highlight_cited);
     gtk_grid_attach(GTK_GRID(grid), print_prefs->highlight_cited, 1, 0, 1, 1);
 
     print_prefs->highlight_phrases = gtk_check_button_new_with_mnemonic(_("Highlight _structured phrases"));
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(print_prefs->highlight_phrases), 
balsa_app.print_highlight_phrases);
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(print_prefs->highlight_phrases), 
balsa_app.print_highlight_phrases);
     gtk_grid_attach(GTK_GRID(grid), print_prefs->highlight_phrases, 1, 1, 1, 1);
 
 #ifdef HAVE_HTML_WIDGET
@@ -686,10 +686,10 @@ message_prefs_apply(GtkPrintOperation * operation, GtkWidget * widget,
     balsa_app.print_footer_font =
        gtk_font_chooser_get_font(GTK_FONT_CHOOSER(print_prefs->footer_font));
     balsa_app.print_highlight_cited =
-       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+       gtk_check_button_get_active(GTK_CHECK_BUTTON
                                      (print_prefs->highlight_cited));
     balsa_app.print_highlight_phrases =
-       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+       gtk_check_button_get_active(GTK_CHECK_BUTTON
                                      (print_prefs->highlight_phrases));
 
     balsa_app.margin_top =
@@ -709,9 +709,9 @@ message_prefs_apply(GtkPrintOperation * operation, GtkWidget * widget,
     }
 #ifdef HAVE_HTML_WIDGET
     print_prefs->setup->print_alt_html =
-       !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(print_prefs->html_print));
+       !gtk_check_button_get_active(GTK_CHECK_BUTTON(print_prefs->html_print));
     print_prefs->setup->html_load_images =
-       gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(print_prefs->html_load_imgs));
+       gtk_check_button_get_active(GTK_CHECK_BUTTON(print_prefs->html_load_imgs));
 #endif
 }
 
diff --git a/src/sendmsg-window.c b/src/sendmsg-window.c
index 364352eeb..6bc9fda6e 100644
--- a/src/sendmsg-window.c
+++ b/src/sendmsg-window.c
@@ -3702,7 +3702,7 @@ show_decrypted_warning_response(GtkDialog *dialog,
 {
     GtkWidget *remind_btn = user_data;
 
-    balsa_app.warn_reply_decrypted = !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(remind_btn));
+    balsa_app.warn_reply_decrypted = !gtk_check_button_get_active(GTK_CHECK_BUTTON(remind_btn));
 
     gtk_window_destroy(GTK_WINDOW(dialog));
 }
@@ -3726,7 +3726,7 @@ show_decrypted_warning(GtkWindow *parent)
     message_area = gtk_message_dialog_get_message_area(GTK_MESSAGE_DIALOG(dialog));
 
     remind_btn = gtk_check_button_new_with_label(_("Do not remind me again."));
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(remind_btn), FALSE);
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(remind_btn), FALSE);
     gtk_box_append(GTK_BOX(message_area), remind_btn);
 
     g_signal_connect(dialog, "response", G_CALLBACK(show_decrypted_warning_response), remind_btn);
diff --git a/src/toolbar-prefs.c b/src/toolbar-prefs.c
index be0352278..d37bdd23a 100644
--- a/src/toolbar-prefs.c
+++ b/src/toolbar-prefs.c
@@ -193,7 +193,7 @@ balsa_toolbar_customize(GtkWindow * active_window, BalsaToolbarType type)
 
     wrap_button =
         gtk_check_button_new_with_mnemonic(_("_Wrap button labels"));
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(wrap_button),
+    gtk_check_button_set_active(GTK_CHECK_BUTTON(wrap_button),
                                  balsa_app.toolbar_wrap_button_text);
     g_signal_connect(wrap_button, "toggled",
                      G_CALLBACK(wrap_toggled_cb), notebook);
@@ -237,7 +237,7 @@ wrap_toggled_cb(GtkWidget * widget, GtkNotebook * notebook)
     ToolbarPage *page;
 
     balsa_app.toolbar_wrap_button_text =
-        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
+        gtk_check_button_get_active(GTK_CHECK_BUTTON(widget));
 
     for (i = 0; (child = gtk_notebook_get_nth_page(notebook, i)); i++) {
         page = g_object_get_data(G_OBJECT(child), BALSA_KEY_TOOLBAR_PAGE);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]