diff options
author | Daniel Friesel <derf@finalrewind.org> | 2018-08-18 19:43:32 +0200 |
---|---|---|
committer | ulteq <ulteq@web.de> | 2018-08-24 11:41:18 +0200 |
commit | dbc8dc8ceabdab55c5c8c74708af7788ade1c151 (patch) | |
tree | cbecefba342df30568aef9e7e468dca5c8790f04 /src/slideshow.c | |
parent | f3ea5c887e034f08d2735c7a32876f94ee9ef60a (diff) |
combine --no-cycle and --cycle-once into --on-last-slide={quit,hold}
Diffstat (limited to 'src/slideshow.c')
-rw-r--r-- | src/slideshow.c | 10 |
1 files changed, 5 insertions, 5 deletions
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) { |