diff 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
line wrap: on
line diff
--- a/src/utilops.c	Sat Feb 07 19:01:21 2009 +0000
+++ b/src/utilops.c	Sat Feb 07 21:03:11 2009 +0000
@@ -590,8 +590,16 @@
 {
 	UtilityData *ud = data;
 
-	/* this is removed when ud is destroyed */
-	if (ud->perform_idle_id == -1) ud->perform_idle_id = g_idle_add(file_util_perform_ci_internal, ud);
+	if (ud->perform_idle_id == -1) 
+		{
+		/* this function was called directly
+		   just setup idle callback and wait until we are called again
+		*/
+		
+		/* this is removed when ud is destroyed */
+		ud->perform_idle_id = g_idle_add(file_util_perform_ci_internal, ud);
+		return TRUE;
+		}
 
 	g_assert(ud->flist);