From 22485fb7f08950379f2fa498bd081c1623ea8bbd Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 21 Aug 2012 17:13:27 +0200 Subject: reload: accept float values --- ChangeLog | 1 + src/keyevents.c | 2 +- src/options.c | 2 +- src/options.h | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 571e5e8..ec5c493 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,7 @@ git HEAD ** %z image zoom * Always use file URL as filename when opening http files. (consequence: lossless rotate no longer works for such files) + * --reload now accepts rational numbers Sun, 25 Mar 2012 13:13:26 +0200 Daniel Friesel diff --git a/src/keyevents.c b/src/keyevents.c index 343b5d1..18853ed 100644 --- a/src/keyevents.c +++ b/src/keyevents.c @@ -750,7 +750,7 @@ void feh_event_handle_keypress(XEvent * ev) if (opt.reload < SLIDESHOW_RELOAD_MAX) opt.reload++; else if (opt.verbose) - weprintf("Cannot set RELOAD higher than %d seconds.", opt.reload); + weprintf("Cannot set RELOAD higher than %f seconds.", opt.reload); } else if (feh_is_kp(&keys.reload_minus, keysym, state)) { if (opt.reload > 1) diff --git a/src/options.c b/src/options.c index c27e11e..6f11d07 100644 --- a/src/options.c +++ b/src/options.c @@ -590,7 +590,7 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun) } break; case 'R': - opt.reload = atoi(optarg); + opt.reload = atof(optarg); break; case 'a': opt.alpha = 1; diff --git a/src/options.h b/src/options.h index cef4215..a763642 100644 --- a/src/options.h +++ b/src/options.h @@ -97,7 +97,7 @@ struct __fehoptions { int limit_w; int limit_h; unsigned int thumb_redraw; - int reload; + double reload; int sort; int debug; int geom_flags; -- cgit v1.2.3