1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-06-28 14:49:30 +00:00
Anton Lazarev 2023-12-15 15:26:01 -08:00
parent 50126f05f0
commit f7354a06c6

View file

@ -218,8 +218,7 @@ remove_call (CallsCallWindow *self,
if (display_call_data == ui_call_data) { if (display_call_data == ui_call_data) {
g_list_store_remove (self->calls, i); g_list_store_remove (self->calls, i);
gtk_container_remove (GTK_CONTAINER (self->call_stack), gtk_stack_remove (self->call_stack, GTK_WIDGET (display));
GTK_WIDGET (display));
break; break;
} }
} }
@ -231,14 +230,11 @@ remove_call (CallsCallWindow *self,
static void static void
remove_calls (CallsCallWindow *self) remove_calls (CallsCallWindow *self)
{ {
GList *children, *child; GtkWidget *child;
/* Safely remove the call stack's children. */ /* Safely remove the call stack's children. */
children = gtk_container_get_children (GTK_CONTAINER (self->call_stack)); while ((child = gtk_stack_get_visible_child (self->call_stack)))
for (child = children; child != NULL; child = child->next) gtk_stack_remove (self->call_stack, child);
gtk_container_remove (GTK_CONTAINER (self->call_stack),
GTK_WIDGET (child->data));
g_list_free (children);
g_list_store_remove_all (self->calls); g_list_store_remove_all (self->calls);