aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/alarm-notify/alarm.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-12-17 01:04:52 +0800
committerMilan Crha <mcrha@redhat.com>2010-12-17 01:04:52 +0800
commit5fd00f91ed46f9964032207c9797a348d2b6ca32 (patch)
tree4c2d3d34b3205dc42bcd4b13b5efb96ae5d4aa8d /calendar/gui/alarm-notify/alarm.c
parent27af441d1f0ca1dcbca0175cbfbf99f6482bb743 (diff)
downloadgsoc2013-evolution-5fd00f91ed46f9964032207c9797a348d2b6ca32.tar
gsoc2013-evolution-5fd00f91ed46f9964032207c9797a348d2b6ca32.tar.gz
gsoc2013-evolution-5fd00f91ed46f9964032207c9797a348d2b6ca32.tar.bz2
gsoc2013-evolution-5fd00f91ed46f9964032207c9797a348d2b6ca32.tar.lz
gsoc2013-evolution-5fd00f91ed46f9964032207c9797a348d2b6ca32.tar.xz
gsoc2013-evolution-5fd00f91ed46f9964032207c9797a348d2b6ca32.tar.zst
gsoc2013-evolution-5fd00f91ed46f9964032207c9797a348d2b6ca32.zip
Enable debugging of alarm-notify with ALARMS_DEBUG=1 environment variable
Diffstat (limited to 'calendar/gui/alarm-notify/alarm.c')
-rw-r--r--calendar/gui/alarm-notify/alarm.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/calendar/gui/alarm-notify/alarm.c b/calendar/gui/alarm-notify/alarm.c
index a4be16bd69..2765c25183 100644
--- a/calendar/gui/alarm-notify/alarm.c
+++ b/calendar/gui/alarm-notify/alarm.c
@@ -31,8 +31,7 @@
#include <sys/time.h>
#include <gdk/gdk.h>
#include "alarm.h"
-
-#define d(x)
+#include "config-data.h"
@@ -89,7 +88,7 @@ alarm_ready_cb (gpointer data)
now = time (NULL);
- d(g_message ("Alarm callback!"));
+ debug (("Alarm callback!"));
while (alarms) {
AlarmRecord *notify_id, *ar;
AlarmRecord ar_copy;
@@ -99,7 +98,7 @@ alarm_ready_cb (gpointer data)
if (ar->trigger > now)
break;
- d(g_message ("Process alarm with trigger %lu", ar->trigger));
+ debug (("Process alarm with trigger %lu", ar->trigger));
notify_id = ar;
ar_copy = *ar;
@@ -152,10 +151,10 @@ setup_timeout (void)
now = time (NULL);
/* Add the time out */
- d(g_message ("Setting timeout for %d.%2d (from now) %lu %lu",
+ debug (("Setting timeout for %d.%2d (from now) %lu %lu",
diff / 60, diff % 60, ar->trigger, now));
- d(g_message (" %s", ctime (&ar->trigger)));
- d(g_message (" %s", ctime (&now)));
+ debug ((" %s", ctime (&ar->trigger)));
+ debug ((" %s", ctime (&now)));
timeout_id = g_timeout_add_seconds (diff, alarm_ready_cb, NULL);
}