comparison audacious/pluginenum.c @ 2159:35bdfcd17ba7 trunk

[svn] - change the cleanup order in mainwin_quit_cb() to avoid freeze on quit. - replace deprecated g_main_iteration() with g_main_context_iteration().
author yaz
date Mon, 18 Dec 2006 06:53:52 -0800
parents f18a5b617c34
children 894f7aa46f83
comparison
equal deleted inserted replaced
2158:ba9deed2f121 2159:35bdfcd17ba7
390 for (node = get_input_list(); node; node = g_list_next(node)) { 390 for (node = get_input_list(); node; node = g_list_next(node)) {
391 ip = INPUT_PLUGIN(node->data); 391 ip = INPUT_PLUGIN(node->data);
392 if (ip && ip->cleanup) { 392 if (ip && ip->cleanup) {
393 ip->cleanup(); 393 ip->cleanup();
394 GDK_THREADS_LEAVE(); 394 GDK_THREADS_LEAVE();
395 while (g_main_iteration(FALSE)); 395 while (g_main_context_iteration(NULL, FALSE));
396 GDK_THREADS_ENTER(); 396 GDK_THREADS_ENTER();
397 } 397 }
398 g_module_close(ip->handle); 398 g_module_close(ip->handle);
399 } 399 }
400 400
404 for (node = get_output_list(); node; node = g_list_next(node)) { 404 for (node = get_output_list(); node; node = g_list_next(node)) {
405 op = OUTPUT_PLUGIN(node->data); 405 op = OUTPUT_PLUGIN(node->data);
406 if (op && op->cleanup) { 406 if (op && op->cleanup) {
407 op->cleanup(); 407 op->cleanup();
408 GDK_THREADS_LEAVE(); 408 GDK_THREADS_LEAVE();
409 while (g_main_iteration(FALSE)); 409 while (g_main_context_iteration(NULL, FALSE));
410 GDK_THREADS_ENTER(); 410 GDK_THREADS_ENTER();
411 } 411 }
412 g_module_close(op->handle); 412 g_module_close(op->handle);
413 } 413 }
414 414
418 for (node = get_effect_list(); node; node = g_list_next(node)) { 418 for (node = get_effect_list(); node; node = g_list_next(node)) {
419 ep = EFFECT_PLUGIN(node->data); 419 ep = EFFECT_PLUGIN(node->data);
420 if (ep && ep->cleanup) { 420 if (ep && ep->cleanup) {
421 ep->cleanup(); 421 ep->cleanup();
422 GDK_THREADS_LEAVE(); 422 GDK_THREADS_LEAVE();
423 while (g_main_iteration(FALSE)); 423 while (g_main_context_iteration(NULL, FALSE));
424 GDK_THREADS_ENTER(); 424 GDK_THREADS_ENTER();
425 } 425 }
426 g_module_close(ep->handle); 426 g_module_close(ep->handle);
427 } 427 }
428 428
437 437
438 if (gp_data.enabled_list) 438 if (gp_data.enabled_list)
439 g_list_free(gp_data.enabled_list); 439 g_list_free(gp_data.enabled_list);
440 440
441 GDK_THREADS_LEAVE(); 441 GDK_THREADS_LEAVE();
442 while (g_main_iteration(FALSE)); 442 while (g_main_context_iteration(NULL, FALSE));
443 GDK_THREADS_ENTER(); 443 GDK_THREADS_ENTER();
444 #endif 444 #endif
445 445
446 for (node = get_general_list(); node; node = g_list_next(node)) { 446 for (node = get_general_list(); node; node = g_list_next(node)) {
447 gp = GENERAL_PLUGIN(node->data); 447 gp = GENERAL_PLUGIN(node->data);
448 if (gp && gp->cleanup) { 448 if (gp && gp->cleanup) {
449 gp->cleanup(); 449 gp->cleanup();
450 GDK_THREADS_LEAVE(); 450 GDK_THREADS_LEAVE();
451 while (g_main_iteration(FALSE)); 451 while (g_main_context_iteration(NULL, FALSE));
452 GDK_THREADS_ENTER(); 452 GDK_THREADS_ENTER();
453 } 453 }
454 g_module_close(gp->handle); 454 g_module_close(gp->handle);
455 } 455 }
456 456
465 465
466 if (vp_data.enabled_list) 466 if (vp_data.enabled_list)
467 g_list_free(vp_data.enabled_list); 467 g_list_free(vp_data.enabled_list);
468 468
469 GDK_THREADS_LEAVE(); 469 GDK_THREADS_LEAVE();
470 while (g_main_iteration(FALSE)); 470 while (g_main_context_iteration(NULL, FALSE));
471 GDK_THREADS_ENTER(); 471 GDK_THREADS_ENTER();
472 #endif 472 #endif
473 473
474 for (node = get_vis_list(); node; node = g_list_next(node)) { 474 for (node = get_vis_list(); node; node = g_list_next(node)) {
475 vp = VIS_PLUGIN(node->data); 475 vp = VIS_PLUGIN(node->data);
476 if (vp && vp->cleanup) { 476 if (vp && vp->cleanup) {
477 vp->cleanup(); 477 vp->cleanup();
478 GDK_THREADS_LEAVE(); 478 GDK_THREADS_LEAVE();
479 while (g_main_iteration(FALSE)); 479 while (g_main_context_iteration(NULL, FALSE));
480 GDK_THREADS_ENTER(); 480 GDK_THREADS_ENTER();
481 } 481 }
482 g_module_close(vp->handle); 482 g_module_close(vp->handle);
483 } 483 }
484 484
488 for (node = lowlevel_list; node; node = g_list_next(node)) { 488 for (node = lowlevel_list; node; node = g_list_next(node)) {
489 lp = LOWLEVEL_PLUGIN(node->data); 489 lp = LOWLEVEL_PLUGIN(node->data);
490 if (lp && lp->cleanup) { 490 if (lp && lp->cleanup) {
491 lp->cleanup(); 491 lp->cleanup();
492 GDK_THREADS_LEAVE(); 492 GDK_THREADS_LEAVE();
493 while (g_main_iteration(FALSE)); 493 while (g_main_context_iteration(NULL, FALSE));
494 GDK_THREADS_ENTER(); 494 GDK_THREADS_ENTER();
495 } 495 }
496 g_module_close(lp->handle); 496 g_module_close(lp->handle);
497 } 497 }
498 498