Mercurial > pidgin
changeset 19440:3ad938b84843
Add receiving-im-attention and received-im-attention signals, similar to
as suggested on http://pidgin.im/pipermail/devel/2007-August/002649.html.
author | Jeffrey Connelly <jaconnel@calpoly.edu> |
---|---|
date | Sun, 26 Aug 2007 21:28:58 +0000 |
parents | 0202145e3465 |
children | bbb205c49228 2bccaf556994 |
files | libpurple/conversation.c libpurple/server.c |
diffstat | 2 files changed, 34 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/conversation.c Sun Aug 26 18:51:06 2007 +0000 +++ b/libpurple/conversation.c Sun Aug 26 21:28:58 2007 +0000 @@ -2123,6 +2123,33 @@ PURPLE_SUBTYPE_CONVERSATION), purple_value_new(PURPLE_TYPE_UINT)); + purple_signal_register(handle, "receiving-im-attention", + purple_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER_POINTER, + purple_value_new(PURPLE_TYPE_BOOLEAN), 7, + purple_value_new(PURPLE_TYPE_SUBTYPE, + PURPLE_SUBTYPE_ACCOUNT), + purple_value_new_outgoing(PURPLE_TYPE_STRING), + purple_value_new(PURPLE_TYPE_STRING), + purple_value_new(PURPLE_TYPE_STRING), + purple_value_new(PURPLE_TYPE_STRING), + purple_value_new(PURPLE_TYPE_STRING), + purple_value_new(PURPLE_TYPE_SUBTYPE, + PURPLE_SUBTYPE_CONVERSATION)); + + purple_signal_register(handle, "received-im-attention", + purple_marshal_VOID__POINTER_POINTER_POINTER_POINTER_UINT, + NULL, 7, + purple_value_new(PURPLE_TYPE_SUBTYPE, + PURPLE_SUBTYPE_ACCOUNT), + purple_value_new(PURPLE_TYPE_STRING), + purple_value_new(PURPLE_TYPE_STRING), + purple_value_new(PURPLE_TYPE_STRING), + purple_value_new(PURPLE_TYPE_STRING), + purple_value_new(PURPLE_TYPE_STRING), + purple_value_new(PURPLE_TYPE_SUBTYPE, + PURPLE_SUBTYPE_CONVERSATION)); + + purple_signal_register(handle, "writing-chat-msg", purple_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER_UINT, purple_value_new(PURPLE_TYPE_BOOLEAN), 5,
--- a/libpurple/server.c Sun Aug 26 18:51:06 2007 +0000 +++ b/libpurple/server.c Sun Aug 26 21:28:58 2007 +0000 @@ -266,16 +266,19 @@ plugin_return = GPOINTER_TO_INT( purple_signal_emit_return_1(purple_conversations_get_handle(), - "receiving-im-msg", gc->account, - &who_copy, &attn, conv)); + "receiving-im-attention", gc->account, + &who_copy, attn->icon_name, attn->name, + attn->incoming_description, + attn->outgoing_description, conv)); if (!attn || !who_copy || plugin_return) { g_free(who_copy); return; } - purple_signal_emit(purple_conversations_get_handle(), "received-im-msg", gc->account, - who, attn, conv); + purple_signal_emit(purple_conversations_get_handle(), "received-im-attention", gc->account, + who, attn->icon_name, attn->name, + attn->incoming_description, attn->outgoing_description, conv); } /* The attention message was allowed. Create a string representing the message. */