apoint_check_next() modified to handle item state
apoint_switch_notify() updated updated call to notify_check_added()
This commit is contained in:
parent
3df48d7f9f
commit
eed40f2fbe
20
src/apoint.c
20
src/apoint.c
@ -1,4 +1,4 @@
|
|||||||
/* $calcurse: apoint.c,v 1.8 2007/02/24 17:37:08 culot Exp $ */
|
/* $calcurse: apoint.c,v 1.9 2007/02/25 19:31:44 culot Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Calcurse - text-based organizer
|
* Calcurse - text-based organizer
|
||||||
@ -286,7 +286,8 @@ void scroll_pad_up(int item_nb, int nb_events_inday)
|
|||||||
* Look in the appointment list if we have an item which starts before the item
|
* 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).
|
* stored in the notify_app structure (which is the next item to be notified).
|
||||||
*/
|
*/
|
||||||
struct notify_app_s *apoint_check_next(struct notify_app_s *app, long start)
|
struct notify_app_s *
|
||||||
|
apoint_check_next(struct notify_app_s *app, long start)
|
||||||
{
|
{
|
||||||
apoint_llist_node_t *i;
|
apoint_llist_node_t *i;
|
||||||
|
|
||||||
@ -299,6 +300,7 @@ struct notify_app_s *apoint_check_next(struct notify_app_s *app, long start)
|
|||||||
if (i->start > start) {
|
if (i->start > start) {
|
||||||
app->time = i->start;
|
app->time = i->start;
|
||||||
app->txt = mycpy(i->mesg);
|
app->txt = mycpy(i->mesg);
|
||||||
|
app->state = i->state;
|
||||||
app->got_app = 1;
|
app->got_app = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -356,15 +358,11 @@ apoint_switch_notify(int year, int month, int day, int item_num)
|
|||||||
if (apoint_inday(apoint, date)) {
|
if (apoint_inday(apoint, date)) {
|
||||||
if (n == apoint_nb) {
|
if (n == apoint_nb) {
|
||||||
apoint->state ^= APOINT_NOTIFY;
|
apoint->state ^= APOINT_NOTIFY;
|
||||||
if (notify_bar()) {
|
|
||||||
if (apoint->state & APOINT_NOTIFY)
|
if (notify_bar())
|
||||||
notify_check_added(apoint->mesg,
|
notify_check_added(apoint->mesg,
|
||||||
apoint->start);
|
apoint->start, apoint->state);
|
||||||
else
|
|
||||||
need_chk_notify =
|
|
||||||
notify_same_item(
|
|
||||||
apoint->start);
|
|
||||||
}
|
|
||||||
pthread_mutex_unlock(&(alist_p->mutex));
|
pthread_mutex_unlock(&(alist_p->mutex));
|
||||||
if (need_chk_notify)
|
if (need_chk_notify)
|
||||||
notify_check_next_app();
|
notify_check_next_app();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user