Mercurial > pidgin.yaz
diff plugins/gtk-signals-test.c @ 12604:71299d63801d
[gaim-migrate @ 14939]
SF Patch #1383857 from Sadrul
"This patch makes the display-msg signals to be emitted
from gtkconv instead of conversation. The display-msg
signals were not too useful before, especially because
they were being emitted right after writing-msg
signals, and not being emitted for messages being sent
at all.
This patch also makes necessary changes in the plugins,
and in Changelog.API. With this change, the notify
plugin can set the URGENT hint for a new received
message which creates a conversation.
marv and charkins seemed to think this was a good thing
to do."
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Wed, 21 Dec 2005 21:48:38 +0000 |
parents | 434181b96f44 |
children | 366326fa9cb4 |
line wrap: on
line diff
--- a/plugins/gtk-signals-test.c Wed Dec 21 21:18:25 2005 +0000 +++ b/plugins/gtk-signals-test.c Wed Dec 21 21:48:38 2005 +0000 @@ -60,6 +60,40 @@ gaim_debug_info("gtk-signal-test", "conversation dragging cb\n"); } +static gboolean +displaying_im_msg_cb(GaimAccount *account, GaimConversation *conv, + char **buffer, int flags, void *data) +{ + gaim_debug_misc("gtk-signals test", "displaying-im-msg (%s, %s)\n", + gaim_conversation_get_name(conv), *buffer); + + return FALSE; +} + +static void +displayed_im_msg_cb(GaimAccount *account, GaimConversation *conv, const char *buffer, int 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) +{ + gaim_debug_misc("gtk-signals test", "displaying-chat-msg (%s, %s)\n", + gaim_conversation_get_name(conv), *buffer); + + return FALSE; +} + +static void +displayed_chat_msg_cb(GaimAccount *account, GaimConversation *conv, const char *buffer, int flags, void *data) +{ + gaim_debug_misc("gtk-signals test", "displayed-chat-msg (%s, %s)\n", + gaim_conversation_get_name(conv), buffer); +} + /************************************************************************** * Plugin stuff **************************************************************************/ @@ -83,6 +117,14 @@ /* Conversations subsystem signals */ gaim_signal_connect(conv_handle, "conversation-dragging", plugin, GAIM_CALLBACK(conversation_dragging_cb), NULL); + gaim_signal_connect(conv_handle, "displaying-im-msg", + plugin, GAIM_CALLBACK(displaying_im_msg_cb), NULL); + gaim_signal_connect(conv_handle, "displayed-im-msg", + plugin, GAIM_CALLBACK(displayed_im_msg_cb), NULL); + gaim_signal_connect(conv_handle, "displaying-chat-msg", + plugin, GAIM_CALLBACK(displaying_chat_msg_cb), NULL); + gaim_signal_connect(conv_handle, "displayed-chat-msg", + plugin, GAIM_CALLBACK(displayed_chat_msg_cb), NULL); return TRUE; }