Mercurial > gftp.yaz
diff src/uicommon/gftpui.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 | 42f9ce5e4bff |
children | a41a3590d696 |
line wrap: on
line diff
--- a/src/uicommon/gftpui.c Wed Feb 07 01:56:20 2007 +0000 +++ b/src/uicommon/gftpui.c Wed Feb 07 02:43:57 2007 +0000 @@ -1348,9 +1348,7 @@ curfle->transfer_action = GFTP_TRANS_ACTION_SKIP; if (tdata->curfle != NULL && curfle == tdata->curfle->data) { - tdata->cancel = 1; - tdata->fromreq->cancel = 1; - tdata->toreq->cancel = 1; + gftpui_cancel_file_transfer (tdata); tdata->skip_file = 1; } else if (!curfle->transfer_done) @@ -1373,9 +1371,7 @@ if (tdata->started) { - tdata->cancel = 1; - tdata->fromreq->cancel = 1; - tdata->toreq->cancel = 1; + gftpui_cancel_file_transfer (tdata); tdata->skip_file = 0; } else @@ -1552,6 +1548,8 @@ int ret, skipped_files; tdata->curfle = tdata->files; + gftpui_common_num_child_threads++; + gettimeofday (&tdata->starttime, NULL); memcpy (&tdata->lasttime, &tdata->starttime, sizeof (tdata->lasttime)); @@ -1596,6 +1594,8 @@ skipped_files); tdata->done = 1; + gftpui_common_num_child_threads--; + return (1); }