[balsa/gtk4: 190/196] Various: Build with gtk4




commit a4ada1276caf6c4d0bac8078db7bbeb2efffa71c
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Wed Oct 14 16:15:25 2020 -0400

    Various: Build with gtk4

 libbalsa/address.c           |  4 ++--
 libbalsa/autocrypt.c         | 10 +++++-----
 libbalsa/libbalsa-gpgme-cb.c |  2 +-
 libbalsa/libbalsa.c          |  2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/libbalsa/address.c b/libbalsa/address.c
index eab1b2e01..c99d83314 100644
--- a/libbalsa/address.c
+++ b/libbalsa/address.c
@@ -1008,10 +1008,10 @@ libbalsa_address_get_edit_widget(LibBalsaAddress *address,
             entries[cnt] = lba_addr_list_widget(changed_cb, changed_data);
             gtk_widget_set_margin_top(label, 1);
             gtk_widget_set_margin_bottom(label, 1);
-            gtk_container_add(GTK_CONTAINER(box), label);
+            gtk_box_append(GTK_BOX(box), label);
             gtk_widget_set_margin_top(but, 1);
             gtk_widget_set_margin_bottom(but, 1);
-            gtk_container_add(GTK_CONTAINER(box), but);
+            gtk_box_append(GTK_BOX(box), but);
             lhs = box;
             tree_view = gtk_frame_get_child(GTK_FRAME(entries[cnt]));
             g_signal_connect(but, "clicked", G_CALLBACK(add_row), tree_view);
diff --git a/libbalsa/autocrypt.c b/libbalsa/autocrypt.c
index 50d85440d..ae67cbbdd 100644
--- a/libbalsa/autocrypt.c
+++ b/libbalsa/autocrypt.c
@@ -423,7 +423,7 @@ main_dialog_response_cb(GtkDialog *dialog,
     GList *keys = user_data;
 
     g_list_free_full(keys, (GDestroyNotify) g_bytes_unref);
-    gtk_widget_destroy(GTK_WIDGET(dialog));
+    gtk_window_destroy(GTK_WINDOW(dialog));
 }
 
 /* documentation: see header file */
@@ -450,18 +450,18 @@ autocrypt_db_dialog_run(const gchar *date_string, GtkWindow *parent)
 
     vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 12);
     gtk_widget_set_vexpand(vbox, TRUE);
-    gtk_container_add(GTK_CONTAINER(content_area), vbox);
+    gtk_box_append(GTK_BOX(content_area), vbox);
 
     label = gtk_label_new(_("Double-click key to show details"));
     gtk_widget_set_halign(label, GTK_ALIGN_START);
-    gtk_container_add(GTK_CONTAINER(vbox), label);
+    gtk_box_append(GTK_BOX(vbox), label);
 
     scrolled_window = gtk_scrolled_window_new();
     gtk_scrolled_window_set_has_frame(GTK_SCROLLED_WINDOW(scrolled_window), TRUE);
     gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window), GTK_POLICY_AUTOMATIC, 
GTK_POLICY_AUTOMATIC);
     gtk_widget_set_vexpand(scrolled_window, TRUE);
     gtk_widget_set_valign(scrolled_window, GTK_ALIGN_FILL);
-    gtk_container_add(GTK_CONTAINER(vbox), scrolled_window);
+    gtk_box_append(GTK_BOX(vbox), scrolled_window);
 
     model = gtk_list_store_new(AC_DB_VIEW_COLUMNS, G_TYPE_STRING,      /* address */
        G_TYPE_STRING,                                                                                        
  /* formatted last seen timestamp */
@@ -816,7 +816,7 @@ row_activated_cb(GtkTreeView       *tree_view,
                                dialog = libbalsa_key_dialog(window, GTK_BUTTONS_CLOSE, (gpgme_key_t) 
keys->data, GPG_SUBKEY_CAP_ALL,
                                        NULL, NULL);
                                 g_list_free_full(keys, (GDestroyNotify) gpgme_key_release);
-                                g_signal_connect(dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL);
+                                g_signal_connect(dialog, "response", G_CALLBACK(gtk_window_destroy), NULL);
                                 gtk_widget_show(dialog);
                                }
                                libbalsa_delete_directory_contents(temp_dir);
diff --git a/libbalsa/libbalsa-gpgme-cb.c b/libbalsa/libbalsa-gpgme-cb.c
index d214b764a..586080912 100644
--- a/libbalsa/libbalsa-gpgme-cb.c
+++ b/libbalsa/libbalsa-gpgme-cb.c
@@ -143,7 +143,7 @@ row_activated_cb(GtkTreeView       *tree_view,
 
         gtk_tree_model_get(model, &iter, GPG_KEY_PTR_COLUMN, &key, -1);
         dialog = libbalsa_key_dialog(window, GTK_BUTTONS_CLOSE, key, GPG_SUBKEY_CAP_ALL, NULL, NULL);
-        g_signal_connect(dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL);
+        g_signal_connect(dialog, "response", G_CALLBACK(gtk_window_destroy), NULL);
         gtk_widget_show(dialog);
     }
 }
diff --git a/libbalsa/libbalsa.c b/libbalsa/libbalsa.c
index 87ab445b2..e500d0bb3 100644
--- a/libbalsa/libbalsa.c
+++ b/libbalsa/libbalsa.c
@@ -467,7 +467,7 @@ ask_cert_real(void *data)
     gtk_box_append(GTK_BOX(content_area), cert_widget);
 
     g_signal_connect(dialog, "response", G_CALLBACK(ask_cert_real_response), acd);
-    gtk_widget_show_all(dialog);
+    gtk_widget_show(dialog);
 
     return G_SOURCE_REMOVE;
 }


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