Mercurial > pidgin.yaz
changeset 17220:da2bab3b9fab
New api function purple_conversation_get_extended_menu.
New signal "conversation-extended-menu".
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Tue, 22 May 2007 03:28:12 +0000 |
parents | 0598803f9b64 |
children | c9a046a7f326 |
files | ChangeLog.API doc/conversation-signals.dox libpurple/conversation.c libpurple/conversation.h |
diffstat | 4 files changed, 48 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog.API Mon May 21 14:42:45 2007 +0000 +++ b/ChangeLog.API Tue May 22 03:28:12 2007 +0000 @@ -1,5 +1,12 @@ Pidgin and Finch: The Pimpin' Penguin IM Clients That're Good for the Soul +version 2.1.0 (?/?/?): + Added: + * purple_conversation_get_extended_menu + + Signals - Added: (See the Doxygen docs for details on all signals.) + * "conversation-extended-menu" + version 2.0.0 (5/3/2007): Please note all functions, defines, and data structures have been re-namespaced to match the new names of Pidgin, Finch, and libpurple.
--- a/doc/conversation-signals.dox Mon May 21 14:42:45 2007 +0000 +++ b/doc/conversation-signals.dox Tue May 22 03:28:12 2007 +0000 @@ -29,6 +29,7 @@ @signal chat-joined @signal chat-left @signal chat-topic-changed + @signal conversation-extended-menu @endsignals @signaldef writing-im-msg @@ -417,5 +418,15 @@ @param topic The new topic. @endsignaldef + @signaldef conversation-extended-menu + @signalproto +void (*conversation_extended_menu)(PurpleConversation *conv, GList **list); + @endsignalproto + @signaldesc + Emitted when the UI requests a list of plugin actions for a + conversation. + @param conv The conversation. + @param list A pointer to the list of actions. + @endsignaldef */ // vim: syntax=c tw=75 et
--- a/libpurple/conversation.c Mon May 21 14:42:45 2007 +0000 +++ b/libpurple/conversation.c Tue May 22 03:28:12 2007 +0000 @@ -1989,6 +1989,19 @@ return cb->name; } +GList * +purple_conversation_get_extended_menu(PurpleConversation *conv) +{ + GList *menu = NULL; + + g_return_val_if_fail(conv != NULL, NULL); + + purple_signal_emit(purple_conversations_get_handle(), + "conversation-extended-menu", conv, &menu); + return menu; +} + + void * purple_conversations_get_handle(void) { @@ -2252,6 +2265,12 @@ PURPLE_SUBTYPE_CONVERSATION), purple_value_new(PURPLE_TYPE_STRING), purple_value_new(PURPLE_TYPE_STRING)); + + purple_signal_register(handle, "conversation-extended-menu", + purple_marshal_VOID__POINTER_POINTER, NULL, 2, + purple_value_new(PURPLE_TYPE_SUBTYPE, + PURPLE_SUBTYPE_CONVERSATION), + purple_value_new(PURPLE_TYPE_BOXED, "GList **")); } void
--- a/libpurple/conversation.h Mon May 21 14:42:45 2007 +0000 +++ b/libpurple/conversation.h Tue May 22 03:28:12 2007 +0000 @@ -1190,6 +1190,17 @@ */ void purple_conv_chat_cb_destroy(PurpleConvChatBuddy *cb); +/** + * Retrieves the extended menu items for the conversation. + * + * @param conv The conversation. + * + * @return A list of PurpleMenuAction items, harvested by the + * chat-extended-menu signal. The list and the menuaction + * items should be freed by the caller. + */ +GList * purple_conversation_get_extended_menu(PurpleConversation *conv); + /*@}*/ /**************************************************************************/