Kaynağa Gözat

Merge djhejna/floatdelay

master
Bert Münnich 8 yıl önce
ebeveyn
işleme
ff2ce99bf7
6 değiştirilmiş dosya ile 17 ekleme ve 9 silme
  1. +1
    -1
      Makefile
  2. +2
    -2
      commands.c
  3. +1
    -1
      image.c
  4. +7
    -3
      main.c
  5. +1
    -1
      options.c
  6. +5
    -1
      sxiv.1

+ 1
- 1
Makefile Dosyayı Görüntüle

@@ -1,4 +1,4 @@
VERSION := git-20161129
VERSION := git-20161201

PREFIX := /usr/local
MANPREFIX := $(PREFIX)/share/man


+ 2
- 2
commands.c Dosyayı Görüntüle

@@ -429,8 +429,8 @@ bool ci_slideshow(arg_t _)
{
if (prefix > 0) {
img.ss.on = true;
img.ss.delay = prefix;
set_timeout(slideshow, img.ss.delay * 1000, true);
img.ss.delay = prefix * 10;
set_timeout(slideshow, img.ss.delay * 100, true);
} else if (img.ss.on) {
img.ss.on = false;
reset_timeout(slideshow);


+ 1
- 1
image.c Dosyayı Görüntüle

@@ -76,7 +76,7 @@ void img_init(img_t *img, win_t *win)
img->gamma = MIN(MAX(options->gamma, -GAMMA_RANGE), GAMMA_RANGE);

img->ss.on = options->slideshow > 0;
img->ss.delay = options->slideshow > 0 ? options->slideshow : SLIDESHOW_DELAY;
img->ss.delay = options->slideshow > 0 ? options->slideshow : SLIDESHOW_DELAY * 10;
}

#if HAVE_LIBEXIF


+ 7
- 3
main.c Dosyayı Görüntüle

@@ -371,8 +371,12 @@ void update_info(void)
bar_put(r, "%s%0*d/%d", mark, fw, fileidx + 1, filecnt);
} else {
bar_put(r, "%s", mark);
if (img.ss.on)
bar_put(r, "%ds | ", img.ss.delay);
if (img.ss.on) {
if (img.ss.delay % 10 != 0)
bar_put(r, "%2.1fs | ", (float)img.ss.delay / 10);
else
bar_put(r, "%ds | ", img.ss.delay / 10);
}
if (img.gamma != 0)
bar_put(r, "G%+d | ", img.gamma);
bar_put(r, "%3d%% | ", (int) (img.zoom * 100.0));
@@ -403,7 +407,7 @@ void redraw(void)
if (mode == MODE_IMAGE) {
img_render(&img);
if (img.ss.on) {
t = img.ss.delay * 1000;
t = img.ss.delay * 100;
if (img.multi.cnt > 0 && img.multi.animate)
t = MAX(t, img.multi.length);
set_timeout(slideshow, t, false);


+ 1
- 1
options.c Dosyayı Görüntüle

@@ -136,7 +136,7 @@ void parse_options(int argc, char **argv)
_options.recursive = true;
break;
case 'S':
n = strtol(optarg, &end, 0);
n = strtof(optarg, &end) * 10;
if (*end != '\0' || n <= 0)
error(EXIT_FAILURE, 0, "Invalid argument for option -S: %s", optarg);
_options.slideshow = n;


+ 5
- 1
sxiv.1 Dosyayı Görüntüle

@@ -87,7 +87,11 @@ Be quiet, disable warnings to standard error stream.
Search the given directories recursively for images to view.
.TP
.BI "\-S " DELAY
Start in slideshow mode. Set the delay between images to DELAY seconds.
Start in slideshow mode. Set the delay between images to
.I DELAY
seconds.
.I DELAY
may be a floating point number.
.TP
.BI "\-s " MODE
Set scale mode according to MODE character. Supported modes are: [d]own,


Yükleniyor…
İptal
Kaydet