diff src/gtkblist.c @ 10229:9aa0b6d11bbf

[gaim-migrate @ 11364] This is a heavily warmenhoved patch from Alceste Scalas. Here's what it changes: If the user drags an image file into the buddy list or conversation, it presents three options (when applicable): Set as buddy icon - sets this image to be the buddy icon for this buddy Send image file - Initiates a file transfer to send this image. Insert in message - Inserts in the gtkimhtml for use as an IM image. If the user drags a .desktop web link, it will insert a hyperlink in the conversation. All other types of .desktop files fail with an error dialog. If anyone can think of better ways to handle any of them, let me know. This also happens to implement gaim_request_choice, which had previously been unimplemented. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Mon, 22 Nov 2004 02:57:34 +0000
parents 224c9f244a3a
children 95ca0db2d01d
line wrap: on
line diff
--- a/src/gtkblist.c	Sun Nov 21 20:36:15 2004 +0000
+++ b/src/gtkblist.c	Mon Nov 22 02:57:34 2004 +0000
@@ -2023,18 +2023,10 @@
 				
 				if (GAIM_BLIST_NODE_IS_BUDDY(node) || GAIM_BLIST_NODE_IS_CONTACT(node)) {
 					GaimBuddy *b = GAIM_BLIST_NODE_IS_BUDDY(node) ? (GaimBuddy*)node : gaim_contact_get_priority_buddy((GaimContact*)node);
-					GList *tmp;
-					GList *files = gaim_uri_list_extract_filenames(sd->data);
-					for(tmp = files; tmp != NULL ; tmp = g_list_next(tmp)) {
-						gchar *filename = tmp->data;
-						/* XXX - Make ft API support creating a transfer with more than one file */
-						if (g_file_test(filename, G_FILE_TEST_EXISTS)
-								&& !g_file_test(filename, G_FILE_TEST_IS_DIR)) {
-							serv_send_file(gaim_account_get_connection(b->account), b->name, filename);
-						}
-						g_free(filename);
-					}
-					g_list_free(files);
+					gaim_dnd_file_manage(sd, b->account, b->name);
+					gtk_drag_finish(dc, TRUE, (dc->action == GDK_ACTION_MOVE), t);
+				} else {
+					gtk_drag_finish(dc, FALSE, FALSE, t);
 				}
 			}	
 	}