diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index 39d87e576a..c82f144ab6 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -1873,7 +1873,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) @@ -2000,16 +2000,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; } } @@ -7240,7 +7240,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, diff --git a/gtk/gtkfilechooserentry.c b/gtk/gtkfilechooserentry.c index 1bf3fba211..3caa7b821d 100644 --- a/gtk/gtkfilechooserentry.c +++ b/gtk/gtkfilechooserentry.c @@ -1467,7 +1467,7 @@ start_loading_current_folder (GtkFileChooserEntry *chooser_entry) g_assert (chooser_entry->load_folder_cancellable == NULL); if (chooser_entry->local_only - && !_gtk_file_is_path_not_local (chooser_entry->current_folder_file)) + && !_gtk_file_has_native_path (chooser_entry->current_folder_file)) { g_object_unref (chooser_entry->current_folder_file); chooser_entry->current_folder_file = NULL; diff --git a/gtk/gtkfilesystem.c b/gtk/gtkfilesystem.c index 1197255620..fd2bfb3f85 100644 --- a/gtk/gtkfilesystem.c +++ b/gtk/gtkfilesystem.c @@ -1928,16 +1928,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; } - diff --git a/gtk/gtkfilesystem.h b/gtk/gtkfilesystem.h index 410795d48c..6f3be36d4e 100644 --- a/gtk/gtkfilesystem.h +++ b/gtk/gtkfilesystem.h @@ -176,7 +176,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