Mercurial > pidgin
changeset 32330:26a4f6fc8024
Autoaccept: Use file-transfer accessor functions.
author | andrew.victor@mxit.com |
---|---|
date | Sun, 30 Oct 2011 15:42:24 +0000 |
parents | f7072a6dc43d |
children | 1ffa35da9a7b |
files | libpurple/plugins/autoaccept.c |
diffstat | 1 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/plugins/autoaccept.c Mon Oct 24 06:04:43 2011 +0000 +++ b/libpurple/plugins/autoaccept.c Sun Oct 30 15:42:24 2011 +0000 @@ -73,10 +73,10 @@ auto_accept_complete_cb(PurpleXfer *xfer, PurpleXfer *my) { if (xfer == my && purple_prefs_get_bool(PREF_NOTIFY) && - !purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, xfer->who, xfer->account)) + !purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, purple_xfer_get_remote_user(xfer), purple_xfer_get_account(xfer))) { char *message = g_strdup_printf(_("Autoaccepted file transfer of \"%s\" from \"%s\" completed."), - xfer->filename, xfer->who); + purple_xfer_get_filename(xfer), purple_xfer_get_remote_user(xfer)); purple_notify_info(NULL, _("Autoaccept complete"), message, NULL); g_free(message); } @@ -93,8 +93,8 @@ int accept_setting; - account = xfer->account; - node = PURPLE_BLIST_NODE(purple_find_buddy(account, xfer->who)); + account = purple_xfer_get_account(xfer); + node = PURPLE_BLIST_NODE(purple_find_buddy(account, purple_xfer_get_remote_user(xfer))); /* If person is on buddy list, use the buddy setting; otherwise, use the stranger setting. */ @@ -121,7 +121,7 @@ gchar *ext; if (purple_prefs_get_bool(PREF_NEWDIR)) - dirname = g_build_filename(pref, purple_normalize(account, xfer->who), NULL); + dirname = g_build_filename(pref, purple_normalize(account, purple_xfer_get_remote_user(xfer)), NULL); else dirname = g_build_filename(pref, NULL); @@ -133,9 +133,9 @@ /* Escape filename (if escaping is turned on) */ if (purple_prefs_get_bool(PREF_ESCAPE)) { - escape = purple_escape_filename(xfer->filename); + escape = purple_escape_filename(purple_xfer_get_filename(xfer)); } else { - escape = xfer->filename; + escape = purple_xfer_get_filename(xfer); } filename = g_build_filename(dirname, escape, NULL); @@ -174,7 +174,7 @@ PURPLE_CALLBACK(auto_accept_complete_cb), xfer); break; case FT_REJECT: - xfer->status = PURPLE_XFER_STATUS_CANCEL_LOCAL; + purple_xfer_set_status(xfer, PURPLE_XFER_STATUS_CANCEL_LOCAL); break; } }