diff options
author | Frederic Culot <calcurse@culot.org> | 2006-08-31 18:46:09 +0000 |
---|---|---|
committer | Frederic Culot <calcurse@culot.org> | 2006-08-31 18:46:09 +0000 |
commit | 5f1ff985a91cbca4078f3e7b6e7952bde42d91eb (patch) | |
tree | 8686a77fc7275ca18ef9b12a8348360e75e9ece3 /src/calcurse.c | |
parent | a32519833b998f3646760b86a862edbd3387980d (diff) | |
download | calcurse-5f1ff985a91cbca4078f3e7b6e7952bde42d91eb.zip |
update_todo_panel(): priority added when displaying todo list
'+/-' keys are now used to handle todo priorities
Diffstat (limited to 'src/calcurse.c')
-rwxr-xr-x | src/calcurse.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/calcurse.c b/src/calcurse.c index bf40821..b269d6a 100755 --- a/src/calcurse.c +++ b/src/calcurse.c @@ -1,4 +1,4 @@ -/* $calcurse: calcurse.c,v 1.8 2006/08/30 17:46:02 culot Exp $ */ +/* $calcurse: calcurse.c,v 1.9 2006/08/31 18:46:09 culot Exp $ */ /* * Calcurse - text-based organizer @@ -321,6 +321,12 @@ int main(int argc, char **argv) recur_repeat_item(sel_year, sel_month, sel_day, hilt_app, colr); break; + + case '+': + case '-': + if (which_pan == TODO && hilt_tod != 0) + hilt_tod = todo_chg_priority(ch, hilt_tod); + break; case '?': /* Online help system */ status_bar(which_pan, colr, nc_bar, nl_bar); @@ -965,6 +971,7 @@ void update_todo_panel(void) int todo_lines = 1; int max_items = nl_tod - 4; int incolor = -1; + char mesg[MAX_LENGTH] = ""; /* Print todo item in the panel. */ erase_window_part(twin, 1, title_lines, nc_tod - 2, nl_tod - 2); @@ -974,7 +981,9 @@ void update_todo_panel(void) incolor = num_todo - hilt_tod; if (incolor == 0) saved_t_mesg = i->mesg; if (t_realpos >= 0 && t_realpos < max_items) { - display_item(twin, incolor, i->mesg, + sprintf(mesg, "%d. ", i->id); + strncat(mesg, i->mesg, strlen(i->mesg)); + display_item(twin, incolor, mesg, len, y_offset, x_offset); y_offset = y_offset + todo_lines; } |