pidgin/gtkconv.c

branch
release-2.x.y
changeset 33218
f7b7a6c58ad3
parent 33216
5aada1464bf1
child 33283
7b12c4d2c6d7
child 33477
ed01a53b8afc
equal deleted inserted replaced
33217:7e266d890064 33218:f7b7a6c58ad3
9378 } 9378 }
9379 9379
9380 void 9380 void
9381 pidgin_conv_window_destroy(PidginWindow *win) 9381 pidgin_conv_window_destroy(PidginWindow *win)
9382 { 9382 {
9383 PidginConversation *gtkconv;
9384 GList *iter;
9385
9386 if (win->gtkconvs) {
9387 for (iter = win->gtkconvs; iter != NULL; iter = iter->next) {
9388 gtkconv = iter->data;
9389 close_conv_cb(NULL, gtkconv);
9390 }
9391 return;
9392 }
9393
9383 purple_prefs_disconnect_by_handle(win); 9394 purple_prefs_disconnect_by_handle(win);
9384 window_list = g_list_remove(window_list, win); 9395 window_list = g_list_remove(window_list, win);
9385 9396
9386 /* Close the "Find" dialog if it's open */ 9397 /* Close the "Find" dialog if it's open */
9387 if (win->dialogs.search) 9398 if (win->dialogs.search)
9388 gtk_widget_destroy(win->dialogs.search); 9399 gtk_widget_destroy(win->dialogs.search);
9389 9400
9390 if (win->gtkconvs) {
9391 while (win->gtkconvs) {
9392 gboolean last = (win->gtkconvs->next == NULL);
9393 close_conv_cb(NULL, win->gtkconvs->data);
9394 if (last)
9395 break;
9396 }
9397 return;
9398 }
9399 gtk_widget_destroy(win->window); 9401 gtk_widget_destroy(win->window);
9400 9402
9401 g_object_unref(G_OBJECT(win->menu.item_factory)); 9403 g_object_unref(G_OBJECT(win->menu.item_factory));
9402 9404
9403 purple_notify_close_with_handle(win); 9405 purple_notify_close_with_handle(win);

mercurial