[evolution/kill-bonobo] Kill EConfigListener.



commit f9049cded460a9e316fa83ff1941970abfe0fd09
Author: Matthew Barnes <mbarnes redhat com>
Date:   Thu Jul 2 19:13:15 2009 -0400

    Kill EConfigListener.

 addressbook/util/eab-book-util.c              |   12 -
 addressbook/util/eab-book-util.h              |    4 -
 calendar/conduits/calendar/calendar-conduit.c |   15 +-
 calendar/conduits/memo/memo-conduit.c         |   14 +-
 calendar/conduits/todo/todo-conduit.c         |   14 +-
 e-util/Makefile.am                            |    2 -
 e-util/e-config-listener.c                    |  596 -------------------------
 e-util/e-config-listener.h                    |   94 ----
 8 files changed, 22 insertions(+), 729 deletions(-)
---
diff --git a/addressbook/util/eab-book-util.c b/addressbook/util/eab-book-util.c
index b3450a2..599486c 100644
--- a/addressbook/util/eab-book-util.c
+++ b/addressbook/util/eab-book-util.c
@@ -27,18 +27,6 @@
 #include <string.h>
 #include <glib.h>
 #include <glib-object.h>
-#include <e-util/e-config-listener.h>
-
-EConfigListener *
-eab_get_config_database (void)
-{
-	static EConfigListener *config_db;
-
-	if (config_db == NULL)
-		config_db = e_config_listener_new ();
-
-	return config_db;
-}
 
 /*
  *
diff --git a/addressbook/util/eab-book-util.h b/addressbook/util/eab-book-util.h
index a06ef43..9f8a79e 100644
--- a/addressbook/util/eab-book-util.h
+++ b/addressbook/util/eab-book-util.h
@@ -25,15 +25,11 @@
 #define __EAB_UTIL_H__
 
 #include <libebook/e-book.h>
-#include "e-util/e-config-listener.h"
 
 G_BEGIN_DECLS
 
 typedef void (*EABHaveAddressCallback) (EBook *book, const gchar *addr, EContact *contact, gpointer closure);
 
-/* config database interface. */
-EConfigListener       *eab_get_config_database       (void);
-
 /* Specialized Name/Email Queries */
 guint                  eab_name_and_email_query      (EBook                    *book,
 						      const gchar               *name,
diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c
index 93f99ca..668fbe9 100644
--- a/calendar/conduits/calendar/calendar-conduit.c
+++ b/calendar/conduits/calendar/calendar-conduit.c
@@ -44,7 +44,6 @@
 #include <e-pilot-map.h>
 #include <e-pilot-settings.h>
 #include <e-pilot-util.h>
-#include <e-config-listener.h>
 #include <libecalendar-common-conduit.h>
 
 GnomePilotConduit * conduit_get_gpilot_conduit (guint32);
@@ -520,15 +519,17 @@ get_timezone (ECal *client, const gchar *tzid)
 static icaltimezone *
 get_default_timezone (void)
 {
-	EConfigListener *listener;
+	GConfClient *client;
 	icaltimezone *timezone = NULL;
+	const gchar *key;
 	gchar *location;
 
-	listener = e_config_listener_new ();
+	client = gconf_client_get_default ();
+	key = "/apps/evolution/calendar/display/timezone";
+	location = gconf_client_get_string (client, key, NULL);
 
-	location = e_config_listener_get_string_with_default (listener,
-		"/apps/evolution/calendar/display/timezone", "UTC", NULL);
-	if (!location || !location[0]) {
+
+	if (location == NULL || *location == '\0') {
 		g_free (location);
 		location = g_strdup ("UTC");
 	}
@@ -536,7 +537,7 @@ get_default_timezone (void)
 	timezone = icaltimezone_get_builtin_timezone (location);
 	g_free (location);
 
-	g_object_unref (listener);
+	g_object_unref (client);
 
 	return timezone;
 }
diff --git a/calendar/conduits/memo/memo-conduit.c b/calendar/conduits/memo/memo-conduit.c
index 0027337..48a8f59 100644
--- a/calendar/conduits/memo/memo-conduit.c
+++ b/calendar/conduits/memo/memo-conduit.c
@@ -46,7 +46,6 @@
 #include <e-pilot-map.h>
 #include <e-pilot-settings.h>
 #include <e-pilot-util.h>
-#include <e-config-listener.h>
 #include <libecalendar-common-conduit.h>
 
 GnomePilotConduit * conduit_get_gpilot_conduit (guint32);
@@ -376,15 +375,16 @@ start_calendar_server (EMemoConduitContext *ctxt)
 static icaltimezone *
 get_default_timezone (void)
 {
-	EConfigListener *listener;
+	GConfClient *client;
 	icaltimezone *timezone = NULL;
+	const gchar *key;
 	gchar *location;
 
-	listener = e_config_listener_new ();
+	client = gconf_client_get_default ();
+	key = "/apps/evolution/calendar/display/timezone";
+	location = gconf_client_get_string (client, key, NULL);
 
-	location = e_config_listener_get_string_with_default (listener,
-		"/apps/evolution/calendar/display/timezone", "UTC", NULL);
-	if (!location || !location[0]) {
+	if (location == NULL || *location == '\0') {
 		g_free (location);
 		location = g_strdup ("UTC");
 	}
@@ -392,7 +392,7 @@ get_default_timezone (void)
 	timezone = icaltimezone_get_builtin_timezone (location);
 	g_free (location);
 
-	g_object_unref (listener);
+	g_object_unref (client);
 
 	return timezone;
 }
diff --git a/calendar/conduits/todo/todo-conduit.c b/calendar/conduits/todo/todo-conduit.c
index 4b9baa0..d72e85f 100644
--- a/calendar/conduits/todo/todo-conduit.c
+++ b/calendar/conduits/todo/todo-conduit.c
@@ -48,7 +48,6 @@
 #include <e-pilot-map.h>
 #include <e-pilot-settings.h>
 #include <e-pilot-util.h>
-#include <e-config-listener.h>
 #include <libecalendar-common-conduit.h>
 
 GnomePilotConduit * conduit_get_gpilot_conduit (guint32);
@@ -507,15 +506,16 @@ get_timezone (ECal *client, const gchar *tzid)
 static icaltimezone *
 get_default_timezone (void)
 {
-	EConfigListener *listener;
+	GConfClient *client;
 	icaltimezone *timezone = NULL;
+	const gchar *key;
 	gchar *location;
 
-	listener = e_config_listener_new ();
+	client = gconf_client_get_default ();
+	key = "/apps/evolution/calendar/display/timezone";
+	location = gconf_client_get_string (client, key, NULL);
 
-	location = e_config_listener_get_string_with_default (listener,
-		"/apps/evolution/calendar/display/timezone", "UTC", NULL);
-	if (!location || !location[0]) {
+	if (location == NULL || *location == '\0') {
 		g_free (location);
 		location = g_strdup ("UTC");
 	}
@@ -523,7 +523,7 @@ get_default_timezone (void)
 	timezone = icaltimezone_get_builtin_timezone (location);
 	g_free (location);
 
-	g_object_unref (listener);
+	g_object_unref (client);
 
 	return timezone;
 }
diff --git a/e-util/Makefile.am b/e-util/Makefile.am
index c8b1c87..dd8c90f 100644
--- a/e-util/Makefile.am
+++ b/e-util/Makefile.am
@@ -45,7 +45,6 @@ eutilinclude_HEADERS = 				\
 	e-categories-config.h			\
 	e-charset.h				\
 	e-config.h				\
-	e-config-listener.h			\
 	e-cursor.h				\
 	e-dialog-utils.h			\
 	e-dialog-widgets.h			\
@@ -88,7 +87,6 @@ libeutil_la_SOURCES =				\
 	e-binding.c				\
 	e-categories-config.c			\
 	e-charset.c				\
-	e-config-listener.c			\
 	e-config.c				\
 	e-cursor.c				\
 	e-dialog-utils.c			\



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