diff options
author | nobody <nobody@localhost> | 2003-09-26 23:53:23 +0800 |
---|---|---|
committer | nobody <nobody@localhost> | 2003-09-26 23:53:23 +0800 |
commit | 911c3b9d4fe2f40bc34029ef798ed78fdf0fcb42 (patch) | |
tree | e3efa4958cf2cf6bfe50e2a15c729b9014efa5db /calendar/gui/comp-util.c | |
parent | 99c61843f0d1da7f9b3b73b99bab0e918ce99e5b (diff) | |
download | gsoc2013-evolution-new-calendar-branch-merge-end.tar gsoc2013-evolution-new-calendar-branch-merge-end.tar.gz gsoc2013-evolution-new-calendar-branch-merge-end.tar.bz2 gsoc2013-evolution-new-calendar-branch-merge-end.tar.lz gsoc2013-evolution-new-calendar-branch-merge-end.tar.xz gsoc2013-evolution-new-calendar-branch-merge-end.tar.zst gsoc2013-evolution-new-calendar-branch-merge-end.zip |
This commit was manufactured by cvs2svn to create tagnew-calendar-branch-merge-end
'new-calendar-branch-merge-end'.
svn path=/tags/new-calendar-branch-merge-end/; revision=22718
Diffstat (limited to 'calendar/gui/comp-util.c')
-rw-r--r-- | calendar/gui/comp-util.c | 37 |
1 files changed, 9 insertions, 28 deletions
diff --git a/calendar/gui/comp-util.c b/calendar/gui/comp-util.c index 28bc66bd54..9c8b8b2e6c 100644 --- a/calendar/gui/comp-util.c +++ b/calendar/gui/comp-util.c @@ -95,7 +95,6 @@ cal_comp_util_compare_event_timezones (CalComponent *comp, CalClient *client, icaltimezone *zone) { - CalClientGetStatus status; CalComponentDateTime start_datetime, end_datetime; const char *tzid; gboolean retval = FALSE; @@ -143,10 +142,8 @@ cal_comp_util_compare_event_timezones (CalComponent *comp, /* If the TZIDs differ, we have to compare the UTC offsets of the start and end times, using their own timezones and the given timezone. */ - status = cal_client_get_timezone (client, - start_datetime.tzid, - &start_zone); - if (status != CAL_CLIENT_GET_SUCCESS) + if (!cal_client_get_timezone (client, start_datetime.tzid, + &start_zone, NULL)) goto out; if (start_datetime.value) { @@ -160,10 +157,8 @@ cal_comp_util_compare_event_timezones (CalComponent *comp, goto out; } - status = cal_client_get_timezone (client, - end_datetime.tzid, - &end_zone); - if (status != CAL_CLIENT_GET_SUCCESS) + if (!cal_client_get_timezone (client, end_datetime.tzid, + &end_zone, NULL)) goto out; if (end_datetime.value) { @@ -210,7 +205,6 @@ gboolean cal_comp_is_on_server (CalComponent *comp, CalClient *client) { const char *uid; - CalClientGetStatus status; icalcomponent *icalcomp; g_return_val_if_fail (comp != NULL, FALSE); @@ -226,25 +220,12 @@ cal_comp_is_on_server (CalComponent *comp, CalClient *client) */ cal_component_get_uid (comp, &uid); - status = cal_client_get_object (client, uid, &icalcomp); - - switch (status) { - case CAL_CLIENT_GET_SUCCESS: + if (cal_client_get_object (client, uid, NULL, &icalcomp, NULL)) { icalcomponent_free (icalcomp); return TRUE; - - case CAL_CLIENT_GET_SYNTAX_ERROR: - g_message ("confirm_delete_empty_appointment(): Syntax error when getting " - "object `%s'", - uid); - return TRUE; - - case CAL_CLIENT_GET_NOT_FOUND: - return FALSE; - - default: - g_assert_not_reached (); } + + /* FIXME Better error handling */ return FALSE; } @@ -268,7 +249,7 @@ cal_comp_event_new_with_defaults (CalClient *client) icalproperty *icalprop; CalAlarmTrigger trigger; - if (cal_client_get_default_object (client, CALOBJ_TYPE_EVENT, &icalcomp) != CAL_CLIENT_GET_SUCCESS) + if (!cal_client_get_default_object (client, CALOBJ_TYPE_EVENT, &icalcomp, NULL)) return NULL; comp = cal_component_new (); @@ -334,7 +315,7 @@ cal_comp_task_new_with_defaults (CalClient *client) CalComponent *comp; icalcomponent *icalcomp; - if (cal_client_get_default_object (client, CALOBJ_TYPE_TODO, &icalcomp) != CAL_CLIENT_GET_SUCCESS) + if (!cal_client_get_default_object (client, CALOBJ_TYPE_TODO, &icalcomp, NULL)) return NULL; comp = cal_component_new (); |