[evolution/account-mgmt: 19/50] Adapt calendar/gui to the new ESource API.



commit fcb86903bcd0f3774ba88fe64edfff786657274c
Author: Matthew Barnes <mbarnes redhat com>
Date:   Mon Dec 13 16:05:32 2010 -0500

    Adapt calendar/gui to the new ESource API.

 calendar/gui/alarm-notify/config-data.h     |    1 -
 calendar/gui/dialogs/Makefile.am            |    3 -
 calendar/gui/dialogs/calendar-setup.c       |  697 ---------------------------
 calendar/gui/dialogs/calendar-setup.h       |   44 --
 calendar/gui/dialogs/comp-editor.c          |    4 +-
 calendar/gui/dialogs/e-send-options-utils.c |   61 ++-
 calendar/gui/dialogs/e-send-options-utils.h |    2 +-
 calendar/gui/dialogs/event-page.c           |  105 ++---
 calendar/gui/dialogs/event-page.ui          |    1 +
 calendar/gui/dialogs/memo-page.c            |   99 ++---
 calendar/gui/dialogs/memo-page.ui           |    1 +
 calendar/gui/dialogs/select-source-dialog.c |   61 +--
 calendar/gui/dialogs/task-page.c            |   88 +---
 calendar/gui/dialogs/task-page.ui           |    1 +
 calendar/gui/e-cal-component-preview.c      |    2 +-
 calendar/gui/e-cal-config.c                 |    2 +
 calendar/gui/e-cal-event.c                  |    4 -
 calendar/gui/e-cal-event.h                  |    4 -
 calendar/gui/e-cal-model.c                  |   88 +++--
 calendar/gui/e-cal-model.h                  |    5 +-
 calendar/gui/e-cal-source-config.c          |   42 +-
 calendar/gui/e-cal-source-config.h          |    7 +-
 calendar/gui/e-calendar-selector.c          |   49 +--
 calendar/gui/e-calendar-selector.h          |    3 +-
 calendar/gui/e-calendar-view.c              |    8 +-
 calendar/gui/e-day-view.c                   |    8 +-
 calendar/gui/e-meeting-list-view.c          |    8 +-
 calendar/gui/e-meeting-store.c              |   64 ++-
 calendar/gui/e-memo-list-selector.c         |   53 +--
 calendar/gui/e-memo-list-selector.h         |    3 +-
 calendar/gui/e-task-list-selector.c         |   53 +--
 calendar/gui/e-task-list-selector.h         |    3 +-
 calendar/gui/itip-utils.c                   |  157 +++++--
 calendar/gui/itip-utils.h                   |    1 -
 34 files changed, 465 insertions(+), 1267 deletions(-)
---
diff --git a/calendar/gui/alarm-notify/config-data.h b/calendar/gui/alarm-notify/config-data.h
index 705e69e..2bdbd99 100644
--- a/calendar/gui/alarm-notify/config-data.h
+++ b/calendar/gui/alarm-notify/config-data.h
@@ -29,7 +29,6 @@
 #include <libical/ical.h>
 #include <libecal/e-cal-client.h>
 #include <gconf/gconf-client.h>
-#include <libedataserver/e-source-list.h>
 
 GConfClient *	config_data_get_conf_client	(void);
 icaltimezone *	config_data_get_timezone	(void);
diff --git a/calendar/gui/dialogs/Makefile.am b/calendar/gui/dialogs/Makefile.am
index 6845509..3be066d 100644
--- a/calendar/gui/dialogs/Makefile.am
+++ b/calendar/gui/dialogs/Makefile.am
@@ -25,7 +25,6 @@ ecalendarinclude_HEADERS =		\
 	comp-editor.h			\
 	alarm-dialog.h			\
 	alarm-list-dialog.h		\
-	calendar-setup.h		\
 	cancel-comp.h			\
 	changed-comp.h			\
 	comp-editor-util.h		\
@@ -60,8 +59,6 @@ libcal_dialogs_la_SOURCES =		\
 	alarm-dialog.h			\
 	alarm-list-dialog.c		\
 	alarm-list-dialog.h		\
