Mercurial > pidgin
changeset 15542:5ec72809228b
merge of '4af83de031df5affbcf7e43099e6223f252d3deb'
and '6bfd7f3f9bd034def884bed56ff76598fbdabf12'
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 04 Feb 2007 08:48:08 +0000 |
parents | 16845e318249 (diff) 7ae72b7c02b1 (current diff) |
children | cb6bb41291c8 |
files | |
diffstat | 4 files changed, 21 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/qq/keep_alive.c Sun Feb 04 08:46:24 2007 +0000 +++ b/libpurple/protocols/qq/keep_alive.c Sun Feb 04 08:48:08 2007 +0000 @@ -164,6 +164,11 @@ } gaim_debug(GAIM_DEBUG_INFO, "QQ", "set buddy %d to %s\n", q_bud->uid, status_id); gaim_prpl_got_user_status(gc->account, name, status_id, NULL); + + if (q_bud->comm_flag & QQ_COMM_FLAG_BIND_MOBILE && q_bud->status != QQ_BUDDY_OFFLINE) + gaim_prpl_got_user_status(gc->account, name, "mobile", NULL); + else + gaim_prpl_got_user_status_deactive(gc->account, name, "mobile"); } else { gaim_debug(GAIM_DEBUG_ERROR, "QQ", "unknown buddy: %d\n", q_bud->uid); }
--- a/libpurple/protocols/qq/qq.c Sun Feb 04 08:46:24 2007 +0000 +++ b/libpurple/protocols/qq/qq.c Sun Feb 04 08:48:08 2007 +0000 @@ -257,8 +257,6 @@ qq_buddy *q_bud = b->proto_data; if (q_bud) { - if (q_bud->comm_flag & QQ_COMM_FLAG_BIND_MOBILE) - return "mobile"; if (q_bud->comm_flag & QQ_COMM_FLAG_QQ_MEMBER) return "qq_member"; /* @@ -292,6 +290,10 @@ "offline", _("QQ: Offline"), FALSE, TRUE, FALSE); types = g_list_append(types, status); + status = gaim_status_type_new_full(GAIM_STATUS_MOBILE, + "mobile", NULL, FALSE, FALSE, TRUE); + types = g_list_append(types, status); + return types; }
--- a/libpurple/protocols/yahoo/yahoo.c Sun Feb 04 08:46:24 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo.c Sun Feb 04 08:48:08 2007 +0000 @@ -176,6 +176,11 @@ gaim_prpl_got_user_idle(gaim_connection_get_account(gc), name, TRUE, f->idle); else gaim_prpl_got_user_idle(gaim_connection_get_account(gc), name, FALSE, 0); + + if (f->sms) + gaim_prpl_got_user_status(gaim_connection_get_account(gc), name, YAHOO_STATUS_TYPE_MOBILE, NULL); + else + gaim_prpl_got_user_status_deactive(gaim_connection_get_account(gc), name, YAHOO_STATUS_TYPE_MOBILE); } static void yahoo_process_status(GaimConnection *gc, struct yahoo_packet *pkt) @@ -300,8 +305,10 @@ if (strtol(pair->value, NULL, 10) == 0) { if (f) f->status = YAHOO_STATUS_OFFLINE; - if (name) + if (name) { gaim_prpl_got_user_status(account, name, "offline", NULL); + gaim_prpl_got_user_status_deactive(account, name, YAHOO_STATUS_TYPE_MOBILE); + } break; } break; @@ -2821,8 +2828,6 @@ presence = gaim_buddy_get_presence(b); if (gaim_presence_is_online(presence)) { - if (f->sms) - return "mobile"; if (yahoo_friend_get_game(f)) return "game"; if (f->protocol == 2) @@ -3473,6 +3478,9 @@ type = gaim_status_type_new(GAIM_STATUS_OFFLINE, YAHOO_STATUS_TYPE_OFFLINE, NULL, TRUE); types = g_list_append(types, type); + type = gaim_status_type_new_full(GAIM_STATUS_MOBILE, YAHOO_STATUS_TYPE_MOBILE, NULL, FALSE, FALSE, TRUE); + types = g_list_append(types, type); + return types; }
--- a/libpurple/protocols/yahoo/yahoo.h Sun Feb 04 08:46:24 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo.h Sun Feb 04 08:48:08 2007 +0000 @@ -66,6 +66,7 @@ #define YAHOO_STATUS_TYPE_STEPPEDOUT "steppedout" #define YAHOO_STATUS_TYPE_AWAY "away" #define YAHOO_STATUS_TYPE_INVISIBLE "invisible" +#define YAHOO_STATUS_TYPE_MOBILE "mobile" enum yahoo_status { YAHOO_STATUS_AVAILABLE = 0,