From 5e481912ec983be89f10cbbb21561ed7cc898027 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bert=20M=C3=BCnnich?= Date: Fri, 25 Jul 2014 22:52:31 +0200 Subject: Revised handling of GIF animations - New option `-a`: Play animations at startup - Ctrl-Space toggles animation for all GIF files - Infinite loop for all animations --- options.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'options.c') diff --git a/options.c b/options.c index 47fe21a..403785c 100644 --- a/options.c +++ b/options.c @@ -33,7 +33,7 @@ const options_t *options = (const options_t*) &_options; void print_usage(void) { - printf("usage: sxiv [-bcfhioqrtvZ] [-G GAMMA] [-g GEOMETRY] [-n NUM] " + printf("usage: sxiv [-abcfhioqrtvZ] [-G GAMMA] [-g GEOMETRY] [-n NUM] " "[-N NAME] [-S DELAY] [-s MODE] [-z ZOOM] FILES...\n"); } @@ -55,6 +55,7 @@ void parse_options(int argc, char **argv) _options.scalemode = SCALE_DOWN; _options.zoom = 1.0; + _options.animate = false; _options.gamma = 0; _options.slideshow = 0; @@ -67,11 +68,14 @@ void parse_options(int argc, char **argv) _options.thumb_mode = false; _options.clean_cache = false; - while ((opt = getopt(argc, argv, "bcfG:g:hin:N:oqrS:s:tvZz:")) != -1) { + while ((opt = getopt(argc, argv, "abcfG:g:hin:N:oqrS:s:tvZz:")) != -1) { switch (opt) { case '?': print_usage(); exit(EXIT_FAILURE); + case 'a': + _options.animate = true; + break; case 'b': _options.hide_bar = true; break; -- cgit v1.2.3