Mercurial > geeqie.yaz
comparison src/collect.c @ 506:fc9c8a3e1a8b
Handle the newline in DEBUG_N() macro instead of adding one
in each debug message string.
author | zas_ |
---|---|
date | Thu, 24 Apr 2008 00:15:03 +0000 |
parents | c7a2471e5c4e |
children | 135570a8bd96 |
comparison
equal
deleted
inserted
replaced
505:60f75a9799b2 | 506:fc9c8a3e1a8b |
---|---|
363 | 363 |
364 void collection_free(CollectionData *cd) | 364 void collection_free(CollectionData *cd) |
365 { | 365 { |
366 if (!cd) return; | 366 if (!cd) return; |
367 | 367 |
368 DEBUG_1("collection \"%s\" freed\n", cd->name); | 368 DEBUG_1("collection \"%s\" freed", cd->name); |
369 | 369 |
370 collection_load_stop(cd); | 370 collection_load_stop(cd); |
371 collection_list_free(cd->list); | 371 collection_list_free(cd->list); |
372 | 372 |
373 collection_list = g_list_remove(collection_list, cd); | 373 collection_list = g_list_remove(collection_list, cd); |
382 | 382 |
383 void collection_ref(CollectionData *cd) | 383 void collection_ref(CollectionData *cd) |
384 { | 384 { |
385 cd->ref++; | 385 cd->ref++; |
386 | 386 |
387 DEBUG_1("collection \"%s\" ref count = %d\n", cd->name, cd->ref); | 387 DEBUG_1("collection \"%s\" ref count = %d", cd->name, cd->ref); |
388 } | 388 } |
389 | 389 |
390 void collection_unref(CollectionData *cd) | 390 void collection_unref(CollectionData *cd) |
391 { | 391 { |
392 cd->ref--; | 392 cd->ref--; |
393 | 393 |
394 DEBUG_1("collection \"%s\" ref count = %d\n", cd->name, cd->ref); | 394 DEBUG_1("collection \"%s\" ref count = %d", cd->name, cd->ref); |
395 | 395 |
396 if (cd->ref < 1) | 396 if (cd->ref < 1) |
397 { | 397 { |
398 collection_free(cd); | 398 collection_free(cd); |
399 } | 399 } |
622 { | 622 { |
623 CollectInfo *ci; | 623 CollectInfo *ci; |
624 | 624 |
625 ci = collection_info_new_if_not_exists(cd, &st, fd); | 625 ci = collection_info_new_if_not_exists(cd, &st, fd); |
626 if (!ci) return FALSE; | 626 if (!ci) return FALSE; |
627 DEBUG_3("add to collection: %s\n", fd->path); | 627 DEBUG_3("add to collection: %s", fd->path); |
628 | 628 |
629 cd->list = collection_list_add(cd->list, ci, sorted ? cd->sort_method : SORT_NONE); | 629 cd->list = collection_list_add(cd->list, ci, sorted ? cd->sort_method : SORT_NONE); |
630 cd->changed = TRUE; | 630 cd->changed = TRUE; |
631 | 631 |
632 if (!sorted || cd->sort_method == SORT_NONE) | 632 if (!sorted || cd->sort_method == SORT_NONE) |
658 CollectInfo *ci; | 658 CollectInfo *ci; |
659 | 659 |
660 ci = collection_info_new_if_not_exists(cd, &st, fd); | 660 ci = collection_info_new_if_not_exists(cd, &st, fd); |
661 if (!ci) return FALSE; | 661 if (!ci) return FALSE; |
662 | 662 |
663 DEBUG_3("insert in collection: %s\n", fd->path); | 663 DEBUG_3("insert in collection: %s", fd->path); |
664 | 664 |
665 cd->list = collection_list_insert(cd->list, ci, insert_ci, sorted ? cd->sort_method : SORT_NONE); | 665 cd->list = collection_list_insert(cd->list, ci, insert_ci, sorted ? cd->sort_method : SORT_NONE); |
666 cd->changed = TRUE; | 666 cd->changed = TRUE; |
667 | 667 |
668 collection_window_insert(collection_window_find(cd), ci); | 668 collection_window_insert(collection_window_find(cd), ci); |