# HG changeset patch # User Sadrul Habib Chowdhury # Date 1189899403 0 # Node ID fee0eea83e58695d482e14b1855a3fe5ef5a2e2a # Parent 5103485b4b2640d6c50b2bd6f4035d80476d098c Honour the persistency when closing the window from the WM. diff -r 5103485b4b26 -r fee0eea83e58 pidgin/gtkconv.c --- a/pidgin/gtkconv.c Sat Sep 15 18:27:01 2007 +0000 +++ b/pidgin/gtkconv.c Sat Sep 15 23:36:43 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 @@ -8828,15 +8828,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; }