changeset 20080:539d042c8fc6

merge of '133f2968e112c003cac1320d1ca0128d5da74066' and '9fcca7e91bb6c390293cfcffb52f4e3884d8dc6a'
author Eoin Coffey <ecoffey@soc.pidgin.im>
date Sun, 16 Sep 2007 01:40:44 +0000
parents 6bf32c9e15a7 (current diff) 3e3246eb204c (diff)
children 6e2bd948a897
files pidgin/gtkconv.c
diffstat 2 files changed, 6 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.c	Sun Sep 16 01:05:22 2007 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Sun Sep 16 01:40:44 2007 +0000
@@ -141,6 +141,7 @@
 		if(jabber_process_starttls(js, packet))
 			return;
 	} else if(purple_account_get_bool(js->gc->account, "require_tls", FALSE) && !js->gsc) {
+		js->gc->wants_to_die = TRUE;
 		purple_connection_error(js->gc, _("You require encryption, but it is not available on this server."));
 		return;
 	}
--- a/pidgin/gtkconv.c	Sun Sep 16 01:05:22 2007 +0000
+++ b/pidgin/gtkconv.c	Sun Sep 16 01:40:44 2007 +0000
@@ -220,7 +220,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
@@ -8834,15 +8834,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;
 	}