Mercurial > pidgin
comparison libpurple/plugins/statenotify.c @ 32819:2c6510167895 default tip
propagate from branch 'im.pidgin.pidgin.2.x.y' (head 3315c5dfbd0ad16511bdcf865e5b07c02d07df24)
to branch 'im.pidgin.pidgin' (head cbd1eda6bcbf0565ae7766396bb8f6f419cb6a9a)
| author | Elliott Sales de Andrade <qulogic@pidgin.im> |
|---|---|
| date | Sat, 02 Jun 2012 02:30:49 +0000 |
| parents | 78fae2fc38d5 |
| children |
comparison
equal
deleted
inserted
replaced
| 32818:01ff09d4a463 | 32819:2c6510167895 |
|---|---|
| 28 conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, | 28 conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, |
| 29 buddy_name, account); | 29 buddy_name, account); |
| 30 | 30 |
| 31 if (conv == NULL) | 31 if (conv == NULL) |
| 32 return; | 32 return; |
| 33 g_return_if_fail(conv->type == PURPLE_CONV_TYPE_IM); | 33 g_return_if_fail(purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM); |
| 34 | 34 |
| 35 /* Prevent duplicate notifications for buddies in multiple groups */ | 35 /* Prevent duplicate notifications for buddies in multiple groups */ |
| 36 if (buddy != purple_find_buddy(account, buddy_name)) | 36 if (buddy != purple_find_buddy(account, buddy_name)) |
| 37 return; | 37 return; |
| 38 | 38 |
| 40 escaped = g_markup_escape_text(who, -1); | 40 escaped = g_markup_escape_text(who, -1); |
| 41 | 41 |
| 42 g_snprintf(buf, sizeof(buf), message, escaped); | 42 g_snprintf(buf, sizeof(buf), message, escaped); |
| 43 g_free(escaped); | 43 g_free(escaped); |
| 44 | 44 |
| 45 purple_conv_im_write(conv->u.im, NULL, buf, PURPLE_MESSAGE_SYSTEM | PURPLE_MESSAGE_ACTIVE_ONLY | PURPLE_MESSAGE_NO_LINKIFY, time(NULL)); | 45 purple_conv_im_write(PURPLE_CONV_IM(conv), NULL, buf, PURPLE_MESSAGE_SYSTEM | PURPLE_MESSAGE_ACTIVE_ONLY | PURPLE_MESSAGE_NO_LINKIFY, time(NULL)); |
| 46 } | 46 } |
| 47 | 47 |
| 48 static void | 48 static void |
| 49 buddy_status_changed_cb(PurpleBuddy *buddy, PurpleStatus *old_status, | 49 buddy_status_changed_cb(PurpleBuddy *buddy, PurpleStatus *old_status, |
| 50 PurpleStatus *status, void *data) | 50 PurpleStatus *status, void *data) |
