diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-07-26 05:36:59 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-08-03 23:40:13 +0800 |
commit | 0c1e73178599ee4b1b9b661fb6a1d0729eed67fb (patch) | |
tree | e4fab50842967d4c6661adf0e7cb82508f1f6df2 /widgets | |
parent | ad76248e8da0ac74447963f25e5dae1b07179ce1 (diff) | |
download | gsoc2013-evolution-0c1e73178599ee4b1b9b661fb6a1d0729eed67fb.tar.gz gsoc2013-evolution-0c1e73178599ee4b1b9b661fb6a1d0729eed67fb.tar.zst gsoc2013-evolution-0c1e73178599ee4b1b9b661fb6a1d0729eed67fb.zip |
ESourceConfig: Enable remote resource creation.
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/misc/e-source-config.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/widgets/misc/e-source-config.c b/widgets/misc/e-source-config.c index baf09a3b37..79d2e24f61 100644 --- a/widgets/misc/e-source-config.c +++ b/widgets/misc/e-source-config.c @@ -422,19 +422,21 @@ source_config_init_for_adding_source (ESourceConfig *config) if (backend == NULL) continue; + /* Some backends disallow creating certain types of + * resources. For example, the Exchange Web Services + * backend disallows creating new memo lists. */ + if (!e_source_config_backend_allow_creation (backend)) + continue; + scratch_source = e_source_new (NULL, NULL, NULL); g_return_if_fail (scratch_source != NULL); e_source_set_parent (scratch_source, parent_uid); - /* XXX Leave this disabled until we actually support - * creating remote resources through ESourceConfig. */ -#if 0 g_tree_insert ( scratch_source_tree, g_object_ref (scratch_source), g_object_ref (backend)); -#endif g_object_unref (scratch_source); } @@ -723,7 +725,14 @@ source_config_list_eligible_collections (ESourceConfig *config) list = e_source_registry_list_sources (registry, extension_name); for (link = list; link != NULL; link = g_list_next (link)) { - if (!e_source_get_enabled (E_SOURCE (link->data))) + ESource *source = E_SOURCE (link->data); + gboolean elligible; + + elligible = + e_source_get_enabled (source) && + e_source_get_remote_creatable (source); + + if (!elligible) g_queue_push_tail (&trash, link); } |