changeset 20900:f7b799e77c43

When drag-dropping an image onto a conversation, include 'Send image file' as an option if the prpl supports file-transfer. This closes #3510.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Fri, 12 Oct 2007 12:47:07 +0000
parents 3969ac8237e3
children a5aa5a835c94
files pidgin/gtkutils.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkutils.c	Fri Oct 12 12:13:39 2007 +0000
+++ b/pidgin/gtkutils.c	Fri Oct 12 12:47:07 2007 +0000
@@ -1526,6 +1526,8 @@
 
 			if (prpl_info && prpl_info->can_receive_file)
 				ft = prpl_info->can_receive_file(gc, who);
+			else if (prpl_info && prpl_info->send_file)
+				ft = TRUE;
 
 			if (im && ft)
 				purple_request_choice(NULL, NULL,
@@ -1559,6 +1561,7 @@
 						    _("Set as buddy icon"), DND_BUDDY_ICON,
 						    (ft ? _("Send image file") : _("Insert in message")), (ft ? DND_FILE_TRANSFER : DND_IM_IMAGE),
 							NULL);
+			gdk_pixbuf_unref(pb);
 			return;
 		}