Mercurial > pidgin
diff libpurple/ft.c @ 27590:a08e84032814
merge of '2348ff22f0ff3453774b8b25b36238465580c609'
and 'e76f11543c2a4aa05bdf584f087cbe3439029661'
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Sun, 12 Jul 2009 05:43:38 +0000 |
parents | 740760605cc1 |
children | fd4415c0595f a7eac81575e7 8b452039c329 |
line wrap: on
line diff
--- a/libpurple/ft.c Sun Jul 12 05:42:40 2009 +0000 +++ b/libpurple/ft.c Sun Jul 12 05:43:38 2009 +0000 @@ -696,14 +696,34 @@ if (completed == TRUE) { char *msg = NULL; + PurpleConversation *conv; + purple_xfer_set_status(xfer, PURPLE_XFER_STATUS_DONE); if (purple_xfer_get_filename(xfer) != NULL) - msg = g_strdup_printf(_("Transfer of file %s complete"), - purple_xfer_get_filename(xfer)); + { + char *filename = g_markup_escape_text(purple_xfer_get_filename(xfer), -1); + if (purple_xfer_get_local_filename(xfer) + && purple_xfer_get_type(xfer) == PURPLE_XFER_RECEIVE) + { + char *local = g_markup_escape_text(purple_xfer_get_local_filename(xfer), -1); + msg = g_strdup_printf(_("Transfer of file <A HREF=\"file://%s\">%s</A> complete"), + local, filename); + g_free(local); + } + else + msg = g_strdup_printf(_("Transfer of file %s complete"), + filename); + g_free(filename); + } else msg = g_strdup(_("File transfer complete")); - purple_xfer_conversation_write(xfer, msg, FALSE); + + conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, xfer->who, + purple_xfer_get_account(xfer)); + + if (conv != NULL) + purple_conversation_write(conv, NULL, msg, PURPLE_MESSAGE_SYSTEM, time(NULL)); g_free(msg); }