Mercurial > pidgin.yaz
diff src/gtkconv.c @ 12639:366326fa9cb4
[gaim-migrate @ 14975]
SF Patch #1323534 from Sadrul
"There is a documented signal `conversation-switched',
which never gets emitted. This patch emits this signal
when a conversation is switched. This signal can be
used by plugins that may want to deal with menu-items /
menu-tray items etc."
"The conversation-switched signals is moved to gtkconv,
-switching signal is removed. Changelog.API and doc/.dox
files are updated. I have included the changes in
displaying-signals in the dox-files as well."
Also, I added a cast to the code from my last commit to suppress a warning. I wish C knew about object oriented inheritance.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Fri, 23 Dec 2005 05:13:52 +0000 |
parents | 7a2a2ca48703 |
children | fc28451f5d96 |
line wrap: on
line diff
--- a/src/gtkconv.c Fri Dec 23 05:00:47 2005 +0000 +++ b/src/gtkconv.c Fri Dec 23 05:13:52 2005 +0000 @@ -1985,6 +1985,8 @@ gaim_conversation_set_logging(conv, gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(gtkconv->win->menu.logging))); + + gaim_signal_emit(gaim_gtk_conversations_get_handle(), "conversation-switched", conv); } void @@ -2990,7 +2992,7 @@ for (node = node->child; node != NULL; node = node->next) { - GaimBuddy *buddy = node; + GaimBuddy *buddy = (GaimBuddy *)node; GaimAccount *account; if (!GAIM_BLIST_NODE_IS_BUDDY(node)) @@ -6178,6 +6180,11 @@ gaim_value_new(GAIM_TYPE_STRING), gaim_value_new(G_TYPE_INT)); + gaim_signal_register(handle, "conversation-switched", + gaim_marshal_VOID__POINTER_POINTER, NULL, 1, + gaim_value_new(GAIM_TYPE_SUBTYPE, + GAIM_SUBTYPE_CONVERSATION)); + /********************************************************************** * Register commands **********************************************************************/ @@ -6969,6 +6976,8 @@ if ((gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) && (gtkconv->u.im->animate)) start_anim(NULL, gtkconv); + + gaim_signal_emit(gaim_gtk_conversations_get_handle(), "conversation-switched", conv); } /**************************************************************************