aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--data/evolution.convert1
-rw-r--r--data/org.gnome.evolution.calendar.gschema.xml.in9
-rw-r--r--modules/calendar/e-memo-shell-backend.c8
-rw-r--r--modules/calendar/e-task-shell-backend.c40
4 files changed, 37 insertions, 21 deletions
diff --git a/data/evolution.convert b/data/evolution.convert
index 823125288a..e9922d051f 100644
--- a/data/evolution.convert
+++ b/data/evolution.convert
@@ -53,6 +53,7 @@ notify-programs = /apps/evolution/calendar/notify/programs
notify-with-tray = /apps/evolution/calendar/notify/notify_with_tray
selected-calendars = /apps/evolution/calendar/display/selected_calendars
selected-memos = /apps/evolution/calendar/memos/selected_memos
+selected-tasks = /apps/evolution/calendar/tasks/selected_tasks
show-memo-preview = /apps/evolution/calendar/display/show_memo_preview
show-task-preview = /apps/evolution/calendar/display/show_task_preview
task-layout = /apps/evolution/calendar/display/task_layout
diff --git a/data/org.gnome.evolution.calendar.gschema.xml.in b/data/org.gnome.evolution.calendar.gschema.xml.in
index 534ec5f99c..7fb0511325 100644
--- a/data/org.gnome.evolution.calendar.gschema.xml.in
+++ b/data/org.gnome.evolution.calendar.gschema.xml.in
@@ -103,8 +103,13 @@
</key>
<key name="selected-memos" type="as">
<default>[]</default>
- <_summary>List of selected memos</_summary>
- <_description>List of memos to load</_description>
+ <_summary>List of selected memo lists</_summary>
+ <_description>List of memo lists to load</_description>
+ </key>
+ <key name="selected-tasks" type="as">
+ <default>[]</default>
+ <_summary>List of selected task lists</_summary>
+ <_description>List of task lists to load</_description>
</key>
<key name="show-memo-preview" type="b">
<default>true</default>
diff --git a/modules/calendar/e-memo-shell-backend.c b/modules/calendar/e-memo-shell-backend.c
index e9c8233a99..5e24425678 100644
--- a/modules/calendar/e-memo-shell-backend.c
+++ b/modules/calendar/e-memo-shell-backend.c
@@ -648,7 +648,7 @@ e_memo_shell_backend_get_selected_memo_lists (EMemoShellBackend *memo_shell_back
GSettings *settings;
char **strv;
gint i;
- GSList *selected_memo_list = NULL;
+ GSList *selected_memo_lists = NULL;
g_return_val_if_fail (
E_IS_MEMO_SHELL_BACKEND (memo_shell_backend), NULL);
@@ -660,12 +660,12 @@ e_memo_shell_backend_get_selected_memo_lists (EMemoShellBackend *memo_shell_back
if (strv != NULL) {
for (i = 0; strv[i] != NULL; i++)
- selected_memo_list = g_slist_append (selected_memo_list, g_strdup (strv[i]));
+ selected_memo_lists = g_slist_append (selected_memo_lists, g_strdup (strv[i]));
g_strfreev (strv);
}
- return selected_memo_list;
+ return selected_memo_lists;
}
void
@@ -678,7 +678,7 @@ e_memo_shell_backend_set_selected_memo_lists (EMemoShellBackend *memo_shell_back
g_return_if_fail (E_IS_MEMO_SHELL_BACKEND (memo_shell_backend));
- for (l = selected_memo_list; l != NULL; l = l->next)
+ for (l = selected_memo_lists; l != NULL; l = l->next)
g_ptr_array_add (array, l->data);
settings = g_settings_new ("org.gnome.evolution.calendar");
diff --git a/modules/calendar/e-task-shell-backend.c b/modules/calendar/e-task-shell-backend.c
index f6a5e14588..0236a1227e 100644
--- a/modules/calendar/e-task-shell-backend.c
+++ b/modules/calendar/e-task-shell-backend.c
@@ -650,18 +650,24 @@ e_task_shell_backend_get_source_list (ETaskShellBackend *task_shell_backend)
GSList *
e_task_shell_backend_get_selected_task_lists (ETaskShellBackend *task_shell_backend)
{
- GConfClient *client;
- GSList *selected_task_lists;
- const gchar *key;
+ GSettings *settings;
+ char **strv;
+ gint i;
+ GSList *selected_task_lists = NULL;
g_return_val_if_fail (
E_IS_TASK_SHELL_BACKEND (task_shell_backend), NULL);
- client = gconf_client_get_default ();
- key = "/apps/evolution/calendar/tasks/selected_tasks";
- selected_task_lists = gconf_client_get_list (
- client, key, GCONF_VALUE_STRING, NULL);
- g_object_unref (client);
+ settings = g_settings_new ("org.gnome.evolution.calendar");
+ strv = g_settings_get_strv (settings, "selected-tasks");
+ g_object_unref (G_OBJECT (settings));
+
+ if (strv != NULL) {
+ for (i = 0; strv[i] != NULL; i++)
+ selected_task_lists = g_slist_append (selected_task_lists, g_strdup (strv[i]));
+
+ g_strfreev (strv);
+ }
return selected_task_lists;
}
@@ -670,14 +676,18 @@ void
e_task_shell_backend_set_selected_task_lists (ETaskShellBackend *task_shell_backend,
GSList *selected_task_lists)
{
- GConfClient *client;
- const gchar *key;
+ GSettings *settings;
+ GSList *l;
+ GPtrArray *array = g_ptr_array_new ();
g_return_if_fail (E_IS_TASK_SHELL_BACKEND (task_shell_backend));
- client = gconf_client_get_default ();
- key = "/apps/evolution/calendar/tasks/selected_tasks";
- gconf_client_set_list (
- client, key, GCONF_VALUE_STRING, selected_task_lists, NULL);
- g_object_unref (client);
+ for (l = selected_task_lists; l != NULL; l = l->next)
+ g_ptr_array_add (array, l->data);
+
+ settings = g_settings_new ("org.gnome.evolution.calendar");
+ g_settings_set_strv (settings, "selected-tasks", array->pdata);
+ g_object_unref (settings);
+
+ g_ptr_array_free (array, FALSE);
}