| 4363 if (protocol != NULL) g_free(protocol); |
4363 if (protocol != NULL) g_free(protocol); |
| 4364 |
4364 |
| 4365 gtk_drag_finish(dc, TRUE, (dc->action == GDK_ACTION_MOVE), t); |
4365 gtk_drag_finish(dc, TRUE, (dc->action == GDK_ACTION_MOVE), t); |
| 4366 } |
4366 } |
| 4367 else if (sd->target == gdk_atom_intern("text/uri-list", FALSE)) { |
4367 else if (sd->target == gdk_atom_intern("text/uri-list", FALSE)) { |
| 4368 GList *tmp; |
4368 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) |
| 4369 GList *files = gaim_uri_list_extract_filenames(sd->data); |
4369 gaim_dnd_file_manage(sd, gaim_conversation_get_account(conv), gaim_conversation_get_name(conv)); |
| 4370 for(tmp = files; tmp != NULL ; tmp = g_list_next(tmp)) { |
|
| 4371 gchar *filename = tmp->data; |
|
| 4372 /* XXX - Make ft API support creating a transfer with more than one file */ |
|
| 4373 if (g_file_test(filename, G_FILE_TEST_EXISTS) |
|
| 4374 && !g_file_test(filename, G_FILE_TEST_IS_DIR) |
|
| 4375 && gaim_conversation_get_type(conv) == GAIM_CONV_IM) { |
|
| 4376 serv_send_file(gaim_conversation_get_gc(conv), |
|
| 4377 gaim_conversation_get_name(conv), filename); |
|
| 4378 } |
|
| 4379 g_free(filename); |
|
| 4380 } |
|
| 4381 g_list_free(files); |
|
| 4382 /* XXX - Attempt to load this file into gdk_pixbuf, or otherwise determine if it is an image. If it is, offer |
|
| 4383 * the choice of a) sending this file b) inserting this file as an IM image or c) setting this file as a custom |
|
| 4384 * buddy icon for this buddy */ |
|
| 4385 gtk_drag_finish(dc, TRUE, (dc->action == GDK_ACTION_MOVE), t); |
4370 gtk_drag_finish(dc, TRUE, (dc->action == GDK_ACTION_MOVE), t); |
| 4386 } |
4371 } |
| 4387 else |
4372 else |
| 4388 gtk_drag_finish(dc, FALSE, FALSE, t); |
4373 gtk_drag_finish(dc, FALSE, FALSE, t); |
| 4389 } |
4374 } |