summaryrefslogtreecommitdiff
path: root/src/options.c
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-08-29 19:19:38 +0200
committerDaniel Friesel <derf@finalrewind.org>2018-08-29 19:19:38 +0200
commit12c1253971b3635024b4571ec382a9ff75c7e605 (patch)
tree845a8c8994be760269eee92f003be40b1f762e66 /src/options.c
parentbcefd10220b7da136ccff57b37d47e7ae7337013 (diff)
parentdbc8dc8ceabdab55c5c8c74708af7788ade1c151 (diff)
Merge branch 'no-cycle' of https://github.com/ulteq/feh into ulteq-no-cycle
Diffstat (limited to 'src/options.c')
-rw-r--r--src/options.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/options.c b/src/options.c
index af0f07d..38d2568 100644
--- a/src/options.c
+++ b/src/options.c
@@ -415,6 +415,7 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun)
{"insecure" , 0, 0, 240},
{"no-recursive" , 0, 0, 241},
{"cache-size" , 1, 0, 243},
+ {"on-last-slide" , 1, 0, 244},
{"conversion-timeout" , 1, 0, 245},
{"version-sort" , 0, 0, 246},
{"offset" , 1, 0, 247},
@@ -742,7 +743,8 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun)
break;
#endif
case 224:
- opt.cycle_once = 1;
+ weprintf("--cycle-once is deprecated, please use --on-last-slide=quit instead");
+ opt.on_last_slide = ON_LAST_SLIDE_QUIT;
break;
case 225:
opt.xinerama = 0;
@@ -785,6 +787,18 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun)
if (opt.cache_size > 2048)
opt.cache_size = 2048;
break;
+ case 244:
+ if (!strcmp(optarg, "quit")) {
+ opt.on_last_slide = ON_LAST_SLIDE_QUIT;
+ } else if (!strcmp(optarg, "hold")) {
+ opt.on_last_slide = ON_LAST_SLIDE_HOLD;
+ } else if (!strcmp(optarg, "resume")) {
+ opt.on_last_slide = ON_LAST_SLIDE_RESUME;
+ } else {
+ weprintf("Unrecognized on-last-slide action \"%s\"."
+ "Supported actions: hold, resume, quit\n", optarg);
+ }
+ break;
case 245:
opt.conversion_timeout = atoi(optarg);
break;