From 1ddae03ed906264f203ddc253bec27a4c8d49dd5 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 16 Dec 2010 18:04:52 +0100 Subject: Enable debugging of alarm-notify with ALARMS_DEBUG=1 environment variable --- calendar/gui/alarm-notify/config-data.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'calendar/gui/alarm-notify/config-data.h') diff --git a/calendar/gui/alarm-notify/config-data.h b/calendar/gui/alarm-notify/config-data.h index 08f3915b83..e956f508a0 100644 --- a/calendar/gui/alarm-notify/config-data.h +++ b/calendar/gui/alarm-notify/config-data.h @@ -44,4 +44,18 @@ gboolean config_data_is_blessed_program (const gchar *program); ESourceList *config_data_get_calendars (const gchar *); void config_data_replace_string_list (const gchar *, const gchar *, const gchar *); +void config_data_init_debugging (void); +gboolean config_data_start_debugging (void); +void config_data_stop_debugging (void); + +#define debug(x) G_STMT_START { \ + if (config_data_start_debugging ()) { \ + g_print ("%s (%s): ", G_STRFUNC, G_STRLOC); \ + g_print x ; \ + g_print ("\n"); \ + \ + config_data_stop_debugging (); \ + } \ + } G_STMT_END + #endif -- cgit v1.2.3