shortcutswindow: Clear search entry on unmap

Otherwise, the search term will linger around until
somebody clicks the search button again.

Fixes: #2981
This commit is contained in:
Matthias Clasen 2020-08-02 09:33:52 -04:00
parent 3d65178f37
commit 888a65c1fb

View File

@ -740,8 +740,8 @@ gtk_shortcuts_window_unmap (GtkWidget *widget)
GtkShortcutsWindow *self = (GtkShortcutsWindow *)widget;
GtkShortcutsWindowPrivate *priv = gtk_shortcuts_window_get_instance_private (self);
if (priv->search_bar)
gtk_search_bar_set_search_mode (priv->search_bar, FALSE);
gtk_search_bar_set_search_mode (priv->search_bar, FALSE);
gtk_editable_set_text (GTK_EDITABLE (priv->search_entry), "");
GTK_WIDGET_CLASS (gtk_shortcuts_window_parent_class)->unmap (widget);
}