From 9683cf429bdaac618926e3a05dd4ed2f05bbb943 Mon Sep 17 00:00:00 2001 From: Laurent MONIN Date: Mon, 26 Dec 2005 10:39:07 +0100 Subject: [PATCH] display_listbox_item(): clarify tests a bit. --- src/bfu/listbox.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/bfu/listbox.c b/src/bfu/listbox.c index a0e5ccd8..1ce22c7e 100644 --- a/src/bfu/listbox.c +++ b/src/bfu/listbox.c @@ -361,11 +361,12 @@ display_listbox_item(struct listbox_item *item, void *data_, int *offset) int x, y; tree_color = get_bfu_color(data->term, "menu.normal"); - if (item == data->box->sel || item->marked) { - unsigned char *name = (item == data->box->sel) - ? "menu.selected" : "menu.marked"; + if (item == data->box->sel) { + text_color = get_bfu_color(data->term, "menu.selected"); + + } else if (item->marked) { + text_color = get_bfu_color(data->term, "menu.marked"); - text_color = get_bfu_color(data->term, name); } else { text_color = tree_color; }