From 5a5c6d2604664478306b29b64bf876d7403b74bb Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Fri, 29 Jul 2011 18:01:38 +0200 Subject: Add "force" parameter to notify_check_next_app() This allows to force notify_check_next_app() to update the notification appointment, even if start times are equal (e.g. if the item description was changed). Signed-off-by: Lukas Fleischer --- src/apoint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/apoint.c') diff --git a/src/apoint.c b/src/apoint.c index ab3fab5..8771426 100644 --- a/src/apoint.c +++ b/src/apoint.c @@ -516,7 +516,7 @@ apoint_delete_bynum (long start, unsigned num, enum eraseflg flag) erase_note (&apt->note, flag); mem_free (apt); if (need_check_notify) - notify_check_next_app (); + notify_check_next_app (0); break; } @@ -663,7 +663,7 @@ apoint_switch_notify (void) if (notify_bar ()) notify_check_added (apt->mesg, apt->start, apt->state); if (need_chk_notify) - notify_check_next_app (); + notify_check_next_app (0); LLIST_TS_UNLOCK (&alist_p); } -- cgit v1.2.3-54-g00ecf From 0126cbd1b3fd1ee46ce3c6f01fef92761c2193c7 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Fri, 29 Jul 2011 18:26:58 +0200 Subject: Update the notification item in *_paste_item() Signed-off-by: Lukas Fleischer --- src/apoint.c | 4 ++++ src/recur.c | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'src/apoint.c') diff --git a/src/apoint.c b/src/apoint.c index 8771426..859e807 100644 --- a/src/apoint.c +++ b/src/apoint.c @@ -729,5 +729,9 @@ apoint_paste_item (void) (void)apoint_new (bkp_cut_apoint.mesg, bkp_cut_apoint.note, bkp_start, bkp_cut_apoint.dur, bkp_cut_apoint.state); + + if (notify_bar ()) + notify_check_added (bkp_cut_apoint.mesg, bkp_start, bkp_cut_apoint.state); + apoint_free_bkp (ERASE_FORCE_KEEP_NOTE); } diff --git a/src/recur.c b/src/recur.c index b2980fc..50e2beb 100644 --- a/src/recur.c +++ b/src/recur.c @@ -1144,5 +1144,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); } -- cgit v1.2.3-54-g00ecf From 709525cf8d545f039e99a033068c1242a3bc4a31 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Fri, 29 Jul 2011 20:22:54 +0200 Subject: Fix apoint_get() call in apoint_switch_notify() We passed the function arguments the wrong way round. This regression was introduced in commit 77ef3fe76e4ce4c9a990e8a5904ad2d83420ca02. Signed-off-by: Lukas Fleischer --- src/apoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/apoint.c') diff --git a/src/apoint.c b/src/apoint.c index 859e807..6fd9e64 100644 --- a/src/apoint.c +++ b/src/apoint.c @@ -657,7 +657,7 @@ apoint_switch_notify (void) need_chk_notify = 0; LLIST_TS_LOCK (&alist_p); - struct apoint *apt = apoint_get (apoint_nb, date); + struct apoint *apt = apoint_get (date, apoint_nb); apt->state ^= APOINT_NOTIFY; if (notify_bar ()) -- cgit v1.2.3-54-g00ecf