[evolution/wip/gsettings] Default to beginning of the day for the last alarm notification



commit 1ab47c13608df8d3bb0892c6614473b504c352dc
Author: Milan Crha <mcrha redhat com>
Date:   Tue Nov 30 16:18:42 2010 +0100

    Default to beginning of the day for the last alarm notification

 calendar/gui/alarm-notify/alarm-queue.c |    2 +-
 calendar/gui/alarm-notify/config-data.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c
index e8b3f86..38db936 100644
--- a/calendar/gui/alarm-notify/alarm-queue.c
+++ b/calendar/gui/alarm-notify/alarm-queue.c
@@ -1867,7 +1867,7 @@ alarm_queue_init (gpointer data)
 	queue_midnight_refresh ();
 
 	if (config_data_get_last_notification_time (NULL) == -1) {
-		time_t tmval = time (NULL);
+		time_t tmval = time_day_begin (time (NULL));
 		d(printf("%s:%d (alarm_queue_init) - Setting last notification time to %s\n",__FILE__, __LINE__, e_ctime(&tmval)));
 		config_data_set_last_notification_time (NULL, tmval);
 	}
diff --git a/calendar/gui/alarm-notify/config-data.c b/calendar/gui/alarm-notify/config-data.c
index 00cb0dc..65e3e15 100644
--- a/calendar/gui/alarm-notify/config-data.c
+++ b/calendar/gui/alarm-notify/config-data.c
@@ -336,7 +336,7 @@ config_data_get_last_notification_time (ECal *cal)
 		return val;
 	}
 
-	return time (NULL);
+	return -1;
 }
 
 /**



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]