[gtk+] file chooser: Clear search entry when it goes away
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] file chooser: Clear search entry when it goes away
- Date: Tue, 7 Jul 2015 03:04:23 +0000 (UTC)
commit 56af2358deeacff9f25faaf897adaf53c76adac0
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jul 6 20:50:08 2015 -0400
file chooser: Clear search entry when it goes away
Keeping the entry contents conflicts with type-to-search.
gtk/gtkfilechooserwidget.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index aa9ecda..7638930 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -2951,7 +2951,7 @@ operation_mode_stop (GtkFileChooserWidget *impl,
if (mode == OPERATION_MODE_SEARCH)
{
g_clear_object (&impl->priv->model_for_search);
- search_stop_searching (impl, FALSE);
+ search_stop_searching (impl, TRUE);
search_clear_model (impl, TRUE);
}
}
@@ -6928,10 +6928,9 @@ search_stop_searching (GtkFileChooserWidget *impl,
{
GtkFileChooserWidgetPrivate *priv = impl->priv;
- if (remove_query && priv->search_query)
+ if (remove_query && priv->search_entry)
{
- g_object_unref (priv->search_query);
- priv->search_query = NULL;
+ gtk_entry_set_text (GTK_ENTRY (priv->search_entry), "");
}
if (priv->search_engine)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]