aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-04-26 21:20:50 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-04-26 21:20:50 +0800
commit8cd20682159f0e683cdd81af54611b9511f873a1 (patch)
tree9753aad4a18754fd2854df32927f814dff342dd7 /plugins
parent831e7616c7aee818a304c962bf6007d03a29c2ed (diff)
downloadgsoc2013-evolution-8cd20682159f0e683cdd81af54611b9511f873a1.tar.gz
gsoc2013-evolution-8cd20682159f0e683cdd81af54611b9511f873a1.tar.zst
gsoc2013-evolution-8cd20682159f0e683cdd81af54611b9511f873a1.zip
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.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/groupwise-features/camel-gw-listener.c8
-rw-r--r--plugins/groupwise-features/groupwise-account-setup.c4
-rw-r--r--plugins/groupwise-features/gw-ui.c4
-rw-r--r--plugins/itip-formatter/itip-formatter.c5
4 files changed, 10 insertions, 11 deletions
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 <e-gw-connection.h>
#include <libedataserverui/e-passwords.h>
#include "e-util/e-alert-dialog.h"
-#include <libedataserver/e-account.h>
#include <libecal/e-cal.h>
#include <shell/e-shell.h>
+#include <e-util/e-account-utils.h>
/*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 <gconf/gconf-client.h>
#include "shell/es-event.h"
#include <string.h>
+#include <e-util/e-account-utils.h>
#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 <gtk/gtk.h>
#include <glib/gi18n.h>
+#include <e-util/e-account-utils.h>
+
#include <shell/e-shell-view.h>
#include <shell/e-shell-window.h>
@@ -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;
diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c
index dcf3874b12..f2455adfa5 100644
--- a/plugins/itip-formatter/itip-formatter.c
+++ b/plugins/itip-formatter/itip-formatter.c
@@ -41,6 +41,7 @@
#include <mail/mail-tools.h>
#include <mail/mail-mt.h>
#include <libedataserver/e-account-list.h>
+#include <e-util/e-account-utils.h>
#include <e-util/e-alert-dialog.h>
#include <e-util/e-mktemp.h>
#include <calendar/gui/itip-utils.h>
@@ -964,7 +965,7 @@ change_status (icalcomponent *ical_comp, const gchar *address, icalparameter_par
} else {
EAccount *a;
- a = itip_addresses_get_default ();
+ a = e_get_default_account ();
prop = icalproperty_new_attendee (a->id->address);
icalcomponent_add_property (ical_comp, prop);
@@ -2323,7 +2324,7 @@ format_itip_object (EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject
info = (struct _itip_puri *) em_format_find_puri ((EMFormat *)efh, pobject->classid);
/* Accounts */
- info->accounts = itip_addresses_get ();
+ info->accounts = e_get_account_list ();
/* Source Lists and open ecal clients */
for (i = 0; i < E_CAL_SOURCE_TYPE_LAST; i++) {