[monkey-bubble: 155/753] Don't call gnome_uri_extract_filename(), just use the URI as-is.



commit 8eb9130cd59beeea806872286a0310db3f118afb
Author: Martin Baulig <baulig suse de>
Date:   Tue Apr 17 21:02:40 2001 +0000

    Don't call gnome_uri_extract_filename(), just use the URI as-is.
    
    2001-04-17  Martin Baulig  <baulig suse de>
    
    	* gnome-ditem.c (gnome_desktop_item_drop_uri_list): Don't call
    	gnome_uri_extract_filename(), just use the URI as-is.

 libgnome/ChangeLog     |    5 +++++
 libgnome/gnome-ditem.c |   17 +++--------------
 2 files changed, 8 insertions(+), 14 deletions(-)
---
diff --git a/libgnome/ChangeLog b/libgnome/ChangeLog
index c15a273..e62b0a5 100644
--- a/libgnome/ChangeLog
+++ b/libgnome/ChangeLog
@@ -1,3 +1,8 @@
+2001-04-17  Martin Baulig  <baulig suse de>
+
+	* gnome-ditem.c (gnome_desktop_item_drop_uri_list): Don't call
+	gnome_uri_extract_filename(), just use the URI as-is.
+
 2001-04-15  Martin Baulig  <baulig suse de>
 
 	* libgnome-init.c (libgnome_loadinit): Don't initialize threads here;
diff --git a/libgnome/gnome-ditem.c b/libgnome/gnome-ditem.c
index 49e8585..2d7cec2 100644
--- a/libgnome/gnome-ditem.c
+++ b/libgnome/gnome-ditem.c
@@ -53,6 +53,7 @@
 #include <popt.h>
 
 #include <libgnomevfs/gnome-vfs-mime.h>
+#include <libgnomevfs/gnome-vfs-uri.h>
 
 struct _GnomeDesktopItem {
         GHashTable *name; /* key is language, value is translated string */
@@ -1293,15 +1294,7 @@ gnome_desktop_item_drop_uri_list (const GnomeDesktopItem *item,
 		const char **argv = g_alloca((argc + 1) * sizeof(char *));
 
 		for(i=0,li=uri_list; li; i++, li=li->next) {
-			char *p = gnome_uri_extract_filename(li->data);
-			if(p) {
-				char *s = g_alloca(strlen(p)+1);
-				strcpy(s, p);
-				g_free(p);
-				argv[i] = s;
-			} else {
-				argv[i] = li->data;
-			}
+			argv[i] = li->data;
 		}
 		argv[i] = NULL;
 		return gnome_desktop_item_launch(item, argc, argv);
@@ -1310,11 +1303,7 @@ gnome_desktop_item_drop_uri_list (const GnomeDesktopItem *item,
 	/* figure out if we have any urls in the dropped files,
 	   this also builds a list of all the files */
 	for(li=uri_list; li; li=li->next) {
-		char *p = gnome_uri_extract_filename(li->data);
-		if(p)
-			file_list = g_list_prepend(file_list, p);
-		else
-			any_urls = TRUE;
+		file_list = g_list_prepend(file_list, g_strdup (li->data));
 	}
 	if(file_list)
 		file_list = g_list_reverse(file_list);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]