summaryrefslogtreecommitdiffstats
path: root/commands.c
diff options
context:
space:
mode:
authorBert Münnich <be.muennich@googlemail.com>2012-05-13 21:52:53 +0200
committerBert Münnich <be.muennich@googlemail.com>2012-05-13 21:52:53 +0200
commitd1a1e0142b453a7083463eaf02402b4d3b31ff65 (patch)
tree72bcc1d1176e674a38ed75b869ad47ebe2508404 /commands.c
parent4057453d6d48fe3fa070c90449cc7308dfd84559 (diff)
downloadnsxiv-d1a1e0142b453a7083463eaf02402b4d3b31ff65.tar.zst
Simplified & sped up reloading of all thumbnails
Diffstat (limited to 'commands.c')
-rw-r--r--commands.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/commands.c b/commands.c
index 7567757..a27673a 100644
--- a/commands.c
+++ b/commands.c
@@ -94,22 +94,14 @@ bool it_toggle_bar(arg_t a) {
return true;
}
-bool it_refresh_thumbs(arg_t a) {
- int i = 0;
- if (mode == MODE_THUMB) {
- win_set_cursor(&win, CURSOR_WATCH);
- while (i < filecnt) {
- if (!tns_load(&tns, i, &files[i], true, false)) {
- remove_file(i, false);
- tns.dirty = true;
- if (tns.sel >= tns.cnt)
- tns.sel = tns.cnt - 1;
- } else {
- i++;
- }
- }
- }
- return true;
+bool t_reload_all(arg_t a) {
+ if (mode == MODE_THUMB) {
+ tns_free(&tns);
+ tns_init(&tns, filecnt, &win);
+ return true;
+ } else {
+ return false;
+ }
}
bool it_reload_image(arg_t a) {