comparison src/gtk/gtkui_transfer.c @ 876:2d4e6fca8e7c

2007-2-6 Brian Masney <masneyb@gftp.org> * src/text/textui.c src/gtk/gtkui_transfer.c src/uicommon/gftpui.h - added new function: gftpui_cancel_file_transfer() * src/uicommon/gftpui.c - use gftpui_cancel_file_transfer() to cancel the file transfers * lib/gftp.h lib/misc.c src/gtk/transfer.c - added pointer for the thread_id of the transfer to the gftp_transfer structure. This will be used in the GTK+ port so that the transfer can be stopped.
author masneyb
date Wed, 07 Feb 2007 02:43:57 +0000
parents 877282be3a78
children 1808cebed602
comparison
equal deleted inserted replaced
875:19dacfb69433 876:2d4e6fca8e7c
68 transdata = g_malloc (sizeof (*transdata)); 68 transdata = g_malloc (sizeof (*transdata));
69 transdata->transfer = tdata; 69 transdata->transfer = tdata;
70 transdata->curfle = curfle; 70 transdata->curfle = curfle;
71 71
72 gtk_ctree_node_set_row_data (GTK_CTREE (dlwdw), fle->user_data, transdata); 72 gtk_ctree_node_set_row_data (GTK_CTREE (dlwdw), fle->user_data, transdata);
73 }
74
75
76 void
77 gftpui_cancel_file_transfer (gftp_transfer * tdata)
78 {
79 if (tdata->thread_id != NULL)
80 pthread_kill (*(pthread_t *) tdata->thread_id, SIGINT);
81
82 tdata->cancel = 1; /* FIXME */
83 tdata->fromreq->cancel = 1;
84 tdata->toreq->cancel = 1;
73 } 85 }
74 86
75 87
76 static void 88 static void
77 gftpui_gtk_trans_selectall (GtkWidget * widget, gpointer data) 89 gftpui_gtk_trans_selectall (GtkWidget * widget, gpointer data)