merge of '71e22ca0f0c5ad0ee1dd2d6ef3bce84f78ac4f67'

Sun, 16 Sep 2007 00:00:37 +0000

author
Andreas Monitzer <am@adiumx.com>
date
Sun, 16 Sep 2007 00:00:37 +0000
changeset 20336
bfcf14861801
parent 20332
71e22ca0f0c5 (current diff)
parent 20333
5f024b6f772a (diff)
child 20337
ce080531de34

merge of '71e22ca0f0c5ad0ee1dd2d6ef3bce84f78ac4f67'
and '5f024b6f772a00703ce802e9609b7c6c1a0dbc17'

--- a/pidgin/gtkconv.c	Sun Sep 16 00:00:22 2007 +0000
+++ b/pidgin/gtkconv.c	Sun Sep 16 00:00:37 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