[nautilus/wip/csoriano/search-popover: 12/17] files-view: use nautilus_query_is_empty to validate query
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/csoriano/search-popover: 12/17] files-view: use nautilus_query_is_empty to validate query
- Date: Wed, 27 Jan 2016 20:00:54 +0000 (UTC)
commit b02af0952e65e54fdd6ca8eda2e26cca7fbb06d6
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Mon Oct 5 21:21:52 2015 -0300
files-view: use nautilus_query_is_empty to validate query
The previous commits introduced a new function to NautilusQuery
that performs the check we're doing here. Use this API to validate
the query.
src/nautilus-files-view.c | 10 +---------
1 files changed, 1 insertions(+), 9 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index d324a87..4b43e60 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -7858,21 +7858,13 @@ set_search_query_internal (NautilusFilesView *files_view,
NautilusDirectory *base_model)
{
GFile *location;
- gchar *text;
- gboolean valid_query = FALSE;
location = NULL;
- if (query) {
- text = nautilus_query_get_text (query);
- valid_query = strlen (text) > 0;
-
- g_free (text);
- }
g_set_object (&files_view->details->search_query, query);
g_object_notify (G_OBJECT (files_view), "search-query");
- if (valid_query) {
+ if (!nautilus_query_is_empty (query)) {
if (nautilus_view_is_searching (NAUTILUS_VIEW (files_view))) {
/*
* Reuse the search directory and reload it.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]