aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/comp-util.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@src.gnome.org>2003-03-05 03:52:37 +0800
committerJP Rosevear <jpr@src.gnome.org>2003-03-05 03:52:37 +0800
commit6b4c3984d52cfbf88ae84ee0102f4aa0c17a2a62 (patch)
treebba07b5f28966c10a90de8f550af895014b0b9bb /calendar/gui/comp-util.c
parentcd4477930e72b1be069d5c97b90d96e989645bfc (diff)
downloadgsoc2013-evolution-6b4c3984d52cfbf88ae84ee0102f4aa0c17a2a62.tar
gsoc2013-evolution-6b4c3984d52cfbf88ae84ee0102f4aa0c17a2a62.tar.gz
gsoc2013-evolution-6b4c3984d52cfbf88ae84ee0102f4aa0c17a2a62.tar.bz2
gsoc2013-evolution-6b4c3984d52cfbf88ae84ee0102f4aa0c17a2a62.tar.lz
gsoc2013-evolution-6b4c3984d52cfbf88ae84ee0102f4aa0c17a2a62.tar.xz
gsoc2013-evolution-6b4c3984d52cfbf88ae84ee0102f4aa0c17a2a62.tar.zst
gsoc2013-evolution-6b4c3984d52cfbf88ae84ee0102f4aa0c17a2a62.zip
If only the pipe wouldn't break.
svn path=/trunk/; revision=20143
Diffstat (limited to 'calendar/gui/comp-util.c')
-rw-r--r--calendar/gui/comp-util.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/calendar/gui/comp-util.c b/calendar/gui/comp-util.c
index df4817d70d..fc3496be67 100644
--- a/calendar/gui/comp-util.c
+++ b/calendar/gui/comp-util.c
@@ -258,7 +258,7 @@ cal_comp_is_on_server (CalComponent *comp, CalClient *client)
* Return value: A newly-created calendar component.
**/
CalComponent *
-cal_comp_event_new_with_defaults (void)
+cal_comp_event_new_with_defaults (CalClient *client)
{
CalComponent *comp;
int interval;
@@ -268,10 +268,9 @@ cal_comp_event_new_with_defaults (void)
icalproperty *icalprop;
CalAlarmTrigger trigger;
- comp = cal_component_new ();
-
- cal_component_set_new_vtype (comp, CAL_COMPONENT_EVENT);
-
+ if (cal_client_get_default_object (client, CALOBJ_TYPE_EVENT, &comp) != CAL_CLIENT_GET_SUCCESS)
+ return NULL;
+
if (!calendar_config_get_use_default_reminder ())
return comp;
@@ -321,3 +320,14 @@ cal_comp_event_new_with_defaults (void)
return comp;
}
+
+CalComponent *
+cal_comp_task_new_with_defaults (CalClient *client)
+{
+ CalComponent *comp;
+
+ if (cal_client_get_default_object (client, CALOBJ_TYPE_TODO, &comp) != CAL_CLIENT_GET_SUCCESS)
+ return NULL;
+
+ return comp;
+}