cpw.attention_ui: 4f5eec79: Use purple_prpl_got_attention
malu at pidgin.im
malu at pidgin.im
Thu Jan 1 16:46:26 EST 2009
-----------------------------------------------------------------
Revision: 4f5eec798a17d8dc80d236b4639d0eebd186e96c
Ancestor: 083396b4e644a9a36b1ca810cc3aa5b4053a8e18
Author: malu at pidgin.im
Date: 2009-01-01T21:01:42
Branch: im.pidgin.cpw.attention_ui
URL: http://d.pidgin.im/viewmtn/revision/info/4f5eec798a17d8dc80d236b4639d0eebd186e96c
Modified files:
libpurple/protocols/jabber/message.c
ChangeLog:
Use purple_prpl_got_attention
-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/message.c 765eb4440c58f40f3d71eb2a95d7c3aef610c63d
+++ libpurple/protocols/jabber/message.c b8b5ef190e22524fcda6c3fd2c5848d5c81338bf
@@ -302,16 +302,16 @@ static void handle_buzz(JabberMessage *j
account = purple_connection_get_account(jm->js->gc);
- if ((buddy = purple_find_buddy(account, jm->from)) != NULL)
- username = g_markup_escape_text(purple_buddy_get_alias(buddy), -1);
- else
+ if ((buddy = purple_find_buddy(account, jm->from)) == NULL)
return; /* Do not accept buzzes from unknown people */
- c = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, jm->from);
+ c = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, jm->from, account);
+ if (c == NULL)
+ c = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, jm->from);
- str = g_strdup_printf(_("%s has buzzed you!"), username);
-
- purple_conversation_write(c, NULL, str, PURPLE_MESSAGE_SYSTEM|PURPLE_MESSAGE_NOTIFY, time(NULL));
+ username = g_markup_escape_text(purple_buddy_get_alias(buddy), -1);
+ /* xmpp only has 1 attention type, so index is 0 */
+ purple_prpl_got_attention(jm->js->gc, username, 0);
purple_conversation_attention(c, username, 0, PURPLE_MESSAGE_RECV, time(NULL));
g_free(username);
g_free(str);
More information about the Commits
mailing list