Index: doc/conversation-signals.dox =================================================================== RCS file: /cvsroot/gaim/gaim/doc/conversation-signals.dox,v retrieving revision 1.18 diff -u -p -r1.18 conversation-signals.dox --- doc/conversation-signals.dox 24 Jul 2004 15:26:08 -0000 1.18 +++ doc/conversation-signals.dox 16 Oct 2004 03:39:51 -0000 @@ -142,14 +142,15 @@ gboolean (*receiving_im_msg)(GaimAccount @signaldef received-im-msg @signalproto -void (*received_im_msg)(GaimAccount *account, char *sender, - char *message, int flags); +void (*received_im_msg)(GaimAccount *account, char *sender, char *message, + GaimConversation *conv, int flags); @endsignalproto @signaldesc Emitted after an IM is received. @param account The account the message was received on. @param sender The username of the sender. @param message The message that was sent. + @param conv The chat conversation. @param flags The message flags. @endsignaldef @@ -259,8 +260,8 @@ gboolean (*receiving_chat_msg)(GaimAccou @signaldef received-chat-msg @signalproto -void (*received_chat_msg)(GaimAccount *account, char *sender, - char *message, GaimConversation *conv); +void (*received_chat_msg)(GaimAccount *account, char *sender, char *message, + GaimConversation *conv, int flags); @endsignalproto @signaldesc Emitted after a chat message is received. @@ -268,6 +269,7 @@ void (*received_chat_msg)(GaimAccount *a @param sender The username of the sender. @param message The message that was sent. @param conv The chat conversation. + @param flags The message flags. @endsignaldef @signaldef conversation-switching Index: plugins/ChangeLog.API =================================================================== RCS file: /cvsroot/gaim/gaim/plugins/ChangeLog.API,v retrieving revision 1.38 diff -u -p -r1.38 ChangeLog.API --- plugins/ChangeLog.API 15 Oct 2004 03:14:44 -0000 1.38 +++ plugins/ChangeLog.API 16 Oct 2004 03:39:51 -0000 @@ -8,6 +8,8 @@ version 2.0.0cvs: /gaim/gtk/sound/mute preference) * Changed: gtk_imhtml_toolbar now descends from GtkHBox making it easier to add your own widgets to it + * Changed: "received-im-msg" and "received-chat-msg" to match, both + now pass a conversation pointer and flags version 1.0.0 (09/17/2004): * Added: get_chat_name to the GaimPluginProtocolInfo struct Index: plugins/notify.c =================================================================== RCS file: /cvsroot/gaim/gaim/plugins/notify.c,v retrieving revision 1.55 diff -u -p -r1.55 notify.c --- plugins/notify.c 3 Sep 2004 21:21:20 -0000 1.55 +++ plugins/notify.c 16 Oct 2004 03:39:52 -0000 @@ -213,10 +213,8 @@ unnotify_cb(GtkWidget *widget, gpointer static gboolean im_recv_im(GaimAccount *account, char *sender, char *message, - int *flags) + GaimConversation *conv, int *flags) { - GaimConversation *conv = gaim_find_conversation_with_account(sender, account); - notify(conv, TRUE); return FALSE; @@ -224,7 +222,7 @@ im_recv_im(GaimAccount *account, char *s static gboolean chat_recv_im(GaimAccount *account, char *sender, char *message, - GaimConversation *conv) + GaimConversation *conv, int *flags) { notify(conv, TRUE); Index: plugins/signals-test.c =================================================================== RCS file: /cvsroot/gaim/gaim/plugins/signals-test.c,v retrieving revision 1.17 diff -u -p -r1.17 signals-test.c --- plugins/signals-test.c 5 Sep 2004 17:10:37 -0000 1.17 +++ plugins/signals-test.c 16 Oct 2004 03:39:52 -0000 @@ -227,11 +227,11 @@ receiving_im_msg_cb(GaimAccount *account static void received_im_msg_cb(GaimAccount *account, char *sender, char *buffer, - int flags, void *data) + GaimConversation *conv, int flags, void *data) { - gaim_debug_misc("signals test", "received-im-msg (%s, %s, %s, %d)\n", + gaim_debug_misc("signals test", "received-im-msg (%s, %s, %s, %s, %d)\n", gaim_account_get_username(account), sender, buffer, - flags); + gaim_conversation_get_name(chat), flags); } static gboolean @@ -298,12 +298,12 @@ receiving_chat_msg_cb(GaimAccount *accou static void received_chat_msg_cb(GaimAccount *account, char *sender, char *buffer, - GaimConversation *chat, void *data) + GaimConversation *chat, int flags, void *data) { gaim_debug_misc("signals test", - "received-chat-msg (%s, %s, %s, %s)\n", + "received-chat-msg (%s, %s, %s, %s, %d)\n", gaim_account_get_username(account), sender, buffer, - gaim_conversation_get_name(chat)); + gaim_conversation_get_name(chat), flags); } static void Index: plugins/docklet/docklet.c =================================================================== RCS file: /cvsroot/gaim/gaim/plugins/docklet/docklet.c,v retrieving revision 1.77 diff -u -p -r1.77 docklet.c --- plugins/docklet/docklet.c 2 Oct 2004 18:53:19 -0000 1.77 +++ plugins/docklet/docklet.c 16 Oct 2004 03:39:52 -0000 @@ -426,8 +426,8 @@ gaim_away(GaimAccount *account, char *st } static gboolean -gaim_conv_im_recv(GaimAccount *account, char *sender, - char *message, int flags, void *data) +gaim_conv_im_recv(GaimAccount *account, char *sender, char *message, + GaimConversation *conv, int flags, void *data) { /* if message queuing while away is enabled, this event could be the first message so we need to see if the status (and hence icon) needs changing. Index: plugins/tcl/signal-test.tcl =================================================================== RCS file: /cvsroot/gaim/gaim/plugins/tcl/signal-test.tcl,v retrieving revision 1.4 diff -u -p -r1.4 signal-test.tcl --- plugins/tcl/signal-test.tcl 21 May 2004 14:33:32 -0000 1.4 +++ plugins/tcl/signal-test.tcl 16 Oct 2004 03:39:52 -0000 @@ -56,12 +56,12 @@ gaim::signal connect [gaim::conversation return 0 } -gaim::signal connect [gaim::conversation handle] received-chat-msg { account who what id } { - gaim::debug -info "tcl signal" "received-chat-msg [gaim::account username $account] $id $who \"$what\"" +gaim::signal connect [gaim::conversation handle] received-chat-msg { account who what id flags } { + gaim::debug -info "tcl signal" "received-chat-msg [gaim::account username $account] $id $flags $who \"$what\"" } -gaim::signal connect [gaim::conversation handle] received-im-msg { account who what flags } { - gaim::debug -info "tcl signal" "received-im-msg [gaim::account username $account] $flags $who \"$what\"" +gaim::signal connect [gaim::conversation handle] received-im-msg { account who what id flags } { + gaim::debug -info "tcl signal" "received-im-msg [gaim::account username $account] $id $flags $who \"$what\"" } gaim::signal connect [gaim::conversation handle] sending-chat-msg { account what id } { Index: src/conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.631 diff -u -p -r1.631 conversation.c --- src/conversation.c 12 Oct 2004 00:49:17 -0000 1.631 +++ src/conversation.c 16 Oct 2004 03:39:52 -0000 @@ -2802,12 +2802,14 @@ gaim_conversations_init(void) gaim_value_new_outgoing(GAIM_TYPE_UINT)); gaim_signal_register(handle, "received-im-msg", - gaim_marshal_VOID__POINTER_POINTER_POINTER_UINT, - NULL, 4, + gaim_marshal_VOID__POINTER_POINTER_POINTER_POINTER_UINT, + NULL, 5, gaim_value_new(GAIM_TYPE_SUBTYPE, GAIM_SUBTYPE_ACCOUNT), gaim_value_new(GAIM_TYPE_STRING), gaim_value_new(GAIM_TYPE_STRING), + gaim_value_new(GAIM_TYPE_SUBTYPE, + GAIM_SUBTYPE_CONVERSATION), gaim_value_new(GAIM_TYPE_UINT)); gaim_signal_register(handle, "writing-chat-msg", @@ -2871,14 +2873,15 @@ gaim_conversations_init(void) GAIM_SUBTYPE_CONVERSATION)); gaim_signal_register(handle, "received-chat-msg", - gaim_marshal_VOID__POINTER_POINTER_POINTER_POINTER, - NULL, 4, + gaim_marshal_VOID__POINTER_POINTER_POINTER_POINTER_UINT, + NULL, 5, gaim_value_new(GAIM_TYPE_SUBTYPE, GAIM_SUBTYPE_ACCOUNT), gaim_value_new(GAIM_TYPE_STRING), gaim_value_new(GAIM_TYPE_STRING), gaim_value_new(GAIM_TYPE_SUBTYPE, - GAIM_SUBTYPE_CONVERSATION)); + GAIM_SUBTYPE_CONVERSATION), + gaim_value_new(GAIM_TYPE_UINT)); gaim_signal_register(handle, "conversation-switching", gaim_marshal_VOID__POINTER_POINTER, NULL, 2, Index: src/server.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/server.c,v retrieving revision 1.447 diff -u -p -r1.447 server.c --- src/server.c 19 Sep 2004 21:19:55 -0000 1.447 +++ src/server.c 16 Oct 2004 03:39:52 -0000 @@ -821,7 +821,7 @@ void serv_got_im(GaimConnection *gc, con message = buffy; gaim_signal_emit(gaim_conversations_get_handle(), "received-im-msg", gc->account, - name, message, imflags); + name, message, cnv, imflags); /* Make sure URLs are clickable */ buffy = gaim_markup_linkify(message); @@ -1290,7 +1290,7 @@ void serv_got_chat_in(GaimConnection *g, message = buffy; gaim_signal_emit(gaim_conversations_get_handle(), "received-chat-msg", g->account, - who, message, conv); + who, message, conv, chatflags); /* Make sure URLs are clickable */ buf = gaim_markup_linkify(message); Index: src/signals.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/signals.c,v retrieving revision 1.20 diff -u -p -r1.20 signals.c --- src/signals.c 10 Aug 2004 00:41:33 -0000 1.20 +++ src/signals.c 16 Oct 2004 03:39:52 -0000 @@ -686,6 +686,21 @@ gaim_marshal_VOID__POINTER_POINTER_POINT } void +gaim_marshal_VOID__POINTER_POINTER_POINTER_POINTER_UINT(GaimCallback cb, + va_list args, + void *data, + void **return_val) +{ + void *arg1 = va_arg(args, void *); + void *arg2 = va_arg(args, void *); + void *arg3 = va_arg(args, void *); + void *arg4 = va_arg(args, void *); + guint arg5 = va_arg(args, guint); + + ((void (*)(void *, void *, void *, void *, guint, void *))cb)(arg1, arg2, arg3, arg4, arg5, data); +} + +void gaim_marshal_VOID__POINTER_POINTER_POINTER_UINT_UINT(GaimCallback cb, va_list args, void *data, Index: src/signals.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/signals.h,v retrieving revision 1.13 diff -u -p -r1.13 signals.h --- src/signals.h 10 Aug 2004 00:41:33 -0000 1.13 +++ src/signals.h 16 Oct 2004 03:39:52 -0000 @@ -237,6 +237,8 @@ void gaim_marshal_VOID__POINTER_POINTER_ GaimCallback cb, va_list args, void *data, void **return_val); void gaim_marshal_VOID__POINTER_POINTER_POINTER_UINT( GaimCallback cb, va_list args, void *data, void **return_val); +void gaim_marshal_VOID__POINTER_POINTER_POINTER_POINTER_UINT( + GaimCallback cb, va_list args, void *data, void **return_val); void gaim_marshal_VOID__POINTER_POINTER_POINTER_UINT_UINT( GaimCallback cb, va_list args, void *data, void **return_val);