From 12199ba19c4d2b53c31d0ba8d5f8ee849c7dd8e4 Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Sat, 6 Feb 1999 04:15:29 +0000 Subject: [PATCH] 1999-02-05 Federico Mena Quintero * gdesktop.c (drag_data_get): Set the Netscape URL from the icon if it is available. Wheee! We can now drop icons onto Netscape. --- gnome/ChangeLog | 3 +++ gnome/gdesktop.c | 21 +++++++++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/gnome/ChangeLog b/gnome/ChangeLog index 2be4dd772..03aefb4aa 100644 --- a/gnome/ChangeLog +++ b/gnome/ChangeLog @@ -1,5 +1,8 @@ 1999-02-05 Federico Mena Quintero + * gdesktop.c (drag_data_get): Set the Netscape URL from the icon + if it is available. Wheee! We can now drop icons onto Netscape. + * gmain.h: Added prototype for gmc_open_filename(). * gdesktop.c (desktop_icon_info_open): Fixed call to diff --git a/gnome/gdesktop.c b/gnome/gdesktop.c index a5935e6c3..9bf9a6645 100644 --- a/gnome/gdesktop.c +++ b/gnome/gdesktop.c @@ -1150,16 +1150,25 @@ drag_data_get (GtkWidget *widget, GdkDragContext *context, GtkSelectionData *sel len); break; - case TARGET_URL: - files = gnome_uri_list_extract_uris (filelist); - if (files) { + case TARGET_URL: + if (dii->url) gtk_selection_data_set (selection_data, selection_data->target, 8, - files->data, - strlen (files->data)); + dii->url, + strlen (dii->url)); + else { + files = gnome_uri_list_extract_uris (filelist); + if (files) + gtk_selection_data_set (selection_data, + selection_data->target, + 8, + files->data, + strlen (files->data)); + + gnome_uri_list_free_strings (files); } - gnome_uri_list_free_strings (files); + break; default: