diff options
author | Alexander Larsson <alexl@redhat.com> | 2007-12-20 14:23:45 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2007-12-20 14:23:45 +0000 |
commit | be0c2889c05e648fcee32876be4871fa012769c5 (patch) | |
tree | 7cee29db874e633dd030571f7096db6e297fcd5b | |
parent | a9985b93a0f7f11f7dd4ed895d545cd7a5271f91 (diff) | |
download | nautilus-be0c2889c05e648fcee32876be4871fa012769c5.tar.gz |
Correct check for require_uri. Small performance fix
2007-12-20 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-mime-actions.c:
Correct check for require_uri.
Small performance fix
svn path=/trunk/; revision=13540
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | libnautilus-private/nautilus-mime-actions.c | 21 |
2 files changed, 19 insertions, 8 deletions
@@ -1,5 +1,11 @@ 2007-12-20 Alexander Larsson <alexl@redhat.com> + * libnautilus-private/nautilus-mime-actions.c: + Correct check for require_uri. + Small performance fix + +2007-12-20 Alexander Larsson <alexl@redhat.com> + * libnautilus-private/nautilus-file-private.h: Missed one "std" in the conversion diff --git a/libnautilus-private/nautilus-mime-actions.c b/libnautilus-private/nautilus-mime-actions.c index 2edca0af7..4c36c5366 100644 --- a/libnautilus-private/nautilus-mime-actions.c +++ b/libnautilus-private/nautilus-mime-actions.c @@ -192,16 +192,21 @@ file_has_local_path (NautilusFile *file) char *path; gboolean res; - /* Don't check _is_native, because we want to support + + /* Don't only check _is_native, because we want to support using the fuse path */ location = nautilus_file_get_location (file); - path = g_file_get_path (location); - - res = path != NULL; - - g_free (path); + if (g_file_is_native (location)) { + res = TRUE; + } else { + path = g_file_get_path (location); + + res = path != NULL; + + g_free (path); + } g_object_unref (location); - + return res; } @@ -217,7 +222,7 @@ nautilus_mime_get_default_application_for_file (NautilusFile *file) } mime_type = nautilus_file_get_mime_type (file); - app = g_app_info_get_default_for_type (mime_type, file_has_local_path (file)); + app = g_app_info_get_default_for_type (mime_type, !file_has_local_path (file)); g_free (mime_type); if (app == NULL) { |