diff options
Diffstat (limited to 'calendar/gui/tasks-component.c')
-rw-r--r-- | calendar/gui/tasks-component.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c index 3f5a13d9ec..cc87d9d287 100644 --- a/calendar/gui/tasks-component.c +++ b/calendar/gui/tasks-component.c @@ -919,6 +919,17 @@ setup_create_ecal (TasksComponent *component, TasksComponentView *component_view return priv->create_ecal ; } +/* Ensures the calendar is selected */ +static void +object_created_cb (CompEditor *ce, ECalendarTable *cal_table) +{ + g_return_if_fail (cal_table != NULL); + + cal_table->user_created_cal = comp_editor_get_e_cal (ce); + g_signal_emit_by_name (cal_table, "user_created"); + cal_table->user_created_cal = NULL; +} + static gboolean create_new_todo (TasksComponent *task_component, gboolean is_assigned, TasksComponentView *component_view) { @@ -939,6 +950,8 @@ create_new_todo (TasksComponent *task_component, gboolean is_assigned, TasksComp editor = task_editor_new (ecal, flags); comp = cal_comp_task_new_with_defaults (ecal); + g_signal_connect (editor, "object_created", G_CALLBACK (object_created_cb), e_tasks_get_calendar_table (component_view->tasks)); + comp_editor_edit_comp (COMP_EDITOR (editor), comp); if (is_assigned) task_editor_show_assignment (editor); |