# HG changeset patch # User Richard Laager # Date 1139685398 0 # Node ID f09c6e8df82c34e235554de9d48b0ecc6749a2af # Parent c9f536f771d0f109a53ca104f17fae664d3d9e1a [gaim-migrate @ 15598] SF Patch #1417225 from Sadrul This reworks the conversation signals. committer: Tailor Script diff -r c9f536f771d0 -r f09c6e8df82c doc/conversation-signals.dox --- a/doc/conversation-signals.dox Sat Feb 11 19:07:49 2006 +0000 +++ b/doc/conversation-signals.dox Sat Feb 11 19:16:38 2006 +0000 @@ -33,32 +33,37 @@ @signaldef writing-im-msg @signalproto -gboolean (*writing_im_msg)(GaimAccount *account, GaimConversation *conv, char **message); +gboolean (*writing_im_msg)(GaimAccount *account, const char *who, + char **message, GaimConversation *conv, + GaimMessageFlags flags); @endsignalproto @signaldesc - Emitted before a message is displayed in an IM conversation or sent to a remote user. - @a message is a pointer to a string, so the plugin can replace the - message that will be displayed along with the message that will be sent. - This can also be used to cancel an outgoing message by returning @c TRUE. + Emitted before a message is written in an IM conversation. If the + message is changed, then the changed message is displayed and logged + instead of the original message. @note Make sure to free @a *message before you replace it! - @param account The account the message is being displayed and sent on. - @param conv The conversation the message is being displayed and sent on. - @param message A pointer to the message that will be displayed and sent. + @param account The account. + @param who The name of the user. + @param message A pointer to the message. + @param conv The conversation. + @param flags Flags for this message. @return @c TRUE if the message should be canceled, or @c FALSE otherwise. @endsignaldef @signaldef wrote-im-msg @signalproto -void (*wrote_im_msg)(GaimAccount *account, GaimConversation *conv, const char *message); +void (*wrote_im_msg)(GaimAccount *account, const char *who, + char *message, GaimConversation *conv, + GaimMessageFlags flags); @endsignalproto @signaldesc - Emitted after a message is entered by the user, but before it is sent and displyed. - When sending an IM, the order that the im-msg callbacks will be called is: - writing-im-msg, wrote-im-msg, sending-im-msg, and finally sent-im-msg. - @param account The account the message was displayed on. - @param conv The conversation the message was displayed on. - @param message The message that was displayed. + Emitted after a message is written and possibly displayed in a conversation. + @param account The account. + @param who The name of the user. + @param message The message. + @param conv The conversation. + @param flags Flags for this message. @endsignaldef @signaldef sending-im-msg @@ -91,7 +96,8 @@ @signaldef receiving-im-msg @signalproto gboolean (*receiving_im_msg)(GaimAccount *account, char **sender, - char **message, GaimConversation *conv, int *flags); + char **message, GaimConversation *conv, + GaimMessageFlags *flags); @endsignalproto @signaldesc Emitted when an IM is received. The callback can replace the name of the @@ -111,7 +117,7 @@ @signaldef received-im-msg @signalproto void (*received_im_msg)(GaimAccount *account, char *sender, char *message, - GaimConversation *conv, int flags); + GaimConversation *conv, GaimMessageFlags flags); @endsignalproto @signaldesc Emitted after an IM is received. @@ -124,34 +130,37 @@ @signaldef writing-chat-msg @signalproto -gboolean (*writing_chat_msg)(GaimAccount *account, GaimConversation *conv, char **message); +gboolean (*writing_chat_msg)(GaimAccount *account, const char *who, + char **message, GaimConversation *conv, + GaimMessageFlags flags); @endsignalproto @signaldesc - Emitted before a message is displayed in a chat conversation or sent to - a remote chat. @a message is a pointer to a string, so the plugin can - replace the message that will be displayed along with the message that - will be sent. This can also be used to cancel an outgoing message by - returning @c TRUE. + Emitted before a message is written in a chat conversation. If the + message is changed, then the changed message is displayed and logged + instead of the original message. @note Make sure to free @a *message before you replace it! - @param account The account the message is being displayed and sent on. - @param conv The conversation the message is being displayed and sent on. - @param message A pointer to the message that will be displayed and sent. + @param account The account. + @param who The name of the user. + @param message A pointer to the message. + @param conv The conversation. + @param flags Flags for this message. @return @c TRUE if the message should be canceled, or @c FALSE otherwise. @endsignaldef @signaldef wrote-chat-msg @signalproto -void (*wrote_chat_msg)(GaimAccount *account, GaimConversation *conv, const char *message); +void (*wrote_chat_msg)(GaimAccount *account, const char *who, + char *message, GaimConversation *conv, + GaimMessageFlags flags); @endsignalproto @signaldesc - Emitted after a message is entered by the user, but before it is sent and displyed. - When sending an IM, the order that the im-msg callbacks will be called is: - writing-chat-msg, wrote-chat-msg, sending-chat-msg, and finally - sent-chat-msg. - @param account The account the message was displayed on. - @param conv The conversation the message was displayed on. - @param message The message that was displayed. + Emitted after a message is written and possibly displayed in a chat. + @param account The account. + @param who The name of the user. + @param message The message. + @param conv The conversation. + @param flags Flags for this message. @endsignaldef @signaldef sending-chat-msg diff -r c9f536f771d0 -r f09c6e8df82c doc/gtkconv-signals.dox --- a/doc/gtkconv-signals.dox Sat Feb 11 19:07:49 2006 +0000 +++ b/doc/gtkconv-signals.dox Sat Feb 11 19:16:38 2006 +0000 @@ -37,8 +37,9 @@ @signaldef displaying-im-msg @signalproto -gboolean (*displaying_im_msg)(GaimAccount *account, GaimConversation *conv, - char **message, GaimMessageFlags flags); +gboolean (*displaying_im_msg)(GaimAccount *account, const char *who, + char **message, GaimConversation *conv, + GaimMessageFlags flags); @endsignalproto @signaldesc Emitted just before a message is displayed in an IM conversation. @@ -47,30 +48,34 @@ a message by returning @c TRUE. @note Make sure to free @a *message before you replace it! - @param account The account the message is being displayed on. - @param conv The conversation the message is being displayed on. - @param message A pointer to the message that will be displayed. - @param flags The message flags. + @param account The account. + @param who The name of the user. + @param message A pointer to the message. + @param conv The conversation. + @param flags Flags for this message. @return @c TRUE if the message should be canceled, or @c FALSE otherwise. @endsignaldef @signaldef displayed-im-msg @signalproto -void (*displayed_im_msg)(GaimAccount *account, GaimConversation *conv, - const char *message, GaimMessageFlags flags); +void (*displayed_im_msg)(GaimAccount *account, const char *who, + char *message, GaimConversation *conv, + GaimMessageFlags flags); @endsignalproto @signaldesc Emitted after a message is displayed in an IM conversation. - @param account The account the message was displayed on. - @param conv The conversation the message was displayed on. - @param message The message that was displayed. - @param flags The message flags. + @param account The account. + @param who The name of the user. + @param message The message. + @param conv The conversation. + @param flags Flags for this message. @endsignaldef @signaldef displaying-chat-msg @signalproto -gboolean (*displaying_chat_msg)(GaimAccount *account, GaimConversation *conv, - char **message, GaimMessageFlags flags); +gboolean (*displaying_chat_msg)(GaimAccount *account, const char *who, + char **message, GaimConversation *conv, + GaimMessageFlags flags); @endsignalproto @signaldesc Emitted just before a message is displayed in a chat. @@ -79,24 +84,27 @@ a message by returning @c TRUE. @note Make sure to free @a *message before you replace it! - @param account The account the message is being displayed on. - @param conv The conversation the message is being displayed on. - @param message A pointer to the message that will be displayed. - @param flags The message flags. + @param account The account the message is being displayed and sent on. + @param who The name of the user. + @param message A pointer to the message that will be displayed and sent. + @param conv The conversation the message is being displayed and sent on. + @param flags Flags for this message. @return @c TRUE if the message should be canceled, or @c FALSE otherwise. @endsignaldef @signaldef displayed-chat-msg @signalproto -void (*displayed_chat_msg)(GaimAccount *account, GaimConversation *conv, - const char *message, GaimMessageFlags flags); +void (*displayed_chat_msg)(GaimAccount *account, const char *who, + char *message, GaimConversation *conv, + GaimMessageFlags flags); @endsignalproto @signaldesc Emitted after a message is displayed in a chat conversation. - @param account The account the message was displayed on. - @param conv The conversation the message was displayed on. - @param message The message that was displayed. - @param flags The message flags. + @param account The account the message is being displayed and sent on. + @param who The name of the user. + @param message A pointer to the message that will be displayed and sent. + @param conv The conversation the message is being displayed and sent on. + @param flags Flags for this message. @endsignaldef @signaldef conversation-switched diff -r c9f536f771d0 -r f09c6e8df82c plugins/ChangeLog.API --- a/plugins/ChangeLog.API Sat Feb 11 19:07:49 2006 +0000 +++ b/plugins/ChangeLog.API Sat Feb 11 19:16:38 2006 +0000 @@ -292,6 +292,12 @@ conversation pointer and flags * "receiving-im-msg" and "receving-chat-msg" to match, both now pass a conversation pointer and a pointer to the flags. + * "writing-im-msg", "wrote-im-msg", "writing-chat-msg", "wrote-chat-msg": + Now emitted from a difference place in the message handling code. + The arguments also changed. + * "displaying-im-msg", "displayed-im-msg", "displaying-chat-msg", + "displayed-chat-msg": Added "who" argument, which changes the order + of the existing arguments. Signals - Added: (See the Doxygen docs for details on all signals.) * "account-disabled" diff -r c9f536f771d0 -r f09c6e8df82c plugins/codeinline.c --- a/plugins/codeinline.c Sat Feb 11 19:07:49 2006 +0000 +++ b/plugins/codeinline.c Sat Feb 11 19:16:38 2006 +0000 @@ -30,7 +30,8 @@ GaimPlugin *plugin_handle = NULL; -static gboolean outgoing_msg_cb(GaimAccount *account, GaimConversation *conv, char **message) +static gboolean outgoing_msg_cb(GaimAccount *account, const char *who, char **message, + GaimConversation *conv, GaimMessageFlags flags, gpointer null) { char *m; char **ms = g_strsplit(*message, "", -1); diff -r c9f536f771d0 -r f09c6e8df82c plugins/crazychat/cc_gaim_plugin.c --- a/plugins/crazychat/cc_gaim_plugin.c Sat Feb 11 19:07:49 2006 +0000 +++ b/plugins/crazychat/cc_gaim_plugin.c Sat Feb 11 19:16:38 2006 +0000 @@ -71,8 +71,8 @@ * @param message the message we are displaying * @param data user data */ -static gboolean display_im_cb(GaimAccount *account, GaimConversation *conv, - char **message, void *data); +static gboolean display_im_cb(GaimAccount *account, const char *who, char **message, + GaimConnection *conv, GaimMessageFlags flags, void *data); /** * Callback for CrazyChat plugin configuration frame diff -r c9f536f771d0 -r f09c6e8df82c plugins/gtk-signals-test.c --- a/plugins/gtk-signals-test.c Sat Feb 11 19:07:49 2006 +0000 +++ b/plugins/gtk-signals-test.c Sat Feb 11 19:16:38 2006 +0000 @@ -61,8 +61,8 @@ } static gboolean -displaying_im_msg_cb(GaimAccount *account, GaimConversation *conv, - char **buffer, int flags, void *data) +displaying_im_msg_cb(GaimAccount *account, const char *who, char **buffer, + GaimConversation *conv, GaimMessageFlags flags, void *data) { gaim_debug_misc("gtk-signals test", "displaying-im-msg (%s, %s)\n", gaim_conversation_get_name(conv), *buffer); @@ -71,15 +71,16 @@ } static void -displayed_im_msg_cb(GaimAccount *account, GaimConversation *conv, const char *buffer, int flags, void *data) +displayed_im_msg_cb(GaimAccount *account, const char *who, const char *buffer, + GaimConversation *conv, GaimMessageFlags flags, void *data) { gaim_debug_misc("gtk-signals test", "displayed-im-msg (%s, %s)\n", gaim_conversation_get_name(conv), buffer); } static gboolean -displaying_chat_msg_cb(GaimAccount *account, GaimConversation *conv, - char **buffer, int flags, void *data) +displaying_chat_msg_cb(GaimAccount *account, const char *who, char **buffer, + GaimConversation *conv, GaimMessageFlags flags, void *data) { gaim_debug_misc("gtk-signals test", "displaying-chat-msg (%s, %s)\n", gaim_conversation_get_name(conv), *buffer); @@ -88,7 +89,8 @@ } static void -displayed_chat_msg_cb(GaimAccount *account, GaimConversation *conv, const char *buffer, int flags, void *data) +displayed_chat_msg_cb(GaimAccount *account, const char *who, const char *buffer, + GaimConversation *conv, GaimMessageFlags flags, void *data) { gaim_debug_misc("gtk-signals test", "displayed-chat-msg (%s, %s)\n", gaim_conversation_get_name(conv), buffer); diff -r c9f536f771d0 -r f09c6e8df82c plugins/musicmessaging/musicmessaging.c --- a/plugins/musicmessaging/musicmessaging.c Sat Feb 11 19:07:49 2006 +0000 +++ b/plugins/musicmessaging/musicmessaging.c Sat Feb 11 19:16:38 2006 +0000 @@ -63,7 +63,7 @@ static void remove_widget (GtkWidget *button); static void init_conversation (GaimConversation *conv); static void conv_destroyed(GaimConversation *conv); -static gboolean intercept_sent(GaimAccount *account, GaimConversation *conv, char **message, void* pData); +static gboolean intercept_sent(GaimAccount *account, const char *who, char **message, void* pData); static gboolean intercept_received(GaimAccount *account, char **sender, char **message, GaimConversation *conv, int *flags); static gboolean send_change_request (const int session, const char *id, const char *command, const char *parameters); static gboolean send_change_confirmed (const int session, const char *command, const char *parameters); @@ -281,7 +281,7 @@ plugin, GAIM_CALLBACK(conv_destroyed), NULL); /* Listen for sending/receiving messages to replace tags */ - gaim_signal_connect(conv_list_handle, "writing-im-msg", + gaim_signal_connect(conv_list_handle, "sending-im-msg", plugin, GAIM_CALLBACK(intercept_sent), NULL); gaim_signal_connect(conv_list_handle, "receiving-im-msg", plugin, GAIM_CALLBACK(intercept_received), NULL); @@ -304,7 +304,7 @@ static gboolean -intercept_sent(GaimAccount *account, GaimConversation *conv, char **message, void* pData) +intercept_sent(GaimAccount *account, const char *who, char **message, void* pData) { if (0 == strncmp(*message, MUSICMESSAGING_PREFIX, strlen(MUSICMESSAGING_PREFIX))) diff -r c9f536f771d0 -r f09c6e8df82c plugins/notify.c --- a/plugins/notify.c Sat Feb 11 19:07:49 2006 +0000 +++ b/plugins/notify.c Sat Feb 11 19:16:38 2006 +0000 @@ -241,7 +241,8 @@ } static gboolean -message_displayed_cb(GaimAccount *account, GaimConversation *conv, const char *message, GaimMessageFlags flags) +message_displayed_cb(GaimAccount *account, const char *who, char *message, + GaimConversation *conv, GaimMessageFlags flags) { if ((flags & GAIM_MESSAGE_RECV) && !(flags & GAIM_MESSAGE_DELAYED)) notify(conv, TRUE); diff -r c9f536f771d0 -r f09c6e8df82c plugins/signals-test.c --- a/plugins/signals-test.c Sat Feb 11 19:07:49 2006 +0000 +++ b/plugins/signals-test.c Sat Feb 11 19:16:38 2006 +0000 @@ -200,7 +200,8 @@ * Conversation subsystem signal callbacks **************************************************************************/ static gboolean -writing_im_msg_cb(GaimAccount *account, GaimConversation *conv, char **buffer, void *data) +writing_im_msg_cb(GaimAccount *account, const char *who, char **buffer, + GaimConversation *conv, GaimMessageFlags flags, void *data) { gaim_debug_misc("signals test", "writing-im-msg (%s, %s, %s)\n", gaim_account_get_username(account), gaim_conversation_get_name(conv), *buffer); @@ -210,7 +211,8 @@ } static void -wrote_im_msg_cb(GaimAccount *account, GaimConversation *conv, const char *buffer, void *data) +wrote_im_msg_cb(GaimAccount *account, const char *who, const char *buffer, + GaimConversation *conv, GaimMessageFlags flags, void *data) { gaim_debug_misc("signals test", "wrote-im-msg (%s, %s, %s)\n", gaim_account_get_username(account), gaim_conversation_get_name(conv), buffer); @@ -252,8 +254,8 @@ } static gboolean -writing_chat_msg_cb(GaimAccount *account, GaimConversation *conv, - char **buffer, void *data) +writing_chat_msg_cb(GaimAccount *account, const char *who, char **buffer, + GaimConversation *conv, GaimMessageFlags flags, void *data) { gaim_debug_misc("signals test", "writing-chat-msg (%s, %s)\n", gaim_conversation_get_name(conv), *buffer); @@ -262,7 +264,8 @@ } static void -wrote_chat_msg_cb(GaimAccount *account, GaimConversation *conv, const char *buffer, void *data) +wrote_chat_msg_cb(GaimAccount *account, const char *who, const char *buffer, + GaimConversation *conv, GaimMessageFlags flags, void *data) { gaim_debug_misc("signals test", "wrote-chat-msg (%s, %s)\n", gaim_conversation_get_name(conv), buffer); diff -r c9f536f771d0 -r f09c6e8df82c plugins/timestamp.c --- a/plugins/timestamp.c Sat Feb 11 19:07:49 2006 +0000 +++ b/plugins/timestamp.c Sat Feb 11 19:16:38 2006 +0000 @@ -82,8 +82,8 @@ static gboolean -timestamp_displaying_conv_msg(GaimAccount *account, GaimConversation *conv, - char **buffer, GaimMessageFlags flags, void *data) +timestamp_displaying_conv_msg(GaimAccount *account, const char *who, char **buffer, + GaimConversation *conv, GaimMessageFlags flags, void *data) { int is_timestamp_enabled; diff -r c9f536f771d0 -r f09c6e8df82c src/accountopt.c --- a/src/accountopt.c Sat Feb 11 19:07:49 2006 +0000 +++ b/src/accountopt.c Sat Feb 11 19:16:38 2006 +0000 @@ -114,16 +114,12 @@ { g_return_if_fail(option != NULL); - if (option->text != NULL) - g_free(option->text); - - if (option->pref_name != NULL) - g_free(option->pref_name); + g_free(option->text); + g_free(option->pref_name); if (option->type == GAIM_PREF_STRING) { - if (option->default_value.string != NULL) - g_free(option->default_value.string); + g_free(option->default_value.string); } else if (option->type == GAIM_PREF_STRING_LIST) { diff -r c9f536f771d0 -r f09c6e8df82c src/conversation.c --- a/src/conversation.c Sat Feb 11 19:07:49 2006 +0000 +++ b/src/conversation.c Sat Feb 11 19:16:38 2006 +0000 @@ -92,7 +92,6 @@ GaimConnection *gc; GaimConversationUiOps *ops; char *displayed = NULL, *sent = NULL; - int plugin_return; int err = 0; if (strlen(message) == 0) @@ -118,24 +117,6 @@ else sent = g_strdup(message); - plugin_return = - GPOINTER_TO_INT(gaim_signal_emit_return_1( - gaim_conversations_get_handle(), - (type == GAIM_CONV_TYPE_IM ? "writing-im-msg" : "writing-chat-msg"), - account, conv, &displayed)); - - if (displayed == NULL) - return; - - if (plugin_return) { - g_free(displayed); - return; - } - - gaim_signal_emit(gaim_conversations_get_handle(), - (type == GAIM_CONV_TYPE_IM ? "wrote-im-msg" : "wrote-chat-msg"), - account, conv, displayed); - msgflags |= GAIM_MESSAGE_SEND; if (type == GAIM_CONV_TYPE_IM) { @@ -838,7 +819,10 @@ GaimAccount *account; GaimConversationUiOps *ops; const char *alias; + char *displayed = NULL; GaimBuddy *b; + int plugin_return; + GaimConversationType type; /* int logging_font_options = 0; */ g_return_if_fail(conv != NULL); @@ -850,6 +834,7 @@ return; account = gaim_conversation_get_account(conv); + type = gaim_conversation_get_type(conv); if (account != NULL) gc = gaim_account_get_connection(account); @@ -862,6 +847,22 @@ !g_list_find(gaim_get_conversations(), conv)) return; + displayed = g_strdup(message); + + plugin_return = + GPOINTER_TO_INT(gaim_signal_emit_return_1( + gaim_conversations_get_handle(), + (type == GAIM_CONV_TYPE_IM ? "writing-im-msg" : "writing-chat-msg"), + account, who, &displayed, conv, flags)); + + if (displayed == NULL) + return; + + if (plugin_return) { + g_free(displayed); + return; + } + if (who == NULL || *who == '\0') who = gaim_conversation_get_name(conv); @@ -904,7 +905,7 @@ log = conv->logs; while (log != NULL) { - gaim_log_write((GaimLog *)log->data, flags, alias, mtime, message); + gaim_log_write((GaimLog *)log->data, flags, alias, mtime, displayed); log = log->next; } } @@ -915,7 +916,13 @@ } } - ops->write_conv(conv, who, alias, message, flags, mtime); + ops->write_conv(conv, who, alias, displayed, flags, mtime); + + gaim_signal_emit(gaim_conversations_get_handle(), + (type == GAIM_CONV_TYPE_IM ? "wrote-im-msg" : "wrote-chat-msg"), + account, who, displayed, conv, flags); + + g_free(displayed); } gboolean @@ -1915,8 +1922,7 @@ { g_return_if_fail(cb != NULL); - if (cb->name) - g_free(cb->name); + g_free(cb->name); cb->name = NULL; cb->flags = 0; @@ -1965,22 +1971,26 @@ * Register signals **********************************************************************/ gaim_signal_register(handle, "writing-im-msg", - gaim_marshal_BOOLEAN__POINTER_POINTER_POINTER, - gaim_value_new(GAIM_TYPE_BOOLEAN), 3, + gaim_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER_POINTER, + gaim_value_new(GAIM_TYPE_BOOLEAN), 5, gaim_value_new(GAIM_TYPE_SUBTYPE, GAIM_SUBTYPE_ACCOUNT), + gaim_value_new(GAIM_TYPE_STRING), + gaim_value_new_outgoing(GAIM_TYPE_STRING), gaim_value_new(GAIM_TYPE_SUBTYPE, GAIM_SUBTYPE_CONVERSATION), - gaim_value_new_outgoing(GAIM_TYPE_STRING)); + gaim_value_new(GAIM_TYPE_UINT)); gaim_signal_register(handle, "wrote-im-msg", - gaim_marshal_VOID__POINTER_POINTER_POINTER, - NULL, 3, + 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_STRING)); + gaim_value_new(GAIM_TYPE_UINT)); gaim_signal_register(handle, "sending-im-msg", gaim_marshal_VOID__POINTER_POINTER_POINTER, @@ -2021,22 +2031,26 @@ gaim_value_new(GAIM_TYPE_UINT)); gaim_signal_register(handle, "writing-chat-msg", - gaim_marshal_BOOLEAN__POINTER_POINTER_POINTER, - gaim_value_new(GAIM_TYPE_BOOLEAN), 3, + gaim_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER_POINTER, + gaim_value_new(GAIM_TYPE_BOOLEAN), 5, gaim_value_new(GAIM_TYPE_SUBTYPE, GAIM_SUBTYPE_ACCOUNT), + gaim_value_new(GAIM_TYPE_STRING), + gaim_value_new_outgoing(GAIM_TYPE_STRING), gaim_value_new(GAIM_TYPE_SUBTYPE, GAIM_SUBTYPE_CONVERSATION), - gaim_value_new_outgoing(GAIM_TYPE_STRING)); + gaim_value_new(GAIM_TYPE_UINT)); gaim_signal_register(handle, "wrote-chat-msg", - gaim_marshal_VOID__POINTER_POINTER_POINTER, - NULL, 3, + 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_STRING)); + gaim_value_new(GAIM_TYPE_UINT)); gaim_signal_register(handle, "sending-chat-msg", gaim_marshal_VOID__POINTER_POINTER_UINT, NULL, 3, diff -r c9f536f771d0 -r f09c6e8df82c src/gtkconv.c --- a/src/gtkconv.c Sat Feb 11 19:07:49 2006 +0000 +++ b/src/gtkconv.c Sat Feb 11 19:16:38 2006 +0000 @@ -4622,7 +4622,7 @@ plugin_return = GPOINTER_TO_INT(gaim_signal_emit_return_1( gaim_gtk_conversations_get_handle(), (type == GAIM_CONV_TYPE_IM ? "displaying-im-msg" : "displaying-chat-msg"), - account, conv, &displaying, flags)); + account, name, &displaying, conv, flags)); if (plugin_return) { g_free(displaying); @@ -4916,7 +4916,7 @@ gaim_signal_emit(gaim_gtk_conversations_get_handle(), (type == GAIM_CONV_TYPE_IM ? "displayed-im-msg" : "displayed-chat-msg"), - account, conv, message, flags); + account, name, message, conv, flags); g_free(displaying); } @@ -5843,7 +5843,6 @@ gdk_pixbuf_render_pixmap_and_mask(scale, &pm, &bm, 100); g_object_unref(G_OBJECT(scale)); - gtkconv->u.im->icon_container = gtk_vbox_new(FALSE, 0); frame = gtk_frame_new(NULL); @@ -5875,9 +5874,11 @@ gtk_widget_show(frame); /* The buddy icon code needs badly to be fixed. */ - buf = gdk_pixbuf_animation_get_static_image(gtkconv->u.im->anim); if(gaim_gtk_conv_window_is_active_conversation(conv)) + { + buf = gdk_pixbuf_animation_get_static_image(gtkconv->u.im->anim); gtk_window_set_icon(GTK_WINDOW(win->window), buf); + } } void @@ -6464,44 +6465,48 @@ gaim_value_new(GAIM_TYPE_POINTER)); gaim_signal_register(handle, "displaying-im-msg", - gaim_marshal_BOOLEAN__POINTER_POINTER_POINTER_UINT, - gaim_value_new(GAIM_TYPE_BOOLEAN), 4, + gaim_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER_POINTER, + gaim_value_new(GAIM_TYPE_BOOLEAN), 5, gaim_value_new(GAIM_TYPE_SUBTYPE, GAIM_SUBTYPE_ACCOUNT), + gaim_value_new(GAIM_TYPE_STRING), + gaim_value_new_outgoing(GAIM_TYPE_STRING), gaim_value_new(GAIM_TYPE_SUBTYPE, GAIM_SUBTYPE_CONVERSATION), - gaim_value_new_outgoing(GAIM_TYPE_STRING), - gaim_value_new(G_TYPE_INT)); + gaim_value_new(GAIM_TYPE_INT)); gaim_signal_register(handle, "displayed-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_STRING), - gaim_value_new(G_TYPE_INT)); + gaim_value_new(GAIM_TYPE_INT)); gaim_signal_register(handle, "displaying-chat-msg", - gaim_marshal_BOOLEAN__POINTER_POINTER_POINTER_UINT, - gaim_value_new(GAIM_TYPE_BOOLEAN), 4, + gaim_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER_POINTER, + gaim_value_new(GAIM_TYPE_BOOLEAN), 5, gaim_value_new(GAIM_TYPE_SUBTYPE, GAIM_SUBTYPE_ACCOUNT), + gaim_value_new(GAIM_TYPE_STRING), + gaim_value_new_outgoing(GAIM_TYPE_STRING), gaim_value_new(GAIM_TYPE_SUBTYPE, GAIM_SUBTYPE_CONVERSATION), - gaim_value_new_outgoing(GAIM_TYPE_STRING), - gaim_value_new(G_TYPE_INT)); + gaim_value_new(GAIM_TYPE_INT)); gaim_signal_register(handle, "displayed-chat-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_STRING), - gaim_value_new(G_TYPE_INT)); + gaim_value_new(GAIM_TYPE_INT)); gaim_signal_register(handle, "conversation-switched", gaim_marshal_VOID__POINTER_POINTER, NULL, 1,