[gtk+/gtk-2-24] filechooser: Use _gtk_file_has_native_path() throughout when testing for local_only
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-24] filechooser: Use _gtk_file_has_native_path() throughout when testing for local_only
- Date: Wed, 6 Mar 2013 18:49:57 +0000 (UTC)
commit 3c993547a4d26cf0946ce5d0b0e020726c6d306d
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Mar 5 17:17:00 2013 -0600
filechooser: Use _gtk_file_has_native_path() throughout when testing for local_only
In the case of checking for local_only, g_file_is_native() is not useful, since it
will return FALSE for something in a FUSE mount.
Signed-off-by: Federico Mena Quintero <federico gnome org>
gtk/gtkfilechooserbutton.c | 10 +++++-----
gtk/gtkfilechooserdefault.c | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c
index 5154ab1..7b677ab 100644
--- a/gtk/gtkfilechooserbutton.c
+++ b/gtk/gtkfilechooserbutton.c
@@ -1931,7 +1931,7 @@ model_add_volumes (GtkFileChooserButton *button,
base_file = _gtk_file_system_volume_get_root (volume);
if (base_file != NULL)
{
- if (!g_file_is_native (base_file))
+ if (!_gtk_file_has_native_path (base_file))
{
g_object_unref (base_file);
continue;
@@ -1991,7 +1991,7 @@ model_add_bookmarks (GtkFileChooserButton *button,
file = l->data;
- if (g_file_is_native (file))
+ if (_gtk_file_has_native_path (file))
{
gtk_list_store_insert (store, &iter, pos);
gtk_list_store_set (store, &iter,
@@ -2213,7 +2213,7 @@ test_if_file_is_visible (GtkFileSystem *fs,
if (!file)
return FALSE;
- if (local_only && !g_file_is_native (file))
+ if (local_only && !_gtk_file_has_native_path (file))
return FALSE;
if (!is_folder)
@@ -2266,7 +2266,7 @@ filter_model_visible_func (GtkTreeModel *model,
if (base_file)
{
- if (!g_file_is_native (base_file))
+ if (!_gtk_file_has_native_path (base_file))
retval = FALSE;
g_object_unref (base_file);
}
@@ -2786,7 +2786,7 @@ dialog_notify_cb (GObject *dialog,
/* If the path isn't local but we're in local-only mode now, remove
* the custom-folder row */
- if (data && g_file_is_native (G_FILE (data)) &&
+ if (data && !_gtk_file_has_native_path (G_FILE (data)) &&
gtk_file_chooser_get_local_only (GTK_FILE_CHOOSER (priv->dialog)))
{
pos--;
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index c82f144..dc7b86b 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -5009,7 +5009,7 @@ set_local_only (GtkFileChooserDefault *impl,
}
if (local_only && impl->current_folder &&
- !g_file_is_native (impl->current_folder))
+ !_gtk_file_has_native_path (impl->current_folder))
{
/* If we are pointing to a non-local folder, make an effort to change
* back to a local folder, but it's really up to the app to not cause
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]