aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/comp-editor-factory.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/comp-editor-factory.c')
-rw-r--r--calendar/gui/comp-editor-factory.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/calendar/gui/comp-editor-factory.c b/calendar/gui/comp-editor-factory.c
index 3f1008d7ba..404b0ab5a6 100644
--- a/calendar/gui/comp-editor-factory.c
+++ b/calendar/gui/comp-editor-factory.c
@@ -301,7 +301,7 @@ edit_existing (OpenClient *oc, const char *uid)
* type.
*/
static CalComponent *
-get_default_event (gboolean all_day)
+get_default_event (CalClient *client, gboolean all_day)
{
CalComponent *comp;
struct icaltimetype itt;
@@ -309,7 +309,7 @@ get_default_event (gboolean all_day)
char *location;
icaltimezone *zone;
- comp = cal_comp_event_new_with_defaults ();
+ comp = cal_comp_event_new_with_defaults (client);
location = calendar_config_get_timezone ();
zone = icaltimezone_get_builtin_timezone (location);
@@ -340,12 +340,11 @@ get_default_event (gboolean all_day)
}
static CalComponent *
-get_default_task (void)
+get_default_task (CalClient *client)
{
CalComponent *comp;
- comp = cal_component_new ();
- cal_component_set_new_vtype (comp, CAL_COMPONENT_TODO);
+ comp = cal_comp_task_new_with_defaults (client);
return comp;
}
@@ -361,15 +360,15 @@ edit_new (OpenClient *oc, const GNOME_Evolution_Calendar_CompEditorFactory_CompE
case GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_EVENT:
case GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_MEETING:
editor = COMP_EDITOR (event_editor_new (oc->client));
- comp = get_default_event (FALSE);
+ comp = get_default_event (oc->client, FALSE);
break;
case GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_ALLDAY_EVENT:
editor = COMP_EDITOR (event_editor_new (oc->client));
- comp = get_default_event (TRUE);
+ comp = get_default_event (oc->client, TRUE);
break;
case GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_TODO:
editor = COMP_EDITOR (task_editor_new (oc->client));
- comp = get_default_task ();
+ comp = get_default_task (oc->client);
break;
default:
g_assert_not_reached ();