Krolyxon
Commit 4057453

Branches

Refs →

nsxiv4057453

Merge remote-tracking branch 'baskerville/master'

Author
Bert Münnich
Date
2012-05-13 21:40 +0200
Parents
b605b98 de4e9fc
Commit
4057453d6d48fe3fa070c90449cc7308dfd84559

+24 −0

5 files changed

  1. M README.md +1 −0
  2. M commands.c +18 −0
  3. M commands.h +1 −0
  4. M config.def.h +1 −0
  5. M sxiv.1 +3 −0
M README.md View
@@ -93,6 +93,7 @@ The following general key commands are available:
9393 A Toggle visibility of alpha-channel, i.e. transparency
9494
9595 r Reload image
96+ R Refresh thumbnails
9697 D Remove image from file list and go to next image
9798
9899
M commands.c View
@@ -94,6 +94,24 @@ bool it_toggle_bar(arg_t a) {
9494 return true;
9595 }
9696
97+bool it_refresh_thumbs(arg_t a) {
98+ int i = 0;
99+ if (mode == MODE_THUMB) {
100+ win_set_cursor(&win, CURSOR_WATCH);
101+ while (i < filecnt) {
102+ if (!tns_load(&tns, i, &files[i], true, false)) {
103+ remove_file(i, false);
104+ tns.dirty = true;
105+ if (tns.sel >= tns.cnt)
106+ tns.sel = tns.cnt - 1;
107+ } else {
108+ i++;
109+ }
110+ }
111+ }
112+ return true;
113+}
114+
97115 bool it_reload_image(arg_t a) {
98116 if (mode == MODE_IMAGE) {
99117 load_image(fileidx);
M commands.h View
@@ -45,6 +45,7 @@ bool it_quit(arg_t);
4545 bool it_switch_mode(arg_t);
4646 bool it_toggle_fullscreen(arg_t);
4747 bool it_toggle_bar(arg_t);
48+bool it_refresh_thumbs(arg_t);
4849 bool it_reload_image(arg_t);
4950 bool it_remove_image(arg_t);
5051 bool i_navigate(arg_t);
M config.def.h View
@@ -64,6 +64,7 @@ static const keymap_t keys[] = {
6464 { false, XK_b, it_toggle_bar, (arg_t) None },
6565
6666 { false, XK_r, it_reload_image, (arg_t) None },
67+ { false, XK_R, it_refresh_thumbs, (arg_t) None },
6768 { false, XK_D, it_remove_image, (arg_t) None },
6869
6970 { false, XK_n, i_navigate, (arg_t) +1 },
M sxiv.1 View
@@ -117,6 +117,9 @@ Toggle visibility of alpha-channel, i.e. image transparency.
117117 .B r
118118 Reload image.
119119 .TP
120+.B R
121+Refresh thumbnails.
122+.TP
120123 .B D
121124 Remove current image from file list and go to next image.
122125 .SH THUMBNAIL KEYBOARD COMMANDS