diff options
author | Bert <ber.t@gmx.com> | 2011-01-20 16:04:34 +0100 |
---|---|---|
committer | Bert <ber.t@gmx.com> | 2011-01-20 16:04:34 +0100 |
commit | 004f297ebb3043032661513f40a36c1cc915bc59 (patch) | |
tree | 6780041bbe5c5502fd49e563ee0fd699d8eb7fe4 /main.c | |
parent | 45db2881e26dd5e51c0e4142bdefa2d947292c80 (diff) |
Go to next/previous image
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -102,6 +102,20 @@ void on_keypress(XEvent *ev) { case XK_q: cleanup(); exit(0); + case XK_n: + case XK_space: + if (fileidx + 1 < options->filecnt) { + img_load(&img, options->filenames[++fileidx]); + img_display(&img, &win); + } + break; + case XK_p: + case XK_BackSpace: + if (fileidx > 0) { + img_load(&img, options->filenames[--fileidx]); + img_display(&img, &win); + } + break; } } |