[evolution] Kill EConfigListener.
- From: Matthew Barnes <mbarnes src gnome org>
- To: svn-commits-list gnome org
- Subject: [evolution] Kill EConfigListener.
- Date: Fri, 3 Jul 2009 03:15:30 +0000 (UTC)
commit e013e10cc54fae7ad8409aa65c4731331ed6000a
Author: Matthew Barnes <mbarnes redhat com>
Date: Thu Jul 2 19:13:15 2009 -0400
Kill EConfigListener.
addressbook/gui/component/addressbook.h | 1 -
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 ----
mail/em-account-editor.c | 2 +-
10 files changed, 23 insertions(+), 731 deletions(-)
---
diff --git a/addressbook/gui/component/addressbook.h b/addressbook/gui/component/addressbook.h
index 0dbd4d7..3997c9c 100644
--- a/addressbook/gui/component/addressbook.h
+++ b/addressbook/gui/component/addressbook.h
@@ -23,7 +23,6 @@
#define __ADDRESSBOOK_H__
#include <bonobo/bonobo-control.h>
-#include <e-util/e-config-listener.h>
#include <bonobo/bonobo-object.h>
#include <bonobo/bonobo-moniker-util.h>
#include <libebook/e-book.h>
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 8a9df33..8c43b64 100644
--- a/addressbook/util/eab-book-util.h
+++ b/addressbook/util/eab-book-util.h
@@ -27,15 +27,11 @@
#include <bonobo/bonobo-object.h>
#include <bonobo/bonobo-moniker-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 79080f9..f85644b 100644
--- a/e-util/Makefile.am
+++ b/e-util/Makefile.am
@@ -44,7 +44,6 @@ eutilinclude_HEADERS = \
e-binding.h \
e-categories-config.h \
e-config.h \
- e-config-listener.h \
e-corba-utils.h \
e-cursor.h \
e-dialog-utils.h \
@@ -85,7 +84,6 @@ libeutil_la_SOURCES = \
e-binding.c \
e-categories-config.c \
e-config.c \
- e-config-listener.c \
e-corba-utils.c \
e-cursor.c \
e-dialog-utils.c \
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c
index cac9717..df8ede8 100644
--- a/mail/em-account-editor.c
+++ b/mail/em-account-editor.c
@@ -74,7 +74,7 @@
#include "smime/gui/e-cert-selector.h"
#endif
-#define d (x)
+#define d(x)
/* econfig item for the extra config hings */
struct _receive_options_item {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]