[evolution-exchange] Remove EConfigListener usage.



commit 8a36e452cdd5f2fb71deebbc2876cc411a24f367
Author: Matthew Barnes <mbarnes redhat com>
Date:   Thu Jul 2 19:24:27 2009 -0400

    Remove EConfigListener usage.

 calendar/e-cal-backend-exchange-tasks.c |   26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/calendar/e-cal-backend-exchange-tasks.c b/calendar/e-cal-backend-exchange-tasks.c
index 4e9be00..c2f44b6 100644
--- a/calendar/e-cal-backend-exchange-tasks.c
+++ b/calendar/e-cal-backend-exchange-tasks.c
@@ -26,7 +26,6 @@
 #include <e2k-properties.h>
 #include <e2k-propnames.h>
 #include "libecal/e-cal-component.h"
-#include "e-util/e-config-listener.h"
 #include "e2k-cal-utils.h"
 #include <e2k-context.h>
 #include <exchange-account.h>
@@ -163,23 +162,24 @@ set_sensitivity (E2kProperties *props, ECalComponent *comp)
 icaltimezone *
 get_default_timezone (void)
 {
-        static EConfigListener *cl = NULL;
-        gchar *location;
-        icaltimezone *local_timezone;
-
-	if (!cl)
-                cl = e_config_listener_new ();
+	GConfClient *client;
+	icaltimezone *local_timezone;
+	const gchar *key;
+	gchar *location;
 
-	location = e_config_listener_get_string_with_default (cl, "/apps/evolution/calendar/display/timezone", "UTC", NULL);
+	client = gconf_client_get_default ();
+	key = "/apps/evolution/calendar/display/timezone";
+	location = gconf_client_get_string (client, key, NULL);
 
-        if (location && location[0]) {
-                local_timezone = icaltimezone_get_builtin_timezone (location);
-        } else {
-                local_timezone = icaltimezone_get_utc_timezone ();
-        }
+	if (location != NULL && *location != '\0')
+		local_timezone = icaltimezone_get_builtin_timezone (location);
+	else
+		local_timezone = icaltimezone_get_utc_timezone ();
 
 	g_free (location);
 
+	g_object_unref (client);
+
 	return local_timezone;
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]