summaryrefslogtreecommitdiff
path: root/src/keyevents.c
diff options
context:
space:
mode:
authorDaniel Friesel <ghub@derf.homelinux.org>2011-10-02 11:34:54 -0700
committerDaniel Friesel <ghub@derf.homelinux.org>2011-10-02 11:34:54 -0700
commitb467f5f01ce15f24f786cc10dc3fc543d44871dd (patch)
treebf1c198e248205d31af6b47a9b696644741ef081 /src/keyevents.c
parentf55de5185347da52e7cd282491afdc7114418e50 (diff)
parent31288506d2f5639e9e7348ef34a6bc917c9a294b (diff)
Merge pull request #66 from Ferada/master
Perform actions on thumbnails.
Diffstat (limited to 'src/keyevents.c')
-rw-r--r--src/keyevents.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/keyevents.c b/src/keyevents.c
index 827ab24..64194da 100644
--- a/src/keyevents.c
+++ b/src/keyevents.c
@@ -345,10 +345,21 @@ void feh_event_invoke_action(winwidget winwid, unsigned char action)
feh_reload_image(winwid, 1, 1);
else
winwidget_destroy(winwid);
- } else if (winwid->type == WIN_TYPE_THUMBNAIL)
- fputs("actions from the main thumb window aren't currently supported!\n"
- "For now, open the image to perform the action on it.\n",
- stdout);
+ } else if (winwid->type == WIN_TYPE_THUMBNAIL) {
+ feh_file *thumbfile;
+ /* also see events.c:306 */
+ thumbfile = feh_thumbnail_get_selected_file();
+
+ if (thumbfile) {
+ feh_action_run(thumbfile, opt.actions[action]);
+
+ /* so, reload/regenerate the thumbnail here? */
+ if (!opt.hold_actions[action])
+ winwidget_destroy(winwid);
+ }
+ else
+ fputs("no thumbnail selected\n", stderr);
+ }
}
return;
}