comparison src/utilops.c @ 1289:deb0876c29d2

force at least one idle call before writting metadata (without this the exit_program_write_metadata_cb could be called before the exit_program function finished)
author nadvornik
date Sat, 07 Feb 2009 21:03:11 +0000
parents 8b89e3ff286b
children fe4da037be21
comparison
equal deleted inserted replaced
1288:10073464e6aa 1289:deb0876c29d2
588 588
589 static gboolean file_util_perform_ci_internal(gpointer data) 589 static gboolean file_util_perform_ci_internal(gpointer data)
590 { 590 {
591 UtilityData *ud = data; 591 UtilityData *ud = data;
592 592
593 /* this is removed when ud is destroyed */ 593 if (ud->perform_idle_id == -1)
594 if (ud->perform_idle_id == -1) ud->perform_idle_id = g_idle_add(file_util_perform_ci_internal, ud); 594 {
595 /* this function was called directly
596 just setup idle callback and wait until we are called again
597 */
598
599 /* this is removed when ud is destroyed */
600 ud->perform_idle_id = g_idle_add(file_util_perform_ci_internal, ud);
601 return TRUE;
602 }
595 603
596 g_assert(ud->flist); 604 g_assert(ud->flist);
597 605
598 if (ud->flist) 606 if (ud->flist)
599 { 607 {