diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-11-02 23:49:38 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2010-11-10 06:33:22 +0800 |
commit | dce5bdc3699faf592453492fe201606ed47e06b9 (patch) | |
tree | f533fe0d3ac9d6d75251ba5e6b1d48fcd9ab5a58 /modules/calendar/e-task-shell-sidebar.c | |
parent | e3a09eb67c1f9b2a3762626eafbd9dec94bc63bf (diff) | |
download | gsoc2013-evolution-dce5bdc3699faf592453492fe201606ed47e06b9.tar gsoc2013-evolution-dce5bdc3699faf592453492fe201606ed47e06b9.tar.gz gsoc2013-evolution-dce5bdc3699faf592453492fe201606ed47e06b9.tar.bz2 gsoc2013-evolution-dce5bdc3699faf592453492fe201606ed47e06b9.tar.lz gsoc2013-evolution-dce5bdc3699faf592453492fe201606ed47e06b9.tar.xz gsoc2013-evolution-dce5bdc3699faf592453492fe201606ed47e06b9.tar.zst gsoc2013-evolution-dce5bdc3699faf592453492fe201606ed47e06b9.zip |
Move calendar preferences to the calendar module.
Continue replacing the use of calendar-config functions with GObject
property bindings to EShellSettings properties.
Diffstat (limited to 'modules/calendar/e-task-shell-sidebar.c')
-rw-r--r-- | modules/calendar/e-task-shell-sidebar.c | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/modules/calendar/e-task-shell-sidebar.c b/modules/calendar/e-task-shell-sidebar.c index 580cee286f..52887faf03 100644 --- a/modules/calendar/e-task-shell-sidebar.c +++ b/modules/calendar/e-task-shell-sidebar.c @@ -28,7 +28,6 @@ #include "e-util/e-alert-dialog.h" #include "e-util/e-util.h" #include "calendar/common/authentication.h" -#include "calendar/gui/calendar-config.h" #include "calendar/gui/e-task-list-selector.h" #include "calendar/gui/misc.h" @@ -376,12 +375,19 @@ static void task_shell_sidebar_selection_changed_cb (ETaskShellSidebar *task_shell_sidebar, ESourceSelector *selector) { + EShellView *shell_view; + EShellBackend *shell_backend; + EShellSidebar *shell_sidebar; GSList *list, *iter; /* This signal is emitted less frequently than "row-changed", * especially when the model is being rebuilt. So we'll take * it easy on poor GConf. */ + shell_sidebar = E_SHELL_SIDEBAR (task_shell_sidebar); + shell_view = e_shell_sidebar_get_shell_view (shell_sidebar); + shell_backend = e_shell_view_get_shell_backend (shell_view); + list = e_source_selector_get_selection (selector); for (iter = list; iter != NULL; iter = iter->next) { @@ -391,7 +397,8 @@ task_shell_sidebar_selection_changed_cb (ETaskShellSidebar *task_shell_sidebar, g_object_unref (source); } - calendar_config_set_tasks_selected (list); + e_task_shell_backend_set_selected_task_lists ( + E_TASK_SHELL_BACKEND (shell_backend), list); g_slist_free (list); } @@ -458,19 +465,19 @@ task_shell_sidebar_restore_state_cb (EShellWindow *shell_window, g_object_ref (source_list), (GDestroyNotify) g_object_unref); - list = calendar_config_get_tasks_selected (); + list = e_task_shell_backend_get_selected_task_lists ( + E_TASK_SHELL_BACKEND (shell_backend)); + for (iter = list; iter != NULL; iter = iter->next) { - gchar *uid; + const gchar *uid = iter->data; - uid = iter->data; source = e_source_list_peek_source_by_uid (source_list, uid); - g_free (uid); - if (source == NULL) - continue; - - e_source_selector_select_source (selector, source); + if (source != NULL) + e_source_selector_select_source (selector, source); } + + g_slist_foreach (list, (GFunc) g_free, NULL); g_slist_free (list); /* Listen for subsequent changes to the selector. */ |