- return special_folder;
-}
-
-typedef struct
-{
- GSourceFunc func;
- GMainLoop* loop;
-} UtilIdleData;
-
-static gboolean util_on_idle(gpointer user_data)
-{
- /* We are now in the main thread,
- * so we can call the function:
- */
- UtilIdleData *idle_data = (UtilIdleData*)user_data;
- if (idle_data && idle_data->func)
- (*(idle_data->func))(NULL);
-
- /* Stop the main loop so that the caller can continue: */
- if (idle_data->loop)
- g_main_loop_quit (idle_data->loop);
-
- return FALSE; /* Stop calling this callback. */
-}
-
-static void
-util_run_in_main_thread_and_wait(GSourceFunc function)
-{
- UtilIdleData *data = g_slice_new0 (UtilIdleData);
- data->func = function;
- data->loop = g_main_loop_new (NULL, FALSE /* not running */);