diff src/buddy_chat.c @ 2017:eee309c0de93

[gaim-migrate @ 2027] this is better. also plugged a mem leak for when you left a chat after you were disconnected. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Thu, 14 Jun 2001 21:43:59 +0000
parents 352bd24e03ef
children 3366311426df
line wrap: on
line diff
--- a/src/buddy_chat.c	Thu Jun 14 17:33:25 2001 +0000
+++ b/src/buddy_chat.c	Thu Jun 14 21:43:59 2001 +0000
@@ -1009,7 +1009,8 @@
 	gtk_widget_show(win);
 }
 
-void chat_set_topic(struct conversation *b, char* who, char* topic) {
+void chat_set_topic(struct conversation *b, char* who, char* topic)
+{
 	gtk_entry_set_text(GTK_ENTRY(b->topic_text), topic);
 }
 
@@ -1023,6 +1024,19 @@
 	}
 }
 
+void delete_chat(struct conversation *b)
+{
+	while (b->in_room) {
+		g_free(b->in_room->data);
+		b->in_room = g_list_remove(b->in_room, b->in_room->data);
+	}
+	while (b->ignored) {
+		g_free(b->ignored->data);
+		b->ignored = g_list_remove(b->ignored, b->ignored->data);
+	}
+	g_string_free(b->history, TRUE);
+	g_free(b);
+}
 
 void setup_buddy_chats()
 {