aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2007-02-25 19:31:44 +0000
committerFrederic Culot <calcurse@culot.org>2007-02-25 19:31:44 +0000
commiteed40f2fbedd71aafa9bdc3114437ec422688182 (patch)
tree79fb30dbb90433d74e9eede39c5404cb264a2101
parent3df48d7f9f33a60256c68945d8ee131a260aed82 (diff)
downloadcalcurse-eed40f2fbedd71aafa9bdc3114437ec422688182.tar.gz
calcurse-eed40f2fbedd71aafa9bdc3114437ec422688182.zip
apoint_check_next() modified to handle item state
apoint_switch_notify() updated updated call to notify_check_added()
-rwxr-xr-xsrc/apoint.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/apoint.c b/src/apoint.c
index 18f10e6..a7c7e4d 100755
--- a/src/apoint.c
+++ b/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
@@ -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
* 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;
@@ -299,6 +300,7 @@ struct notify_app_s *apoint_check_next(struct notify_app_s *app, long start)
if (i->start > start) {
app->time = i->start;
app->txt = mycpy(i->mesg);
+ app->state = i->state;
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 (n == apoint_nb) {
apoint->state ^= APOINT_NOTIFY;
- if (notify_bar()) {
- if (apoint->state & APOINT_NOTIFY)
- notify_check_added(apoint->mesg,
- apoint->start);
- else
- need_chk_notify =
- notify_same_item(
- apoint->start);
- }
+
+ if (notify_bar())
+ notify_check_added(apoint->mesg,
+ apoint->start, apoint->state);
+
pthread_mutex_unlock(&(alist_p->mutex));
if (need_chk_notify)
notify_check_next_app();