[nautilus/wip/csoriano/search-popover: 20/29] query-editor: use is_* instead of !is_
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/csoriano/search-popover: 20/29] query-editor: use is_* instead of !is_
- Date: Tue, 2 Feb 2016 21:25:39 +0000 (UTC)
commit 267b6b03fb59d106ee4fef76a47c880b2f9e1ad7
Author: Carlos Soriano <csoriano gnome org>
Date: Mon Feb 1 10:11:53 2016 +0100
query-editor: use is_* instead of !is_
An element within the group that complies a property A doesn't mean
the element automatically complies property B if we don't know
previously that those properties are mutual exclusive.
This can bring misbehavior if at some point a property C is introduced
making the other two non mutual exclusive.
Basically, it's better to check for the property you are going to assume
on the code than the opposite mutual exclusive property.
Also, is usually easier to understand what an element is than what is
not.
src/nautilus-query-editor.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-query-editor.c b/src/nautilus-query-editor.c
index b8432d2..66a6b05 100644
--- a/src/nautilus-query-editor.c
+++ b/src/nautilus-query-editor.c
@@ -85,7 +85,7 @@ query_recursive_changed (GObject *object,
file = nautilus_file_get (priv->location);
- if (!nautilus_file_is_local (file)) {
+ if (nautilus_file_is_remote (file)) {
key = "enable-remote-recursive-search";
}
@@ -546,7 +546,7 @@ nautilus_query_editor_set_location (NautilusQueryEditor *editor,
label = _("Searching devices only");
} else if (g_str_has_prefix (uri, "network://")) {
label = _("Searching network locations only");
- } else if (!nautilus_file_is_local (file)) {
+ } else if (nautilus_file_is_remote (file)) {
label = _("Remote location - only searching the current folder");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]