From: Richard L. <rl...@us...> - 2005-12-23 05:14:04
|
Update of /cvsroot/gaim/gaim/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20867/src Modified Files: conversation.c gtkconv.c Log Message: 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. Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.695 retrieving revision 1.696 diff -u -d -p -r1.695 -r1.696 --- conversation.c 22 Dec 2005 19:39:22 -0000 1.695 +++ conversation.c 23 Dec 2005 05:13:52 -0000 1.696 @@ -2105,20 +2105,6 @@ gaim_conversations_init(void) GAIM_SUBTYPE_CONVERSATION), gaim_value_new(GAIM_TYPE_UINT)); - gaim_signal_register(handle, "conversation-switching", - gaim_marshal_VOID__POINTER_POINTER, NULL, 2, - gaim_value_new(GAIM_TYPE_SUBTYPE, - GAIM_SUBTYPE_CONVERSATION), - gaim_value_new(GAIM_TYPE_SUBTYPE, - GAIM_SUBTYPE_CONVERSATION)); - - gaim_signal_register(handle, "conversation-switched", - gaim_marshal_VOID__POINTER_POINTER, NULL, 2, - gaim_value_new(GAIM_TYPE_SUBTYPE, - GAIM_SUBTYPE_CONVERSATION), - gaim_value_new(GAIM_TYPE_SUBTYPE, - GAIM_SUBTYPE_CONVERSATION)); - gaim_signal_register(handle, "conversation-created", gaim_marshal_VOID__POINTER, NULL, 1, gaim_value_new(GAIM_TYPE_SUBTYPE, Index: gtkconv.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkconv.c,v retrieving revision 1.710 retrieving revision 1.711 diff -u -d -p -r1.710 -r1.711 --- gtkconv.c 23 Dec 2005 05:00:47 -0000 1.710 +++ gtkconv.c 23 Dec 2005 05:13:52 -0000 1.711 @@ -1985,6 +1985,8 @@ gaim_gtkconv_set_active_conversation(Gai 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 @@ generate_send_to_items(GaimGtkWindow *wi 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_gtk_conversations_init(void) 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 @@ switch_conv_cb(GtkNotebook *notebook, Gt 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); } /************************************************************************** |