Mercurial > pidgin
comparison src/gtkconv.c @ 9495:960e3fd1da94
[gaim-migrate @ 10321]
I think this all works. Test it for me.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Fri, 09 Jul 2004 22:33:06 +0000 |
parents | 99423678a6e3 |
children | 44a5bfa4730b |
comparison
equal
deleted
inserted
replaced
9494:42d6650bcdac | 9495:960e3fd1da94 |
---|---|
4363 if (username != NULL) g_free(username); | 4363 if (username != NULL) g_free(username); |
4364 if (protocol != NULL) g_free(protocol); | 4364 if (protocol != NULL) g_free(protocol); |
4365 | 4365 |
4366 gtk_drag_finish(dc, TRUE, (dc->action == GDK_ACTION_MOVE), t); | 4366 gtk_drag_finish(dc, TRUE, (dc->action == GDK_ACTION_MOVE), t); |
4367 } | 4367 } |
4368 gtk_drag_finish(dc, FALSE, FALSE, t); | 4368 else if (sd->target == gdk_atom_intern("text/plain", FALSE)) { |
4369 if (!g_ascii_strncasecmp(sd->data, "file://", 7)) { | |
4370 GError *converr = NULL; | |
4371 gchar *file; | |
4372 if(!(file = g_filename_from_uri(sd->data, NULL, &converr))) { | |
4373 gaim_debug(GAIM_DEBUG_ERROR, "conv dnd", "%s\n", | |
4374 (converr ? converr->message : | |
4375 "g_filename_from_uri error")); | |
4376 return; | |
4377 } | |
4378 file = g_strchomp(file); | |
4379 /* XXX - Handle dragging more than one file. Make ft API support creating a transfer with more than one file */ | |
4380 /* XXX - Attempt to load this file into gdk_pixbuf, or otherwise determine if it is an image. If it is, offer | |
4381 * the choice of a) sending this file b) inserting this file as an IM image or c) setting this file as a custom | |
4382 * buddy icon for this buddy */ | |
4383 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) | |
4384 serv_send_file(gaim_conversation_get_gc(conv), gaim_conversation_get_name(conv), file); | |
4385 g_free(file); | |
4386 } | |
4387 } | |
4388 gtk_drag_finish(dc, FALSE, FALSE, t); | |
4369 } | 4389 } |
4370 | 4390 |
4371 /************************************************************************** | 4391 /************************************************************************** |
4372 * GTK+ window ops | 4392 * GTK+ window ops |
4373 **************************************************************************/ | 4393 **************************************************************************/ |