[nautilus/wip/gbsneto/search-popover: 6/8] files-view: use nautilus_query_is_empty to validate query
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/gbsneto/search-popover: 6/8] files-view: use nautilus_query_is_empty to validate query
- Date: Tue, 12 Jan 2016 22:43:47 +0000 (UTC)
commit f2ccaf465d87d2813b42bf89b46d44ede6ec6891
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 bda80c0..e87d062 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -7847,22 +7847,14 @@ nautilus_files_view_set_search_query (NautilusView *view,
{
NautilusFilesView *files_view;
GFile *location;
- gchar *text;
- gboolean valid_query = FALSE;
files_view = NAUTILUS_FILES_VIEW (view);
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 (view), "search-query");
- if (valid_query) {
+ if (!nautilus_query_is_empty (query)) {
if (nautilus_view_is_searching (view)) {
location = nautilus_directory_get_location (files_view->details->model);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]