From dbc8dc8ceabdab55c5c8c74708af7788ade1c151 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 18 Aug 2018 19:43:32 +0200 Subject: combine --no-cycle and --cycle-once into --on-last-slide={quit,hold} --- src/options.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/options.c') 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); -- cgit v1.2.3