cpw.attention_ui: 79ac6699: Let _got_attention call _conversation_at...
malu at pidgin.im
malu at pidgin.im
Mon Nov 16 15:51:52 EST 2009
-----------------------------------------------------------------
Revision: 79ac6699933544f4a138cb1d38197703474d3410
Ancestor: 07cb8d6bf07818234e8be72eab5a16c5657a861b
Author: malu at pidgin.im
Date: 2009-11-16T20:45:56
Branch: im.pidgin.cpw.attention_ui
URL: http://d.pidgin.im/viewmtn/revision/info/79ac6699933544f4a138cb1d38197703474d3410
Modified files:
libpurple/protocols/jabber/message.c
libpurple/protocols/msn/msg.c
libpurple/protocols/yahoo/libymsg.c libpurple/prpl.c
ChangeLog:
Let _got_attention call _conversation_attention, instead of having prpls do it
on incoming attentions
-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/message.c 97a2864f47368861fdb75b72f317c3e00e45ee91
+++ libpurple/protocols/jabber/message.c e783a4f7f3ff8a604c7fe5b52fc343c7dc1e1067
@@ -294,7 +294,6 @@ static void handle_buzz(JabberMessage *j
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 @@ static void handle_buzz(JabberMessage *j
/* 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 */
============================================================
--- libpurple/protocols/msn/msg.c 3b9af4fa727e17c67a52498bb5f6d38fb6c3ea5d
+++ libpurple/protocols/msn/msg.c cc85e31a1d1aba5b7a1ed9b76ec7f5350619cd1b
@@ -1043,9 +1043,6 @@ msn_datacast_msg(MsnCmdProc *cmdproc, Ms
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);
}
============================================================
--- libpurple/protocols/yahoo/libymsg.c e5f1110f206bdc9a8155166851cf64bf970fcbb9
+++ libpurple/protocols/yahoo/libymsg.c 68a2686db64d77e9bc7102b5e495ece72cc455e5
@@ -1123,10 +1123,6 @@ static void yahoo_process_message(Purple
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);
============================================================
--- libpurple/prpl.c 337803529d283c92ca80f59d96526bfaee98b15e
+++ libpurple/prpl.c 3b9a5acbd663a2f7e6dd8effef94f926f1359400
@@ -503,7 +503,15 @@ purple_prpl_got_attention(PurpleConnecti
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
More information about the Commits
mailing list