diff options
Diffstat (limited to 'calendar/gui/tasks-component.c')
-rw-r--r-- | calendar/gui/tasks-component.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c index 09dd79b8d0..ce9f77157f 100644 --- a/calendar/gui/tasks-component.c +++ b/calendar/gui/tasks-component.c @@ -732,17 +732,18 @@ impl_requestCreateItem (PortableServer_Servant servant, { TasksComponent *tasks_component = TASKS_COMPONENT (bonobo_object_from_servant (servant)); TasksComponentPrivate *priv; - ECalComponent *comp; - TaskEditor *editor; - priv = tasks_component->priv; - - if (!setup_create_ecal (tasks_component)) - return; - - editor = task_editor_new (priv->create_ecal); + priv = tasks_component->priv; if (strcmp (item_type_name, CREATE_TASK_ID) == 0) { + ECalComponent *comp; + TaskEditor *editor; + + if (!setup_create_ecal (tasks_component)) + return; + + editor = task_editor_new (priv->create_ecal); + comp = get_default_task (priv->create_ecal); comp_editor_edit_comp (COMP_EDITOR (editor), comp); |