diff src/ft.c @ 7738:b14442b31a9b

[gaim-migrate @ 8383] This patch from Tim R. (I'll remember your last name next time), snazzes up the file transfer dialog a bit. I also went in and hacked on gtkcellrenderer a bit, so that if you expand the column, the renderer will grow. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Thu, 04 Dec 2003 05:58:26 +0000
parents 02f697df677b
children 5f0bb52c0609
line wrap: on
line diff
--- a/src/ft.c	Thu Dec 04 05:31:54 2003 +0000
+++ b/src/ft.c	Thu Dec 04 05:58:26 2003 +0000
@@ -184,6 +184,14 @@
 	return xfer->account;
 }
 
+GaimXferCancelType
+gaim_xfer_is_canceled(const GaimXfer *xfer)
+{
+	g_return_val_if_fail(xfer != NULL, TRUE);
+
+	return xfer->canceled;
+}
+
 gboolean
 gaim_xfer_is_completed(const GaimXfer *xfer)
 {
@@ -276,6 +284,14 @@
 	return xfer->remote_port;
 }
 
+static void
+gaim_xfer_set_canceled(GaimXfer *xfer, GaimXferCancelType canceled)
+{
+	g_return_if_fail(xfer != NULL);
+
+	xfer->canceled = canceled;
+}
+
 void
 gaim_xfer_set_completed(GaimXfer *xfer, gboolean completed)
 {
@@ -610,6 +626,8 @@
 
 	g_return_if_fail(xfer != NULL);
 
+	gaim_xfer_set_canceled(xfer, GAIM_XFER_CANCEL_LOCAL);
+
 	if (gaim_xfer_get_type(xfer) == GAIM_XFER_SEND)
 	{
 		if (xfer->ops.cancel_send != NULL)
@@ -649,6 +667,8 @@
 
 	g_return_if_fail(xfer != NULL);
 
+	gaim_xfer_set_canceled(xfer, GAIM_XFER_CANCEL_REMOTE);
+
 	if (gaim_xfer_get_type(xfer) == GAIM_XFER_SEND)
 	{
 		if (xfer->ops.cancel_send != NULL)