[gtk+/wip/matthiasc/filechooser: 10/24] file chooser: Make search in recent work
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/matthiasc/filechooser: 10/24] file chooser: Make search in recent work
- Date: Wed, 1 Jul 2015 16:37:04 +0000 (UTC)
commit 4583f9ce1858b63964208e2f335d3d29eeb2eebf
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Jun 27 00:21:53 2015 -0400
file chooser: Make search in recent work
All that was needed here was to set the query location.
gtk/gtkfilechooserwidget.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index 86befdb..9edee93 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -6359,6 +6359,7 @@ search_start_query (GtkFileChooserWidget *impl,
const gchar *query_text)
{
GtkFileChooserWidgetPrivate *priv = impl->priv;
+ GFile *file;
search_stop_searching (impl, FALSE);
search_clear_model (impl, TRUE);
@@ -6383,12 +6384,14 @@ search_start_query (GtkFileChooserWidget *impl,
gtk_query_set_text (priv->search_query, query_text);
}
- if (priv->current_folder)
+ file = gtk_places_sidebar_get_location (GTK_PLACES_SIDEBAR (priv->places_sidebar));
+ if (file)
{
gchar *location;
- location = g_file_get_uri (priv->current_folder);
+ location = g_file_get_uri (file);
gtk_query_set_location (priv->search_query, location);
g_free (location);
+ g_object_unref (file);
}
_gtk_search_engine_set_query (priv->search_engine, priv->search_query);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]