pidgin/gtkrequest.c

branch
memory-leaks
changeset 40264
d253f767f6cc
parent 40197
75ffd76260fc
child 40266
8785aa7408b0
equal deleted inserted replaced
40237:905872c9dd7a 40264:d253f767f6cc
2483 /* if request callback issues another request, it should be attached to the 2483 /* if request callback issues another request, it should be attached to the
2484 * primary request parent */ 2484 * primary request parent */
2485 static void 2485 static void
2486 pidgin_window_detach_children(GtkWindow* win) 2486 pidgin_window_detach_children(GtkWindow* win)
2487 { 2487 {
2488 GList *it; 2488 GList *it, *l;
2489 GtkWindow *par; 2489 GtkWindow *par;
2490 2490
2491 g_return_if_fail(win != NULL); 2491 g_return_if_fail(win != NULL);
2492 2492
2493 par = gtk_window_get_transient_for(win); 2493 par = gtk_window_get_transient_for(win);
2494 it = gtk_window_list_toplevels(); 2494 l = it = gtk_window_list_toplevels();
2495 for (it = g_list_first(it); it != NULL; it = g_list_next(it)) { 2495 for (it = g_list_first(it); it != NULL; it = g_list_next(it)) {
2496 GtkWindow *child = GTK_WINDOW(it->data); 2496 GtkWindow *child = GTK_WINDOW(it->data);
2497 if (gtk_window_get_transient_for(child) != win) 2497 if (gtk_window_get_transient_for(child) != win)
2498 continue; 2498 continue;
2499 if (gtk_window_get_destroy_with_parent(child)) { 2499 if (gtk_window_get_destroy_with_parent(child)) {
2504 #endif 2504 #endif
2505 continue; 2505 continue;
2506 } 2506 }
2507 gtk_window_set_transient_for(child, par); 2507 gtk_window_set_transient_for(child, par);
2508 } 2508 }
2509 g_list_free(l);
2509 } 2510 }
2510 2511
2511 static void 2512 static void
2512 pidgin_close_request(PurpleRequestType type, void *ui_handle) 2513 pidgin_close_request(PurpleRequestType type, void *ui_handle)
2513 { 2514 {

mercurial