display_item() updated to add an asterisk in front of recurrent items
This commit is contained in:
parent
26f01c0d85
commit
08765cc5ef
12
src/utils.c
12
src/utils.c
@ -1,4 +1,4 @@
|
||||
/* $calcurse: utils.c,v 1.11 2006/10/28 09:57:07 culot Exp $ */
|
||||
/* $calcurse: utils.c,v 1.12 2006/10/28 13:14:03 culot Exp $ */
|
||||
|
||||
/*
|
||||
* Calcurse - text-based organizer
|
||||
@ -681,18 +681,24 @@ void win_show(WINDOW * win, char *label)
|
||||
/*
|
||||
* Print an item description in the corresponding panel window.
|
||||
*/
|
||||
void display_item(WINDOW *win, int incolor, char *msg, int len,
|
||||
int y, int x)
|
||||
void display_item(WINDOW *win, int incolor, char *msg, int recur,
|
||||
int len, int y, int x)
|
||||
{
|
||||
char buf[len];
|
||||
|
||||
if (incolor == 0)
|
||||
custom_apply_attr(win, ATTR_HIGHEST);
|
||||
if (strlen(msg) < len) {
|
||||
if (recur)
|
||||
mvwprintw(win, y, x, "*%s", msg);
|
||||
else
|
||||
mvwprintw(win, y, x, " %s", msg);
|
||||
} else {
|
||||
strncpy(buf, msg, len - 1);
|
||||
buf[len - 1] = '\0';
|
||||
if (recur)
|
||||
mvwprintw(win, y, x, "*%s...", buf);
|
||||
else
|
||||
mvwprintw(win, y, x, " %s...", buf);
|
||||
}
|
||||
if (incolor == 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user