1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-02-09 23:48:48 +00:00

imlib2: don't flood warnings on non-existing images

This commit is contained in:
Phil Sutter 2009-09-10 01:59:08 +02:00
parent f33affdc03
commit 77cc646080

View File

@ -173,12 +173,16 @@ static void cimlib_draw_image(struct image_list_s *cur, int *clip_x, int
{ {
int w, h; int w, h;
time_t now = time(NULL); time_t now = time(NULL);
static int rep = 0;
image = imlib_load_image(cur->name); image = imlib_load_image(cur->name);
if (!image) { if (!image) {
if (!rep)
NORM_ERR("Unable to load image '%s'", cur->name); NORM_ERR("Unable to load image '%s'", cur->name);
rep = 1;
return; return;
} }
rep = 0; /* reset so disappearing images are reported */
DBGP("Drawing image '%s' at (%i,%i) scaled to %ix%i, " DBGP("Drawing image '%s' at (%i,%i) scaled to %ix%i, "
"caching interval set to %i (with -n opt %i)", "caching interval set to %i (with -n opt %i)",