diff options
| author | Jens Granseuer <jensgr@gmx.net> | 2008-03-05 20:53:30 +0000 |
|---|---|---|
| committer | Jens Granseuer <jensg@src.gnome.org> | 2008-03-05 20:53:30 +0000 |
| commit | dbc4c266f6008b2b012b0ae87944cedc2de6bd34 (patch) | |
| tree | 3e73b51e126c8b9f946b983a5098220f3e414d60 | |
| parent | 2d5c703c045867791cd59591f28c8074c6e8d236 (diff) | |
| download | evolution-data-server-dbc4c266f6008b2b012b0ae87944cedc2de6bd34.tar.gz | |
** Fixes bug #520362
2008-03-05 Jens Granseuer <jensgr@gmx.net>
** Fixes bug #520362
* backends/google/e-cal-backend-google-utils.c:
(e_cal_backend_google_utils_create_cache),
(e_go_item_to_cal_component), (e_go_item_from_cal_component),
(gd_date_to_ical):
* backends/google/e-cal-backend-google.c: (receive_object),
(e_cal_backend_google_modify_object),
(e_cal_backend_google_create_object): put all declarations at the
beginnings of code blocks to make older compilers happy
svn path=/trunk/; revision=8556
| -rw-r--r-- | calendar/ChangeLog | 13 | ||||
| -rw-r--r-- | calendar/backends/google/e-cal-backend-google-utils.c | 21 | ||||
| -rw-r--r-- | calendar/backends/google/e-cal-backend-google.c | 10 |
3 files changed, 31 insertions, 13 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 5a0d5028a..ea5ba1de2 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,16 @@ +2008-03-05 Jens Granseuer <jensgr@gmx.net> + + ** Fixes bug #520362 + + * backends/google/e-cal-backend-google-utils.c: + (e_cal_backend_google_utils_create_cache), + (e_go_item_to_cal_component), (e_go_item_from_cal_component), + (gd_date_to_ical): + * backends/google/e-cal-backend-google.c: (receive_object), + (e_cal_backend_google_modify_object), + (e_cal_backend_google_create_object): put all declarations at the + beginnings of code blocks to make older compilers happy + 2008-03-03 Milan Crha <mcrha@redhat.com> ** Fix for bug #327851 diff --git a/calendar/backends/google/e-cal-backend-google-utils.c b/calendar/backends/google/e-cal-backend-google-utils.c index 98f564bf9..a2c27f016 100644 --- a/calendar/backends/google/e-cal-backend-google-utils.c +++ b/calendar/backends/google/e-cal-backend-google-utils.c @@ -151,8 +151,10 @@ e_cal_backend_google_utils_create_cache (ECalBackendGoogle *cbgo) if (refresh_interval) x = atoi (refresh_interval); + else + x = 30; - timeout_id = g_timeout_add ((refresh_interval ? x : 30) * 60000, + timeout_id = g_timeout_add (x * 60000, (GSourceFunc) get_deltas_timeout, (gpointer)cbgo); e_cal_backend_google_set_timeout_id (cbgo, timeout_id); @@ -406,6 +408,7 @@ e_go_item_to_cal_component (EGoItem *item, ECalBackendGoogle *cbgo) const char *description, *uid, *temp; struct icaltimetype itt_utc, itt; GSList *category_ids; + GSList *go_attendee_list = NULL, *l = NULL, *attendee_list = NULL; comp = e_cal_component_new (); default_zone = e_cal_backend_google_get_default_zone (cbgo); @@ -484,16 +487,17 @@ e_go_item_to_cal_component (EGoItem *item, ECalBackendGoogle *cbgo) e_cal_component_set_transparency (comp, E_CAL_COMPONENT_TRANSP_TRANSPARENT); /* Attendees */ - GSList *go_attendee_list = NULL, *l = NULL, *attendee_list = NULL; go_attendee_list = gdata_entry_get_attendee_list (item->entry); if (go_attendee_list != NULL) { for (l = go_attendee_list; l != NULL; l = l->next) { Attendee *go_attendee; + ECalComponentAttendee *attendee; + go_attendee = (Attendee *)l->data; - ECalComponentAttendee *attendee = g_new0 (ECalComponentAttendee, 1); + attendee = g_new0 (ECalComponentAttendee, 1); #if 0 _print_attendee ((Attendee *)l->data); #endif @@ -598,10 +602,12 @@ e_go_item_from_cal_component (ECalBackendGoogle *cbgo, ECalComponent *comp) icaltimetype itt; const char *uid; const char *location; - - priv = cbgo->priv; GSList *list = NULL; GDataEntry *entry; + ECalComponentText *t; + GSList *attendee_list = NULL, *l = NULL; + + priv = cbgo->priv; item = g_new0 (EGoItem, 1); entry = gdata_entry_new (); @@ -629,7 +635,6 @@ e_go_item_from_cal_component (ECalBackendGoogle *cbgo, ECalComponent *comp) /* Content / Description */ e_cal_component_get_description_list (comp, &list); - ECalComponentText *t; if (list != NULL) { t = (ECalComponentText *)list->data; gdata_entry_set_content (entry, t->value); @@ -652,7 +657,6 @@ e_go_item_from_cal_component (ECalBackendGoogle *cbgo, ECalComponent *comp) "label", term); /* Attendee */ - GSList *attendee_list = NULL, *l = NULL; e_cal_component_get_attendee_list (comp, &attendee_list); for (l = attendee_list; l!=NULL; l=l->next) { @@ -880,9 +884,10 @@ static gchar * gd_date_to_ical (gchar *string) { gchar *s, *str; + int count = 0; + s = g_strdup (string); str = string; - int count = 0; g_return_val_if_fail (string != NULL, ""); diff --git a/calendar/backends/google/e-cal-backend-google.c b/calendar/backends/google/e-cal-backend-google.c index 92f876ba6..0383bad68 100644 --- a/calendar/backends/google/e-cal-backend-google.c +++ b/calendar/backends/google/e-cal-backend-google.c @@ -544,7 +544,7 @@ static receive_object (ECalBackendGoogle *cbgo, EDataCal *cal, icalcomponent *ic GSList *comps = NULL, *l = NULL; icalproperty_method method; icalproperty *icalprop; - gboolean instances = TRUE, found; + gboolean instances = TRUE, found = FALSE; icalparameter_partstat pstatus = 0; priv = cbgo->priv; @@ -889,6 +889,7 @@ e_cal_backend_google_modify_object (ECalBackendSync *backend, EDataCal *cal, con const char *uid=NULL, *rid=NULL; GDataEntry *entry, *entry_from_server=NULL; gchar *edit_link; + GSList *l; *old_object = NULL; cbgo = E_CAL_BACKEND_GOOGLE (backend); @@ -911,7 +912,6 @@ e_cal_backend_google_modify_object (ECalBackendSync *backend, EDataCal *cal, con e_cal_component_get_uid (comp, &uid); /* Check if object exists */ - GSList *l; switch (priv->mode) { case CAL_MODE_ANY: case CAL_MODE_REMOTE: @@ -1075,13 +1075,13 @@ e_cal_backend_google_create_object (ECalBackendSync *backend, EDataCal *cal, cha switch (priv->mode) { case CAL_MODE_ANY: - case CAL_MODE_REMOTE: + case CAL_MODE_REMOTE: { /* Create an appointment */ + GDataEntry *updated_entry; item = e_go_item_from_cal_component (cbgo, comp); entry = e_go_item_get_entry (item); - GDataEntry *updated_entry; updated_entry = gdata_service_insert_entry (GDATA_SERVICE(priv->service), priv->uri, entry); if (!GDATA_IS_ENTRY (updated_entry)) { g_message ("\n Entry Insertion Failed %s \n", G_STRLOC); @@ -1090,7 +1090,7 @@ e_cal_backend_google_create_object (ECalBackendSync *backend, EDataCal *cal, cha id = gdata_entry_get_id (updated_entry); e_cal_component_set_uid (comp, id); - break; + break; } default: break; } |
