diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2012-10-22 12:44:29 -0400 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2012-10-22 12:44:29 -0400 |
commit | 26e6907a9343e45500d4c3373e4210d072db08e1 (patch) | |
tree | 60fc2b00fda7f8487fa0bdda0b55f274435d4178 /src/nautilus-shell-search-provider.c | |
parent | d09413bcff9b62af6ea58d003ffe2b76c792a57f (diff) | |
download | nautilus-26e6907a9343e45500d4c3373e4210d072db08e1.tar.gz |
bookmark-list: change item_with_uri() API to use a GFile instead
Avoid GFile<->URI roundtrips if possible. Also, this will allow us to
use the same API for another purpose.
Diffstat (limited to 'src/nautilus-shell-search-provider.c')
-rw-r--r-- | src/nautilus-shell-search-provider.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nautilus-shell-search-provider.c b/src/nautilus-shell-search-provider.c index ddc972773..67a6c58ad 100644 --- a/src/nautilus-shell-search-provider.c +++ b/src/nautilus-shell-search-provider.c @@ -104,12 +104,12 @@ static gchar * get_display_name (NautilusShellSearchProviderApp *self, NautilusFile *file) { - gchar *uri; + GFile *location; NautilusBookmark *bookmark; - uri = nautilus_file_get_uri (file); - bookmark = nautilus_bookmark_list_item_with_uri (self->bookmarks, uri); - g_free (uri); + location = nautilus_file_get_location (file); + bookmark = nautilus_bookmark_list_item_with_location (self->bookmarks, location); + g_object_unref (location); if (bookmark) return g_strdup (nautilus_bookmark_get_name (bookmark)); @@ -121,12 +121,12 @@ static GIcon * get_gicon (NautilusShellSearchProviderApp *self, NautilusFile *file) { - gchar *uri; + GFile *location; NautilusBookmark *bookmark; - uri = nautilus_file_get_uri (file); - bookmark = nautilus_bookmark_list_item_with_uri (self->bookmarks, uri); - g_free (uri); + location = nautilus_file_get_location (file); + bookmark = nautilus_bookmark_list_item_with_location (self->bookmarks, location); + g_object_unref (location); if (bookmark) return nautilus_bookmark_get_icon (bookmark); |