changeset 3461:c11960537fee

[gaim-migrate @ 3510] obobo committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Wed, 28 Aug 2002 08:13:58 +0000
parents 66c7cca774f5
children 463dc1d3e6a8
files ChangeLog plugins/SIGNALS src/conversation.c src/core.h src/module.c
diffstat 5 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Aug 28 07:44:46 2002 +0000
+++ b/ChangeLog	Wed Aug 28 08:13:58 2002 +0000
@@ -53,6 +53,7 @@
 	* Option to log IMs and Chats seperately.  (Thanks Etan
 	  Reisner)
 	* Nice Oscar changes--mostly internal (Thanks Mark Doliner)
+	* event_del_conversation for plugins (Thanks Bill Tompkins)
 
 version 0.59 (06/24/2002):
 	* Hungarian translation added (Thanks, Sutto Zoltan)
--- a/plugins/SIGNALS	Wed Aug 28 07:44:46 2002 +0000
+++ b/plugins/SIGNALS	Wed Aug 28 08:13:58 2002 +0000
@@ -28,6 +28,7 @@
 	event_im_displayed_rcvd,
 	event_chat_send_invite,
 	event_got_typing,
+	event_del_conversation,
 };
 
 To add a signal handler, call the fuction gaim_signal_connect with the
@@ -331,3 +332,12 @@
 
 	'gc' 	is the connection the typing is sent to.
 	'who' 	is the person typing to you.
+event_del_conversation:
+	struct conversation *c
+
+	This is called when a conversation window is closed.  It is
+	called before any memory is deallocated so you are able to
+	access any data related to the conversation without breaking
+	anything.
+
+	'c'	is he conversation being closed.
--- a/src/conversation.c	Wed Aug 28 07:44:46 2002 +0000
+++ b/src/conversation.c	Wed Aug 28 08:13:58 2002 +0000
@@ -258,6 +258,7 @@
 
 void delete_conversation(struct conversation *c)
 {
+	plugin_event(event_del_conversation, c, 0, 0, 0);
 	conversations = g_list_remove(conversations, c);
 	if (c->fg_color_dialog)
 		gtk_widget_destroy(c->fg_color_dialog);
--- a/src/core.h	Wed Aug 28 07:44:46 2002 +0000
+++ b/src/core.h	Wed Aug 28 08:13:58 2002 +0000
@@ -97,6 +97,7 @@
 	event_im_displayed_rcvd,
 	event_chat_send_invite,
 	event_got_typing,
+	event_del_conversation,
 	/* any others? it's easy to add... */
 };
 
--- a/src/module.c	Wed Aug 28 07:44:46 2002 +0000
+++ b/src/module.c	Wed Aug 28 08:13:58 2002 +0000
@@ -501,6 +501,7 @@
 			case event_signon:
 			case event_signoff:
 			case event_new_conversation:
+			case event_del_conversation:
 			case event_error:
 				one = g->function;
 				one(arg1, g->data);