Mercurial > geeqie.yaz
comparison src/cache.c @ 318:b16b9b8979e5
Add a new struct ConfOptions to handle options.
Changes were made among the code to use only one global var
named "options" of type ConfOptions *.
Initialization takes place in new init_options().
author | zas_ |
---|---|
date | Fri, 11 Apr 2008 22:14:36 +0000 |
parents | e213fb025621 |
children | 767b53cd9ab7 |
comparison
equal
deleted
inserted
replaced
317:46169c246c51 | 318:b16b9b8979e5 |
---|---|
658 else | 658 else |
659 { | 659 { |
660 cache_ext = NULL; | 660 cache_ext = NULL; |
661 } | 661 } |
662 | 662 |
663 if (((type != CACHE_TYPE_METADATA && enable_thumb_dirs) || | 663 if (((type != CACHE_TYPE_METADATA && options->enable_thumb_dirs) || |
664 (type == CACHE_TYPE_METADATA && enable_metadata_dirs)) && | 664 (type == CACHE_TYPE_METADATA && options->enable_metadata_dirs)) && |
665 access_file(base, W_OK)) | 665 access_file(base, W_OK)) |
666 { | 666 { |
667 path = g_strconcat(base, "/", cache_local, name, cache_ext, NULL); | 667 path = g_strconcat(base, "/", cache_local, name, cache_ext, NULL); |
668 if (mode) *mode = 0775; | 668 if (mode) *mode = 0775; |
669 } | 669 } |
697 name = filename_from_path(source); | 697 name = filename_from_path(source); |
698 base = remove_level_from_path(source); | 698 base = remove_level_from_path(source); |
699 | 699 |
700 if (type == CACHE_TYPE_METADATA) | 700 if (type == CACHE_TYPE_METADATA) |
701 { | 701 { |
702 prefer_local = enable_metadata_dirs; | 702 prefer_local = options->enable_metadata_dirs; |
703 } | 703 } |
704 else | 704 else |
705 { | 705 { |
706 prefer_local = enable_thumb_dirs; | 706 prefer_local = options->enable_thumb_dirs; |
707 } | 707 } |
708 | 708 |
709 if (prefer_local) | 709 if (prefer_local) |
710 { | 710 { |
711 path = g_strconcat(base, "/", cache_local, "/", name, cache_ext, NULL); | 711 path = g_strconcat(base, "/", cache_local, "/", name, cache_ext, NULL); |