diff options
Diffstat (limited to 'src/slideshow.c')
-rw-r--r-- | src/slideshow.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/src/slideshow.c b/src/slideshow.c index ba9e028..22d2124 100644 --- a/src/slideshow.c +++ b/src/slideshow.c @@ -135,12 +135,12 @@ void cb_reload_timer(void *data) winwidget_rename(w, current_filename); free(current_filename); - feh_reload_image(w, 1, 0); + feh_reload_image(w, 1); feh_add_unique_timer(cb_reload_timer, w, opt.reload); return; } -void feh_reload_image(winwidget w, int resize, int force_new) +void feh_reload_image(winwidget w, int resize) { char *title, *new_title; int len; @@ -152,7 +152,7 @@ void feh_reload_image(winwidget w, int resize, int force_new) return; } - D(("resize %d, force_new %d\n", resize, force_new)); + D(("resize %d\n", resize)); free(FEH_FILE(w->file->data)->caption); FEH_FILE(w->file->data)->caption = NULL; @@ -169,20 +169,10 @@ void feh_reload_image(winwidget w, int resize, int force_new) /* force imlib2 not to cache */ winwidget_free_image(w); - /* if the image has changed in dimensions - we gotta resize */ - if ((feh_load_image(&tmp, FEH_FILE(w->file->data))) == 0) { - if (force_new) { - eprintf("failed to reload image\n"); - } else { - im_weprintf(w, "Couldn't reload image. Is it still there?"); - } - winwidget_rename(w, title); - free(title); - free(new_title); - filelist = feh_file_remove_from_list(filelist, w->file); - return; - } + if ((feh_load_image(&tmp, FEH_FILE(w->file->data))) == 0) + eprintf("failed to reload image"); + /* if the image has changed in dimensions - we gotta resize */ if (!resize && ((old_w != gib_imlib_image_get_width(tmp)) || (old_h != gib_imlib_image_get_height(tmp)))) resize = 1; |