summaryrefslogtreecommitdiff
path: root/src/options.c
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-08-18 19:43:32 +0200
committerulteq <ulteq@web.de>2018-08-24 11:41:18 +0200
commitdbc8dc8ceabdab55c5c8c74708af7788ade1c151 (patch)
treecbecefba342df30568aef9e7e468dca5c8790f04 /src/options.c
parentf3ea5c887e034f08d2735c7a32876f94ee9ef60a (diff)
combine --no-cycle and --cycle-once into --on-last-slide={quit,hold}
Diffstat (limited to 'src/options.c')
-rw-r--r--src/options.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/options.c b/src/options.c
index 1a47a39..38d2568 100644
--- a/src/options.c
+++ b/src/options.c
@@ -415,7 +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},
- {"no-cycle" , 0, 0, 244},
+ {"on-last-slide" , 1, 0, 244},
{"conversion-timeout" , 1, 0, 245},
{"version-sort" , 0, 0, 246},
{"offset" , 1, 0, 247},
@@ -743,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;
@@ -787,7 +788,16 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun)
opt.cache_size = 2048;
break;
case 244:
- opt.no_cycle = 1;
+ 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);