comparison src/ft.c @ 10225:ecf3ce2e2ab1

[gaim-migrate @ 11357] This is mostly a patch from Felipe Contreras that eliminates MSN switchboard errors and fixes MSN buddy icon syncronization, with some tweaks by me. Thank Felipe if it works, blame me if something broke. I also fixed a couple of text markup escaping things, fixed a glib warning that was bugging me, fix a rare SILC crash, and make gtkstatusselector.c compile (but do nothing) with gtk < 2.4 committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Sun, 21 Nov 2004 17:48:09 +0000
parents 0aca774bef87
children a66cf83552dc
comparison
equal deleted inserted replaced
10224:ef7f9e69f03e 10225:ecf3ce2e2ab1
244 } 244 }
245 245
246 static void 246 static void
247 gaim_xfer_ask_recv(GaimXfer *xfer) 247 gaim_xfer_ask_recv(GaimXfer *xfer)
248 { 248 {
249 char *buf, *size_buf; 249 char *buf, *size_buf, *escaped;
250 size_t size; 250 size_t size;
251 251
252 /* If we have already accepted the request, ask the destination file 252 /* If we have already accepted the request, ask the destination file
253 name directly */ 253 name directly */
254 if (gaim_xfer_get_status(xfer) != GAIM_XFER_STATUS_ACCEPTED) { 254 if (gaim_xfer_get_status(xfer) != GAIM_XFER_STATUS_ACCEPTED) {
255 size = gaim_xfer_get_size(xfer); 255 size = gaim_xfer_get_size(xfer);
256 size_buf = gaim_str_size_to_units(size); 256 size_buf = gaim_str_size_to_units(size);
257 257
258 escaped = g_markup_escape_text(gaim_xfer_get_filename(xfer), -1);
258 buf = g_strdup_printf(_("%s wants to send you %s (%s)"), 259 buf = g_strdup_printf(_("%s wants to send you %s (%s)"),
259 xfer->who, gaim_xfer_get_filename(xfer), 260 xfer->who, escaped,
260 size_buf); 261 size_buf);
261 g_free(size_buf); 262 g_free(size_buf);
263 g_free(escaped);
262 264
263 if (xfer->message != NULL) 265 if (xfer->message != NULL)
264 serv_got_im(gaim_account_get_connection(xfer->account), 266 serv_got_im(gaim_account_get_connection(xfer->account),
265 xfer->who, xfer->message, 0, time(NULL)); 267 xfer->who, xfer->message, 0, time(NULL));
266 268
902 904
903 void 905 void
904 gaim_xfer_cancel_local(GaimXfer *xfer) 906 gaim_xfer_cancel_local(GaimXfer *xfer)
905 { 907 {
906 GaimXferUiOps *ui_ops; 908 GaimXferUiOps *ui_ops;
907 char *msg = NULL; 909 char *msg = NULL, *escaped;
908 910
909 g_return_if_fail(xfer != NULL); 911 g_return_if_fail(xfer != NULL);
910 912
911 gaim_xfer_set_status(xfer, GAIM_XFER_STATUS_CANCEL_LOCAL); 913 gaim_xfer_set_status(xfer, GAIM_XFER_STATUS_CANCEL_LOCAL);
912 914
915 escaped = g_markup_escape_text(gaim_xfer_get_filename(xfer), -1);
913 msg = g_strdup_printf(_("You canceled the transfer of %s"), 916 msg = g_strdup_printf(_("You canceled the transfer of %s"),
914 gaim_xfer_get_filename(xfer)); 917 escaped);
918 g_free(escaped);
915 gaim_xfer_conversation_write(xfer, msg, FALSE); 919 gaim_xfer_conversation_write(xfer, msg, FALSE);
916 g_free(msg); 920 g_free(msg);
917 921
918 if (gaim_xfer_get_type(xfer) == GAIM_XFER_SEND) 922 if (gaim_xfer_get_type(xfer) == GAIM_XFER_SEND)
919 { 923 {
951 955
952 void 956 void
953 gaim_xfer_cancel_remote(GaimXfer *xfer) 957 gaim_xfer_cancel_remote(GaimXfer *xfer)
954 { 958 {
955 GaimXferUiOps *ui_ops; 959 GaimXferUiOps *ui_ops;
956 gchar *msg; 960 gchar *msg, *escaped;
957 961
958 g_return_if_fail(xfer != NULL); 962 g_return_if_fail(xfer != NULL);
959 963
960 gaim_request_close_with_handle(xfer); 964 gaim_request_close_with_handle(xfer);
961 gaim_xfer_set_status(xfer, GAIM_XFER_STATUS_CANCEL_REMOTE); 965 gaim_xfer_set_status(xfer, GAIM_XFER_STATUS_CANCEL_REMOTE);
962 966
967 escaped = g_markup_escape_text(gaim_xfer_get_filename(xfer), -1);
963 msg = g_strdup_printf(_("%s canceled the transfer of %s"), 968 msg = g_strdup_printf(_("%s canceled the transfer of %s"),
964 xfer->who, gaim_xfer_get_filename(xfer)); 969 xfer->who, escaped);
970 g_free(escaped);
965 gaim_xfer_conversation_write(xfer, msg, TRUE); 971 gaim_xfer_conversation_write(xfer, msg, TRUE);
966 gaim_xfer_error(gaim_xfer_get_type(xfer), xfer->who, msg); 972 gaim_xfer_error(gaim_xfer_get_type(xfer), xfer->who, msg);
967 g_free(msg); 973 g_free(msg);
968 974
969 if (gaim_xfer_get_type(xfer) == GAIM_XFER_SEND) 975 if (gaim_xfer_get_type(xfer) == GAIM_XFER_SEND)