diff options
author | JP Rosevear <jpr@novell.com> | 2004-09-28 23:57:33 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2004-09-28 23:57:33 +0800 |
commit | b405d60ed4196ea2ceb1e70a013e2b48e3f85d58 (patch) | |
tree | 6c53aae1947cfd3b0a3fbff6405eeeec9af4e55d /calendar/gui | |
parent | 947b1e0d27a747e34010cada70eb754004066514 (diff) | |
download | gsoc2013-evolution-b405d60ed4196ea2ceb1e70a013e2b48e3f85d58.tar.gz gsoc2013-evolution-b405d60ed4196ea2ceb1e70a013e2b48e3f85d58.tar.zst gsoc2013-evolution-b405d60ed4196ea2ceb1e70a013e2b48e3f85d58.zip |
Fixes #61766
2004-09-28 JP Rosevear <jpr@novell.com>
Fixes #61766
* gui/migration.c (create_calendar_contact_source): set a color
for the contacts
(create_calendar_sources): set a color for the personal source and
make in primary and default if nothing else is either
(create_task_sources): ditto for tasks personal source
svn path=/trunk/; revision=27414
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/migration.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/calendar/gui/migration.c b/calendar/gui/migration.c index 6c2cd1b969..fa1b4bdeeb 100644 --- a/calendar/gui/migration.c +++ b/calendar/gui/migration.c @@ -46,6 +46,7 @@ #include <e-util/e-folder-map.h> #include <libedataserver/e-dbhash.h> #include <libedataserver/e-xml-hash-utils.h> +#include "calendar-config.h" #include "calendar-config-keys.h" #include "migration.h" @@ -381,6 +382,7 @@ create_calendar_contact_source (ESourceList *source_list) e_source_group_add_source (group, source, -1); g_object_unref (source); + e_source_set_color (source, 0xFED4D3); e_source_group_set_readonly (group, TRUE); return group; @@ -457,7 +459,18 @@ create_calendar_sources (CalendarComponent *component, /* Create the default Person calendar */ ESource *source = e_source_new (_("Personal"), PERSONAL_RELATIVE_URI); e_source_group_add_source (*on_this_computer, source, -1); + + if (!calendar_config_get_primary_calendar () && !calendar_config_get_calendars_selected ()) { + GSList selected; + + calendar_config_set_primary_calendar (e_source_peek_uid (source)); + selected.data = (gpointer)e_source_peek_uid (source); + selected.next = NULL; + calendar_config_set_calendars_selected (&selected); + } + + e_source_set_color (source, 0xBECEDD); *personal_source = source; } @@ -540,6 +553,17 @@ create_task_sources (TasksComponent *component, ESource *source = e_source_new (_("Personal"), PERSONAL_RELATIVE_URI); e_source_group_add_source (*on_this_computer, source, -1); + if (!calendar_config_get_primary_tasks () && !calendar_config_get_tasks_selected ()) { + GSList selected; + + calendar_config_set_primary_tasks (e_source_peek_uid (source)); + + selected.data = (gpointer)e_source_peek_uid (source); + selected.next = NULL; + calendar_config_set_tasks_selected (&selected); + } + + e_source_set_color (source, 0xBECEDD); *personal_source = source; } |