Mercurial > pidgin
changeset 15951:9214184b9d10
merge of '58f408c6a0eb5c8b0411d8ac4754a14bef441062'
and 'fba53203d9fe0ebd98157bdc6c7faeb2b149908b'
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Tue, 27 Mar 2007 03:51:42 +0000 |
parents | 92fa7d6e75b0 (current diff) 5c88d2887cc1 (diff) |
children | 0ef26ac647ac 65b5b2b9b5bc |
files | |
diffstat | 4 files changed, 24 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/COPYRIGHT Tue Mar 27 03:50:04 2007 +0000 +++ b/COPYRIGHT Tue Mar 27 03:51:42 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 03:50:04 2007 +0000 +++ b/libpurple/conversation.h Tue Mar 27 03:51:42 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 03:50:04 2007 +0000 +++ b/libpurple/protocols/msn/switchboard.c Tue Mar 27 03:51:42 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 03:50:04 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo.c Tue Mar 27 03:51:42 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; }