if (!path) path = cd->path;
- if (debug) printf("collection load: append=%d flush=%d only_geometry=%d path=%s\n",
+ DEBUG_1("collection load: append=%d flush=%d only_geometry=%d path=%s\n",
append, flush, only_geometry, path);
/* load it */
changed |= collect_manager_process_action(entry, &buf);
valid = (buf[0] == '/' && collection_add_check(cd, file_data_new_simple(buf), FALSE, TRUE));
- if (debug && !valid) printf("collection invalid file: %s\n", buf);
+ if (!valid) DEBUG_1("collection invalid file: %s\n", buf);
g_free(buf);
total++;
}
}
- if (debug) printf("collection files: total = %d fail = %d official=%d gqview=%d geometry=%d\n",
+ DEBUG_1("collection files: total = %d fail = %d official=%d gqview=%d geometry=%d\n",
total, fail, has_official_header, has_gqview_header, has_geometry_header);
fclose(f);
if (!thumb_loader_start(cd->thumb_loader, ci->fd->path))
{
/* error, handle it, do next */
- if (debug) printf("error loading thumb for %s\n", ci->fd->path);
+ DEBUG_1("error loading thumb for %s\n", ci->fd->path);
collection_load_thumb_do(cd);
collection_load_thumb_step(cd);
}
static void collect_manager_process_actions(gint max)
{
- if (debug && collection_manager_action_list)
- {
- printf("collection manager processing actions\n");
- }
-
+ if (collection_manager_action_list) DEBUG_1("collection manager processing actions\n");
+
while (collection_manager_action_list != NULL && max > 0)
{
CollectManagerAction *action;
if (collect_manager_process_entry_list()) return TRUE;
- if (debug) printf("collection manager is up to date\n");
+ DEBUG_1("collection manager is up to date\n");
return FALSE;
}
static gint collect_manager_timer_cb(gpointer data)
{
- if (debug) printf("collection manager timer expired\n");
+ DEBUG_1("collection manager timer expired\n");
g_idle_add_full(G_PRIORITY_LOW, collect_manager_process_cb, NULL, NULL);
{
collection_manager_timer_id = g_timeout_add(COLLECT_MANAGER_FLUSH_DELAY,
collect_manager_timer_cb, NULL);
- if (debug) printf("collection manager timer started\n");
+ DEBUG_1("collection manager timer started\n");
}
}
{
collect_manager_timer_push(TRUE);
- if (debug) printf("collection manager flushing\n");
+ DEBUG_1("collection manager flushing\n");
while (collect_manager_process_cb(NULL));
}