aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar/e-memo-shell-sidebar.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/calendar/e-memo-shell-sidebar.c')
-rw-r--r--modules/calendar/e-memo-shell-sidebar.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/modules/calendar/e-memo-shell-sidebar.c b/modules/calendar/e-memo-shell-sidebar.c
index 0962a8a20d..33a2226c00 100644
--- a/modules/calendar/e-memo-shell-sidebar.c
+++ b/modules/calendar/e-memo-shell-sidebar.c
@@ -271,8 +271,12 @@ static void
memo_shell_sidebar_primary_selection_changed_cb (EMemoShellSidebar *memo_shell_sidebar,
ESourceSelector *selector)
{
+ EShell *shell;
+ EShellView *shell_view;
+ EShellWindow *shell_window;
+ EShellSidebar *shell_sidebar;
+ EShellSettings *shell_settings;
ESource *source;
- const gchar *uid;
/* XXX ESourceSelector needs a "primary-selection-uid" property
* so we can just bind the property with GConfBridge. */
@@ -281,8 +285,16 @@ memo_shell_sidebar_primary_selection_changed_cb (EMemoShellSidebar *memo_shell_s
if (source == NULL)
return;
- uid = e_source_peek_uid (source);
- calendar_config_set_primary_memos (uid);
+ shell_sidebar = E_SHELL_SIDEBAR (memo_shell_sidebar);
+ shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
+ shell_window = e_shell_view_get_shell_window (shell_view);
+
+ shell = e_shell_window_get_shell (shell_window);
+ shell_settings = e_shell_get_shell_settings (shell);
+
+ e_shell_settings_set_string (
+ shell_settings, "cal-primary-memo-list",
+ e_source_peek_uid (source));
}
static void
@@ -337,9 +349,11 @@ static void
memo_shell_sidebar_constructed (GObject *object)
{
EMemoShellSidebarPrivate *priv;
+ EShell *shell;
EShellView *shell_view;
EShellBackend *shell_backend;
EShellSidebar *shell_sidebar;
+ EShellSettings *shell_settings;
ESourceSelector *selector;
ESourceList *source_list;
ESource *source;
@@ -359,6 +373,9 @@ memo_shell_sidebar_constructed (GObject *object)
shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
shell_backend = e_shell_view_get_shell_backend (shell_view);
+ shell = e_shell_backend_get_shell (shell_backend);
+ shell_settings = e_shell_get_shell_settings (shell);
+
source_list = e_memo_shell_backend_get_source_list (
E_MEMO_SHELL_BACKEND (shell_backend));
@@ -394,7 +411,8 @@ memo_shell_sidebar_constructed (GObject *object)
object);
source = NULL;
- uid = calendar_config_get_primary_memos ();
+ uid = e_shell_settings_get_string (
+ shell_settings, "cal-primary-memo-list");
if (uid != NULL)
source = e_source_list_peek_source_by_uid (source_list, uid);
if (source == NULL)