From 801450b0f391a90ce1b2726ecb571026819673b9 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 26 Apr 2011 09:20:50 -0400 Subject: Remove redundant EAccountList utilities. Kill itip_addresses_get() and itip_addresses_get_default(), and use e_get_account_list() and e_get_default_account() instead. --- plugins/groupwise-features/camel-gw-listener.c | 8 ++------ plugins/groupwise-features/groupwise-account-setup.c | 4 ++-- plugins/groupwise-features/gw-ui.c | 4 +++- 3 files changed, 7 insertions(+), 9 deletions(-) (limited to 'plugins/groupwise-features') diff --git a/plugins/groupwise-features/camel-gw-listener.c b/plugins/groupwise-features/camel-gw-listener.c index 28efe5c94b..ed73953098 100644 --- a/plugins/groupwise-features/camel-gw-listener.c +++ b/plugins/groupwise-features/camel-gw-listener.c @@ -31,9 +31,9 @@ #include #include #include "e-util/e-alert-dialog.h" -#include #include #include +#include /*stores some info about all currently existing groupwise accounts list of GwAccountInfo structures */ @@ -934,7 +934,6 @@ account_changed (EAccountList *account_listener, EAccount *account) static void prune_proxies (void) { - GConfClient *client = gconf_client_get_default (); EAccountList *account_list; ESourceList *sources; ESourceGroup *group; @@ -948,10 +947,7 @@ prune_proxies (void) { E_CAL_SOURCE_TYPE_JOURNAL }; - account_list = e_account_list_new (client); - /* Is this being leaked */ - g_object_unref (client); - + account_list = e_get_account_list (); e_account_list_prune_proxies (account_list); for (i=0; i<3; i++) { diff --git a/plugins/groupwise-features/groupwise-account-setup.c b/plugins/groupwise-features/groupwise-account-setup.c index 335a3b525e..f232bab055 100644 --- a/plugins/groupwise-features/groupwise-account-setup.c +++ b/plugins/groupwise-features/groupwise-account-setup.c @@ -27,6 +27,7 @@ #include #include "shell/es-event.h" #include +#include #define GROUPWISE_BASE_URI "groupwise://" @@ -88,8 +89,8 @@ ensure_mandatory_esource_properties (EPlugin *ep, ESEventTargetUpgrade *target) EAccountList *al; EIterator *it; + al = e_get_account_list (); client = gconf_client_get_default (); - al = e_account_list_new (client); for (it = e_list_get_iterator ((EList *)al); e_iterator_is_valid (it); @@ -103,7 +104,6 @@ ensure_mandatory_esource_properties (EPlugin *ep, ESEventTargetUpgrade *target) set_esource_props ("/apps/evolution/tasks/sources", a, client, a->name); set_esource_props ("/apps/evolution/memos/sources", a, client, a->name); } - g_object_unref (al); g_object_unref (client); } diff --git a/plugins/groupwise-features/gw-ui.c b/plugins/groupwise-features/gw-ui.c index 3ca262b674..0d64bd9d3c 100644 --- a/plugins/groupwise-features/gw-ui.c +++ b/plugins/groupwise-features/gw-ui.c @@ -20,6 +20,8 @@ #include #include +#include + #include #include @@ -319,7 +321,7 @@ is_meeting_owner (ECalComponent *comp, ECal *client) } if (!ret_val) - ret_val = e_account_list_find (itip_addresses_get (), E_ACCOUNT_FIND_ID_ADDRESS, strip) != NULL; + ret_val = e_account_list_find (e_get_account_list (), E_ACCOUNT_FIND_ID_ADDRESS, strip) != NULL; g_free (email); return ret_val; -- cgit v1.2.3