]> Pileus Git - ~andy/gtk/commitdiff
filechooser: Rename _gtk_file_is_path_not_local() to _gtk_file_has_native_path()
authorFederico Mena Quintero <federico@gnome.org>
Tue, 5 Mar 2013 19:59:04 +0000 (13:59 -0600)
committerFederico Mena Quintero <federico@gnome.org>
Tue, 5 Mar 2013 23:17:42 +0000 (17:17 -0600)
Negatives in names of boolean functions are confusing.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
gtk/gtkfilechooserdefault.c
gtk/gtkfilechooserentry.c
gtk/gtkfilesystem.c
gtk/gtkfilesystem.h

index 8f0b278903b88ff60a69c97974e2a763eb3ddda1..55788e366916fbedbd60ded5f8a4a812c48e7795 100644 (file)
@@ -1854,7 +1854,7 @@ shortcuts_append_bookmarks (GtkFileChooserDefault *impl,
 
       file = bookmarks->data;
 
-      if (impl->local_only && _gtk_file_is_path_not_local (file))
+      if (impl->local_only && !_gtk_file_has_native_path (file))
        continue;
 
       if (shortcut_find_position (impl, file) != -1)
@@ -1976,16 +1976,16 @@ shortcuts_add_volumes (GtkFileChooserDefault *impl)
          if (_gtk_file_system_volume_is_mounted (volume))
            {
              GFile *base_file;
-              gboolean base_is_not_local = FALSE;
+              gboolean base_has_native_path = FALSE;
 
              base_file = _gtk_file_system_volume_get_root (volume);
               if (base_file != NULL)
                 {
-                  base_is_not_local = _gtk_file_is_path_not_local (base_file);
+                  base_has_native_path = _gtk_file_has_native_path (base_file);
                   g_object_unref (base_file);
                 }
 
-              if (base_is_not_local)
+              if (!base_has_native_path)
                 continue;
            }
        }
@@ -7338,7 +7338,7 @@ gtk_file_chooser_default_update_current_folder (GtkFileChooser    *chooser,
 
   operation_mode_set (impl, OPERATION_MODE_BROWSE);
 
-  if (impl->local_only && _gtk_file_is_path_not_local (file))
+  if (impl->local_only && !_gtk_file_has_native_path (file))
     {
       g_set_error_literal (error,
                            GTK_FILE_CHOOSER_ERROR,
index 603516a2cfb8c8dac3be7ff55d3d7d0232f419ea..ce2b6cc9e7b38dbafe1c0837612541321249105d 100644 (file)
@@ -558,7 +558,7 @@ set_completion_folder (GtkFileChooserEntry *chooser_entry,
 {
   if (folder_file &&
       chooser_entry->local_only
-      && _gtk_file_is_path_not_local (folder_file))
+      && !_gtk_file_has_native_path (folder_file))
     folder_file = NULL;
 
   if ((chooser_entry->current_folder_file
index db09c9a654a87427832bb094cfe3e1ae9caf07df..2fdfa3df9dd448a1d14a08bb376e80c055e8a856 100644 (file)
@@ -1274,16 +1274,15 @@ _gtk_file_info_consider_as_directory (GFileInfo *info)
 }
 
 gboolean
-_gtk_file_is_path_not_local (GFile *file)
+_gtk_file_has_native_path (GFile *file)
 {
   char *local_file_path;
-  gboolean is_not_local;
+  gboolean has_native_path;
 
-  /* Don't use is_native(), as we want to support fuse paths if available */
+  /* Don't use g_file_is_native(), as we want to support FUSE paths if available */
   local_file_path = g_file_get_path (file);
-  is_not_local = (local_file_path == NULL);
+  has_native_path = (local_file_path != NULL);
   g_free (local_file_path);
 
-  return is_not_local;
+  return has_native_path;
 }
-
index 57b687615b0fdbae787f670bd9f838a5feb28137..03782d6f7f5cfaa13b44012366c6034c4f48960e 100644 (file)
@@ -129,7 +129,7 @@ GdkPixbuf *     _gtk_file_info_render_icon (GFileInfo *info,
 gboolean       _gtk_file_info_consider_as_directory (GFileInfo *info);
 
 /* GFile helper functions */
-gboolean       _gtk_file_is_path_not_local (GFile *file);
+gboolean       _gtk_file_has_native_path (GFile *file);
 
 G_END_DECLS