# HG changeset patch # User Mark Doliner # Date 1092098493 0 # Node ID 676cf082d29c58aa79d9746fdc77891c3bf9014c # Parent 4c5b53bf0aaae3777fae1d73d09802e93f1c1624 [gaim-migrate @ 10595] From Kevin Stange: This patch adds the conversation-updated signal which gets fired whenever something happens to update the data associated with a conversation, like a topic change or adding the person/chat to your buddy list. The signal passes back the enum value for the update type in addition to the conversation, which seems like the right thing to do. committer: Tailor Script diff -r 4c5b53bf0aaa -r 676cf082d29c plugins/ChangeLog.API --- a/plugins/ChangeLog.API Tue Aug 10 00:29:14 2004 +0000 +++ b/plugins/ChangeLog.API Tue Aug 10 00:41:33 2004 +0000 @@ -18,6 +18,10 @@ * Renamed show_confirm_del_blist_chat to gaim_gtkdialogs_remove_chat * Renamed show_confirm_del_contact to gaim_gtkdialogs_remove_contact + Signals: + * Added: conversation-updated for any update to the data associated + with the conversation (topic, icon, adding to buddy list, etc.) + version 0.81 (08/05/2004): Commands API: * Most functions now have a void *data argument. @@ -28,17 +32,19 @@ * Renamed gaim_get_buddy_alias_only to gaim_buddy_get_alias_only Conversation API: - * Changed: gaim_conv_chat_add_user() (added flags parameter) - gaim_conv_chat_add_users() now (added GList of flags parameter) - gaim_conv_chat_get_users() now returns a GList of GaimChatBuddy's - gaim_conv_chat_set_users() now expects a GList of GaimChatBuddy's + * Changed gaim_conv_chat_add_user(), added flags parameter + * Changed gaim_conv_chat_add_users(), added GList of flags parameter + * Changed gaim_conv_chat_get_users(), now returns a GList of + GaimChatBuddy's + * Changed gaim_conv_chat_set_users() now expects a GList of + GaimChatBuddy's * Added: gaim_conv_chat_set_user_flags() - gaim_conv_chat_get_user_flags() - gaim_conv_chat_find_user() - gaim_conv_chat_cb_new() - gaim_conv_chat_cb_find() - gaim_conv_chat_cb_destroy() - gaim_conv_chat_cb_get_name() + * Added: gaim_conv_chat_get_user_flags() + * Added: gaim_conv_chat_find_user() + * Added: gaim_conv_chat_cb_new() + * Added: gaim_conv_chat_cb_find() + * Added: gaim_conv_chat_cb_destroy() + * Added: gaim_conv_chat_cb_get_name() Conversation UI ops: * Added: chat_update_user() @@ -46,10 +52,10 @@ Signals: * Changed: chat-buddy-joining & chat-buddy-joined now include the user's flags * Changed: chat-buddy-joining & chat-buddy-leaving are now booleans, return - TRUE if you don't want the join/leave to be displayed in the UI. + TRUE if you don't want the join/leave to be displayed in the UI. * Added: chat-buddy-flags for when user's flags change - gaim_marshal_VOID__POINTER_POINTER_POINTER_UINT_UINT (required for the new - chat-buddy-flags signal) + gaim_marshal_VOID__POINTER_POINTER_POINTER_UINT_UINT (required for the new + chat-buddy-flags signal) * Added: account-modified for when account settings have been changed. version 0.80 (07/15/2004): diff -r 4c5b53bf0aaa -r 676cf082d29c src/conversation.c --- a/src/conversation.c Tue Aug 10 00:29:14 2004 +0000 +++ b/src/conversation.c Tue Aug 10 00:41:33 2004 +0000 @@ -1503,6 +1503,9 @@ if (ops != NULL && ops->updated != NULL) ops->updated(conv, type); + + gaim_signal_emit(gaim_conversations_get_handle(), + "conversation-updated", conv, type); } /************************************************************************** @@ -2896,6 +2899,12 @@ gaim_value_new(GAIM_TYPE_SUBTYPE, GAIM_SUBTYPE_CONVERSATION)); + gaim_signal_register(handle, "conversation-updated", + gaim_marshal_VOID__POINTER_UINT, NULL, 1, + gaim_value_new(GAIM_TYPE_SUBTYPE, + GAIM_SUBTYPE_CONVERSATION), + gaim_value_new(GAIM_TYPE_UINT)); + gaim_signal_register(handle, "deleting-conversation", gaim_marshal_VOID__POINTER, NULL, 1, gaim_value_new(GAIM_TYPE_SUBTYPE, diff -r 4c5b53bf0aaa -r 676cf082d29c src/signals.c --- a/src/signals.c Tue Aug 10 00:29:14 2004 +0000 +++ b/src/signals.c Tue Aug 10 00:41:33 2004 +0000 @@ -589,6 +589,16 @@ } void +gaim_marshal_VOID__POINTER_UINT(GaimCallback cb, va_list args, + void *data, void **return_val) +{ + void *arg1 = va_arg(args, void *); + guint arg2 = va_arg(args, guint); + + ((void (*)(void *, guint, void *))cb)(arg1, arg2, data); +} + +void gaim_marshal_VOID__POINTER_POINTER(GaimCallback cb, va_list args, void *data, void **return_val) { diff -r 4c5b53bf0aaa -r 676cf082d29c src/signals.h --- a/src/signals.h Tue Aug 10 00:29:14 2004 +0000 +++ b/src/signals.h Tue Aug 10 00:41:33 2004 +0000 @@ -221,6 +221,8 @@ GaimCallback cb, va_list args, void *data, void **return_val); void gaim_marshal_VOID__POINTER( GaimCallback cb, va_list args, void *data, void **return_val); +void gaim_marshal_VOID__POINTER_UINT( + GaimCallback cb, va_list args, void *data, void **return_val); void gaim_marshal_VOID__POINTER_POINTER( GaimCallback cb, va_list args, void *data, void **return_val); void gaim_marshal_VOID__POINTER_POINTER_UINT(