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
|
* Calcurse - text-based organizer
|
||||||
@ -681,18 +681,24 @@ void win_show(WINDOW * win, char *label)
|
|||||||
/*
|
/*
|
||||||
* Print an item description in the corresponding panel window.
|
* Print an item description in the corresponding panel window.
|
||||||
*/
|
*/
|
||||||
void display_item(WINDOW *win, int incolor, char *msg, int len,
|
void display_item(WINDOW *win, int incolor, char *msg, int recur,
|
||||||
int y, int x)
|
int len, int y, int x)
|
||||||
{
|
{
|
||||||
char buf[len];
|
char buf[len];
|
||||||
|
|
||||||
if (incolor == 0)
|
if (incolor == 0)
|
||||||
custom_apply_attr(win, ATTR_HIGHEST);
|
custom_apply_attr(win, ATTR_HIGHEST);
|
||||||
if (strlen(msg) < len) {
|
if (strlen(msg) < len) {
|
||||||
|
if (recur)
|
||||||
|
mvwprintw(win, y, x, "*%s", msg);
|
||||||
|
else
|
||||||
mvwprintw(win, y, x, " %s", msg);
|
mvwprintw(win, y, x, " %s", msg);
|
||||||
} else {
|
} else {
|
||||||
strncpy(buf, msg, len - 1);
|
strncpy(buf, msg, len - 1);
|
||||||
buf[len - 1] = '\0';
|
buf[len - 1] = '\0';
|
||||||
|
if (recur)
|
||||||
|
mvwprintw(win, y, x, "*%s...", buf);
|
||||||
|
else
|
||||||
mvwprintw(win, y, x, " %s...", buf);
|
mvwprintw(win, y, x, " %s...", buf);
|
||||||
}
|
}
|
||||||
if (incolor == 0)
|
if (incolor == 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user