comparison src/ft.c @ 9512:3c79229259ba

[gaim-migrate @ 10339] Oh, one more change. If a PRPL cancels an ft while the Gaim user is still selecting a file, then close the file browser committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 11 Jul 2004 20:46:28 +0000
parents 3ed6001d5de8
children be96293982d2
comparison
equal deleted inserted replaced
9511:3ed6001d5de8 9512:3c79229259ba
64 { 64 {
65 GaimXferUiOps *ui_ops; 65 GaimXferUiOps *ui_ops;
66 66
67 g_return_if_fail(xfer != NULL); 67 g_return_if_fail(xfer != NULL);
68 68
69 /* Close the file browser, if it's open */
70 gaim_request_close_with_handle(xfer);
71
69 if (gaim_xfer_get_status(xfer) == GAIM_XFER_STATUS_STARTED) 72 if (gaim_xfer_get_status(xfer) == GAIM_XFER_STATUS_STARTED)
70 gaim_xfer_cancel_local(xfer); 73 gaim_xfer_cancel_local(xfer);
71 74
72 ui_ops = gaim_xfer_get_ui_ops(xfer); 75 ui_ops = gaim_xfer_get_ui_ops(xfer);
73 76
191 buf = g_strdup_printf(_("%s wants to send you %s (%s)"), 194 buf = g_strdup_printf(_("%s wants to send you %s (%s)"),
192 xfer->who, gaim_xfer_get_filename(xfer), 195 xfer->who, gaim_xfer_get_filename(xfer),
193 size_buf); 196 size_buf);
194 g_free(size_buf); 197 g_free(size_buf);
195 198
196 gaim_request_accept_cancel(NULL, NULL, buf, NULL, 0, xfer, 199 gaim_request_accept_cancel(xfer, NULL, buf, NULL, 0, xfer,
197 G_CALLBACK(gaim_xfer_choose_file), 200 G_CALLBACK(gaim_xfer_choose_file),
198 G_CALLBACK(cancel_recv_cb)); 201 G_CALLBACK(cancel_recv_cb));
199 g_free(buf); 202 g_free(buf);
200 } else 203 } else
201 gaim_xfer_choose_file(xfer); 204 gaim_xfer_choose_file(xfer);
230 gaim_xfer_get_remote_port(xfer)) 233 gaim_xfer_get_remote_port(xfer))
231 buf2 = g_strdup_printf(_("A file is available for download from:\n" 234 buf2 = g_strdup_printf(_("A file is available for download from:\n"
232 "Remote host: %s\nRemote port: %d"), 235 "Remote host: %s\nRemote port: %d"),
233 gaim_xfer_get_remote_ip(xfer), 236 gaim_xfer_get_remote_ip(xfer),
234 gaim_xfer_get_remote_port(xfer)); 237 gaim_xfer_get_remote_port(xfer));
235 gaim_request_accept_cancel(NULL, NULL, buf, buf2, 0, xfer, 238 gaim_request_accept_cancel(xfer, NULL, buf, buf2, 0, xfer,
236 G_CALLBACK(ask_accept_ok), 239 G_CALLBACK(ask_accept_ok),
237 G_CALLBACK(ask_accept_cancel)); 240 G_CALLBACK(ask_accept_cancel));
238 g_free(buf); 241 g_free(buf);
239 g_free(buf2); 242 g_free(buf2);
240 } 243 }