diff options
author | Frederic Culot <calcurse@culot.org> | 2008-12-15 20:02:00 +0000 |
---|---|---|
committer | Frederic Culot <calcurse@culot.org> | 2008-12-15 20:02:00 +0000 |
commit | b1d3178bba66089726e6f93a49af97371bdf5db8 (patch) | |
tree | 1a1bb5ea6c9c4147c6358b2929210e163684b28d /src/day.c | |
parent | 8220580918078bebcd339fdc7492ab28223552b4 (diff) | |
download | calcurse-b1d3178bba66089726e6f93a49af97371bdf5db8.tar.gz calcurse-b1d3178bba66089726e6f93a49af97371bdf5db8.zip |
small bugfixes and a major one (freeze when deleting an appointment's note, thanks Jan for reporting it)
Diffstat (limited to 'src/day.c')
-rwxr-xr-x | src/day.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -1,4 +1,4 @@ -/* $calcurse: day.c,v 1.41 2008/12/12 20:44:50 culot Exp $ */ +/* $calcurse: day.c,v 1.42 2008/12/15 20:02:00 culot Exp $ */ /* * Calcurse - text-based organizer @@ -728,7 +728,7 @@ day_edit_item (conf_t *conf) p = day_get_item (item_num); date = calendar_get_slctd_day_sec (); - ch = 0; + ch = -1; switch (p->type) { case RECUR_EVNT: @@ -819,9 +819,10 @@ day_erase_item (long date, int item_number, erase_flag_e flag) "Delete (i)tem or just its (n)ote ?"); char *note_choice = _("[i/n] "); char *erase_choice = _("[a/o] "); - int ch = 0, ans; + int ch, ans; unsigned delete_whole; + ch = -1; p = day_get_item (item_number); if (flag == ERASE_DONT_FORCE) { @@ -877,7 +878,10 @@ day_erase_item (long date, int item_number, erase_flag_e flag) recur_apoint_erase (date, p->appt_pos, delete_whole, flag); } } - return (p->type); + if (flag == ERASE_FORCE_ONLY_NOTE) + return 0; + else + return (p->type); } /* Returns a structure containing the selected item. */ |