From 571d39604123bf34f1a8932b8e3671c63ca43c42 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Tue, 4 Nov 2003 12:47:14 +0000 Subject: added more menu items. (delete_calendar_cb): callbacks for new popup menu 2003-11-04 Rodrigo Moya * gui/calendar-component.c (fill_popup_menu_callback): added more menu items. (delete_calendar_cb): callbacks for new popup menu items. (impl_createControls): add the source selector widget to the CalendarComponentPrivate structure. * gui/migration.[ch] (migrate_old_tasks): new function to migrate old tasks setups. (process_old_dir): renamed and added a "filename" argument, so that the same function can be used for tasks and calendar directories. (migrate_old_calendars): added new argument when calling process_old_dir(). * gui/tasks-component.c (tasks_component_init): call migrate_old_tasks() if there are no groups defined. svn path=/trunk/; revision=23182 --- calendar/gui/tasks-component.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'calendar/gui/tasks-component.c') diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c index a6b7062b9c..4e5de7c692 100644 --- a/calendar/gui/tasks-component.c +++ b/calendar/gui/tasks-component.c @@ -305,14 +305,18 @@ tasks_component_init (TasksComponent *component, TasksComponentClass *klass) group = e_source_group_new (_("On This Computer"), base_uri); e_source_list_add_group (priv->source_list, group, -1); - /* FIXME: migrate tasks from older setups */ - new_dir = g_build_filename (base_uri, "Personal/", NULL); - if (!e_mkdir_hier (new_dir, 0700)) { - source = e_source_new (_("Personal"), "Personal"); - e_source_group_add_source (group, source, -1); + /* migrate tasks from older setup */ + if (!migrate_old_tasks (group)) { + /* create default tasks folders */ + new_dir = g_build_filename (base_uri, "Personal/", NULL); + if (!e_mkdir_hier (new_dir, 0700)) { + source = e_source_new (_("Personal"), "Personal"); + e_source_group_add_source (group, source, -1); + } + + g_free (new_dir); } - g_free (new_dir); g_free (base_uri); } -- cgit v1.2.3