summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2006-10-28 13:14:03 +0000
committerFrederic Culot <calcurse@culot.org>2006-10-28 13:14:03 +0000
commit08765cc5efbc60dd185ff0be1035340df754b581 (patch)
tree4e4afb2ba85e56d25dd034aaccb27f87a363d7ea
parent26f01c0d85adf599058f8e4942d045628da46954 (diff)
downloadcalcurse-08765cc5efbc60dd185ff0be1035340df754b581.zip
display_item() updated to add an asterisk in front of recurrent items
-rwxr-xr-xsrc/utils.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/utils.c b/src/utils.c
index 561bbcc..7ff8c48 100755
--- a/src/utils.c
+++ b/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,19 +681,25 @@ 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) {
- mvwprintw(win, y, x, "%s", msg);
+ 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';
- mvwprintw(win, y, x, "%s...", buf);
+ if (recur)
+ mvwprintw(win, y, x, "*%s...", buf);
+ else
+ mvwprintw(win, y, x, " %s...", buf);
}
if (incolor == 0)
custom_remove_attr(win, ATTR_HIGHEST);