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:
parent
f33affdc03
commit
77cc646080
@ -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)",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user