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-editor-factory.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-editor-factory.c')
-rw-r--r-- | calendar/gui/comp-editor-factory.c | 40 |
1 files changed, 15 insertions, 25 deletions
diff --git a/calendar/gui/comp-editor-factory.c b/calendar/gui/comp-editor-factory.c index f76e0d4f03..f5c6c97416 100644 --- a/calendar/gui/comp-editor-factory.c +++ b/calendar/gui/comp-editor-factory.c @@ -241,7 +241,6 @@ edit_existing (OpenClient *oc, const char *uid) { CalComponent *comp; icalcomponent *icalcomp; - CalClientGetStatus status; CompEditor *editor; CalComponentVType vtype; @@ -249,31 +248,20 @@ edit_existing (OpenClient *oc, const char *uid) /* Get the object */ - status = cal_client_get_object (oc->client, uid, &icalcomp); - - switch (status) { - case CAL_CLIENT_GET_SUCCESS: - comp = cal_component_new (); - if (!cal_component_set_icalcomponent (comp, icalcomp)) { - g_object_unref (comp); - icalcomponent_free (icalcomp); - return; - } - break; - - case CAL_CLIENT_GET_NOT_FOUND: - /* The object disappeared from the server */ - return; - - case CAL_CLIENT_GET_SYNTAX_ERROR: - g_message ("edit_exiting(): Syntax error while getting component `%s'", uid); + if (!cal_client_get_object (oc->client, uid, NULL, &icalcomp, NULL)) { + /* FIXME Better error handling */ + g_warning (G_STRLOC ": Syntax error while getting component `%s'", uid); + return; - - default: - g_assert_not_reached (); + } + + comp = cal_component_new (); + if (!cal_component_set_icalcomponent (comp, icalcomp)) { + g_object_unref (comp); + icalcomponent_free (icalcomp); return; } - + /* Create the appropriate type of editor */ vtype = cal_component_get_vtype (comp); @@ -405,13 +393,15 @@ resolve_pending_requests (OpenClient *oc) factory = oc->factory; priv = factory->priv; - g_assert (oc->pending != NULL); + if (!oc->pending) + return; /* Set the default timezone in the backend. */ location = calendar_config_get_timezone (); zone = icaltimezone_get_builtin_timezone (location); if (zone) - cal_client_set_default_timezone (oc->client, zone); + /* FIXME Error handling? */ + cal_client_set_default_timezone (oc->client, zone, NULL); for (l = oc->pending; l; l = l->next) { Request *request; |