summaryrefslogtreecommitdiff
path: root/src/keyevents.c
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-05-02 19:22:30 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-05-02 19:22:30 +0200
commit85fba735f87bb9aae2894f658d4b6c470fbe672a (patch)
tree99d1a17a9107ceba487f78c233f032a615f49bd5 /src/keyevents.c
parent873aecef62bfca4ab25a9471b4bf4f98844c846c (diff)
Use next/prev/render keys to select images in thumbnail mode (closes #26)
Diffstat (limited to 'src/keyevents.c')
-rw-r--r--src/keyevents.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/keyevents.c b/src/keyevents.c
index b68a394..381be50 100644
--- a/src/keyevents.c
+++ b/src/keyevents.c
@@ -421,10 +421,14 @@ void feh_event_handle_keypress(XEvent * ev)
if (feh_is_kp(&keys.next_img, keysym, state)) {
if (opt.slideshow)
slideshow_change_image(winwid, SLIDE_NEXT);
+ else if (opt.thumbs)
+ feh_thumbnail_select_next(winwid, 1);
}
else if (feh_is_kp(&keys.prev_img, keysym, state)) {
if (opt.slideshow)
slideshow_change_image(winwid, SLIDE_PREV);
+ else if (opt.thumbs)
+ feh_thumbnail_select_prev(winwid, 1);
}
else if (feh_is_kp(&keys.scroll_right, keysym, state)) {
winwid->im_x -= 20;
@@ -445,10 +449,14 @@ void feh_event_handle_keypress(XEvent * ev)
else if (feh_is_kp(&keys.jump_back, keysym, state)) {
if (opt.slideshow)
slideshow_change_image(winwid, SLIDE_JUMP_BACK);
+ else if (opt.thumbs)
+ feh_thumbnail_select_prev(winwid, 10);
}
else if (feh_is_kp(&keys.jump_fwd, keysym, state)) {
if (opt.slideshow)
slideshow_change_image(winwid, SLIDE_JUMP_FWD);
+ else if (opt.thumbs)
+ feh_thumbnail_select_next(winwid, 10);
}
else if (feh_is_kp(&keys.quit, keysym, state)) {
winwidget_destroy_all();
@@ -533,7 +541,10 @@ void feh_event_handle_keypress(XEvent * ev)
winwidget_render_image(winwid, 0, 0);
}
else if (feh_is_kp(&keys.render, keysym, state)) {
- winwidget_render_image(winwid, 0, 0);
+ if (opt.thumbs)
+ feh_thumbnail_show_selected();
+ else
+ winwidget_render_image(winwid, 0, 0);
}
else if (feh_is_kp(&keys.toggle_actions, keysym, state)) {
opt.draw_actions = !opt.draw_actions;