mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-16 23:24:16 +00:00
file chooser: Make search in recent work
All that was needed here was to set the query location.
This commit is contained in:
parent
0b11d8c115
commit
f968199b02
@ -6353,6 +6353,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);
|
||||
@ -6377,12 +6378,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);
|
||||
|
Loading…
Reference in New Issue
Block a user