[balsa/gtk4] Various: Do not cast GtkScrolledWindow to GtkBox



commit d11047ca539ccdf1cc6d7215e5f73d7a1ce4db4b
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Mon Jan 10 17:36:10 2022 -0500

    Various: Do not cast GtkScrolledWindow to GtkBox

 libbalsa/libbalsa-gpgme-cb.c | 2 +-
 libbalsa/x509-cert-widget.c  | 2 +-
 src/ab-window.c              | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/libbalsa/libbalsa-gpgme-cb.c b/libbalsa/libbalsa-gpgme-cb.c
index ee6893631..678af63b7 100644
--- a/libbalsa/libbalsa-gpgme-cb.c
+++ b/libbalsa/libbalsa-gpgme-cb.c
@@ -327,7 +327,7 @@ select_key_idle(gpointer user_data)
        gtk_tree_view_append_column(GTK_TREE_VIEW(tree_view), column);
        gtk_tree_view_column_set_resizable(column, FALSE);
 
-    gtk_box_append(GTK_BOX(scrolled_window), tree_view);
+    gtk_scrolled_window_set_child(GTK_SCROLLED_WINDOW(scrolled_window), tree_view);
     g_signal_connect(tree_view, "row-activated", G_CALLBACK(row_activated_cb), dialog);
 
     g_signal_connect(dialog, "response", G_CALLBACK(select_key_response), data);
diff --git a/libbalsa/x509-cert-widget.c b/libbalsa/x509-cert-widget.c
index a65d593e4..455e8baff 100644
--- a/libbalsa/x509-cert-widget.c
+++ b/libbalsa/x509-cert-widget.c
@@ -171,7 +171,7 @@ create_chain_widget(GList *cert_list)
 
        store = gtk_tree_store_new(CERT_COLUMNS, G_TYPE_STRING, GTK_TYPE_WIDGET);
        tree_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
-       gtk_box_append(GTK_BOX(scrolledwin), tree_view);
+       gtk_scrolled_window_set_child(GTK_SCROLLED_WINDOW(scrolledwin), tree_view);
        renderer = gtk_cell_renderer_text_new();
        column = gtk_tree_view_column_new_with_attributes(NULL, renderer, "text", CERT_NAME_COLUMN, NULL);
        gtk_tree_view_append_column(GTK_TREE_VIEW(tree_view), column);
diff --git a/src/ab-window.c b/src/ab-window.c
index 494ff7442..4cbfb6e30 100644
--- a/src/ab-window.c
+++ b/src/ab-window.c
@@ -318,7 +318,7 @@ balsa_ab_window_init(BalsaAbWindow *ab)
                                   GTK_POLICY_AUTOMATIC,
                                   GTK_POLICY_AUTOMATIC);
     gtk_grid_attach(GTK_GRID(grid), scrolled_window, 0, 1, 1, 1);
-    gtk_box_append(GTK_BOX(scrolled_window), ab->address_list);
+    gtk_scrolled_window_set_child(GTK_SCROLLED_WINDOW(scrolled_window), ab->address_list);
     gtk_widget_set_size_request(scrolled_window, 300, 250);
 
     /* Buttons ... */


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