diff options
-rw-r--r-- | calendar/ChangeLog | 7 | ||||
-rw-r--r-- | calendar/gui/calendar-component.c | 11 | ||||
-rw-r--r-- | calendar/gui/tasks-component.c | 11 |
3 files changed, 29 insertions, 0 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 5794f177df..9afeeaf83d 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,10 @@ +2005-03-21 JP Rosevear <jpr@novell.com> + + * gui/tasks-component.c (ensure_sources): ensure the color and + primary config are set on the personal source + + * gui/calendar-component.c (ensure_sources): ditto + 2005-03-21 Li Yuan <li.yuan@sun.com> * gui/print.c: (print_comp_item): diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c index ea227f3211..55c4200115 100644 --- a/calendar/gui/calendar-component.c +++ b/calendar/gui/calendar-component.c @@ -216,6 +216,17 @@ ensure_sources (CalendarComponent *component) personal_source = e_source_new (_("Personal"), PERSONAL_RELATIVE_URI); e_source_group_add_source (on_this_computer, personal_source, -1); + if (!calendar_config_get_primary_calendar () && !calendar_config_get_calendars_selected ()) { + GSList selected; + + calendar_config_set_primary_calendar (e_source_peek_uid (personal_source)); + + selected.data = (gpointer)e_source_peek_uid (personal_source); + selected.next = NULL; + calendar_config_set_calendars_selected (&selected); + } + + e_source_set_color (personal_source, 0xBECEDD); } if (!on_the_web) { diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c index 1cb4dabef6..74ef16bd61 100644 --- a/calendar/gui/tasks-component.c +++ b/calendar/gui/tasks-component.c @@ -196,6 +196,17 @@ ensure_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; } |