diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-06-29 19:13:00 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-06-29 19:14:27 +0200 |
commit | 22a627d02fd8d7c5564b89b739cbf368a3049c78 (patch) | |
tree | 7f55924aed0f5ae9e04c75ea7538b64865ff6498 /src | |
parent | 9d662abb14369c655dde0c712aa3da3ae4ac2c84 (diff) |
Add support for x-large and xx-large XDG thumbnail directories
Diffstat (limited to 'src')
-rw-r--r-- | src/thumbnail.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/thumbnail.c b/src/thumbnail.c index 77c0acd..79e5035 100644 --- a/src/thumbnail.c +++ b/src/thumbnail.c @@ -183,8 +183,6 @@ void init_thumbnail_mode(void) winwidget_show(winwid); } - /* make sure we have an ~/.thumbnails/normal directory for storing - permanent thumbnails */ td.cache_thumbnails = opt.cache_thumbnails; if (td.cache_thumbnails) { @@ -193,9 +191,15 @@ void init_thumbnail_mode(void) else td.cache_dim = opt.thumb_h; - if (td.cache_dim > 256) { - /* No caching as specified by standard. Sort of. */ + if (td.cache_dim > 1024) { + /* Not specified by XDG thumbnail standard */ td.cache_thumbnails = 0; + } else if (td.cache_dim > 512) { + td.cache_dim = 1024; + td.cache_dir = estrdup("xx-large"); + } else if (td.cache_dim > 256) { + td.cache_dim = 512; + td.cache_dir = estrdup("x-large"); } else if (td.cache_dim > 128) { td.cache_dim = 256; td.cache_dir = estrdup("large"); |