1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-12-04 20:07:36 +00:00

contacts-box: clear entry if window is closed

Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/717>
This commit is contained in:
Chris Talbot 2024-02-06 20:52:32 -07:00 committed by Marge Bot
parent 28ca838ab4
commit 45b4717c78

View file

@ -148,6 +148,11 @@ contacts_sort_func (FolksIndividual *a,
return fav_a ? -1 : 1;
}
static void
on_main_window_closed (CallsContactsBox *self)
{
gtk_editable_set_text (GTK_EDITABLE (self->search_entry), "");
}
static void
calls_contacts_box_dispose (GObject *object)
@ -234,6 +239,11 @@ calls_contacts_box_init (CallsContactsBox *self)
G_CALLBACK (search_changed_cb),
self);
g_signal_connect_swapped (g_application_get_default (),
"main-window-closed",
G_CALLBACK (on_main_window_closed),
self);
if (!gee_collection_get_is_empty (individuals))
calls_contacts_provider_consume_iter_on_idle (gee_iterable_iterator (GEE_ITERABLE (individuals)),
(IdleCallback) contacts_provider_added,