From 0727996edf68bf48be952be39a8873a41316b940 Mon Sep 17 00:00:00 2001 From: Anton Lazarev Date: Fri, 15 Dec 2023 16:55:00 -0800 Subject: [PATCH] calls-account-overview: Adapt to GtkBin/GtkContainer removal https://docs.gtk.org/gtk4/migrating-3to4.html#adapt-to-gtkbin-removal https://docs.gtk.org/gtk4/migrating-3to4.html#adapt-to-gtkcontainer-removal Part-of: --- src/calls-account-overview.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/calls-account-overview.c b/src/calls-account-overview.c index 110f3b1..c6133b9 100644 --- a/src/calls-account-overview.c +++ b/src/calls-account-overview.c @@ -150,13 +150,9 @@ attach_account_widget (CallsAccountOverview *self, if (widget == self->current_account_widget) return; - if (self->current_account_widget) - gtk_container_remove (GTK_CONTAINER (self->account_window), - self->current_account_widget); + gtk_window_set_child (self->account_window, widget); self->current_account_widget = widget; - if (widget) - gtk_container_add (GTK_CONTAINER (self->account_window), widget); } @@ -249,7 +245,7 @@ on_accounts_changed (GListModel *accounts, GtkListBoxRow *row = gtk_list_box_get_row_at_index (GTK_LIST_BOX (self->overview), position + i - 1); - gtk_container_remove (GTK_CONTAINER (self->overview), GTK_WIDGET (row)); + gtk_list_box_remove (GTK_LIST_BOX (self->overview), GTK_WIDGET (row)); } for (guint i = 0; i < added; i++) {