From f014ab82c81078d60cb1df8c986305c2cc9948c2 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 4 Jun 2011 15:53:10 -0500 Subject: Coding style and whitespace cleanups. --- calendar/gui/alarm-notify/alarm-queue.c | 3 ++- calendar/gui/alarm-notify/config-data.c | 14 +++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'calendar/gui/alarm-notify') diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c index 42dc10c6e9..e8e5485e45 100644 --- a/calendar/gui/alarm-notify/alarm-queue.c +++ b/calendar/gui/alarm-notify/alarm-queue.c @@ -2120,7 +2120,8 @@ remove_client_alarms (ClientAlarms *ca) { debug (("size %d", g_hash_table_size (ca->uid_alarms_hash))); - g_hash_table_foreach_remove (ca->uid_alarms_hash, (GHRFunc) remove_comp_by_id, ca); + g_hash_table_foreach_remove ( + ca->uid_alarms_hash, (GHRFunc) remove_comp_by_id, ca); /* The hash table should be empty now */ g_return_if_fail (g_hash_table_size (ca->uid_alarms_hash) == 0); diff --git a/calendar/gui/alarm-notify/config-data.c b/calendar/gui/alarm-notify/config-data.c index e1fe1f48ff..41207d48fb 100644 --- a/calendar/gui/alarm-notify/config-data.c +++ b/calendar/gui/alarm-notify/config-data.c @@ -309,9 +309,13 @@ config_data_get_last_notification_time (ECal *cal) if (cal) { ESource *source = e_cal_get_source (cal); if (source) { - const gchar *last_notified = e_source_get_property (source, "last-notified"); + const gchar *last_notified; + GTimeVal tmval = {0}; + last_notified = e_source_get_property ( + source, "last-notified"); + if (last_notified && *last_notified && g_time_val_from_iso8601 (last_notified, &tmval)) { time_t now = time (NULL), val = (time_t) tmval.tv_sec; @@ -326,9 +330,13 @@ config_data_get_last_notification_time (ECal *cal) if (!(client = config_data_get_conf_client ())) return -1; - value = gconf_client_get_without_default (client, KEY_LAST_NOTIFICATION_TIME, NULL); + value = gconf_client_get_without_default ( + client, KEY_LAST_NOTIFICATION_TIME, NULL); if (value) { - time_t val = (time_t) gconf_value_get_int (value), now = time (NULL); + time_t val, now; + + val = (time_t) gconf_value_get_int (value); + now = time (NULL); if (val > now) val = now; -- cgit v1.2.3