summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/apoint.c2
-rw-r--r--src/calcurse.h2
-rw-r--r--src/recur.c10
3 files changed, 3 insertions, 11 deletions
diff --git a/src/apoint.c b/src/apoint.c
index 1483beb..16efd25 100644
--- a/src/apoint.c
+++ b/src/apoint.c
@@ -560,7 +560,7 @@ void apoint_switch_notify(void)
date = calendar_get_slctd_day_sec();
if (p->type == RECUR_APPT) {
- recur_apoint_switch_notify(date, p->appt_pos);
+ recur_apoint_switch_notify(p->item.rapt);
return;
} else if (p->type == APPT)
apoint_nb = day_item_nb(date, hilt, APPT);
diff --git a/src/calcurse.h b/src/calcurse.h
index 23d57ce..a1208ac 100644
--- a/src/calcurse.h
+++ b/src/calcurse.h
@@ -865,7 +865,7 @@ void recur_exc_scan(llist_t *, FILE *);
struct notify_app *recur_apoint_check_next(struct notify_app *, long, long);
struct recur_apoint *recur_get_apoint(long, int);
struct recur_event *recur_get_event(long, int);
-void recur_apoint_switch_notify(long, int);
+void recur_apoint_switch_notify(struct recur_apoint *);
void recur_event_paste_item(void);
void recur_apoint_paste_item(void);
diff --git a/src/recur.c b/src/recur.c
index 785f4dd..5eb6de6 100644
--- a/src/recur.c
+++ b/src/recur.c
@@ -1005,19 +1005,11 @@ struct recur_event *recur_get_event(long date, int num)
}
/* Switch recurrent item notification state. */
-void recur_apoint_switch_notify(long date, int recur_nb)
+void recur_apoint_switch_notify(struct recur_apoint *rapt)
{
- llist_item_t *i;
-
LLIST_TS_LOCK(&recur_alist_p);
- i = LLIST_TS_FIND_NTH(&recur_alist_p, recur_nb, date, recur_apoint_inday);
-
- if (!i)
- EXIT(_("item not found"));
- struct recur_apoint *rapt = LLIST_TS_GET_DATA(i);
rapt->state ^= APOINT_NOTIFY;
-
if (notify_bar())
notify_check_repeated(rapt);