| 6189 void |
6189 void |
| 6190 gaim_gtk_conv_window_destroy(GaimGtkWindow *win) |
6190 gaim_gtk_conv_window_destroy(GaimGtkWindow *win) |
| 6191 { |
6191 { |
| 6192 window_list = g_list_remove(window_list, win); |
6192 window_list = g_list_remove(window_list, win); |
| 6193 |
6193 |
| |
6194 if (win->gtkconvs) { |
| |
6195 while (win->gtkconvs) { |
| |
6196 GList *nextgtk = win->gtkconvs->next; |
| |
6197 GaimGtkConversation *gtkconv = win->gtkconvs->data; |
| |
6198 GList *nextcore = gtkconv->convs->next; |
| |
6199 GaimConversation *conv = gtkconv->convs->data; |
| |
6200 gaim_conversation_destroy(conv); |
| |
6201 if (!nextgtk && !nextcore) |
| |
6202 /* we'll end up invoking ourselves when we destroy our last child */ |
| |
6203 /* so don't destroy ourselves right now */ |
| |
6204 return; |
| |
6205 } |
| |
6206 return; |
| |
6207 } |
| 6194 gtk_widget_destroy(win->window); |
6208 gtk_widget_destroy(win->window); |
| 6195 |
6209 |
| 6196 g_object_unref(G_OBJECT(win->menu.item_factory)); |
6210 g_object_unref(G_OBJECT(win->menu.item_factory)); |
| 6197 |
6211 |
| 6198 g_free(win); |
6212 g_free(win); |