g/G key mappings in thumbnail mode

This commit is contained in:
Bert 2011-02-19 23:16:01 +01:00
parent a345c963f8
commit 4cc6ca939c

34
main.c
View File

@ -309,18 +309,6 @@ void on_keypress(XKeyEvent *kev) {
changed = load_image(); changed = load_image();
} }
break; break;
case XK_g:
if (fileidx != 0) {
fileidx = 0;
changed = load_image();
}
break;
case XK_G:
if (fileidx != filecnt - 1) {
fileidx = filecnt - 1;
changed = load_image();
}
break;
/* zooming */ /* zooming */
case XK_plus: case XK_plus:
@ -434,6 +422,28 @@ void on_keypress(XKeyEvent *kev) {
case XK_q: case XK_q:
cleanup(); cleanup();
exit(0); exit(0);
case XK_g:
if (fileidx != 0) {
fileidx = 0;
changed = 1;
if (mode == MODE_NORMAL)
load_image();
else
tns.dirty = 1;
}
break;
case XK_G:
if (fileidx != filecnt - 1) {
fileidx = filecnt - 1;
changed = 1;
if (mode == MODE_NORMAL)
load_image();
else
tns.dirty = 1;
}
break;
case XK_f: case XK_f:
win_toggle_fullscreen(&win); win_toggle_fullscreen(&win);
/* render on next configurenotify */ /* render on next configurenotify */