diff options
author | Frederic Culot <calcurse@culot.org> | 2007-02-25 19:31:08 +0000 |
---|---|---|
committer | Frederic Culot <calcurse@culot.org> | 2007-02-25 19:31:08 +0000 |
commit | 3df48d7f9f33a60256c68945d8ee131a260aed82 (patch) | |
tree | e630878be32096d7e0175d69d9d0f084219f57be /src | |
parent | f7d672093fc990f52ffa9616371eb7e105426a9e (diff) | |
download | calcurse-3df48d7f9f33a60256c68945d8ee131a260aed82.zip |
recur_apoint_check_next() and recur_apoint_check_repeated() modified
to handle item state
Diffstat (limited to 'src')
-rwxr-xr-x | src/recur.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/recur.c b/src/recur.c index 10e7ca4..c23899f 100755 --- a/src/recur.c +++ b/src/recur.c @@ -1,4 +1,4 @@ -/* $calcurse: recur.c,v 1.20 2007/02/24 17:36:27 culot Exp $ */ +/* $calcurse: recur.c,v 1.21 2007/02/25 19:31:08 culot Exp $ */ /* * Calcurse - text-based organizer @@ -672,8 +672,8 @@ struct days_s *recur_exc_scan(FILE *data_file) * Look in the appointment list if we have an item which starts before the item * stored in the notify_app structure (which is the next item to be notified). */ -struct notify_app_s *recur_apoint_check_next( - struct notify_app_s *app, long start, long day) +struct notify_app_s * +recur_apoint_check_next(struct notify_app_s *app, long start, long day) { recur_apoint_llist_node_t *i; long real_recur_start_time; @@ -690,6 +690,7 @@ struct notify_app_s *recur_apoint_check_next( if (real_recur_start_time > start) { app->time = real_recur_start_time; app->txt = mycpy(i->mesg); + app->state = i->state; app->got_app = 1; } } @@ -757,13 +758,10 @@ recur_apoint_switch_notify(long date, int recur_nb) o->rpt->freq, o->rpt->until, date)) { if (n == recur_nb) { o->state ^= APOINT_NOTIFY; - if (notify_bar()) { - if (o->state & APOINT_NOTIFY) - notify_check_repeated(o); - else - need_chk_notify = - notify_same_recur_item(o); - } + + if (notify_bar()) + notify_check_repeated(o); + pthread_mutex_unlock(&(recur_alist_p->mutex)); if (need_chk_notify) notify_check_next_app(); |