From 3a1b07272aeff6397f74014cdeae2c129d608a94 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 13 Sep 2012 12:05:55 +0200 Subject: Show error message if normal load failed (broken by 2.4) + update tests --- ChangeLog | 4 +++- src/imlib.c | 8 +------- test/feh.t | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4f12946..af57063 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -git HEAD +Thu, 13 Sep 2012 12:00:06 +0200 Daniel Friesel * Fix freedesktop.org Thumbnail Managing Standard implementation: when running feh on the current working directory, '/path/to/./image.png' @@ -6,6 +6,8 @@ git HEAD '/path/to/image.png' * Show error message if lossless rotate / flip failed on non-JPEG image * Show error message if -O / -o failed to save image + * Show error message if load failed and magick is disabled (was broken + by feh 2.4) Tue, 28 Aug 2012 11:46:19 +0200 Daniel Friesel diff --git a/src/imlib.c b/src/imlib.c index 3ffc538..b3abc8a 100644 --- a/src/imlib.c +++ b/src/imlib.c @@ -234,10 +234,7 @@ int feh_load_image(Imlib_Image * im, feh_file * file) tmpname = feh_magick_load_image(file->filename); } - if (image_source != SRC_IMLIB) { - if (tmpname == NULL) - return 0; - + if ((image_source != SRC_IMLIB) && tmpname) { *im = imlib_load_image_with_error_return(tmpname, &err); if (im) { real_filename = file->filename; @@ -336,9 +333,6 @@ static char *feh_magick_load_image(char *filename) if (WIFSIGNALED(status)) weprintf("%s - Conversion took too long, skipping", filename); - else - weprintf("%s - No loader for that file format", - filename); } /* diff --git a/test/feh.t b/test/feh.t index 8746362..1d5576b 100644 --- a/test/feh.t +++ b/test/feh.t @@ -33,7 +33,7 @@ if (length($feh_name) == 0) { } my $re_warning = - qr{${feh_name} WARNING: test/fail/... \- No loader for that file format\n}; + qr{${feh_name} WARNING: test/fail/... \- No Imlib2 loader for that file format\n}; my $re_loadable = qr{test/ok/...}; my $re_unloadable = qr{test/fail/...}; my $re_list_action = qr{test/ok/... 16x16}; -- cgit v1.2.3