merge of 'ebb754aae698a1297aec15bf0eb41107f2273529'

Sat, 15 Sep 2007 23:49:13 +0000

author
Richard Laager <rlaager@pidgin.im>
date
Sat, 15 Sep 2007 23:49:13 +0000
changeset 20334
eea65cc53ea5
parent 20328
ebb754aae698 (current diff)
parent 20333
5f024b6f772a (diff)
child 20335
415a2e9e61b6

merge of 'ebb754aae698a1297aec15bf0eb41107f2273529'
and '5f024b6f772a00703ce802e9609b7c6c1a0dbc17'

--- a/pidgin/gtkconv.c	Sat Sep 15 23:40:53 2007 +0000
+++ b/pidgin/gtkconv.c	Sat Sep 15 23:49:13 2007 +0000
@@ -219,7 +219,7 @@
 }
 
 static gboolean
-close_conv_cb(GtkWidget *w, GdkEventButton *event, PidginConversation *gtkconv)
+close_conv_cb(GtkWidget *w, GdkEventButton *dontuse, PidginConversation *gtkconv)
 {
 	/* We are going to destroy the conversations immediately only if the 'close immediately'
 	 * preference is selected. Otherwise, close the conversation after a reasonable timeout
@@ -8833,15 +8833,10 @@
 
 	if (win->gtkconvs) {
 		while (win->gtkconvs) {
-			GList *nextgtk = win->gtkconvs->next;
-			PidginConversation *gtkconv = win->gtkconvs->data;
-			GList *nextcore = gtkconv->convs->next;
-			PurpleConversation *conv = gtkconv->convs->data;
-			purple_conversation_destroy(conv);
-			if (!nextgtk && !nextcore)
-			/* we'll end up invoking ourselves when we destroy our last child */
-			/* so don't destroy ourselves right now */
-				return;
+			gboolean last = (win->gtkconvs->next == NULL);
+			close_conv_cb(NULL, NULL, win->gtkconvs->data);
+			if (last)
+				break;
 		}
 		return;
 	}

mercurial