aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/alarm-notify/config-data.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-09-11 23:50:51 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-09-12 02:14:04 +0800
commitebcce86769d174cce6e881740c5e9bcedce28e06 (patch)
treeb2cc2d18ceb0c3bd3e78f5b768c1b6926b69bb4a /calendar/gui/alarm-notify/config-data.c
parent1e3deb31476cf0026011876327be83e9a47847ee (diff)
downloadgsoc2013-evolution-ebcce86769d174cce6e881740c5e9bcedce28e06.tar.gz
gsoc2013-evolution-ebcce86769d174cce6e881740c5e9bcedce28e06.tar.zst
gsoc2013-evolution-ebcce86769d174cce6e881740c5e9bcedce28e06.zip
Coding style and whitespace cleanups.
Diffstat (limited to 'calendar/gui/alarm-notify/config-data.c')
-rw-r--r--calendar/gui/alarm-notify/config-data.c33
1 files changed, 19 insertions, 14 deletions
diff --git a/calendar/gui/alarm-notify/config-data.c b/calendar/gui/alarm-notify/config-data.c
index 12d7aefa47..00cb0dc7ba 100644
--- a/calendar/gui/alarm-notify/config-data.c
+++ b/calendar/gui/alarm-notify/config-data.c
@@ -30,12 +30,12 @@
#include <libedataserver/e-source-list.h>
#include "config-data.h"
-
-
-#define KEY_LAST_NOTIFICATION_TIME "/apps/evolution/calendar/notify/last_notification_time"
+#define KEY_LAST_NOTIFICATION_TIME \
+ "/apps/evolution/calendar/notify/last_notification_time"
#define KEY_PROGRAMS "/apps/evolution/calendar/notify/programs"
-/* Whether we have initied ourselves by reading the data from the configuration engine */
+/* Whether we have initied ourselves by reading
+ * the data from the configuration engine. */
static gboolean inited = FALSE;
static GConfClient *conf_client = NULL;
static ESourceList *calendar_source_list = NULL, *tasks_source_list = NULL;
@@ -202,20 +202,23 @@ icaltimezone *
config_data_get_timezone (void)
{
gchar *location;
+ const gchar *key;
icaltimezone *local_timezone;
ensure_inited ();
- if (gconf_client_get_bool (conf_client, "/apps/evolution/calendar/display/use_system_timezone", NULL))
+ key = "/apps/evolution/calendar/display/user_system_timezone";
+ if (gconf_client_get_bool (conf_client, key, NULL))
location = e_cal_util_get_system_timezone_location ();
- else
- location = gconf_client_get_string (conf_client, "/apps/evolution/calendar/display/timezone", NULL);
+ else {
+ key = "/apps/evolution/calendar/display/timezone";
+ location = gconf_client_get_string (conf_client, key, NULL);
+ }
- if (location && location[0]) {
+ if (location && location[0])
local_timezone = icaltimezone_get_builtin_timezone (location);
- } else {
+ else
local_timezone = icaltimezone_get_utc_timezone ();
- }
g_free (location);
@@ -228,9 +231,10 @@ config_data_get_24_hour_format (void)
ensure_inited ();
if (locale_supports_12_hour_format ()) {
- return gconf_client_get_bool (conf_client,
- "/apps/evolution/calendar/display/use_24hour_format",
- NULL);
+ const gchar *key;
+
+ key = "/apps/evolution/calendar/display/use_24hour_format";
+ return gconf_client_get_bool (conf_client, key, NULL);
}
return TRUE;
@@ -308,7 +312,8 @@ config_data_get_last_notification_time (ECal *cal)
const gchar *last_notified = e_source_get_property (source, "last-notified");
GTimeVal tmval = {0};
- if (last_notified && *last_notified && g_time_val_from_iso8601 (last_notified, &tmval)) {
+ if (last_notified && *last_notified &&
+ g_time_val_from_iso8601 (last_notified, &tmval)) {
time_t now = time (NULL), val = (time_t) tmval.tv_sec;
if (val > now)