Simplified & sped up reloading of all thumbnails
This commit is contained in:
parent
4057453d6d
commit
d1a1e0142b
@ -93,7 +93,7 @@ The following general key commands are available:
|
|||||||
A Toggle visibility of alpha-channel, i.e. transparency
|
A Toggle visibility of alpha-channel, i.e. transparency
|
||||||
|
|
||||||
r Reload image
|
r Reload image
|
||||||
R Refresh thumbnails
|
R Reload all thumbnails
|
||||||
D Remove image from file list and go to next image
|
D Remove image from file list and go to next image
|
||||||
|
|
||||||
|
|
||||||
|
24
commands.c
24
commands.c
@ -94,22 +94,14 @@ bool it_toggle_bar(arg_t a) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool it_refresh_thumbs(arg_t a) {
|
bool t_reload_all(arg_t a) {
|
||||||
int i = 0;
|
if (mode == MODE_THUMB) {
|
||||||
if (mode == MODE_THUMB) {
|
tns_free(&tns);
|
||||||
win_set_cursor(&win, CURSOR_WATCH);
|
tns_init(&tns, filecnt, &win);
|
||||||
while (i < filecnt) {
|
return true;
|
||||||
if (!tns_load(&tns, i, &files[i], true, false)) {
|
} else {
|
||||||
remove_file(i, false);
|
return false;
|
||||||
tns.dirty = true;
|
}
|
||||||
if (tns.sel >= tns.cnt)
|
|
||||||
tns.sel = tns.cnt - 1;
|
|
||||||
} else {
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool it_reload_image(arg_t a) {
|
bool it_reload_image(arg_t a) {
|
||||||
|
@ -45,7 +45,7 @@ bool it_quit(arg_t);
|
|||||||
bool it_switch_mode(arg_t);
|
bool it_switch_mode(arg_t);
|
||||||
bool it_toggle_fullscreen(arg_t);
|
bool it_toggle_fullscreen(arg_t);
|
||||||
bool it_toggle_bar(arg_t);
|
bool it_toggle_bar(arg_t);
|
||||||
bool it_refresh_thumbs(arg_t);
|
bool t_reload_all(arg_t);
|
||||||
bool it_reload_image(arg_t);
|
bool it_reload_image(arg_t);
|
||||||
bool it_remove_image(arg_t);
|
bool it_remove_image(arg_t);
|
||||||
bool i_navigate(arg_t);
|
bool i_navigate(arg_t);
|
||||||
|
@ -64,7 +64,7 @@ static const keymap_t keys[] = {
|
|||||||
{ false, XK_b, it_toggle_bar, (arg_t) None },
|
{ false, XK_b, it_toggle_bar, (arg_t) None },
|
||||||
|
|
||||||
{ false, XK_r, it_reload_image, (arg_t) None },
|
{ false, XK_r, it_reload_image, (arg_t) None },
|
||||||
{ false, XK_R, it_refresh_thumbs, (arg_t) None },
|
{ false, XK_R, t_reload_all, (arg_t) None },
|
||||||
{ false, XK_D, it_remove_image, (arg_t) None },
|
{ false, XK_D, it_remove_image, (arg_t) None },
|
||||||
|
|
||||||
{ false, XK_n, i_navigate, (arg_t) +1 },
|
{ false, XK_n, i_navigate, (arg_t) +1 },
|
||||||
|
2
sxiv.1
2
sxiv.1
@ -118,7 +118,7 @@ Toggle visibility of alpha-channel, i.e. image transparency.
|
|||||||
Reload image.
|
Reload image.
|
||||||
.TP
|
.TP
|
||||||
.B R
|
.B R
|
||||||
Refresh thumbnails.
|
Reload all thumbnails.
|
||||||
.TP
|
.TP
|
||||||
.B D
|
.B D
|
||||||
Remove current image from file list and go to next image.
|
Remove current image from file list and go to next image.
|
||||||
|
Loading…
Reference in New Issue
Block a user