diff options
author | Damon Chaplin <damon@ximian.com> | 2001-07-11 11:56:03 +0800 |
---|---|---|
committer | Damon Chaplin <damon@src.gnome.org> | 2001-07-11 11:56:03 +0800 |
commit | 0e6d346872289d1ee71cb7b1092b5229b11dab3e (patch) | |
tree | 588b9cbac780c577af5c56d020c98f2f3822b38f /calendar/cal-client | |
parent | 552d3501e9bf05d42ce6f342e85a526a1cea702c (diff) | |
download | gsoc2013-evolution-0e6d346872289d1ee71cb7b1092b5229b11dab3e.tar.gz gsoc2013-evolution-0e6d346872289d1ee71cb7b1092b5229b11dab3e.tar.zst gsoc2013-evolution-0e6d346872289d1ee71cb7b1092b5229b11dab3e.zip |
more timezone updates. I'm pretty much done with the calendar code now,
2001-07-10 Damon Chaplin <damon@ximian.com>
* gui/calendar-model.c:
* gui/e-calendar-table.c:
* gui/e-day-view-main-item.c:
* gui/e-day-view-top-item.c:
* gui/e-day-view.[hc]:
* gui/e-week-view.c:
* gui/gnome-cal.c:
* gui/print.c:
* gui/dialogs/cal-prefs-dialog.c:
* gui/dialogs/comp-editor-util.c:
* gui/dialogs/event-page.c:
* pcs/cal-backend-file.c:
* pcs/query.c:
* cal-util/cal-component.[hc]:
* cal-util/cal-recur.c:
* cal-util/timeutil.[hc]:
* cal-client/cal-client.[hc]: more timezone updates. I'm pretty much
done with the calendar code now, except for alarms and conduits,
which Federico and JP know more about. And there are a couple of
other minor things to fix. But it is still pretty buggy.
svn path=/trunk/; revision=10984
Diffstat (limited to 'calendar/cal-client')
-rw-r--r-- | calendar/cal-client/cal-client.c | 10 | ||||
-rw-r--r-- | calendar/cal-client/cal-client.h | 5 |
2 files changed, 15 insertions, 0 deletions
diff --git a/calendar/cal-client/cal-client.c b/calendar/cal-client/cal-client.c index 8acbbc376a..dc81ec044a 100644 --- a/calendar/cal-client/cal-client.c +++ b/calendar/cal-client/cal-client.c @@ -833,6 +833,8 @@ cal_client_get_timezone (CalClient *client, icalcomponent *icalcomp; icaltimezone *tmp_zone; + g_print ("In cal_client_get_timezone: %s\n", tzid); + g_return_val_if_fail (client != NULL, CAL_CLIENT_GET_NOT_FOUND); g_return_val_if_fail (IS_CAL_CLIENT (client), CAL_CLIENT_GET_NOT_FOUND); @@ -845,12 +847,14 @@ cal_client_get_timezone (CalClient *client, /* If tzid is NULL or "" we return NULL, since it is a 'local time'. */ if (!tzid || !tzid[0]) { *zone = NULL; + g_print (" zone is local time (NULL)\n"); return CAL_CLIENT_GET_SUCCESS; } /* If it is UTC, we return the special UTC timezone. */ if (!strcmp (tzid, "UTC")) { *zone = icaltimezone_get_utc_timezone (); + g_print (" zone is UTC\n"); return CAL_CLIENT_GET_SUCCESS; } @@ -858,12 +862,15 @@ cal_client_get_timezone (CalClient *client, tmp_zone = g_hash_table_lookup (priv->timezones, tzid); if (tmp_zone) { *zone = tmp_zone; + g_print (" zone is in cache\n"); return CAL_CLIENT_GET_SUCCESS; } retval = CAL_CLIENT_GET_NOT_FOUND; *zone = NULL; + g_print (" getting zone from server\n"); + /* We don't already have it, so we try to get it from the server. */ CORBA_exception_init (&ev); comp_str = GNOME_Evolution_Calendar_Cal_getTimezoneObject (priv->cal, (char *) tzid, &ev); @@ -876,6 +883,7 @@ cal_client_get_timezone (CalClient *client, goto out; } + g_print (" parsing zone:\n%s\n", comp_str); icalcomp = icalparser_parse_string (comp_str); CORBA_free (comp_str); @@ -884,6 +892,7 @@ cal_client_get_timezone (CalClient *client, goto out; } + g_print (" creating icaltimezone\n"); tmp_zone = icaltimezone_new (); if (!tmp_zone) { /* FIXME: Needs better error code - out of memory. Or just @@ -901,6 +910,7 @@ cal_client_get_timezone (CalClient *client, g_hash_table_insert (priv->timezones, icaltimezone_get_tzid (tmp_zone), tmp_zone); + g_print (" returning icaltimezone\n"); *zone = tmp_zone; retval = CAL_CLIENT_GET_SUCCESS; diff --git a/calendar/cal-client/cal-client.h b/calendar/cal-client/cal-client.h index 12d04b70d4..4681574289 100644 --- a/calendar/cal-client/cal-client.h +++ b/calendar/cal-client/cal-client.h @@ -135,8 +135,13 @@ gboolean cal_client_get_alarms_for_object (CalClient *client, const char *uid, time_t start, time_t end, CalComponentAlarms **alarms); +/* Add or update a single object. When adding an object only builtin timezones + are allowed. To use external VTIMEZONE data call update_objects() instead.*/ gboolean cal_client_update_object (CalClient *client, CalComponent *comp); +/* Add or update multiple objects, possibly including VTIMEZONE data. */ +gboolean cal_client_update_objects (CalClient *client, icalcomponent *icalcomp); + gboolean cal_client_remove_object (CalClient *client, const char *uid); CalQuery *cal_client_get_query (CalClient *client, const char *sexp); |