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/slideshow.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/slideshow.c') diff --git a/src/slideshow.c b/src/slideshow.c index 77f5a82..6f622b4 100644 --- a/src/slideshow.c +++ b/src/slideshow.c @@ -225,7 +225,7 @@ void slideshow_change_image(winwidget winwid, int change, int render) /* Without this, clicking a one-image slideshow reloads it. Not very * intelligent behaviour :-) */ - if (filelist_len < 2 && opt.cycle_once == 0) + if (filelist_len < 2 && opt.on_last_slide != ON_LAST_SLIDE_QUIT) return; /* Ok. I do this in such an odd way to ensure that if the last or first * @@ -333,7 +333,7 @@ void slideshow_change_image(winwidget winwid, int change, int render) last = NULL; } - if (opt.no_cycle && + if (opt.on_last_slide == ON_LAST_SLIDE_HOLD && ((current_file == filelist && change == SLIDE_NEXT) || (previous_file == filelist && change == SLIDE_PREV))) { current_file = previous_file; @@ -574,10 +574,10 @@ void feh_filelist_image_remove(winwidget winwid, char do_delete) doomed = current_file; /* - * work around feh_list_jump exiting if cycle_once is enabled + * work around feh_list_jump exiting if ON_LAST_SLIDE_QUIT is set * and no further files are left (we need to delete first) */ - if (opt.cycle_once && ! doomed->next && do_delete) { + if (opt.on_last_slide == ON_LAST_SLIDE_QUIT && ! doomed->next && do_delete) { feh_file_rm_and_free(filelist, doomed); exit(0); } @@ -653,7 +653,7 @@ gib_list *feh_list_jump(gib_list * root, gib_list * l, int direction, int num) if (ret->next) { ret = ret->next; } else { - if (opt.cycle_once) { + if (opt.on_last_slide == ON_LAST_SLIDE_QUIT) { exit(0); } if (opt.randomize) { -- cgit v1.2.3