Mercurial > pidgin
changeset 29310:9198a5d39c5c
Let _got_attention call _conversation_attention, instead of having prpls do it
on incoming attentions
author | Marcus Lundblad <ml@update.uu.se> |
---|---|
date | Mon, 16 Nov 2009 20:45:56 +0000 |
parents | 974748d0e1f2 |
children | ad119b77f941 |
files | libpurple/protocols/jabber/message.c libpurple/protocols/msn/msg.c libpurple/protocols/yahoo/libymsg.c libpurple/prpl.c |
diffstat | 4 files changed, 8 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/message.c Mon Nov 16 19:59:20 2009 +0000 +++ b/libpurple/protocols/jabber/message.c Mon Nov 16 20:45:56 2009 +0000 @@ -294,7 +294,6 @@ static void handle_buzz(JabberMessage *jm) { PurpleBuddy *buddy; PurpleAccount *account; - PurpleConversation *c; /* Delayed buzz MUST NOT be accepted */ if(jm->delayed) @@ -311,9 +310,6 @@ /* xmpp only has 1 attention type, so index is 0 */ purple_prpl_got_attention(jm->js->gc, jm->from, 0); - c = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, jm->from, account); - if (c) - purple_conversation_attention(c, jm->from, 0, PURPLE_MESSAGE_RECV, time(NULL)); } /* used internally by the functions below */
--- a/libpurple/protocols/msn/msg.c Mon Nov 16 19:59:20 2009 +0000 +++ b/libpurple/protocols/msn/msg.c Mon Nov 16 20:45:56 2009 +0000 @@ -1043,9 +1043,6 @@ else purple_prpl_got_attention(account->gc, user, MSN_NUDGE); - - purple_conversation_attention(swboard->conv, user, MSN_NUDGE, - PURPLE_MESSAGE_SEND, time(NULL)); } else { purple_prpl_got_attention(account->gc, user, MSN_NUDGE); }
--- a/libpurple/protocols/yahoo/libymsg.c Mon Nov 16 19:59:20 2009 +0000 +++ b/libpurple/protocols/yahoo/libymsg.c Mon Nov 16 20:45:56 2009 +0000 @@ -1123,10 +1123,6 @@ conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_ANY, username, account); purple_prpl_got_attention(gc, username, YAHOO_BUZZ); - if (conv) { - purple_conversation_attention(conv, username, 0, PURPLE_MESSAGE_RECV, - time(NULL)); - } g_free(username); g_free(m); g_free(im->fed_from);
--- a/libpurple/prpl.c Mon Nov 16 19:59:20 2009 +0000 +++ b/libpurple/prpl.c Mon Nov 16 20:45:56 2009 +0000 @@ -503,7 +503,15 @@ void purple_prpl_got_attention(PurpleConnection *gc, const char *who, guint type_code) { + PurpleConversation *conv = NULL; + PurpleAccount *account = purple_connection_get_account(gc); + got_attention(gc, -1, who, type_code); + conv = + purple_find_conversation_with_account(PURPLE_CONV_TYPE_ANY, who, account); + if (conv) + purple_conversation_attention(conv, who, type_code, PURPLE_MESSAGE_RECV, + time(NULL)); } void