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
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:11 +0800
commit1ddae03ed906264f203ddc253bec27a4c8d49dd5 (patch)
tree880e18479d7d5c103211db04074e6d250c0297eb /calendar/gui/alarm-notify/alarm.c
parentd8885dbe7d4cf4736b4895794dc25b0cff0f197e (diff)
downloadgsoc2013-evolution-1ddae03ed906264f203ddc253bec27a4c8d49dd5.tar
gsoc2013-evolution-1ddae03ed906264f203ddc253bec27a4c8d49dd5.tar.gz
gsoc2013-evolution-1ddae03ed906264f203ddc253bec27a4c8d49dd5.tar.bz2
gsoc2013-evolution-1ddae03ed906264f203ddc253bec27a4c8d49dd5.tar.lz
gsoc2013-evolution-1ddae03ed906264f203ddc253bec27a4c8d49dd5.tar.xz
gsoc2013-evolution-1ddae03ed906264f203ddc253bec27a4c8d49dd5.tar.zst
gsoc2013-evolution-1ddae03ed906264f203ddc253bec27a4c8d49dd5.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);
}