From 0f614b2e971aa0f7168b63f335e1c738bf4f9379 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 21 May 2009 22:15:40 -0400 Subject: Fix what I assume are some merge errors. --- calendar/module/e-task-shell-backend.c | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) (limited to 'calendar/module/e-task-shell-backend.c') diff --git a/calendar/module/e-task-shell-backend.c b/calendar/module/e-task-shell-backend.c index a9bc2d9a6c..9e35b47871 100644 --- a/calendar/module/e-task-shell-backend.c +++ b/calendar/module/e-task-shell-backend.c @@ -69,7 +69,7 @@ task_module_ensure_sources (EShellBackend *shell_backend) /* XXX This is basically the same algorithm across all modules. * Maybe we could somehow integrate this into EShellBackend? */ - ESourceList *source_list; + ETaskShellBackendPrivate *priv; ESourceGroup *on_this_computer; ESourceGroup *on_the_web; ESource *personal; @@ -83,28 +83,19 @@ task_module_ensure_sources (EShellBackend *shell_backend) on_the_web = NULL; personal = NULL; - if (!e_cal_get_sources (&source_list, E_CAL_SOURCE_TYPE_TODO, NULL)) { + priv = E_TASK_SHELL_BACKEND_GET_PRIVATE (shell_backend); + + if (!e_cal_get_sources (&priv->source_list, E_CAL_SOURCE_TYPE_TODO, NULL)) { g_warning ("Could not get task sources from GConf!"); return; } - /* Share the source list with all task views. This is - * accessible via e_task_shell_view_get_source_list(). - * Note: EShellBackend takes ownership of the reference. - * - * XXX I haven't yet decided if I want to add a proper - * EShellBackend API for this. The mail module would - * not use it. */ - g_object_set_data_full ( - G_OBJECT (shell_backend), "source-list", - source_list, (GDestroyNotify) g_object_unref); - data_dir = e_shell_backend_get_data_dir (shell_backend); filename = g_build_filename (data_dir, "local", NULL); base_uri = g_filename_to_uri (filename, NULL, NULL); g_free (filename); - groups = e_source_list_peek_groups (source_list); + groups = e_source_list_peek_groups (priv->source_list); for (iter = groups; iter != NULL; iter = iter->next) { ESourceGroup *source_group = iter->data; const gchar *group_base_uri; @@ -161,14 +152,14 @@ task_module_ensure_sources (EShellBackend *shell_backend) * but that happens in an idle loop and too late * to prevent the user from seeing a "Cannot * Open ... because of invalid URI" error. */ - e_source_list_sync (source_list, NULL); + e_source_list_sync (priv->source_list, NULL); } } else { ESourceGroup *source_group; source_group = e_source_group_new (name, base_uri); - e_source_list_add_group (source_list, source_group, -1); + e_source_list_add_group (priv->source_list, source_group, -1); g_object_unref (source_group); } @@ -210,7 +201,7 @@ task_module_ensure_sources (EShellBackend *shell_backend) ESourceGroup *source_group; source_group = e_source_group_new (name, WEB_BASE_URI); - e_source_list_add_group (source_list, source_group, -1); + e_source_list_add_group (priv->source_list, source_group, -1); g_object_unref (source_group); } else { /* Force the group name to the current locale. */ -- cgit v1.2.3