Commit c515ae79 authored by Levi Smith's avatar Levi Smith Committed by Birte Kristina Friesel
Browse files

Option --action-hold-slide. If specified, when in slideshow mode images will...

Option --action-hold-slide. If specified, when in slideshow mode images will not automatically change after running user action. Otherwise, slideshow images will cycle after action as usual.
parent aa22a146
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -37,7 +37,9 @@ void feh_event_invoke_action(winwidget winwid, char *action)
		if (opt.slideshow) {
		    feh_action_run(FEH_FILE(winwid->file->data), action);
		    winwidget_update_caption(winwid);
			/* slideshow_change_image(winwid, SLIDE_NEXT); */

		    if (! opt.action_hold_slide)
		      slideshow_change_image(winwid, SLIDE_NEXT);

		} else if ((winwid->type == WIN_TYPE_SINGLE)
				|| (winwid->type == WIN_TYPE_THUMBNAIL_VIEWER)) {
+11 −0
Original line number Diff line number Diff line
@@ -42,6 +42,8 @@ fehoptions opt;

void init_parse_options(int argc, char **argv)
{
	/* TODO: sort these to match declaration of __fehoptions */

	/* For setting the command hint on X windows */
	cmdargc = argc;
	cmdargv = argv;
@@ -68,6 +70,9 @@ void init_parse_options(int argc, char **argv)
	opt.prev_button = 4;
	opt.next_button = 5;

	opt.draw_actions = 0;
	opt.action_hold_slide = 0;

	opt.rotate_button = 2;
	opt.no_rotate_ctrl_mask = 0;
	opt.blur_button = 1;
@@ -318,6 +323,8 @@ static void feh_parse_option_array(int argc, char **argv)
	static char stropts[] =
		"a:A:b:B:cC:dD:e:E:f:Fg:GhH:iIj:J:kK:lL:mM:nNo:O:pPqQrR:sS:tT:uUvVwW:xXy:YzZ"
		"0:1:2:4:5:8:9:.@:^:~:):|:_:+:";

	/* (*name, has_arg, *flag, val) See: struct option in getopts.h */
	static struct option lopts[] = {
		{"help"          , 0, 0, 'h'},
		{"version"       , 0, 0, 'v'},
@@ -415,6 +422,7 @@ static void feh_parse_option_array(int argc, char **argv)
		{"index-size"    , 1, 0, 231},
		{"index-dim"     , 1, 0, 232},
		{"thumb-redraw"  , 1, 0, 'J'},
		{"action-hold-slide", 0, 0, 233},

		{0, 0, 0, 0}
	};
@@ -761,6 +769,9 @@ static void feh_parse_option_array(int argc, char **argv)
		case 'J':
			opt.thumb_redraw = atoi(optarg);
			break;
		case 233:
			opt.action_hold_slide = 1;
			break;
		default:
			break;
		}
+1 −0
Original line number Diff line number Diff line
@@ -66,6 +66,7 @@ struct __fehoptions {
	unsigned char screen_clip;
	unsigned char hide_pointer;
	unsigned char draw_actions;
	unsigned char action_hold_slide;
	unsigned char cache_thumbnails;
	unsigned char cycle_once;