Mercurial > pidgin.yaz
changeset 15544:cb6bb41291c8
merge of '600cfd77bdb8554e712ba04da84518976cd80b86'
and '79f63e67c9df036c4f97bc50b13b4bbf90c7b0bc'
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Sun, 04 Feb 2007 09:51:11 +0000 |
parents | 5ec72809228b (current diff) a1e0b153fc30 (diff) |
children | 82e3cff11243 |
files | |
diffstat | 3 files changed, 27 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/msn/msn.c Sun Feb 04 08:48:08 2007 +0000 +++ b/libpurple/protocols/msn/msn.c Sun Feb 04 09:51:11 2007 +0000 @@ -479,16 +479,6 @@ return "msn"; } -static const char* -msn_list_emblem(GaimBuddy *b) -{ - MsnUser *user; - user = b->proto_data; - if (user && user->mobile) - return "mobile"; - return NULL; -} - static char * msn_status_text(GaimBuddy *buddy) { @@ -576,7 +566,11 @@ status = gaim_status_type_new_full(GAIM_STATUS_OFFLINE, NULL, NULL, 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; } @@ -743,12 +737,23 @@ GaimMessageFlags flags) { GaimAccount *account; + GaimBuddy *buddy = gaim_find_buddy(gc->account, who); MsnMessage *msg; char *msgformat; char *msgtext; account = gaim_connection_get_account(gc); + if (buddy) { + GaimPresence *p = gaim_buddy_get_presence(buddy); + if (gaim_presence_is_status_primitive_active(p, GAIM_STATUS_MOBILE)) { + char *text = gaim_markup_strip_html(message); + send_to_mobile(gc, who, text); + g_free(text); + return; + } + } + msn_import_html(message, &msgformat, &msgtext); if (strlen(msgtext) + strlen(msgformat) + strlen(VERSION) > 1564) @@ -1930,7 +1935,7 @@ NULL, /* protocol_options */ {"png", 0, 0, 96, 96, 0, GAIM_ICON_SCALE_SEND}, /* icon_spec */ msn_list_icon, /* list_icon */ - msn_list_emblem, /* list_emblems */ + NULL, /* list_emblems */ msn_status_text, /* status_text */ msn_tooltip_text, /* tooltip_text */ msn_status_types, /* away_states */
--- a/libpurple/protocols/msn/user.c Sun Feb 04 08:48:08 2007 +0000 +++ b/libpurple/protocols/msn/user.c Sun Feb 04 09:51:11 2007 +0000 @@ -81,8 +81,15 @@ account = user->userlist->session->account; - if (user->status != NULL) - gaim_prpl_got_user_status(account, user->passport, user->status, NULL); + if (user->status != NULL) { + if (!strcmp(user->status, "offline") && user->mobile) { + gaim_prpl_got_user_status(account, user->passport, "available", NULL); + gaim_prpl_got_user_status(account, user->passport, "mobile", NULL); + } else { + gaim_prpl_got_user_status(account, user->passport, user->status, NULL); + gaim_prpl_got_user_status_deactive(account, user->passport, "mobile"); + } + } if (user->idle) gaim_prpl_got_user_idle(account, user->passport, TRUE, -1);
--- a/pidgin/gtkconv.c Sun Feb 04 08:48:08 2007 +0000 +++ b/pidgin/gtkconv.c Sun Feb 04 09:51:11 2007 +0000 @@ -3195,10 +3195,7 @@ gchar *text; /* Create a pixmap for the protocol icon. */ - if (buddy != NULL) - pixbuf = pidgin_blist_get_status_icon((GaimBlistNode*)buddy, PIDGIN_STATUS_ICON_SMALL); - else - pixbuf = pidgin_create_prpl_icon(account, 0.5); + pixbuf = pidgin_create_prpl_icon(account, PIDGIN_PRPL_ICON_SMALL); /* Now convert it to GtkImage */ if (pixbuf == NULL)