From 5e1f1820a9cbc41d47529fda2ed3434b7c212454 Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Fri, 29 Mar 2002 15:29:06 +0000 Subject: don't assume its a local uri, but instead use 2002-03-27 Mark McLoughlin * src/file-manager/fm-icon-view.c: (icon_view_handle_uri_list): don't assume its a local uri, but instead use gnome_desktop_item_new_from_uri. --- src/file-manager/fm-icon-view.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/file-manager/fm-icon-view.c b/src/file-manager/fm-icon-view.c index 82943344a..9da5f8816 100644 --- a/src/file-manager/fm-icon-view.c +++ b/src/file-manager/fm-icon-view.c @@ -2472,7 +2472,6 @@ icon_view_handle_uri_list (NautilusIconContainer *container, const char *item_ur GnomeDesktopItem *entry; GdkPoint point; char *uri; - char *local_path; char *stripped_uri; char *container_uri_string; char *container_path; @@ -2565,19 +2564,13 @@ icon_view_handle_uri_list (NautilusIconContainer *container, const char *item_ur for (node = real_uri_list; node != NULL; node = node->next) { /* Make a link using the desktop file contents? */ uri = node->data; - local_path = gnome_vfs_get_local_path_from_uri (uri); - if (local_path != NULL) { - entry = gnome_desktop_item_new_from_file (local_path, 0, NULL); - if (entry != NULL) { - /* FIXME: Handle name conflicts? */ - nautilus_link_local_create_from_gnome_entry (entry, container_path, &point); - gnome_desktop_item_unref (entry); - } - g_free (local_path); - if (entry != NULL) { - continue; - - } + entry = gnome_desktop_item_new_from_uri (uri, 0, NULL); + if (entry != NULL) { + /* FIXME: Handle name conflicts? */ + nautilus_link_local_create_from_gnome_entry (entry, container_path, &point); + + gnome_desktop_item_unref (entry); + continue; } /* Make a link from the URI alone. Generate the file @@ -2587,7 +2580,6 @@ icon_view_handle_uri_list (NautilusIconContainer *container, const char *item_ur * instead of a "roll our own" solution. */ stripped_uri = eel_str_strip_trailing_chr (uri, '/'); - g_print ("local_path:%s\nstripped_uri:%s\n", local_path, stripped_uri); last_slash = strrchr (stripped_uri, '/'); link_name = last_slash == NULL ? NULL : last_slash + 1; -- cgit v1.2.1