-	calendar-setup.c		\
-	calendar-setup.h		\
 	cancel-comp.c			\
 	cancel-comp.h			\
 	changed-comp.c			\
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 1d5a45a..995c97d 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -945,7 +945,7 @@ action_save_cb (GtkAction *action,
 		e_alert_submit (
 			E_ALERT_SINK (editor),
 			"calendar:prompt-read-only-cal-editor",
-			e_source_peek_name (
+			e_source_get_display_name (
 				e_client_get_source (E_CLIENT (priv->cal_client))),
 			NULL);
 		return;
@@ -2198,7 +2198,7 @@ prompt_and_save_changes (CompEditor *editor,
 			e_alert_submit (
 				E_ALERT_SINK (editor),
 				"calendar:prompt-read-only-cal-editor",
-				e_source_peek_name (
+				e_source_get_display_name (
 					e_client_get_source (E_CLIENT (priv->cal_client))),
 				NULL);
 			/* don't discard changes when selected readonly calendar */
diff --git a/calendar/gui/dialogs/e-send-options-utils.c b/calendar/gui/dialogs/e-send-options-utils.c
index f8e9335..d438f16 100644
--- a/calendar/gui/dialogs/e-send-options-utils.c
+++ b/calendar/gui/dialogs/e-send-options-utils.c
@@ -28,8 +28,11 @@
 
 #include "e-send-options-utils.h"
 
+#include <stdlib.h>
 #include <string.h>
 
+#include <libedataserver/e-source-extension.h>
+
 void
 e_send_options_utils_set_default_data (ESendOptionsDialog *sod,
                                        ESource *source,
@@ -37,24 +40,25 @@ e_send_options_utils_set_default_data (ESendOptionsDialog *sod,
 {
 	ESendOptionsGeneral *gopts = NULL;
 	ESendOptionsStatusTracking *sopts;
-	GConfClient *gconf = gconf_client_get_default ();
-	ESourceList *source_list;
-	const gchar *uid;
-	const gchar *value;
+	ESourceExtension *extension;
+	const gchar *extension_name;
+	gchar *value;
 
-	gopts = sod->data->gopts;
-	sopts = sod->data->sopts;
+	/* FIXME These is all GroupWise-specific settings.
+	 *       They absolutely do not belong here. */
 
-	if (!strcmp (type, "calendar"))
-		source_list = e_source_list_new_for_gconf (gconf, "/apps/evolution/calendar/sources");
-	else
-		source_list = e_source_list_new_for_gconf (gconf, "/apps/evolution/tasks/sources");
+	extension_name = "GroupWise Backend";
 
-	uid = e_source_peek_uid (source);
-	source = e_source_list_peek_source_by_uid (source_list, uid);
+	if (!e_source_has_extension (source, extension_name))
+		return;
+
+	extension = e_source_get_extension (source, extension_name);
+
+	gopts = sod->data->gopts;
+	sopts = sod->data->sopts;
 
 		/* priority */
-	value = e_source_get_property (source, "priority");
+	g_object_get (extension, "priority", &value, NULL);
 	if (value) {
 		if (!strcmp (value, "high"))
 			gopts->priority = E_PRIORITY_HIGH;
@@ -65,8 +69,10 @@ e_send_options_utils_set_default_data (ESendOptionsDialog *sod,
 		else
 			gopts->priority = E_PRIORITY_UNDEFINED;
 	}
+	g_free (value);
+
 		/* Reply requested */
-	value = e_source_get_property (source, "reply-requested");
+	g_object_get (extension, "reply-requested", &value, NULL);
 	if (value) {
 		if (!strcmp (value, "none"))
 			gopts->reply_enabled = FALSE;
@@ -78,8 +84,10 @@ e_send_options_utils_set_default_data (ESendOptionsDialog *sod,
 			gopts->reply_within = i;
 		}
 	}
+	g_free (value);
+
 		/* Delay delivery */
-	value = e_source_get_property (source, "delay-delivery");
+	g_object_get (extension, "delivery-delay", &value, NULL);
 	if (value) {
 		if (!strcmp (value, "none"))
 			gopts->delay_enabled = FALSE;
@@ -88,8 +96,10 @@ e_send_options_utils_set_default_data (ESendOptionsDialog *sod,
 			gopts->delay_until = icaltime_as_timet (icaltime_from_string (value));
 		}
 	}
+	g_free (value);
+
 		/* Expiration Date */
-	value = e_source_get_property (source, "expiration");
+	g_object_get (extension, "expiration", &value, NULL);
 	if (value) {
 		if (!strcmp (value, "none"))
 			gopts->expiration_enabled = FALSE;
@@ -102,8 +112,10 @@ e_send_options_utils_set_default_data (ESendOptionsDialog *sod,
 			gopts->expire_after = i;
 		}
 	}
+	g_free (value);
+
 		/* status tracking */
-	value = e_source_get_property (source, "status-tracking");
+	g_object_get (extension, "status-tracking", &value, NULL);
 	if (value) {
 		if (!strcmp (value, "none"))
 			sopts->tracking_enabled = FALSE;
@@ -117,42 +129,45 @@ e_send_options_utils_set_default_data (ESendOptionsDialog *sod,
 				sopts->track_when = E_ALL;
 		}
 	}
+	g_free (value);
 
 		/* Return Notifications */
 
-	value = e_source_get_property (source, "return-open");
+	g_object_get (extension, "return-open", &value, NULL);
 	if (value) {
 		if (!strcmp (value, "none"))
 			sopts->opened = E_RETURN_NOTIFY_NONE;
 		else
 			sopts->opened = E_RETURN_NOTIFY_MAIL;
 	}
+	g_free (value);
 
-	value = e_source_get_property (source, "return-accept");
+	g_object_get (extension, "return-accept", &value, NULL);
 	if (value) {
 		if (!strcmp (value, "none"))
 			sopts->accepted = E_RETURN_NOTIFY_NONE;
 		else
 			sopts->accepted = E_RETURN_NOTIFY_MAIL;
 	}
+	g_free (value);
 
-	value = e_source_get_property (source, "return-decline");
+	g_object_get (extension, "return-decline", &value, NULL);
 	if (value) {
 		if (!strcmp (value, "none"))
 			sopts->declined = E_RETURN_NOTIFY_NONE;
 		else
 			sopts->declined = E_RETURN_NOTIFY_MAIL;
 	}
+	g_free (value);
 
-	value = e_source_get_property (source, "return-complete");
+	g_object_get (extension, "return-complete", &value, NULL);
 	if (value) {
 		if (!strcmp (value, "none"))
 			sopts->completed = E_RETURN_NOTIFY_NONE;
 		else
 			sopts->completed = E_RETURN_NOTIFY_MAIL;
 	}
-
-	g_object_unref (gconf);
+	g_free (value);
 }
 
 void
diff --git a/calendar/gui/dialogs/e-send-options-utils.h b/calendar/gui/dialogs/e-send-options-utils.h
index c1a63a2..3ec7542 100644
--- a/calendar/gui/dialogs/e-send-options-utils.h
+++ b/calendar/gui/dialogs/e-send-options-utils.h
@@ -27,7 +27,7 @@
 
 #include "misc/e-send-options.h"
 #include <libecal/e-cal-component.h>
-#include <libedataserver/e-source-list.h>
+#include <libedataserver/e-source.h>
 
 void		e_send_options_utils_set_default_data
 						(ESendOptionsDialog *sod,
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index a0aec98..2f8120b 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -34,6 +34,8 @@
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
 #include <gdk/gdkkeysyms.h>
+#include <libedataserver/e-source-mail-identity.h>
+#include <libedataserver/e-source-registry.h>
 #include <libedataserverui/e-category-completion.h>
 #include <libedataserverui/e-client-utils.h>
 #include <libedataserverui/e-source-combo-box.h>
@@ -44,7 +46,6 @@
 #include "../e-timezone-entry.h"
 
 #include "e-util/e-util.h"
-#include "e-util/e-account-utils.h"
 #include "e-util/e-categories-config.h"
 #include "e-util/e-dialog-utils.h"
 #include "e-util/e-dialog-widgets.h"
@@ -103,7 +104,6 @@ struct _EventPagePrivate {
 	GtkWidget *info_hbox;
 	GtkWidget *info_icon;
 	GtkWidget *info_string;
-	gchar *subscriber_info_text;
 
 	GtkWidget *summary;
 	GtkWidget *summary_label;
@@ -215,9 +215,10 @@ get_current_identity (EventPage *page,
                       gchar **name,
                       gchar **mailto)
 {
-	EAccountList *account_list;
-	EIterator *iterator;
+	ESourceRegistry *registry;
+	GList *list, *iter;
 	GtkWidget *entry;
+	const gchar *extension_name;
 	const gchar *text;
 	gboolean match = FALSE;
 
@@ -227,28 +228,23 @@ get_current_identity (EventPage *page,
 	if (text == NULL || *text == '\0')
 		return FALSE;
 
-	account_list = e_get_account_list ();
-	iterator = e_list_get_iterator (E_LIST (account_list));
+	registry = e_source_registry_get_default ();
+	extension_name = E_SOURCE_EXTENSION_MAIL_IDENTITY;
 
-	while (!match && e_iterator_is_valid (iterator)) {
-		EAccount *account;
+	list = e_source_registry_list_sources (registry, extension_name);
+
+	for (iter = list; !match && iter != NULL; iter = g_list_next (iter)) {
+		ESource *source = E_SOURCE (iter->data);
+		ESourceMailIdentity *extension;
 		const gchar *id_name;
 		const gchar *id_address;
 		gchar *identity;
 
-		/* XXX EIterator misuses const. */
-		account = (EAccount *) e_iterator_get (iterator);
-<<<<<<< HEAD
-
-		id_name = account->id->name;
-		id_address = account->id->address;
+		extension = e_source_get_extension (source, extension_name);
 
-=======
+		id_name = e_source_mail_identity_get_name (extension);
+		id_address = e_source_mail_identity_get_address (extension);
 
-		id_name = account->id->name;
-		id_address = account->id->address;
-
->>>>>>> Refactor CompEditor pages to isolate EAccount usage.
 		identity = g_strdup_printf ("%s <%s>", id_name, id_address);
 		match = (g_ascii_strcasecmp (text, identity) == 0);
 		g_free (identity);
@@ -258,11 +254,9 @@ get_current_identity (EventPage *page,
 
 		if (match && mailto != NULL)
 			*mailto = g_strdup_printf ("MAILTO:%s", id_address);
-
-		e_iterator_next (iterator);
 	}
 
-	g_object_unref (iterator);
+	g_list_free (list);
 
 	return match;
 }
@@ -647,7 +641,7 @@ sensitize_widgets (EventPage *epage)
 		event_page_set_info_string (epage, GTK_STOCK_DIALOG_INFO, tmp);
 		g_free (tmp);
 	} else if (!check_starts_in_the_past (epage)) {
-		event_page_set_info_string (epage, priv->subscriber_info_text ? GTK_STOCK_DIALOG_INFO : NULL, priv->subscriber_info_text);
+		event_page_set_info_string (epage, NULL, NULL);
 	}
 
 	alarm = e_dialog_combo_box_get (priv->alarm_time_combo, priv->alarm_map) != ALARM_NONE;
@@ -2574,8 +2568,6 @@ get_widgets (EventPage *epage)
 
 	priv->source_selector = GW ("source");
 
-	e_util_set_source_combo_box_list (priv->source_selector, "/apps/evolution/calendar/sources");
-
 	completion = e_category_completion_new ();
 	gtk_entry_set_completion (GTK_ENTRY (priv->categories), completion);
 	g_object_unref (completion);
@@ -2923,11 +2915,12 @@ epage_client_opened_cb (GObject *source_object,
 			E_SOURCE_COMBO_BOX (priv->source_selector),
 			e_client_get_source (E_CLIENT (old_client)));
 
-		dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
-						 GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
-						 _("Unable to open the calendar '%s': %s"),
-						 e_source_peek_name (source),
-						 error ? error->message : _("Unknown error"));
+		dialog = gtk_message_dialog_new (
+			NULL, GTK_DIALOG_MODAL,
+			GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
+			_("Unable to open the calendar '%s': %s"),
+			e_source_get_display_name (source),
+			error->message);
 		gtk_dialog_run (GTK_DIALOG (dialog));
 		gtk_widget_destroy (dialog);
 
@@ -2957,10 +2950,15 @@ epage_client_opened_cb (GObject *source_object,
 		set_subscriber_info_string (epage, backend_addr);
 		g_free (backend_addr);
 
-		sensitize_widgets (epage);
+		if (priv->is_meeting)
+			event_page_select_organizer (epage, backend_addr);
 
 		alarm_list_dialog_set_client (priv->alarm_list_dlg_widget, cal_client);
 	}
+
+	sensitize_widgets (epage);
+
+	alarm_list_dialog_set_client (priv->alarm_list_dlg_widget, client);
 }
 
 static void
@@ -2990,26 +2988,8 @@ static void
 set_subscriber_info_string (EventPage *epage,
                             const gchar *backend_address)
 {
-	CompEditor *editor;
-	ECalClient *client;
-	ESource *source;
-
-	editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (epage));
-	client = comp_editor_get_client (editor);
-	source = e_client_get_source (E_CLIENT (client));
-
-	if (e_source_get_property (source, "subscriber")) {
-		g_free (epage->priv->subscriber_info_text);
-		/* Translators: This string is used when we are creating an Event
-		 * (meeting or appointment)  on behalf of some other user */
-		epage->priv->subscriber_info_text = g_markup_printf_escaped (_("You are acting on behalf of %s"), backend_address);
-	} else {
-		g_free (epage->priv->subscriber_info_text);
-		epage->priv->subscriber_info_text = NULL;
-	}
-
 	if (!check_starts_in_the_past (epage))
-		event_page_set_info_string (epage, epage->priv->subscriber_info_text ? GTK_STOCK_DIALOG_INFO : NULL, epage->priv->subscriber_info_text);
+		event_page_set_info_string (epage, NULL, NULL);
 }
 
 static void
@@ -3421,32 +3401,18 @@ event_page_select_organizer (EventPage *epage,
                              const gchar *backend_address)
 {
 	EventPagePrivate *priv = epage->priv;
-	CompEditor *editor;
-	ECalClient *client;
 	const gchar *default_address;
-	gboolean subscribed_cal = FALSE;
-	ESource *source = NULL;
-	const gchar *user_addr = NULL;
 	gint ii;
 
-	editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (epage));
-	client = comp_editor_get_client (editor);
-
-	if (client)
-		source = e_client_get_source (E_CLIENT (client));
-	if (source)
-		user_addr = e_source_get_property (source, "subscriber");
-
-	if (user_addr)
-		subscribed_cal = TRUE;
-	else
-		user_addr = (backend_address && *backend_address) ? backend_address : NULL;
+	/* Treat an empty backend address as NULL. */
+	if (backend_address != NULL && *backend_address == '\0')
+		backend_address = NULL;
 
 	default_address = priv->fallback_address;
 
-	if (user_addr) {
+	if (backend_address != NULL) {
 		for (ii = 0; priv->address_strings[ii] != NULL; ii++) {
-			if (g_strrstr (priv->address_strings[ii], user_addr) != NULL) {
+			if (g_strrstr (priv->address_strings[ii], backend_address) != NULL) {
 				default_address = priv->address_strings[ii];
 				break;
 			}
@@ -3459,7 +3425,6 @@ event_page_select_organizer (EventPage *epage,
 
 			g_signal_handlers_block_by_func (entry, organizer_changed_cb, epage);
 			gtk_entry_set_text (entry, default_address);
-			gtk_widget_set_sensitive (priv->organizer, !subscribed_cal);
 			g_signal_handlers_unblock_by_func (entry, organizer_changed_cb, epage);
 		}
 	} else
diff --git a/calendar/gui/dialogs/event-page.ui b/calendar/gui/dialogs/event-page.ui
index 9377c83..f738c09 100644
--- a/calendar/gui/dialogs/event-page.ui
+++ b/calendar/gui/dialogs/event-page.ui
@@ -779,6 +779,7 @@
                         </child>
                         <child>
                           <object class="ESourceComboBox" type-func="e_source_combo_box_get_type" id="source">
+                            <property name="extension-name">Calendar</property>
                             <property name="visible">True</property>
                           </object>
                           <packing>
diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c
index cf1e879..37d5e95 100644
--- a/calendar/gui/dialogs/memo-page.c
+++ b/calendar/gui/dialogs/memo-page.c
@@ -33,6 +33,8 @@
 #include <string.h>
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
+#include <libedataserver/e-source-mail-identity.h>
+#include <libedataserver/e-source-registry.h>
 #include <libedataserverui/e-category-completion.h>
 #include <libedataserverui/e-client-utils.h>
 #include <libedataserverui/e-source-combo-box.h>
@@ -43,7 +45,6 @@
 #include "misc/e-buffer-tagger.h"
 
 #include "e-util/e-util.h"
-#include "e-util/e-account-utils.h"
 #include "e-util/e-categories-config.h"
 #include "e-util/e-dialog-utils.h"
 #include "e-util/e-dialog-widgets.h"
@@ -68,7 +69,6 @@ struct _MemoPagePrivate {
 	GtkWidget *info_hbox;
 	GtkWidget *info_icon;
 	GtkWidget *info_string;
-	gchar *subscriber_info_text;
 
 	/* Organizer */
 	GtkWidget *org_label;
@@ -113,9 +113,10 @@ get_current_identity (MemoPage *page,
                       gchar **name,
                       gchar **mailto)
 {
-	EAccountList *account_list;
-	EIterator *iterator;
+	ESourceRegistry *registry;
+	GList *list, *iter;
 	GtkWidget *entry;
+	const gchar *extension_name;
 	const gchar *text;
 	gboolean match = FALSE;
 
@@ -125,20 +126,22 @@ get_current_identity (MemoPage *page,
 	if (text == NULL || *text == '\0')
 		return FALSE;
 
-	account_list = e_get_account_list ();
-	iterator = e_list_get_iterator (E_LIST (account_list));
+	registry = e_source_registry_get_default ();
+	extension_name = E_SOURCE_EXTENSION_MAIL_IDENTITY;
 
-	while (!match && e_iterator_is_valid (iterator)) {
-		EAccount *account;
+	list = e_source_registry_list_sources (registry, extension_name);
+
+	for (iter = list; !match && iter != NULL; iter = g_list_next (iter)) {
+		ESource *source = E_SOURCE (iter->data);
+		ESourceMailIdentity *extension;
 		const gchar *id_name;
 		const gchar *id_address;
 		gchar *identity;
 
-		/* XXX EIterator misuses const. */
-		account = (EAccount *) e_iterator_get (iterator);
+		extension = e_source_get_extension (source, extension_name);
 
-		id_name = account->id->name;
-		id_address = account->id->address;
+		id_name = e_source_mail_identity_get_name (extension);
+		id_address = e_source_mail_identity_get_address (extension);
 
 		identity = g_strdup_printf ("%s <%s>", id_name, id_address);
 		match = (g_ascii_strcasecmp (text, identity) == 0);
@@ -149,11 +152,9 @@ get_current_identity (MemoPage *page,
 
 		if (match && mailto != NULL)
 			*mailto = g_strdup_printf ("MAILTO:%s", id_address);
-
-		e_iterator_next (iterator);
 	}
 
-	g_object_unref (iterator);
+	g_list_free (list);
 
 	return match;
 }
@@ -229,8 +230,6 @@ memo_page_finalize (GObject *object)
 		priv->builder = NULL;
 	}
 
-	g_free (priv->subscriber_info_text);
-
 	/* Chain up to parent's finalize() method. */
 	G_OBJECT_CLASS (memo_page_parent_class)->finalize (object);
 }
@@ -402,12 +401,11 @@ check_starts_in_the_past (MemoPage *mpage)
 	start_tt.is_date = TRUE;
 	if (e_date_edit_get_date (E_DATE_EDIT (priv->start_date), &start_tt.year, &start_tt.month, &start_tt.day) &&
 	    comp_editor_test_time_in_the_past (start_tt)) {
-		gchar *tmp = g_strconcat ("<b>", _("Memo's start date is in the past"), "</b>",
-			priv->subscriber_info_text ? "\n" : "", priv->subscriber_info_text, NULL);
+		gchar *tmp = g_strconcat ("<b>", _("Memo's start date is in the past"), "</b>", NULL);
 		memo_page_set_info_string (mpage, GTK_STOCK_DIALOG_WARNING, tmp);
 		g_free (tmp);
 	} else {
-		memo_page_set_info_string (mpage, priv->subscriber_info_text ? GTK_STOCK_DIALOG_INFO : NULL, priv->subscriber_info_text);
+		memo_page_set_info_string (mpage, NULL, NULL);
 	}
 
 	return TRUE;
@@ -447,7 +445,7 @@ sensitize_widgets (MemoPage *mpage)
 		memo_page_set_info_string (mpage, GTK_STOCK_DIALOG_INFO, tmp);
 		g_free (tmp);
 	} else if (!check_starts_in_the_past (mpage)) {
-		memo_page_set_info_string (mpage, priv->subscriber_info_text ? GTK_STOCK_DIALOG_INFO : NULL, priv->subscriber_info_text);
+		memo_page_set_info_string (mpage, NULL, NULL);
 	}
 
 	/* The list of organizers is set to be non-editable. Otherwise any
@@ -534,7 +532,7 @@ fill_comp_with_recipients (ENameSelector *name_selector,
 				ENameSelectorModel *model;
 				EContactStore *c_store;
 				GSList *clients, *l;
-				gchar *uri = e_contact_get (contact, E_CONTACT_BOOK_URI);
+				gchar *uid = e_contact_get (contact, E_CONTACT_BOOK_URI);
 
 				dialog = e_name_selector_peek_dialog (name_selector);
 				model = e_name_selector_dialog_peek_model (dialog);
@@ -543,7 +541,11 @@ fill_comp_with_recipients (ENameSelector *name_selector,
 
 				for (l = clients; l; l = l->next) {
 					EBookClient *b = l->data;
-					if (g_str_equal (uri, e_client_get_uri (E_CLIENT (b)))) {
+					ESource *source;
+
+					source = e_client_get_source (E_CLIENT (b));
+
+					if (g_strcmp0 (uid, e_source_get_uid (source)) == 0) {
 						book_client = b;
 						break;
 					}
@@ -874,8 +876,6 @@ get_widgets (MemoPage *mpage)
 	priv->source_selector = GW ("source");
 #undef GW
 
-	e_util_set_source_combo_box_list (priv->source_selector, "/apps/evolution/memos/sources");
-
 	completion = e_category_completion_new ();
 	gtk_entry_set_completion (GTK_ENTRY (priv->categories), completion);
 	g_object_unref (completion);
@@ -934,7 +934,7 @@ mpage_client_opened_cb (GObject *source_object,
 		dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
 						 GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
 						 _("Unable to open memos in '%s': %s"),
-						 e_source_peek_name (source),
+						 e_source_get_display_name (source),
 						 error ? error->message : _("Unknown error"));
 		gtk_dialog_run (GTK_DIALOG (dialog));
 		gtk_widget_destroy (dialog);
@@ -997,26 +997,8 @@ static void
 set_subscriber_info_string (MemoPage *mpage,
                             const gchar *backend_address)
 {
-	CompEditor *editor;
-	ECalClient *client;
-	ESource *source;
-
-	editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (mpage));
-	client = comp_editor_get_client (editor);
-	source = e_client_get_source (E_CLIENT (client));
-
-	if (e_source_get_property (source, "subscriber")) {
-		g_free (mpage->priv->subscriber_info_text);
-		/* Translators: This string is used when we are creating a Memo
-		 * on behalf of some other user */
-		mpage->priv->subscriber_info_text = g_markup_printf_escaped (_("You are acting on behalf of %s"), backend_address);
-	} else {
-		g_free (mpage->priv->subscriber_info_text);
-		mpage->priv->subscriber_info_text = NULL;
-	}
-
 	if (!check_starts_in_the_past (mpage))
-		memo_page_set_info_string (mpage, mpage->priv->subscriber_info_text ? GTK_STOCK_DIALOG_INFO : NULL, mpage->priv->subscriber_info_text);
+		memo_page_set_info_string (mpage, NULL, NULL);
 }
 
 static void
@@ -1151,36 +1133,24 @@ static void
 memo_page_select_organizer (MemoPage *mpage,
                             const gchar *backend_address)
 {
-	MemoPagePrivate *priv;
+	MemoPagePrivate *priv = mpage->priv;
 	CompEditor *editor;
 	CompEditorFlags flags;
-	ECalClient *client;
 	const gchar *default_address;
-	gboolean subscribed_cal = FALSE;
-	ESource *source = NULL;
-	const gchar *user_addr = NULL;
 	gint ii;
 
-	priv = mpage->priv;
+	/* Treat an empty backend address as NULL. */
+	if (backend_address != NULL && *backend_address == '\0')
+		backend_address = NULL;
+
 	editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (mpage));
-	client = comp_editor_get_client (editor);
 	flags = comp_editor_get_flags (editor);
 
-	if (client)
-		source = e_client_get_source (E_CLIENT (client));
-	if (source)
-		user_addr = e_source_get_property (source, "subscriber");
-
-	if (user_addr)
-		subscribed_cal = TRUE;
-	else
-		user_addr = (backend_address && *backend_address) ? backend_address : NULL;
-
 	default_address = priv->fallback_address;
 
-	if (user_addr) {
+	if (backend_address != NULL) {
 		for (ii = 0; priv->address_strings[ii] != NULL; ii++) {
-			if (g_strrstr (priv->address_strings[ii], user_addr) != NULL) {
+			if (g_strrstr (priv->address_strings[ii], backend_address) != NULL) {
 				default_address = priv->address_strings[ii];
 				break;
 			}
@@ -1190,7 +1160,6 @@ memo_page_select_organizer (MemoPage *mpage,
 	if (default_address != NULL) {
 		if (flags & COMP_EDITOR_NEW_ITEM) {
 			gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->org_combo))), default_address);
-			gtk_widget_set_sensitive (priv->org_combo, !subscribed_cal);
 		}
 	} else
 		g_warning ("No potential organizers!");
diff --git a/calendar/gui/dialogs/memo-page.ui b/calendar/gui/dialogs/memo-page.ui
index c4206e2..c222e0c 100644
--- a/calendar/gui/dialogs/memo-page.ui
+++ b/calendar/gui/dialogs/memo-page.ui
@@ -184,6 +184,7 @@
                     <property name="spacing">0</property>
                     <child>
                       <object class="ESourceComboBox" type-func="e_source_combo_box_get_type" id="source">
+                        <property name="extension-name">Memo List</property>
                         <property name="visible">True</property>
                       </object>
                       <packing>
diff --git a/calendar/gui/dialogs/select-source-dialog.c b/calendar/gui/dialogs/select-source-dialog.c
index 6a768e5..5257e36 100644
--- a/calendar/gui/dialogs/select-source-dialog.c
+++ b/calendar/gui/dialogs/select-source-dialog.c
@@ -26,6 +26,7 @@
 #endif
 
 #include <glib/gi18n.h>
+#include <libecal/e-source-calendar.h>
 #include <libedataserverui/e-source-selector-dialog.h>
 #include "select-source-dialog.h"
 
@@ -40,33 +41,26 @@ select_source_dialog (GtkWindow *parent,
                       ESource *except_source)
 {
 	GtkWidget *dialog;
-	ESourceList *source_list;
+	ESourceRegistry *registry;
 	ESource *selected_source = NULL;
-	const gchar *gconf_key;
-	GConfClient *conf_client;
-	const gchar *icon_name = NULL;
+	const gchar *extension_name;
+	const gchar *icon_name;
 
-	if (obj_type == E_CAL_CLIENT_SOURCE_TYPE_EVENTS)
-		gconf_key = "/apps/evolution/calendar/sources";
-	else if (obj_type == E_CAL_CLIENT_SOURCE_TYPE_TASKS)
-		gconf_key = "/apps/evolution/tasks/sources";
-	else if (obj_type == E_CAL_CLIENT_SOURCE_TYPE_MEMOS)
-                gconf_key = "/apps/evolution/memos/sources";
-	else
+	if (obj_type == E_CAL_CLIENT_SOURCE_TYPE_EVENTS) {
+		extension_name = E_SOURCE_EXTENSION_CALENDAR;
+		icon_name = "x-office-calendar";
+	} else if (obj_type == E_CAL_CLIENT_SOURCE_TYPE_TASKS) {
+		extension_name = E_SOURCE_EXTENSION_TASK_LIST;
+		icon_name = "stock_todo";
+	} else if (obj_type == E_CAL_CLIENT_SOURCE_TYPE_MEMOS) {
+		extension_name = E_SOURCE_EXTENSION_MEMO_LIST;
+		icon_name = "stock_journal";
+	} else
 		return NULL;
 
-	conf_client = gconf_client_get_default ();
-	source_list = e_source_list_new_for_gconf (conf_client, gconf_key);
-
 	/* create the dialog */
-	dialog = e_source_selector_dialog_new (parent, source_list);
-
-	if (obj_type == E_CAL_CLIENT_SOURCE_TYPE_EVENTS)
-		icon_name = "x-office-calendar";
-	else if (obj_type == E_CAL_CLIENT_SOURCE_TYPE_TASKS)
-		icon_name = "stock_todo";
-	else if (obj_type == E_CAL_CLIENT_SOURCE_TYPE_MEMOS)
-                icon_name = "stock_journal";
+	registry = e_source_registry_get_default ();
+	dialog = e_source_selector_dialog_new (parent, registry, extension_name);
 
 	if (icon_name)
 		gtk_window_set_icon_name (GTK_WINDOW (dialog), icon_name);
@@ -74,24 +68,15 @@ select_source_dialog (GtkWindow *parent,
 	if (except_source)
 		g_object_set_data (G_OBJECT (dialog), "except-source", except_source);
 
-	if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) {
-		selected_source = e_source_selector_dialog_peek_primary_selection (E_SOURCE_SELECTOR_DIALOG (dialog));
-		if (selected_source) {
-			gchar *absolute_uri;
+	if (gtk_dialog_run (GTK_DIALOG (dialog)) != GTK_RESPONSE_OK)
+		goto exit;
 
-			/* set the absolute URI on the source we keep around, since the group
-			 * will be unrefed */
-			absolute_uri = e_source_build_absolute_uri (selected_source);
-			e_source_set_absolute_uri (selected_source, (const gchar *) absolute_uri);
-
-			g_object_ref (selected_source);
-			g_free (absolute_uri);
-		}
-	} else
-		selected_source = NULL;
+	selected_source = e_source_selector_dialog_peek_primary_selection (
+		E_SOURCE_SELECTOR_DIALOG (dialog));
+	if (selected_source != NULL)
+		g_object_ref (selected_source);
 
-	g_object_unref (conf_client);
-	g_object_unref (source_list);
+exit:
 	gtk_widget_destroy (dialog);
 
 	return selected_source;
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index d88976b..093b1d1 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -33,6 +33,8 @@
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
 #include <gdk/gdkkeysyms.h>
+#include <libedataserver/e-source-mail-identity.h>
+#include <libedataserver/e-source-registry.h>
 #include <libedataserverui/e-category-completion.h>
 #include <libedataserverui/e-client-utils.h>
 #include <libedataserverui/e-source-combo-box.h>
@@ -46,7 +48,6 @@
 #include "task-page.h"
 
 #include "e-util/e-util.h"
-#include "e-util/e-account-utils.h"
 #include "e-util/e-dialog-widgets.h"
 #include "e-util/e-categories-config.h"
 #include "e-util/e-util-private.h"
@@ -83,7 +84,6 @@ struct _TaskPagePrivate {
 	GtkWidget *info_hbox;
 	GtkWidget *info_icon;
 	GtkWidget *info_string;
-	gchar *subscriber_info_text;
 
 	GtkWidget *summary;
 	GtkWidget *summary_label;
@@ -146,9 +146,10 @@ get_current_identity (TaskPage *page,
                       gchar **name,
                       gchar **mailto)
 {
-	EAccountList *account_list;
-	EIterator *iterator;
+	ESourceRegistry *registry;
+	GList *list, *iter;
 	GtkWidget *entry;
+	const gchar *extension_name;
 	const gchar *text;
 	gboolean match = FALSE;
 
@@ -158,20 +159,22 @@ get_current_identity (TaskPage *page,
 	if (text == NULL || *text == '\0')
 		return FALSE;
 
-	account_list = e_get_account_list ();
-	iterator = e_list_get_iterator (E_LIST (account_list));
+	registry = e_source_registry_get_default ();
+	extension_name = E_SOURCE_EXTENSION_MAIL_IDENTITY;
 
-	while (!match && e_iterator_is_valid (iterator)) {
-		EAccount *account;
+	list = e_source_registry_list_sources (registry, extension_name);
+
+	for (iter = list; !match && iter != NULL; iter = g_list_next (iter)) {
+		ESource *source = E_SOURCE (iter->data);
+		ESourceMailIdentity *extension;
 		const gchar *id_name;
 		const gchar *id_address;
 		gchar *identity;
 
-		/* XXX EIterator misuses const. */
-		account = (EAccount *) e_iterator_get (iterator);
+		extension = e_source_get_extension (source, extension_name);
 
-		id_name = account->id->name;
-		id_address = account->id->address;
+		id_name = e_source_mail_identity_get_name (extension);
+		id_address = e_source_mail_identity_get_address (extension);
 
 		identity = g_strdup_printf ("%s <%s>", id_name, id_address);
 		match = (g_ascii_strcasecmp (text, identity) == 0);
@@ -182,11 +185,9 @@ get_current_identity (TaskPage *page,
 
 		if (match && mailto != NULL)
 			*mailto = g_strdup_printf ("MAILTO:%s", id_address);
-
-		e_iterator_next (iterator);
 	}
 
-	g_object_unref (iterator);
+	g_list_free (list);
 
 	return match;
 }
@@ -249,12 +250,11 @@ check_starts_in_the_past (TaskPage *tpage)
 
 	if (start_in_past || due_in_past) {
 		gchar *tmp = g_strconcat ("<b>", start_in_past ? _("Task's start date is in the past") : "",
-			start_in_past && due_in_past ? "\n" : "", due_in_past ? _("Task's due date is in the past") : "", "</b>",
-			priv->subscriber_info_text ? "\n" : "", priv->subscriber_info_text, NULL);
+			start_in_past && due_in_past ? "\n" : "", due_in_past ? _("Task's due date is in the past") : "", "</b>", NULL);
 		task_page_set_info_string (tpage, GTK_STOCK_DIALOG_WARNING, tmp);
 		g_free (tmp);
 	} else {
-		task_page_set_info_string (tpage, priv->subscriber_info_text ? GTK_STOCK_DIALOG_INFO : NULL, priv->subscriber_info_text);
+		task_page_set_info_string (tpage, NULL, NULL);
 	}
 
 	return TRUE;
@@ -291,7 +291,7 @@ sensitize_widgets (TaskPage *tpage)
 		task_page_set_info_string (tpage, GTK_STOCK_DIALOG_INFO, tmp);
 		g_free (tmp);
 	} else if (!check_starts_in_the_past (tpage)) {
-		task_page_set_info_string (tpage, priv->subscriber_info_text ? GTK_STOCK_DIALOG_INFO : NULL, priv->subscriber_info_text);
+		task_page_set_info_string (tpage, NULL, NULL);
 	}
 
 	/* The list of organizers is set to be non-editable. Otherwise any
@@ -1488,7 +1488,6 @@ get_widgets (TaskPage *tpage)
 	gtk_box_pack_start (GTK_BOX (priv->list_box), sw, TRUE, TRUE, 0);
 
 	priv->source_selector = e_builder_get_widget (priv->builder, "source");
-	e_util_set_source_combo_box_list (priv->source_selector, "/apps/evolution/tasks/sources");
 
 	gtk_label_set_mnemonic_widget (GTK_LABEL (priv->calendar_label), priv->source_selector);
 
@@ -1755,7 +1754,7 @@ tpage_client_opened_cb (GObject *source_object,
 		dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
 						 GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
 						 _("Unable to open tasks in '%s': %s"),
-						 e_source_peek_name (source),
+						 e_source_get_display_name (source),
 						 error ? error->message : _("Unknown error"));
 		gtk_dialog_run (GTK_DIALOG (dialog));
 		gtk_widget_destroy (dialog);
@@ -1823,26 +1822,8 @@ static void
 set_subscriber_info_string (TaskPage *tpage,
                             const gchar *backend_address)
 {
-	CompEditor *editor;
-	ECalClient *client;
-	ESource *source;
-
-	editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (tpage));
-	client = comp_editor_get_client (editor);
-	source = e_client_get_source (E_CLIENT (client));
-
-	if (e_source_get_property (source, "subscriber")) {
-		g_free (tpage->priv->subscriber_info_text);
-		/* Translators: This string is used when we are creating a Task
-		 * on behalf of some other user */
-		tpage->priv->subscriber_info_text = g_markup_printf_escaped (_("You are acting on behalf of %s"), backend_address);
-	} else {
-		g_free (tpage->priv->subscriber_info_text);
-		tpage->priv->subscriber_info_text = NULL;
-	}
-
 	if (!check_starts_in_the_past (tpage))
-		task_page_set_info_string (tpage, tpage->priv->subscriber_info_text ? GTK_STOCK_DIALOG_INFO : NULL, tpage->priv->subscriber_info_text);
+		task_page_set_info_string (tpage, NULL, NULL);
 }
 
 void
@@ -2027,45 +2008,30 @@ task_page_select_organizer (TaskPage *tpage,
                             const gchar *backend_address)
 {
 	TaskPagePrivate *priv = tpage->priv;
-	CompEditor *editor;
 	const gchar *default_address;
-	gboolean subscribed_cal = FALSE;
-	ESource *source = NULL;
-	ECalClient *client;
-	const gchar *user_addr = NULL;
 	gint ii;
 
-	editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (tpage));
-	client = comp_editor_get_client (editor);
-
-	if (client)
-		source = e_client_get_source (E_CLIENT (client));
-	if (source)
-		user_addr = e_source_get_property (source, "subscriber");
-
-	if (user_addr)
-		subscribed_cal = TRUE;
-	else
-		user_addr = (backend_address && *backend_address) ? backend_address : NULL;
+	/* Treat an empty backend address as NULL. */
+	if (backend_address == NULL && *backend_address == '\0')
+		backend_address = NULL;
 
 	default_address = priv->fallback_address;
 
-	if (user_addr) {
+	if (backend_address != NULL) {
 		for (ii = 0; priv->address_strings[ii] != NULL; ii++) {
-			if (g_strrstr (priv->address_strings[ii], user_addr) != NULL) {
+			if (g_strrstr (priv->address_strings[ii], backend_address) != NULL) {
 				default_address = priv->address_strings[ii];
 				break;
 			}
 		}
 	}
 
-	if (default_address) {
+	if (default_address != NULL) {
 		if (!priv->comp || !e_cal_component_has_organizer (priv->comp)) {
 			GtkEntry *entry = GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->organizer)));
 
 			g_signal_handlers_block_by_func (entry, organizer_changed_cb, tpage);
 			gtk_entry_set_text (entry, default_address);
-			gtk_widget_set_sensitive (priv->organizer, !subscribed_cal);
 			g_signal_handlers_unblock_by_func (entry, organizer_changed_cb, tpage);
 		}
 	} else
diff --git a/calendar/gui/dialogs/task-page.ui b/calendar/gui/dialogs/task-page.ui
index cdc6955..d5896f9 100644
--- a/calendar/gui/dialogs/task-page.ui
+++ b/calendar/gui/dialogs/task-page.ui
@@ -439,6 +439,7 @@
                         </child>
                         <child>
                           <object class="ESourceComboBox" id="source">
+                            <property name="extension-name">Task List</property>
                             <property name="visible">True</property>
                           </object>
                           <packing>
diff --git a/calendar/gui/e-cal-component-preview.c b/calendar/gui/e-cal-component-preview.c
index ec4f817..1851146 100644
--- a/calendar/gui/e-cal-component-preview.c
+++ b/calendar/gui/e-cal-component-preview.c
@@ -94,7 +94,7 @@ update_comp_info (ECalComponentPreview *preview,
 		gint comp_sequence;
 
 		source = e_client_get_source (E_CLIENT (client));
-		cal_uid = g_strdup (e_source_peek_uid (source));
+		cal_uid = g_strdup (e_source_get_uid (source));
 		e_cal_component_get_uid (comp, &uid);
 		comp_uid = g_strdup (uid);
 		e_cal_component_get_last_modified (comp, &itm);
diff --git a/calendar/gui/e-cal-config.c b/calendar/gui/e-cal-config.c
index 8269a10..42baece 100644
--- a/calendar/gui/e-cal-config.c
+++ b/calendar/gui/e-cal-config.c
@@ -25,6 +25,8 @@
 #endif
 
 #include <gtk/gtk.h>
+#include <gconf/gconf-client.h>
+
 #include "e-cal-config.h"
 
 static GObjectClass *ecp_parent_class;
diff --git a/calendar/gui/e-cal-event.c b/calendar/gui/e-cal-event.c
index 176e292..e65e819 100644
--- a/calendar/gui/e-cal-event.c
+++ b/calendar/gui/e-cal-event.c
@@ -48,8 +48,6 @@ ece_target_free (EEvent *ev,
 		ECalEventTargetBackend *s = (ECalEventTargetBackend *) t;
 		if (s->shell_backend)
 			g_object_unref (s->shell_backend);
-		if (s->source_list)
-			g_object_unref (s->source_list);
 		break; }
 	}
 
@@ -101,7 +99,6 @@ e_cal_event_peek (void)
 ECalEventTargetBackend *
 e_cal_event_target_new_module (ECalEvent *ece,
                                EShellBackend *shell_backend,
-                               ESourceList *source_list,
                                guint32 flags)
 {
 	ECalEventTargetBackend *t;
@@ -110,7 +107,6 @@ e_cal_event_target_new_module (ECalEvent *ece,
 		&ece->event, E_CAL_EVENT_TARGET_BACKEND, sizeof (*t));
 
 	t->shell_backend = g_object_ref (shell_backend);
-	t->source_list = g_object_ref (source_list);
 	t->target.mask = ~flags;
 
 	return t;
diff --git a/calendar/gui/e-cal-event.h b/calendar/gui/e-cal-event.h
index d67342e..447f1fd 100644
--- a/calendar/gui/e-cal-event.h
+++ b/calendar/gui/e-cal-event.h
@@ -24,8 +24,6 @@
 #ifndef __E_CAL_EVENT_H__
 #define __E_CAL_EVENT_H__
 
-#include <libedataserver/e-source-list.h>
-
 #include "e-util/e-event.h"
 #include "shell/e-shell-backend.h"
 
@@ -48,7 +46,6 @@ typedef struct _ECalEventTargetBackend ECalEventTargetBackend;
 struct _ECalEventTargetBackend {
 	EEventTarget target;
 	EShellBackend *shell_backend;
-	ESourceList *source_list;
 };
 
 struct _ECalEvent {
@@ -66,7 +63,6 @@ ECalEvent *	e_cal_event_peek		(void);
 ECalEventTargetBackend *
 		e_cal_event_target_new_module	(ECalEvent *ece,
 						 EShellBackend *shell_backend,
-						 ESourceList *source_list,
 						 guint32 flags);
 
 G_END_DECLS
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index 9bb8235..02aad23 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -30,14 +30,15 @@
 #include <glib/gi18n.h>
 #include <libedataserver/e-flag.h>
 #include <libedataserver/e-time-utils.h>
+#include <libedataserver/e-source-selectable.h>
 #include <libecal/e-cal-client-view.h>
 #include <libecal/e-cal-time-util.h>
+#include <libecal/e-source-calendar.h>
 #include "comp-util.h"
 #include "e-cal-model.h"
 #include "itip-utils.h"
 #include "misc.h"
 #include "e-util/e-util.h"
-#include "e-util/e-account-utils.h"
 #include "e-util/e-extensible.h"
 #include "e-util/e-util-enumtypes.h"
 
@@ -76,9 +77,6 @@ struct _ECalModelPrivate {
 	/* The default category */
 	gchar *default_category;
 
-	/* Addresses for determining icons */
-	EAccountList *accounts;
-
 	/* Whether we display dates in 24-hour format. */
         gboolean use_24_hour_format;
 
@@ -703,8 +701,6 @@ e_cal_model_init (ECalModel *model)
 	model->priv->kind = ICAL_NO_COMPONENT;
 	model->priv->flags = 0;
 
-	model->priv->accounts = e_get_account_list ();
-
 	model->priv->use_24_hour_format = TRUE;
 
 	model->priv->in_added = FALSE;
@@ -1594,7 +1590,7 @@ ecm_value_to_string (ETableModel *etm,
 
 typedef struct {
 	const gchar *color;
-	GList *uris;
+	GList *uids;
 } AssignedColorData;
 
 static const gchar *
@@ -1602,8 +1598,12 @@ ecm_get_color_for_component (ECalModel *model,
                              ECalModelComponent *comp_data)
 {
 	ESource *source;
+	ESourceSelectable *extension;
 	const gchar *color_spec;
+	const gchar *extension_name;
+	const gchar *uid;
 	gint i, first_empty = 0;
+
 	static AssignedColorData assigned_colors[] = {
 		{ "#BECEDD", NULL }, /* 190 206 221     Blue */
 		{ "#E2F0EF", NULL }, /* 226 240 239     Light Blue */
@@ -1619,34 +1619,48 @@ ecm_get_color_for_component (ECalModel *model,
 
 	g_return_val_if_fail (E_IS_CAL_MODEL (model), NULL);
 
+	switch (e_cal_client_get_source_type (comp_data->client)) {
+		case E_CAL_CLIENT_SOURCE_TYPE_EVENTS:
+			extension_name = E_SOURCE_EXTENSION_CALENDAR;
+			break;
+		case E_CAL_CLIENT_SOURCE_TYPE_TASKS:
+			extension_name = E_SOURCE_EXTENSION_TASK_LIST;
+			break;
+		case E_CAL_CLIENT_SOURCE_TYPE_MEMOS:
+			extension_name = E_SOURCE_EXTENSION_MEMO_LIST;
+			break;
+		default:
+			g_return_val_if_reached (NULL);
+	}
+
 	source = e_client_get_source (E_CLIENT (comp_data->client));
-	color_spec = e_source_peek_color_spec (source);
+	extension = e_source_get_extension (source, extension_name);
+	color_spec = e_source_selectable_get_color (extension);
+
 	if (color_spec != NULL) {
 		g_free (comp_data->color);
 		comp_data->color = g_strdup (color_spec);
 		return comp_data->color;
 	}
 
+	uid = e_source_get_uid (source);
+
 	for (i = 0; i < G_N_ELEMENTS (assigned_colors); i++) {
 		GList *l;
 
-		if (assigned_colors[i].uris == NULL) {
+		if (assigned_colors[i].uids == NULL) {
 			first_empty = i;
 			continue;
 		}
 
-		for (l = assigned_colors[i].uris; l != NULL; l = l->next) {
-			if (!strcmp ((const gchar *) l->data,
-				     e_client_get_uri (E_CLIENT (comp_data->client))))
-			{
+		for (l = assigned_colors[i].uids; l != NULL; l = l->next)
+			if (g_strcmp0 (l->data, uid) == 0)
 				return assigned_colors[i].color;
-			}
-		}
 	}
 
 	/* return the first unused color */
-	assigned_colors[first_empty].uris = g_list_append (assigned_colors[first_empty].uris,
-							   g_strdup (e_client_get_uri (E_CLIENT (comp_data->client))));
+	assigned_colors[first_empty].uids = g_list_append (
+		assigned_colors[first_empty].uids, g_strdup (uid));
 
 	return assigned_colors[first_empty].color;
 }
@@ -2032,23 +2046,29 @@ e_cal_model_get_client_list (ECalModel *model)
 }
 
 /**
- * e_cal_model_get_client_for_uri:
- * @model: A calendar model.
- * @uri: Uri for the client to get.
+ * e_cal_model_get_client_for_source:
+ * @model: an #ECalModel
+ * @source: an #ESource
  */
 ECalClient *
-e_cal_model_get_client_for_uri (ECalModel *model,
-                                const gchar *uri)
+e_cal_model_get_client_for_source (ECalModel *model,
+                                   ESource *source)
 {
-	GList *l;
+	GList *link;
 
 	g_return_val_if_fail (E_IS_CAL_MODEL (model), NULL);
-	g_return_val_if_fail (uri != NULL, NULL);
+	g_return_val_if_fail (E_IS_SOURCE (source), NULL);
 
-	for (l = model->priv->clients; l != NULL; l = l->next) {
-		ECalModelClient *client_data = (ECalModelClient *) l->data;
+	for (link = model->priv->clients; link != NULL; link = link->next) {
+		ECalModelClient *client_data;
+		ESource *client_source;
+		EClient *client;
+
+		client_data = (ECalModelClient *) link->data;
+		client = E_CLIENT (client_data->client);
+		client_source = e_client_get_source (client);
 
-		if (!strcmp (uri, e_client_get_uri (E_CLIENT (client_data->client))))
+		if (e_source_equal (source, client_source))
 			return client_data->client;
 	}
 
@@ -2830,13 +2850,15 @@ client_opened_cb (GObject *source_object,
 	}
 
 	if (error != NULL) {
-		const gchar *uri;
+		ESource *source;
 
-		uri = e_client_get_uri (E_CLIENT (client));
+		source = e_client_get_source (E_CLIENT (client));
 		e_cal_model_remove_client (model, client);
 		g_warning (
 			"%s: Failed to open '%s': %s",
-			G_STRFUNC, uri, error->message);
+			G_STRFUNC,
+			e_source_get_display_name (source),
+			error->message);
 		g_error_free (error);
 		e_cal_model_update_status_message (model, NULL, -1.0);
 		return;
@@ -2905,9 +2927,13 @@ add_new_client (ECalModel *model,
 	if (e_client_is_opened (E_CLIENT (client))) {
 		update_e_cal_view_for_client (model, client_data);
 	} else {
+		ESource *source;
+		const gchar *display_name;
 		gchar *msg;
 
-		msg = g_strdup_printf (_("Opening %s"), e_client_get_uri (E_CLIENT (client)));
+		source = e_client_get_source (E_CLIENT (client));
+		display_name = e_source_get_display_name (source);
+		msg = g_strdup_printf (_("Opening %s"), display_name);
 		e_cal_model_update_status_message (model, msg, -1.0);
 		g_free (msg);
 
diff --git a/calendar/gui/e-cal-model.h b/calendar/gui/e-cal-model.h
index a514c95..a1de900 100644
--- a/calendar/gui/e-cal-model.h
+++ b/calendar/gui/e-cal-model.h
@@ -244,8 +244,9 @@ ECalClient *	e_cal_model_get_default_client	(ECalModel *model);
 void		e_cal_model_set_default_client	(ECalModel *model,
 						 ECalClient *client);
 GList *		e_cal_model_get_client_list	(ECalModel *model);
-ECalClient *	e_cal_model_get_client_for_uri	(ECalModel *model,
-						 const gchar *uri);
+ECalClient *	e_cal_model_get_client_for_source
+						(ECalModel *model,
+						 ESource *source);
 void		e_cal_model_add_client		(ECalModel *model,
 						 ECalClient *cal_client);
 void		e_cal_model_remove_client	(ECalModel *model,
diff --git a/calendar/gui/e-cal-source-config.c b/calendar/gui/e-cal-source-config.c
index a8e33e3..8931f0e 100644
--- a/calendar/gui/e-cal-source-config.c
+++ b/calendar/gui/e-cal-source-config.c
@@ -31,7 +31,7 @@
 	((obj), E_TYPE_CAL_SOURCE_CONFIG, ECalSourceConfigPrivate))
 
 struct _ECalSourceConfigPrivate {
-	ECalSourceType source_type;
+	ECalClientSourceType source_type;
 	GtkWidget *color_button;
 	GtkWidget *default_button;
 };
@@ -55,11 +55,11 @@ cal_source_config_get_default (ESourceConfig *config)
 	priv = E_CAL_SOURCE_CONFIG_GET_PRIVATE (config);
 	registry = e_source_config_get_registry (config);
 
-	if (priv->source_type == E_CAL_SOURCE_TYPE_EVENT)
+	if (priv->source_type == E_CAL_CLIENT_SOURCE_TYPE_EVENTS)
 		return e_source_registry_get_default_calendar (registry);
-	else if (priv->source_type == E_CAL_SOURCE_TYPE_JOURNAL)
+	else if (priv->source_type == E_CAL_CLIENT_SOURCE_TYPE_MEMOS)
 		return e_source_registry_get_default_memo_list (registry);
-	else if (priv->source_type == E_CAL_SOURCE_TYPE_TODO)
+	else if (priv->source_type == E_CAL_CLIENT_SOURCE_TYPE_TASKS)
 		return e_source_registry_get_default_task_list (registry);
 
 	g_return_val_if_reached (NULL);
@@ -75,17 +75,17 @@ cal_source_config_set_default (ESourceConfig *config,
 	priv = E_CAL_SOURCE_CONFIG_GET_PRIVATE (config);
 	registry = e_source_config_get_registry (config);
 
-	if (priv->source_type == E_CAL_SOURCE_TYPE_EVENT)
+	if (priv->source_type == E_CAL_CLIENT_SOURCE_TYPE_EVENTS)
 		e_source_registry_set_default_calendar (registry, source);
-	else if (priv->source_type == E_CAL_SOURCE_TYPE_JOURNAL)
+	else if (priv->source_type == E_CAL_CLIENT_SOURCE_TYPE_MEMOS)
 		e_source_registry_set_default_memo_list (registry, source);
-	else if (priv->source_type == E_CAL_SOURCE_TYPE_TODO)
+	else if (priv->source_type == E_CAL_CLIENT_SOURCE_TYPE_TASKS)
 		e_source_registry_set_default_task_list (registry, source);
 }
 
 static void
 cal_source_config_set_source_type (ECalSourceConfig *config,
-                                   ECalSourceType source_type)
+                                   ECalClientSourceType source_type)
 {
 	config->priv->source_type = source_type;
 }
@@ -169,13 +169,13 @@ cal_source_config_constructed (GObject *object)
 	gtk_widget_show (widget);
 
 	switch (priv->source_type) {
-		case E_CAL_SOURCE_TYPE_EVENT:
+		case E_CAL_CLIENT_SOURCE_TYPE_EVENTS:
 			label = _("Mark as default calendar");
 			break;
-		case E_CAL_SOURCE_TYPE_TODO:
+		case E_CAL_CLIENT_SOURCE_TYPE_TASKS:
 			label = _("Mark as default task list");
 			break;
-		case E_CAL_SOURCE_TYPE_JOURNAL:
+		case E_CAL_CLIENT_SOURCE_TYPE_MEMOS:
 			label = _("Mark as default memo list");
 			break;
 		default:
@@ -287,8 +287,8 @@ e_cal_source_config_class_init (ECalSourceConfigClass *class)
 			"source-type",
 			"Source Type",
 			"The iCalendar object type",
-			E_TYPE_CAL_SOURCE_TYPE,
-			E_CAL_SOURCE_TYPE_EVENT,
+			E_TYPE_CAL_CLIENT_SOURCE_TYPE,
+			E_CAL_CLIENT_SOURCE_TYPE_EVENTS,
 			G_PARAM_READWRITE |
 			G_PARAM_CONSTRUCT_ONLY |
 			G_PARAM_STATIC_STRINGS));
@@ -303,7 +303,7 @@ e_cal_source_config_init (ECalSourceConfig *config)
 GtkWidget *
 e_cal_source_config_new (ESourceRegistry *registry,
                          ESource *original_source,
-                         ECalSourceType source_type)
+                         ECalClientSourceType source_type)
 {
 	g_return_val_if_fail (E_IS_SOURCE_REGISTRY (registry), NULL);
 
@@ -325,13 +325,13 @@ e_cal_source_config_get_selectable (ECalSourceConfig *config,
 	g_return_val_if_fail (E_IS_CAL_SOURCE_CONFIG (config), NULL);
 
 	switch (e_cal_source_config_get_source_type (config)) {
-		case E_CAL_SOURCE_TYPE_EVENT:
+		case E_CAL_CLIENT_SOURCE_TYPE_EVENTS:
 			extension_name = E_SOURCE_EXTENSION_CALENDAR;
 			break;
-		case E_CAL_SOURCE_TYPE_TODO:
+		case E_CAL_CLIENT_SOURCE_TYPE_TASKS:
 			extension_name = E_SOURCE_EXTENSION_TASK_LIST;
 			break;
-		case E_CAL_SOURCE_TYPE_JOURNAL:
+		case E_CAL_CLIENT_SOURCE_TYPE_MEMOS:
 			extension_name = E_SOURCE_EXTENSION_MEMO_LIST;
 			break;
 		default:
@@ -341,7 +341,7 @@ e_cal_source_config_get_selectable (ECalSourceConfig *config,
 	return e_source_get_extension (scratch_source, extension_name);
 }
 
-ECalSourceType
+ECalClientSourceType
 e_cal_source_config_get_source_type (ECalSourceConfig *config)
 {
 	g_return_val_if_fail (E_IS_CAL_SOURCE_CONFIG (config), 0);
@@ -365,15 +365,15 @@ e_cal_source_config_add_offline_toggle (ECalSourceConfig *config,
 	extension = e_source_get_extension (scratch_source, extension_name);
 
 	switch (e_cal_source_config_get_source_type (config)) {
-		case E_CAL_SOURCE_TYPE_EVENT:
+		case E_CAL_CLIENT_SOURCE_TYPE_EVENTS:
 			label = _("Copy calendar contents locally "
 				  "for offline operation");
 			break;
-		case E_CAL_SOURCE_TYPE_TODO:
+		case E_CAL_CLIENT_SOURCE_TYPE_TASKS:
 			label = _("Copy task list contents locally "
 				  "for offline operation");
 			break;
-		case E_CAL_SOURCE_TYPE_JOURNAL:
+		case E_CAL_CLIENT_SOURCE_TYPE_MEMOS:
 			label = _("Copy memo list contents locally "
 				  "for offline operation");
 			break;
diff --git a/calendar/gui/e-cal-source-config.h b/calendar/gui/e-cal-source-config.h
index ce4e11d..5ae01e1 100644
--- a/calendar/gui/e-cal-source-config.h
+++ b/calendar/gui/e-cal-source-config.h
@@ -19,7 +19,7 @@
 #ifndef E_CAL_SOURCE_CONFIG_H
 #define E_CAL_SOURCE_CONFIG_H
 
-#include <libecal/e-cal.h>
+#include <libecal/e-cal-client.h>
 #include <misc/e-source-config.h>
 #include <libedataserver/e-source-extension.h>
 
@@ -60,12 +60,13 @@ struct _ECalSourceConfigClass {
 GType		e_cal_source_config_get_type	(void) G_GNUC_CONST;
 GtkWidget *	e_cal_source_config_new		(ESourceRegistry *registry,
 						 ESource *original_source,
-						 ECalSourceType source_type);
+						 ECalClientSourceType source_type);
 ESourceExtension *
 		e_cal_source_config_get_selectable
 						(ECalSourceConfig *config,
 						 ESource *scratch_source);
-ECalSourceType	e_cal_source_config_get_source_type
+ECalClientSourceType
+		e_cal_source_config_get_source_type
 						(ECalSourceConfig *config);
 void		e_cal_source_config_add_offline_toggle
 						(ECalSourceConfig *config,
diff --git a/calendar/gui/e-calendar-selector.c b/calendar/gui/e-calendar-selector.c
index c71e3b9..bc1262c 100644
--- a/calendar/gui/e-calendar-selector.c
+++ b/calendar/gui/e-calendar-selector.c
@@ -25,14 +25,19 @@
 #include "e-calendar-selector.h"
 
 #include <libecal/e-cal-client.h>
+#include <libecal/e-source-calendar.h>
 #include <libedataserverui/e-client-utils.h>
+
 #include "e-util/e-selection.h"
 
 struct _ECalendarSelectorPrivate {
 	gint dummy_value;
 };
 
-static gpointer parent_class;
+G_DEFINE_TYPE (
+	ECalendarSelector,
+	e_calendar_selector,
+	E_TYPE_SOURCE_SELECTOR)
 
 static gboolean
 calendar_selector_update_single_object (ECalClient *client,
@@ -170,7 +175,8 @@ calendar_selector_data_dropped (ESourceSelector *selector,
 		icalcomponent_set_uid (icalcomp, uid);
 	}
 
-	e_client_utils_open_new (destination, E_CLIENT_SOURCE_TYPE_EVENTS, FALSE, NULL,
+	e_client_utils_open_new (
+		destination, E_CLIENT_SOURCE_TYPE_EVENTS, FALSE, NULL,
 		e_client_utils_authenticate_handler, NULL,
 		client_opened_cb, icalcomp);
 
@@ -187,11 +193,10 @@ exit:
 }
 
 static void
-calendar_selector_class_init (ECalendarSelectorClass *class)
+e_calendar_selector_class_init (ECalendarSelectorClass *class)
 {
 	ESourceSelectorClass *source_selector_class;
 
-	parent_class = g_type_class_peek_parent (class);
 	g_type_class_add_private (class, sizeof (ECalendarSelectorPrivate));
 
 	source_selector_class = E_SOURCE_SELECTOR_CLASS (class);
@@ -199,7 +204,7 @@ calendar_selector_class_init (ECalendarSelectorClass *class)
 }
 
 static void
-calendar_selector_init (ECalendarSelector *selector)
+e_calendar_selector_init (ECalendarSelector *selector)
 {
 	selector->priv = G_TYPE_INSTANCE_GET_PRIVATE (
 		selector, E_TYPE_CALENDAR_SELECTOR, ECalendarSelectorPrivate);
@@ -211,39 +216,13 @@ calendar_selector_init (ECalendarSelector *selector)
 	e_drag_dest_add_calendar_targets (GTK_WIDGET (selector));
 }
 
-GType
-e_calendar_selector_get_type (void)
-{
-	static GType type = 0;
-
-	if (G_UNLIKELY (type == 0)) {
-		const GTypeInfo type_info = {
-			sizeof (ECalendarSelectorClass),
-			(GBaseInitFunc) NULL,
-			(GBaseFinalizeFunc) NULL,
-			(GClassInitFunc) calendar_selector_class_init,
-			(GClassFinalizeFunc) NULL,
-			NULL,  /* class_data */
-			sizeof (ECalendarSelector),
-			0,     /* n_preallocs */
-			(GInstanceInitFunc) calendar_selector_init,
-			NULL   /* value_table */
-		};
-
-		type = g_type_register_static (
-			E_TYPE_SOURCE_SELECTOR, "ECalendarSelector",
-			&type_info, 0);
-	}
-
-	return type;
-}
-
 GtkWidget *
-e_calendar_selector_new (ESourceList *source_list)
+e_calendar_selector_new (ESourceRegistry *registry)
 {
-	g_return_val_if_fail (E_IS_SOURCE_LIST (source_list), NULL);
+	g_return_val_if_fail (E_IS_SOURCE_REGISTRY (registry), NULL);
 
 	return g_object_new (
 		E_TYPE_CALENDAR_SELECTOR,
-		"source-list", source_list, NULL);
+		"extension-name", E_SOURCE_EXTENSION_CALENDAR,
+		"registry", registry, NULL);
 }
diff --git a/calendar/gui/e-calendar-selector.h b/calendar/gui/e-calendar-selector.h
index 65d9a2f..d8aec73 100644
--- a/calendar/gui/e-calendar-selector.h
+++ b/calendar/gui/e-calendar-selector.h
@@ -21,7 +21,6 @@
 #ifndef E_CALENDAR_SELECTOR_H
 #define E_CALENDAR_SELECTOR_H
 
-#include <libedataserver/e-source-list.h>
 #include <libedataserverui/e-source-selector.h>
 
 /* Standard GObject macros */
@@ -59,7 +58,7 @@ struct _ECalendarSelectorClass {
 };
 
 GType		e_calendar_selector_get_type	(void);
-GtkWidget *	e_calendar_selector_new		(ESourceList *source_list);
+GtkWidget *	e_calendar_selector_new		(ESourceRegistry *registry);
 
 G_END_DECLS
 
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index 82bbea2..2193a5d 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -1437,8 +1437,14 @@ e_calendar_view_new_appointment_for (ECalendarView *cal_view,
 
 	if (e_client_is_readonly (E_CLIENT (default_client))) {
 		GtkWidget *widget;
+		ESource *source;
 
-		widget = e_alert_dialog_new_for_args (parent, "calendar:prompt-read-only-cal", e_source_peek_name (e_client_get_source (E_CLIENT (default_client))), NULL);
+		source = e_client_get_source (E_CLIENT (default_client));
+
+		widget = e_alert_dialog_new_for_args (
+			parent, "calendar:prompt-read-only-cal",
+			e_source_get_display_name (source),
+			NULL);
 
 		g_signal_connect ((GtkDialog *)widget, "response", G_CALLBACK (gtk_widget_destroy),
 				  widget);
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index efad7db..3cabc02 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -7863,13 +7863,13 @@ e_day_view_on_drag_data_get (GtkWidget *widget,
 
 	comp_str = icalcomponent_as_ical_string_r (vcal);
 	if (comp_str) {
-		ESource *source = e_client_get_source (E_CLIENT (event->comp_data->client));
-		const gchar *source_uid = e_source_peek_uid (source);
+		ESource *source;
+		const gchar *source_uid;
 		GdkAtom target;
 		gchar *tmp;
 
-		if (!source_uid)
-			source_uid = "";
+		source = e_client_get_source (E_CLIENT (event->comp_data->client));
+		source_uid = e_source_get_uid (source);
 
 		tmp = g_strconcat (source_uid, "\n", comp_str, NULL);
 		target = gtk_selection_data_get_target (selection_data);
diff --git a/calendar/gui/e-meeting-list-view.c b/calendar/gui/e-meeting-list-view.c
index c27697b..cad3c60 100644
--- a/calendar/gui/e-meeting-list-view.c
+++ b/calendar/gui/e-meeting-list-view.c
@@ -825,7 +825,7 @@ process_section (EMeetingListView *view,
 				ENameSelectorModel *model;
 				EContactStore *c_store;
 				GSList *clients, *l;
-				gchar *uri = e_contact_get (contact, E_CONTACT_BOOK_URI);
+				gchar *uid = e_contact_get (contact, E_CONTACT_BOOK_URI);
 
 				dialog = e_name_selector_peek_dialog (view->priv->name_selector);
 				model = e_name_selector_dialog_peek_model (dialog);
@@ -834,7 +834,11 @@ process_section (EMeetingListView *view,
 
 				for (l = clients; l; l = l->next) {
 					EBookClient *b = l->data;
-					if (g_str_equal (uri, e_client_get_uri (E_CLIENT (b)))) {
+					ESource *source;
+
+					source = e_client_get_source (E_CLIENT (b));
+
+					if (g_strcmp0 (uid, e_source_get_uid (source)) == 0) {
 						book_client = b;
 						break;
 					}
diff --git a/calendar/gui/e-meeting-store.c b/calendar/gui/e-meeting-store.c
index 51ce798..4e95f86 100644
--- a/calendar/gui/e-meeting-store.c
+++ b/calendar/gui/e-meeting-store.c
@@ -33,9 +33,11 @@
 #include <libecal/e-cal-time-util.h>
 #include <libedataserver/e-data-server-util.h>
 #include <libedataserver/e-proxy.h>
+#include <libedataserver/e-source-mail-identity.h>
+#include <libedataserver/e-source-password.h>
+#include <libedataserver/e-source-registry.h>
 #include <libedataserverui/e-passwords.h>
 #include <e-util/e-extensible.h>
-#include <e-util/e-account-utils.h>
 #include <e-util/e-util-enumtypes.h>
 #include "itip-utils.h"
 #include "e-meeting-utils.h"
@@ -1136,31 +1138,34 @@ e_meeting_store_find_self (EMeetingStore *store,
                            gint *row)
 {
 	EMeetingAttendee *attendee = NULL;
-	EAccountList *account_list;
-	EIterator *iterator;
+	ESourceRegistry *registry;
+	GList *list, *iter;
+	const gchar *extension_name;
 
 	g_return_val_if_fail (E_IS_MEETING_STORE (store), NULL);
 
-	account_list = e_get_account_list ();
+	registry = e_source_registry_get_default ();
+	extension_name = E_SOURCE_EXTENSION_MAIL_IDENTITY;
 
-	iterator = e_list_get_iterator (E_LIST (account_list));
+	list = e_source_registry_list_sources (registry, extension_name);
 
-	while (e_iterator_is_valid (iterator)) {
-		EAccount *account;
+	for (iter = list; iter != NULL; iter = g_list_next (iter)) {
+		ESource *source = E_SOURCE (iter->data);
+		ESourceMailIdentity *extension;
+		const gchar *address;
 
-		/* XXX EIterator misuses const. */
-		account = (EAccount *) e_iterator_get (iterator);
+		extension = e_source_get_extension (source, extension_name);
+		address = e_source_mail_identity_get_address (extension);
 
-		attendee = e_meeting_store_find_attendee (
-			store, account->id->address, row);
+		if (address != NULL)
+			attendee = e_meeting_store_find_attendee (
+				store, address, row);
 
 		if (attendee != NULL)
 			break;
-
-		e_iterator_next (iterator);
 	}
 
-	g_object_unref (iterator);
+	g_list_free (list);
 
 	return attendee;
 }
@@ -1823,15 +1828,20 @@ soup_authenticate (SoupSession *session,
                    SoupMessage *msg,
                    SoupAuth *auth,
                    gboolean retrying,
-                   gpointer data)
+                   EMeetingStoreQueueData *qdata)
 {
 	SoupURI *suri;
+	ECalClient *client;
+	ESource *source;
 	const gchar *orig_uri;
 	gboolean tried = FALSE;
 
 	g_return_if_fail (msg != NULL);
 	g_return_if_fail (auth != NULL);
 
+	client = e_meeting_store_get_client (qdata->store);
+	source = e_client_get_source (E_CLIENT (client));
+
 	orig_uri = g_object_get_data (G_OBJECT (msg), "orig-uri");
 	g_return_if_fail (orig_uri != NULL);
 
@@ -1849,16 +1859,18 @@ soup_authenticate (SoupSession *session,
 			soup_auth_authenticate (auth, suri->user, suri->password);
 			tried = TRUE;
 		} else {
-			gchar *password;
+			gchar *password = NULL;
 
-			password = e_passwords_get_password (NULL, orig_uri);
-			if (password) {
-				soup_auth_authenticate (auth, suri->user, password);
-				tried = TRUE;
+			e_source_password_lookup_sync (
+				source, NULL, &password, NULL);
 
-				memset (password, 0, strlen (password));
-				g_free (password);
+			if (password != NULL) {
+				soup_auth_authenticate (
+					auth, suri->user, password);
+				tried = TRUE;
 			}
+
+			e_source_password_free (password);
 		}
 	}
 
@@ -1888,8 +1900,8 @@ soup_authenticate (SoupSession *session,
 		}
 
 		password = e_passwords_ask_password (
-			_("Enter password"), NULL, orig_uri,
-			description->str, E_PASSWORDS_REMEMBER_FOREVER |
+			source, "", description->str,
+			E_PASSWORDS_REMEMBER_FOREVER |
 			E_PASSWORDS_SECRET | E_PASSWORDS_ONLINE |
 			(retrying ? E_PASSWORDS_REPROMPT : 0),
 			&remember, NULL);
@@ -1984,7 +1996,9 @@ download_with_libsoup (const gchar *uri,
 	g_object_set_data_full (G_OBJECT (msg), "orig-uri", g_strdup (uri), g_free);
 
 	session = soup_session_async_new ();
-	g_signal_connect (session, "authenticate", G_CALLBACK (soup_authenticate), NULL);
+	g_signal_connect (
+		session, "authenticate",
+		G_CALLBACK (soup_authenticate), qdata);
 
 	proxy = e_proxy_new ();
 	e_proxy_setup_proxy (proxy);
diff --git a/calendar/gui/e-memo-list-selector.c b/calendar/gui/e-memo-list-selector.c
index 5fff33d..fd9233f 100644
--- a/calendar/gui/e-memo-list-selector.c
+++ b/calendar/gui/e-memo-list-selector.c
@@ -26,6 +26,7 @@
 
 #include <string.h>
 #include <libecal/e-cal-client.h>
+#include <libecal/e-source-calendar.h>
 #include <libedataserverui/e-client-utils.h>
 #include "e-util/e-selection.h"
 #include "calendar/gui/comp-util.h"
@@ -34,7 +35,10 @@ struct _EMemoListSelectorPrivate {
 	gint dummy_value;
 };
 
-static gpointer parent_class;
+G_DEFINE_TYPE (
+	EMemoListSelector,
+	e_memo_list_selector,
+	E_TYPE_SOURCE_SELECTOR)
 
 static gboolean
 memo_list_selector_update_single_object (ECalClient *client,
@@ -156,8 +160,8 @@ memo_list_selector_process_data (ESourceSelector *selector,
                                  icalcomponent *icalcomp,
                                  GdkDragAction action)
 {
-	ESourceList *source_list;
 	ESource *source;
+	ESourceRegistry *registry;
 	icalcomponent *tmp_icalcomp = NULL;
 	const gchar *uid;
 	gchar *old_uid = NULL;
@@ -197,10 +201,10 @@ memo_list_selector_process_data (ESourceSelector *selector,
 	if (!success || action != GDK_ACTION_MOVE)
 		goto exit;
 
-	source_list = e_source_selector_get_source_list (selector);
-	source = e_source_list_peek_source_by_uid (source_list, source_uid);
+	registry = e_source_selector_get_registry (selector);
+	source = e_source_registry_lookup_by_uid (registry, source_uid);
 
-	if (!E_IS_SOURCE (source) || e_source_get_readonly (source))
+	if (!E_IS_SOURCE (source))
 		goto exit;
 
 	e_client_utils_open_new (source, E_CLIENT_SOURCE_TYPE_MEMOS, TRUE, NULL,
@@ -302,11 +306,10 @@ memo_list_selector_data_dropped (ESourceSelector *selector,
 }
 
 static void
-memo_list_selector_class_init (EMemoListSelectorClass *class)
+e_memo_list_selector_class_init (EMemoListSelectorClass *class)
 {
 	ESourceSelectorClass *source_selector_class;
 
-	parent_class = g_type_class_peek_parent (class);
 	g_type_class_add_private (class, sizeof (EMemoListSelectorPrivate));
 
 	source_selector_class = E_SOURCE_SELECTOR_CLASS (class);
@@ -314,7 +317,7 @@ memo_list_selector_class_init (EMemoListSelectorClass *class)
 }
 
 static void
-memo_list_selector_init (EMemoListSelector *selector)
+e_memo_list_selector_init (EMemoListSelector *selector)
 {
 	selector->priv = G_TYPE_INSTANCE_GET_PRIVATE (
 		selector, E_TYPE_MEMO_LIST_SELECTOR, EMemoListSelectorPrivate);
@@ -326,39 +329,13 @@ memo_list_selector_init (EMemoListSelector *selector)
 	e_drag_dest_add_calendar_targets (GTK_WIDGET (selector));
 }
 
-GType
-e_memo_list_selector_get_type (void)
-{
-	static GType type = 0;
-
-	if (G_UNLIKELY (type == 0)) {
-		const GTypeInfo type_info = {
-			sizeof (EMemoListSelectorClass),
-			(GBaseInitFunc) NULL,
-			(GBaseFinalizeFunc) NULL,
-			(GClassInitFunc) memo_list_selector_class_init,
-			(GClassFinalizeFunc) NULL,
-			NULL,  /* class_data */
-			sizeof (EMemoListSelector),
-			0,     /* n_preallocs */
-			(GInstanceInitFunc) memo_list_selector_init,
-			NULL   /* value_table */
-		};
-
-		type = g_type_register_static (
-			E_TYPE_SOURCE_SELECTOR, "EMemoListSelector",
-			&type_info, 0);
-	}
-
-	return type;
-}
-
 GtkWidget *
-e_memo_list_selector_new (ESourceList *source_list)
+e_memo_list_selector_new (ESourceRegistry *registry)
 {
-	g_return_val_if_fail (E_IS_SOURCE_LIST (source_list), NULL);
+	g_return_val_if_fail (E_IS_SOURCE_REGISTRY (registry), NULL);
 
 	return g_object_new (
 		E_TYPE_MEMO_LIST_SELECTOR,
-		"source-list", source_list, NULL);
+		"extension-name", E_SOURCE_EXTENSION_MEMO_LIST,
+		"registry", registry, NULL);
 }
diff --git a/calendar/gui/e-memo-list-selector.h b/calendar/gui/e-memo-list-selector.h
index c10cff2..62dc0e1 100644
--- a/calendar/gui/e-memo-list-selector.h
+++ b/calendar/gui/e-memo-list-selector.h
@@ -26,7 +26,6 @@
 #ifndef E_MEMO_LIST_SELECTOR_H
 #define E_MEMO_LIST_SELECTOR_H
 
-#include <libedataserver/e-source-list.h>
 #include <libedataserverui/e-source-selector.h>
 
 /* Standard GObject macros */
@@ -64,7 +63,7 @@ struct _EMemoListSelectorClass {
 };
 
 GType		e_memo_list_selector_get_type	(void);
-GtkWidget *	e_memo_list_selector_new	(ESourceList *source_list);
+GtkWidget *	e_memo_list_selector_new	(ESourceRegistry *registry);
 
 G_END_DECLS
 
diff --git a/calendar/gui/e-task-list-selector.c b/calendar/gui/e-task-list-selector.c
index 7e09159..fa81b7d 100644
--- a/calendar/gui/e-task-list-selector.c
+++ b/calendar/gui/e-task-list-selector.c
@@ -26,6 +26,7 @@
 
 #include <string.h>
 #include <libecal/e-cal-client.h>
+#include <libecal/e-source-calendar.h>
 #include <libedataserverui/e-client-utils.h>
 #include "e-util/e-selection.h"
 #include "calendar/gui/comp-util.h"
@@ -34,7 +35,10 @@ struct _ETaskListSelectorPrivate {
 	gint dummy_value;
 };
 
-static gpointer parent_class;
+G_DEFINE_TYPE (
+	ETaskListSelector,
+	e_task_list_selector,
+	E_TYPE_SOURCE_SELECTOR)
 
 static gboolean
 task_list_selector_update_single_object (ECalClient *client,
@@ -157,8 +161,8 @@ task_list_selector_process_data (ESourceSelector *selector,
                                  icalcomponent *icalcomp,
                                  GdkDragAction action)
 {
-	ESourceList *source_list;
 	ESource *source;
+	ESourceRegistry *registry;
 	icalcomponent *tmp_icalcomp = NULL;
 	const gchar *uid;
 	gchar *old_uid = NULL;
@@ -199,10 +203,10 @@ task_list_selector_process_data (ESourceSelector *selector,
 	if (!success || action != GDK_ACTION_MOVE)
 		goto exit;
 
-	source_list = e_source_selector_get_source_list (selector);
-	source = e_source_list_peek_source_by_uid (source_list, source_uid);
+	registry = e_source_selector_get_registry (selector);
+	source = e_source_registry_lookup_by_uid (registry, source_uid);
 
-	if (!E_IS_SOURCE (source) || e_source_get_readonly (source))
+	if (!E_IS_SOURCE (source))
 		goto exit;
 
 	e_client_utils_open_new (source, E_CLIENT_SOURCE_TYPE_MEMOS, TRUE, NULL,
@@ -304,11 +308,10 @@ task_list_selector_data_dropped (ESourceSelector *selector,
 }
 
 static void
-task_list_selector_class_init (ETaskListSelectorClass *class)
+e_task_list_selector_class_init (ETaskListSelectorClass *class)
 {
 	ESourceSelectorClass *source_selector_class;
 
-	parent_class = g_type_class_peek_parent (class);
 	g_type_class_add_private (class, sizeof (ETaskListSelectorPrivate));
 
 	source_selector_class = E_SOURCE_SELECTOR_CLASS (class);
@@ -316,7 +319,7 @@ task_list_selector_class_init (ETaskListSelectorClass *class)
 }
 
 static void
-task_list_selector_init (ETaskListSelector *selector)
+e_task_list_selector_init (ETaskListSelector *selector)
 {
 	selector->priv = G_TYPE_INSTANCE_GET_PRIVATE (
 		selector, E_TYPE_TASK_LIST_SELECTOR, ETaskListSelectorPrivate);
@@ -328,39 +331,13 @@ task_list_selector_init (ETaskListSelector *selector)
 	e_drag_dest_add_calendar_targets (GTK_WIDGET (selector));
 }
 
-GType
-e_task_list_selector_get_type (void)
-{
-	static GType type = 0;
-
-	if (G_UNLIKELY (type == 0)) {
-		const GTypeInfo type_info = {
-			sizeof (ETaskListSelectorClass),
-			(GBaseInitFunc) NULL,
-			(GBaseFinalizeFunc) NULL,
-			(GClassInitFunc) task_list_selector_class_init,
-			(GClassFinalizeFunc) NULL,
-			NULL,  /* class_data */
-			sizeof (ETaskListSelector),
-			0,     /* n_preallocs */
-			(GInstanceInitFunc) task_list_selector_init,
-			NULL   /* value_table */
-		};
-
-		type = g_type_register_static (
-			E_TYPE_SOURCE_SELECTOR, "ETaskListSelector",
-			&type_info, 0);
-	}
-
-	return type;
-}
-
 GtkWidget *
-e_task_list_selector_new (ESourceList *source_list)
+e_task_list_selector_new (ESourceRegistry *registry)
 {
-	g_return_val_if_fail (E_IS_SOURCE_LIST (source_list), NULL);
+	g_return_val_if_fail (E_IS_SOURCE_REGISTRY (registry), NULL);
 
 	return g_object_new (
 		E_TYPE_TASK_LIST_SELECTOR,
-		"source-list", source_list, NULL);
+		"extension-name", E_SOURCE_EXTENSION_TASK_LIST,
+		"registry", registry, NULL);
 }
diff --git a/calendar/gui/e-task-list-selector.h b/calendar/gui/e-task-list-selector.h
index 847a221..735611a 100644
--- a/calendar/gui/e-task-list-selector.h
+++ b/calendar/gui/e-task-list-selector.h
@@ -26,7 +26,6 @@
 #ifndef E_TASK_LIST_SELECTOR_H
 #define E_TASK_LIST_SELECTOR_H
 
-#include <libedataserver/e-source-list.h>
 #include <libedataserverui/e-source-selector.h>
 
 /* Standard GObject macros */
@@ -64,7 +63,7 @@ struct _ETaskListSelectorClass {
 };
 
 GType		e_task_list_selector_get_type	(void);
-GtkWidget *	e_task_list_selector_new	(ESourceList *source_list);
+GtkWidget *	e_task_list_selector_new	(ESourceRegistry *registry);
 
 G_END_DECLS
 
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c
index c2fa19b..903b054 100644
--- a/calendar/gui/itip-utils.c
+++ b/calendar/gui/itip-utils.c
@@ -26,9 +26,11 @@
 
 #include <glib/gi18n.h>
 #include <libedataserver/e-time-utils.h>
+#include <libedataserver/e-source-mail-account.h>
+#include <libedataserver/e-source-mail-identity.h>
+#include <libedataserver/e-source-registry.h>
 #include <gtk/gtk.h>
 #include <libical/ical.h>
-#include <e-util/e-account-utils.h>
 #include <e-util/e-dialog-utils.h>
 #include <libecal/e-cal-time-util.h>
 #include <libecal/e-cal-util.h>
@@ -72,33 +74,33 @@ static icalproperty_method itip_methods_enum[] = {
 gchar **
 itip_get_user_identities (void)
 {
-	EAccountList *account_list;
-	EIterator *iterator;
+	ESourceRegistry *registry;
+	GList *list, *iter;
+	const gchar *extension_name;
 	gchar **identities;
-	gint length, ii = 0;
+	guint ii = 0;
 
-	account_list = e_get_account_list ();
-	length = e_list_length (E_LIST (account_list));
-	iterator = e_list_get_iterator (E_LIST (account_list));
+	registry = e_source_registry_get_default ();
+	extension_name = E_SOURCE_EXTENSION_MAIL_IDENTITY;
 
-	identities = g_new0 (gchar *, length + 1);
+	list = e_source_registry_list_sources (registry, extension_name);
 
-	while (e_iterator_is_valid (iterator)) {
-		EAccount *account;
+	identities = g_new0 (gchar *, g_list_length (list) + 1);
 
-		/* XXX EIterator misuses const. */
-		account = (EAccount *) e_iterator_get (iterator);
+	for (iter = list; iter != NULL; iter = g_list_next (iter)) {
+		ESource *source = E_SOURCE (iter->data);
+		ESourceMailIdentity *extension;
+		const gchar *name, *address;
 
-		if (account->enabled)
-			identities[ii++] = g_strdup_printf (
-				"%s <%s>",
-				account->id->name,
-				account->id->address);
+		extension = e_source_get_extension (source, extension_name);
 
-		e_iterator_next (iterator);
+		name = e_source_mail_identity_get_name (extension);
+		address = e_source_mail_identity_get_address (extension);
+
+		identities[ii++] = g_strdup_printf ("%s <%s>", name, address);
 	}
 
-	g_object_unref (iterator);
+	g_list_free (list);
 
 	return identities;
 }
@@ -117,17 +119,36 @@ itip_get_user_identities (void)
 gchar *
 itip_get_fallback_identity (void)
 {
-	EAccount *account;
-	gchar *identity = NULL;
+	ESource *source;
+	ESourceRegistry *registry;
+	ESourceMailAccount *mail_account;
+	ESourceMailIdentity *mail_identity;
+	const gchar *extension_name;
+	const gchar *address;
+	const gchar *name;
+	const gchar *uid;
+
+	registry = e_source_registry_get_default ();
+	source = e_source_registry_get_default_mail_account (registry);
+
+	extension_name = E_SOURCE_EXTENSION_MAIL_ACCOUNT;
+	mail_account = e_source_get_extension (source, extension_name);
 
-	account = e_get_default_account ();
-	if (account != NULL && account->enabled)
-		identity = g_strdup_printf (
-			"%s <%s>",
-			account->id->name,
-			account->id->address);
+	if (!e_source_mail_account_get_enabled (mail_account))
+		return NULL;
+
+	source = e_source_mail_account_get_identity (mail_account);
+
+	if (source == NULL)
+		return NULL;
 
-	return identity;
+	extension_name = E_SOURCE_EXTENSION_MAIL_IDENTITY;
+	mail_identity = e_source_get_extension (source, extension_name);
+
+	name = e_source_mail_identity_get_name (mail_identity);
+	address = e_source_mail_identity_get_address (mail_identity);
+
+	return g_strdup_printf ("%s <%s>", name, address);
 }
 
 /**
@@ -141,18 +162,38 @@ itip_get_fallback_identity (void)
 gboolean
 itip_address_is_user (const gchar *address)
 {
-	EAccountList *account_list;
-	EAccount *account;
+	ESourceRegistry *registry;
+	GList *list, *iter;
+	const gchar *extension_name;
+	gboolean match = FALSE;
 
 	g_return_val_if_fail (address != NULL, FALSE);
 
-	account_list = e_get_account_list ();
+	registry = e_source_registry_get_default ();
+	extension_name = E_SOURCE_EXTENSION_MAIL_IDENTITY;
+
+	list = e_source_registry_list_sources (registry, extension_name);
+
+	for (iter = list; iter != NULL; iter = g_list_next (iter)) {
+		ESource *source = E_SOURCE (iter->data);
+		ESourceMailIdentity *extension;
+		const gchar *id_address;
+
+		extension = e_source_get_extension (source, extension_name);
+		id_address = e_source_mail_identity_get_address (extension);
+
+		if (id_address == NULL)
+			continue;
+
+		if (g_ascii_strcasecmp (address, id_address) == 0) {
+			match = TRUE;
+			break;
+		}
+	}
 
-	/* XXX EAccountList misuses const. */
-	account = (EAccount *) e_account_list_find (
-		account_list, E_ACCOUNT_FIND_ID_ADDRESS, address);
+	g_list_free (list);
 
-	return (account != NULL);
+	return match;
 }
 
 gboolean
@@ -278,6 +319,7 @@ gchar *
 itip_get_comp_attendee (ECalComponent *comp,
                         ECalClient *cal_client)
 {
+#if 0  /* ACCOUNT_MGMT */
 	GSList *attendees;
 	EAccountList *al;
 	EAccount *a;
@@ -294,28 +336,31 @@ itip_get_comp_attendee (ECalComponent *comp,
 			CAL_BACKEND_PROPERTY_CAL_EMAIL_ADDRESS,
 			&address, NULL, NULL);
 
-	if (address && *address) {
+	if (address != NULL && *address != '\0') {
 		attendee = get_attendee (attendees, address);
 
 		if (attendee) {
 			gchar *user_email;
 
-			user_email = g_strdup (itip_strip_mailto (attendee->value));
-
+			user_email = g_strdup (
+				itip_strip_mailto (attendee->value));
 			e_cal_component_free_attendee_list (attendees);
 			g_free (address);
+
 			return user_email;
 		}
 
-		attendee = get_attendee_if_attendee_sentby_is_user (attendees, address);
+		attendee = get_attendee_if_attendee_sentby_is_user (
+			attendees, address);
 
-		if (attendee) {
+		if (attendee != NULL) {
 			gchar *user_email;
 
-			user_email = g_strdup (itip_strip_mailto (attendee->sentby));
-
+			user_email = g_strdup (
+				itip_strip_mailto (attendee->sentby));
 			e_cal_component_free_attendee_list (attendees);
 			g_free (address);
+
 			return user_email;
 		}
 
@@ -332,21 +377,28 @@ itip_get_comp_attendee (ECalComponent *comp,
 			continue;
 
 		attendee = get_attendee (attendees, a->id->address);
-		if (attendee) {
-			gchar *user_email = g_strdup (itip_strip_mailto (attendee->value));
+		if (attendee != NULL) {
+			gchar *user_email;
 
+			user_email = g_strdup (
+				itip_strip_mailto (attendee->value));
 			e_cal_component_free_attendee_list (attendees);
+
 			return user_email;
 		}
 
 		/* If the account was not found in the attendees list, then
 		 * let's check the 'sentby' fields of the attendees if we can
 		 * find the account. */
-		attendee = get_attendee_if_attendee_sentby_is_user (attendees, a->id->address);
+		attendee = get_attendee_if_attendee_sentby_is_user (
+			attendees, a->id->address);
 		if (attendee) {
-			gchar *user_email = g_strdup (itip_strip_mailto (attendee->sentby));
+			gchar *user_email;
 
+			user_email = g_strdup (
+				itip_strip_mailto (attendee->sentby));
 			e_cal_component_free_attendee_list (attendees);
+
 			return user_email;
 		}
 	}
@@ -359,7 +411,11 @@ itip_get_comp_attendee (ECalComponent *comp,
 	address = g_strdup ((a != NULL) ? a->id->address : "");
 
 	e_cal_component_free_attendee_list (attendees);
+
 	return address;
+#endif /* ACCOUNT_MGMT */
+
+	return NULL;
 }
 
 const gchar *
@@ -1066,6 +1122,7 @@ comp_sentby (ECalComponent *comp,
 	gchar *user = NULL;
 
 	e_cal_component_get_organizer (comp, &organizer);
+#if 0  /* ACCOUNT_MGMT */
 	if (!organizer.value) {
 		EAccount *a = e_get_default_account ();
 
@@ -1079,6 +1136,7 @@ comp_sentby (ECalComponent *comp,
 
 		return;
 	}
+#endif /* ACCOUNT_MGMT */
 
 	e_cal_component_get_attendee_list (comp, &attendees);
 	user = itip_get_comp_attendee (comp, cal_client);
@@ -1094,6 +1152,7 @@ comp_sentby (ECalComponent *comp,
 		}
 	}
 
+#if 0  /* ACCOUNT_MGMT */
 	if (!itip_organizer_is_user (comp, cal_client) && !itip_sentby_is_user (comp, cal_client)) {
 		EAccount *a = e_get_default_account ();
 
@@ -1109,7 +1168,9 @@ comp_sentby (ECalComponent *comp,
 		g_free ((gchar *) organizer.cn);
 		g_free ((gchar *) organizer.language);
 	}
+#endif /* ACCOUNT_MGMT */
 }
+
 static ECalComponent *
 comp_minimal (ECalComponent *comp,
               gboolean attendee)
@@ -1397,6 +1458,7 @@ append_cal_attachments (EMsgComposer *composer,
 	g_slist_free (attach_list);
 }
 
+#if 0  /* ACCOUNT_MGMT */
 static EAccount *
 find_enabled_account (EAccountList *accounts,
                       const gchar *id_address)
@@ -1426,6 +1488,7 @@ find_enabled_account (EAccountList *accounts,
 
 	return account;
 }
+#endif /* ACCOUNT_MGMT */
 
 static void
 setup_from (ECalComponentItipMethod method,
@@ -1433,6 +1496,7 @@ setup_from (ECalComponentItipMethod method,
             ECalClient *cal_client,
             EComposerHeaderTable *table)
 {
+#if 0  /* ACCOUNT_MGMT */
 	EAccountList *accounts;
 
 	accounts = e_composer_header_table_get_account_list (table);
@@ -1463,6 +1527,7 @@ setup_from (ECalComponentItipMethod method,
 		if (account)
 			e_composer_header_table_set_account (table, account);
 	}
+#endif /* ACCOUNT_MGMT */
 }
 
 gboolean
diff --git a/calendar/gui/itip-utils.h b/calendar/gui/itip-utils.h
index 6da2519..b5c3105 100644
--- a/calendar/gui/itip-utils.h
+++ b/calendar/gui/itip-utils.h
@@ -24,7 +24,6 @@
 #include <string.h>
 #include <libecal/e-cal-client.h>
 #include <libecal/e-cal-component.h>
-#include <libedataserver/e-account-list.h>
 
 G_BEGIN_DECLS
 



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