summaryrefslogtreecommitdiffstats
path: root/thumbs.c
diff options
context:
space:
mode:
authorBert Münnich <ber.t@posteo.de>2015-01-04 15:38:49 +0100
committerBert Münnich <ber.t@posteo.de>2015-01-04 21:24:43 +0100
commit9b9294bae67da4e0388e7c31d0063f4e114aa1f8 (patch)
tree8a9a6ece7fb48b548a75cae28dfe4b4acb99d3c3 /thumbs.c
parent0cb1d1130568d61c06a2cdd22ab050973e302fc8 (diff)
downloadnsxiv-9b9294bae67da4e0388e7c31d0063f4e114aa1f8.tar.zst
Use bit-field for boolean flags in fileinfo struct
Diffstat (limited to 'thumbs.c')
-rw-r--r--thumbs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/thumbs.c b/thumbs.c
index 8051dd8..8ec7a30 100644
--- a/thumbs.c
+++ b/thumbs.c
@@ -341,7 +341,7 @@ bool tns_load(tns_t *tns, int n, bool force)
if (im == NULL && (access(file->path, R_OK) < 0 ||
(im = imlib_load_image(file->path)) == NULL))
{
- if (file->warn)
+ if (file->flags & FF_WARN)
warn("could not open image: %s", file->name);
return false;
}
@@ -461,7 +461,7 @@ void tns_render(tns_t *tns)
t->y = y + (thumb_sizes[tns->zl] - t->h) / 2;
imlib_context_set_image(t->im);
imlib_render_image_on_drawable_at_size(t->x, t->y, t->w, t->h);
- if (tns->files[i].marked)
+ if (tns->files[i].flags & FF_MARK)
tns_mark(tns, i, true);
} else {
tns->loadnext = MIN(tns->loadnext, i);
@@ -520,7 +520,7 @@ void tns_highlight(tns_t *tns, int n, bool hl)
win_draw_rect(win, t->x - oxy, t->y - oxy, t->w + owh, t->h + owh,
false, tns->bw, col);
- if (tns->files[n].marked)
+ if (tns->files[n].flags & FF_MARK)
tns_mark(tns, n, true);
}
}