aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-07-03 07:13:15 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-07-03 07:13:15 +0800
commitf9049cded460a9e316fa83ff1941970abfe0fd09 (patch)
tree8f33fb755f4a9d1b5801e51e53a298370804dc50 /calendar
parent11a1fab991cefe94f90a5c4f4a5567dc068dce05 (diff)
downloadgsoc2013-evolution-f9049cded460a9e316fa83ff1941970abfe0fd09.tar
gsoc2013-evolution-f9049cded460a9e316fa83ff1941970abfe0fd09.tar.gz
gsoc2013-evolution-f9049cded460a9e316fa83ff1941970abfe0fd09.tar.bz2
gsoc2013-evolution-f9049cded460a9e316fa83ff1941970abfe0fd09.tar.lz
gsoc2013-evolution-f9049cded460a9e316fa83ff1941970abfe0fd09.tar.xz
gsoc2013-evolution-f9049cded460a9e316fa83ff1941970abfe0fd09.tar.zst
gsoc2013-evolution-f9049cded460a9e316fa83ff1941970abfe0fd09.zip
Kill EConfigListener.
Diffstat (limited to 'calendar')
-rw-r--r--calendar/conduits/calendar/calendar-conduit.c15
-rw-r--r--calendar/conduits/memo/memo-conduit.c14
-rw-r--r--calendar/conduits/todo/todo-conduit.c14
3 files changed, 22 insertions, 21 deletions
diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c
index 93f99ca1c2..668fbe9bc9 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 0027337b5b..48a8f59f6e 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 4b9baa0fcf..d72e85fe3f 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;
}