[nautilus/wip/csoriano/search-popover: 34/40] query-editor: use is_* instead of !is_



commit cd8683d865c7cd9547c6decc7457900021355a42
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 9d6cbad..16dc119 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";
                }
 
@@ -549,7 +549,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]