Mercurial > pidgin.yaz
changeset 15948:5c88d2887cc1
merge of '343dc2d52b5a1cb204359ecc11a1b4d98b984dd0'
and 'f894448f712134780a75dba19622a78626a98231'
author | Evan Schoenberg <evan.s@dreskin.net> |
---|---|
date | Tue, 27 Mar 2007 03:08:31 +0000 |
parents | a0f24a614a9d (diff) 1071320641b9 (current diff) |
children | b4ab4812838a 9214184b9d10 |
files | COPYRIGHT |
diffstat | 4 files changed, 24 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/COPYRIGHT Tue Mar 27 01:38:37 2007 +0000 +++ b/COPYRIGHT Tue Mar 27 03:08:31 2007 +0000 @@ -357,6 +357,7 @@ Andrew Wellington Adam Wendt Dave West +Zac West Daniel Westermann-Clark Andrew Whewell Simon Wilkinson
--- a/libpurple/conversation.h Tue Mar 27 01:38:37 2007 +0000 +++ b/libpurple/conversation.h Tue Mar 27 03:08:31 2007 +0000 @@ -115,7 +115,8 @@ PURPLE_MESSAGE_DELAYED = 0x0400, /**< Delayed message. */ PURPLE_MESSAGE_RAW = 0x0800, /**< "Raw" message - don't apply formatting */ - PURPLE_MESSAGE_IMAGES = 0x1000 /**< Message contains images */ + PURPLE_MESSAGE_IMAGES = 0x1000, /**< Message contains images */ + PURPLE_MESSAGE_NOTIFY = 0x2000 /**< Message is a notification */ } PurpleMessageFlags;
--- a/libpurple/protocols/msn/switchboard.c Tue Mar 27 01:38:37 2007 +0000 +++ b/libpurple/protocols/msn/switchboard.c Tue Mar 27 03:08:31 2007 +0000 @@ -955,7 +955,7 @@ str = g_strdup_printf(_("%s just sent you a Nudge!"), username); g_free(username); - msn_switchboard_report_user(swboard, PURPLE_MESSAGE_SYSTEM, str); + msn_switchboard_report_user(swboard, PURPLE_MESSAGE_SYSTEM|PURPLE_MESSAGE_NOTIFY, str); g_free(str); }
--- a/libpurple/protocols/yahoo/yahoo.c Tue Mar 27 01:38:37 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo.c Tue Mar 27 03:08:31 2007 +0000 @@ -859,10 +859,25 @@ purple_util_chrreplace(m, '\r', '\n'); if (!strcmp(m, "<ding>")) { - PurpleConversation *c = purple_conversation_new(PURPLE_CONV_TYPE_IM, - purple_connection_get_account(gc), im->from); - purple_conv_im_write(PURPLE_CONV_IM(c), "", _("Buzz!!"), PURPLE_MESSAGE_NICK|PURPLE_MESSAGE_RECV, - im->time); + PurpleBuddy *buddy; + PurpleAccount *account; + PurpleConversation *c; + char *username, *str; + + account = purple_connection_get_account(gc); + c = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, im->from); + + if ((buddy = purple_find_buddy(account, im->from)) != NULL) + username = g_markup_escape_text(purple_buddy_get_alias(buddy), -1); + else + username = g_markup_escape_text(im->from, -1); + + str = g_strdup_printf(_("%s just sent you a Buzz!"), username); + + purple_conversation_write(c, NULL, str, PURPLE_MESSAGE_SYSTEM|PURPLE_MESSAGE_NOTIFY, im->time); + + g_free(username); + g_free(str); g_free(m); g_free(im); continue; @@ -3737,7 +3752,7 @@ purple_debug(PURPLE_DEBUG_INFO, "yahoo", "Sending <ding> on account %s to buddy %s.\n", username, c->name); purple_conv_im_send(PURPLE_CONV_IM(c), "<ding>"); - purple_conv_im_write(PURPLE_CONV_IM(c), "", _("Buzz!!"), PURPLE_MESSAGE_NICK|PURPLE_MESSAGE_SEND, time(NULL)); + purple_conversation_write(c, NULL, _("You have just sent a Buzz!"), PURPLE_MESSAGE_SYSTEM, time(NULL)); return PURPLE_CMD_RET_OK; }