summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-08-18 11:00:24 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-08-18 11:01:39 +0200
commitfee966abf48a84814b7b50ccb8c0dd118d65f30f (patch)
tree7b10899a30ff49e739f38eadcf3d9cde98122da0
parentfdf6add16d8deb9f52dc416bd626d888205e548a (diff)
downloadfeh-fee966abf48a84814b7b50ccb8c0dd118d65f30f.zip
--action: Reload image if hold_action flag (;) is set (closes #59)
An action may be used to alter the image or specific parts of it displayed by --info, so if a user invokes an action with hold_action set, the image and all relevant information must be reloaded.
-rw-r--r--ChangeLog5
-rw-r--r--man/feh.pre3
-rw-r--r--src/keyevents.c11
3 files changed, 15 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 9791bdf..c9753e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+git HEAD
+
+ * Reload image after executing an action with the hold-action flag set
+ <https://github.com/derf/feh/issues/59>
+
Tue, 16 Aug 2011 22:48:06 +0200 Daniel Friesel <derf@finalrewind.org>
* Release v1.15.1
diff --git a/man/feh.pre b/man/feh.pre
index e8bb8b1..c8bd8dd 100644
--- a/man/feh.pre
+++ b/man/feh.pre
@@ -123,7 +123,8 @@ If
is
.Qq \&; ,
.Nm
-will not switch to the next image after executing the action.
+will reload the current image instead of switching to the next one after
+executing the action.
.
.Pp
.
diff --git a/src/keyevents.c b/src/keyevents.c
index 7299fa8..82d0cce 100644
--- a/src/keyevents.c
+++ b/src/keyevents.c
@@ -331,15 +331,20 @@ void feh_event_invoke_action(winwidget winwid, unsigned char action)
if (opt.actions[action]) {
if (opt.slideshow) {
feh_action_run(FEH_FILE(winwid->file->data), opt.actions[action]);
- winwidget_update_caption(winwid);
- if (! opt.hold_actions[action])
+ if (opt.hold_actions[action])
+ feh_reload_image(winwid, 1, 1);
+ else
slideshow_change_image(winwid, SLIDE_NEXT, 1);
} else if ((winwid->type == WIN_TYPE_SINGLE)
|| (winwid->type == WIN_TYPE_THUMBNAIL_VIEWER)) {
feh_action_run(FEH_FILE(winwid->file->data), opt.actions[action]);
- winwidget_destroy(winwid);
+
+ if (opt.hold_actions[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",