diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2011-07-30 22:56:22 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2011-07-30 22:56:22 +0200 |
commit | 0884d62b2282b3ff5936f8d36f7f8d77c504938d (patch) | |
tree | 5371793ff9e066f942ece617acd381c9a12b4f7d /src/recur.c | |
parent | 6256183e1e8a7ba09e12b9216ecaa730bb1ec114 (diff) | |
parent | 13a41f8e0a722f4491ad6256718227e7161b5896 (diff) | |
download | calcurse-0884d62b2282b3ff5936f8d36f7f8d77c504938d.zip |
Merge branch 'maint'
Diffstat (limited to 'src/recur.c')
-rw-r--r-- | src/recur.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/recur.c b/src/recur.c index b757400..dbc52ee 100644 --- a/src/recur.c +++ b/src/recur.c @@ -811,7 +811,7 @@ recur_apoint_erase (long start, unsigned num, unsigned delete_whole, erase_note (&rapt->note, flag); mem_free (rapt); if (need_check_notify) - notify_check_next_app (); + notify_check_next_app (0); break; } } @@ -819,7 +819,7 @@ recur_apoint_erase (long start, unsigned num, unsigned delete_whole, { recur_add_exc (&rapt->exc, start); if (need_check_notify) - notify_check_next_app (); + notify_check_next_app (0); } LLIST_TS_UNLOCK (&recur_alist_p); } @@ -1004,9 +1004,9 @@ recur_exc_scan (llist_t *lexc, FILE *data_file) } static int -recur_apoint_starts_after (struct recur_apoint *rapt, long time) +recur_apoint_starts_before (struct recur_apoint *rapt, long time) { - return (rapt->start > time); + return (rapt->start < time); } /* @@ -1020,9 +1020,7 @@ recur_apoint_check_next (struct notify_app *app, long start, long day) long real_recur_start_time; LLIST_TS_LOCK (&recur_alist_p); - i = LLIST_TS_FIND_FIRST (&recur_alist_p, start, recur_apoint_starts_after); - - if (i) + LLIST_TS_FIND_FOREACH (&recur_alist_p, app->time, recur_apoint_starts_before, i) { struct recur_apoint *rapt = LLIST_TS_GET_DATA (i); @@ -1035,7 +1033,6 @@ recur_apoint_check_next (struct notify_app *app, long start, long day) app->got_app = 1; } } - LLIST_TS_UNLOCK (&recur_alist_p); return (app); @@ -1144,5 +1141,9 @@ recur_apoint_paste_item (void) bkp_cut_recur_apoint.rpt->freq, bkp_cut_recur_apoint.rpt->until, &bkp_cut_recur_apoint.exc); + + if (notify_bar ()) + notify_check_repeated (&bkp_cut_recur_apoint); + recur_apoint_free_bkp (ERASE_FORCE_KEEP_NOTE); } |