Mercurial > pidgin
comparison libpurple/protocols/myspace/myspace.c @ 32246:10e5000326a5
Convert code to use the purple_account accessor functions.
author | andrew.victor@mxit.com |
---|---|
date | Sat, 01 Oct 2011 21:04:35 +0000 |
parents | f75041cb3fec |
children | 2ec94166be43 |
comparison
equal
deleted
inserted
replaced
32245:f75041cb3fec | 32246:10e5000326a5 |
---|---|
2541 | 2541 |
2542 msim_set_status_code(session, status_code, stripped); | 2542 msim_set_status_code(session, status_code, stripped); |
2543 | 2543 |
2544 /* If we should be idle, set that status. Time is irrelevant here. */ | 2544 /* If we should be idle, set that status. Time is irrelevant here. */ |
2545 if (purple_presence_is_idle(pres) && status_code != MSIM_STATUS_CODE_OFFLINE_OR_HIDDEN) | 2545 if (purple_presence_is_idle(pres) && status_code != MSIM_STATUS_CODE_OFFLINE_OR_HIDDEN) |
2546 msim_set_idle(account->gc, 1); | 2546 msim_set_idle(purple_account_get_connection(account), 1); |
2547 } | 2547 } |
2548 | 2548 |
2549 /** | 2549 /** |
2550 * Go idle. | 2550 * Go idle. |
2551 */ | 2551 */ |
2862 if (msim_is_userid(str)) { | 2862 if (msim_is_userid(str)) { |
2863 /* Have user ID, we need to get their username first :) */ | 2863 /* Have user ID, we need to get their username first :) */ |
2864 const char *username; | 2864 const char *username; |
2865 | 2865 |
2866 /* If the account does not exist, we can't look up the user. */ | 2866 /* If the account does not exist, we can't look up the user. */ |
2867 if (!account || !account->gc) | 2867 if (!account || !purple_account_get_connection(account)) |
2868 return str; | 2868 return str; |
2869 | 2869 |
2870 id = atol(str); | 2870 id = atol(str); |
2871 username = msim_uid2username_from_blist((PurpleAccount *)account, id); | 2871 username = msim_uid2username_from_blist((PurpleAccount *)account, id); |
2872 if (!username) { | 2872 if (!username) { |