Commit be0c2889 authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson

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
parent a9985b93
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:
......
......@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment