aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-02-01 05:14:49 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-02-01 06:39:05 +0800
commitfd43cd692ad12e7f9c70386c1b0867b16f9ec15d (patch)
tree7de35780745b82c9655e0bbc87945f36368c4643 /mail
parentfc3bf6f39e7215df6325515afff3217aedb2cc10 (diff)
downloadgsoc2013-evolution-fd43cd692ad12e7f9c70386c1b0867b16f9ec15d.tar
gsoc2013-evolution-fd43cd692ad12e7f9c70386c1b0867b16f9ec15d.tar.gz
gsoc2013-evolution-fd43cd692ad12e7f9c70386c1b0867b16f9ec15d.tar.bz2
gsoc2013-evolution-fd43cd692ad12e7f9c70386c1b0867b16f9ec15d.tar.lz
gsoc2013-evolution-fd43cd692ad12e7f9c70386c1b0867b16f9ec15d.tar.xz
gsoc2013-evolution-fd43cd692ad12e7f9c70386c1b0867b16f9ec15d.tar.zst
gsoc2013-evolution-fd43cd692ad12e7f9c70386c1b0867b16f9ec15d.zip
Incorporate ESourceUOA.
Where we make exceptions for GNOME Online Accounts, so too shall we for Ubuntu Online Accounts.
Diffstat (limited to 'mail')
-rw-r--r--mail/e-mail-account-store.c7
-rw-r--r--mail/e-mail-config-notebook.c18
-rw-r--r--mail/e-mail-sidebar.c9
3 files changed, 28 insertions, 6 deletions
diff --git a/mail/e-mail-account-store.c b/mail/e-mail-account-store.c
index a2a639d9b4..cb1f4e000d 100644
--- a/mail/e-mail-account-store.c
+++ b/mail/e-mail-account-store.c
@@ -1153,6 +1153,13 @@ e_mail_account_store_add_service (EMailAccountStore *store,
enabled_visible = FALSE;
}
+ /* Check for Ubuntu Online Accounts linkage. */
+ extension_name = E_SOURCE_EXTENSION_UOA;
+ if (e_source_has_extension (collection, extension_name)) {
+ online_account = TRUE;
+ enabled_visible = FALSE;
+ }
+
g_object_unref (collection);
} else {
enabled = e_source_get_enabled (source);
diff --git a/mail/e-mail-config-notebook.c b/mail/e-mail-config-notebook.c
index 0aff802df5..fd43b20c7e 100644
--- a/mail/e-mail-config-notebook.c
+++ b/mail/e-mail-config-notebook.c
@@ -311,7 +311,7 @@ mail_config_notebook_constructed (GObject *object)
gboolean add_receiving_page = TRUE;
gboolean add_sending_page = TRUE;
gboolean add_transport_source;
- gboolean gnome_online_account = FALSE;
+ gboolean online_account = FALSE;
notebook = E_MAIL_CONFIG_NOTEBOOK (object);
@@ -328,13 +328,21 @@ mail_config_notebook_constructed (GObject *object)
mail_identity_extension = E_SOURCE_MAIL_IDENTITY (extension);
/* If we have a collection source and the collection source
- * has a [GNOME Online Accounts] extension, skip the Receiving
- * and Sending pages since GOA dictates those settings. */
+ * has a [GNOME Online Accounts] or [Ubuntu Online Accounts]
+ * extension, skip the Receiving and Sending pages since GOA
+ * and UOA dictates those settings. */
source = notebook->priv->collection_source;
if (source != NULL) {
extension_name = E_SOURCE_EXTENSION_GOA;
if (e_source_has_extension (source, extension_name)) {
- gnome_online_account = TRUE;
+ online_account = TRUE;
+ add_receiving_page = FALSE;
+ add_sending_page = FALSE;
+ }
+
+ extension_name = E_SOURCE_EXTENSION_UOA;
+ if (e_source_has_extension (source, extension_name)) {
+ online_account = TRUE;
add_receiving_page = FALSE;
add_sending_page = FALSE;
}
@@ -367,7 +375,7 @@ mail_config_notebook_constructed (GObject *object)
registry, notebook->priv->identity_source);
e_mail_config_identity_page_set_show_instructions (
E_MAIL_CONFIG_IDENTITY_PAGE (page), FALSE);
- if (gnome_online_account) {
+ if (online_account) {
e_mail_config_identity_page_set_show_account_info (
E_MAIL_CONFIG_IDENTITY_PAGE (page), FALSE);
e_mail_config_identity_page_set_show_email_address (
diff --git a/mail/e-mail-sidebar.c b/mail/e-mail-sidebar.c
index aafa6cd302..20cf41404c 100644
--- a/mail/e-mail-sidebar.c
+++ b/mail/e-mail-sidebar.c
@@ -485,7 +485,7 @@ mail_sidebar_check_state (EMailSidebar *sidebar)
can_delete &= !(folder_flags & CAMEL_FOLDER_SYSTEM);
}
- /* GOA-based accounts cannot be disabled from Evolution. */
+ /* GOA and UOA-based accounts cannot be disabled from Evolution. */
if (is_store && !store_is_local && !store_is_vfolder) {
EMFolderTree *folder_tree;
EMailSession *session;
@@ -505,6 +505,13 @@ mail_sidebar_check_state (EMailSidebar *sidebar)
g_object_unref (ancestor);
}
+ ancestor = e_source_registry_find_extension (
+ registry, source, E_SOURCE_EXTENSION_UOA);
+ if (ancestor != NULL) {
+ can_disable = FALSE;
+ g_object_unref (ancestor);
+ }
+
g_object_unref (source);
}