Fixes bug #62857 return the cal object created for the first component and
authorChenthill Palanisamy <pchenthill@novell.com>
Mon, 23 Aug 2004 04:37:07 +0000 (04:37 +0000)
committerChenthill Palanisamy <pchen@src.gnome.org>
Mon, 23 Aug 2004 04:37:07 +0000 (04:37 +0000)
2004-08-16  Chenthill Palanisamy <pchenthill@novell.com>

Fixes bug #62857
* backends/groupwise/e-cal-backend-groupwise.c
(e_cal_backend_groupwise_create_object): return the cal object created
for the first component and notify the client for the cal objects of other
components created in recurrences.

calendar/ChangeLog
calendar/backends/groupwise/e-cal-backend-groupwise.c

index 4ddfd0e..5d51c7b 100644 (file)
@@ -1,3 +1,11 @@
+2004-08-16  Chenthill Palanisamy <pchenthill@novell.com>
+       
+       Fixes bug #62857
+       * backends/groupwise/e-cal-backend-groupwise.c
+       (e_cal_backend_groupwise_create_object): return the cal object created
+       for the first component and notify the client for the cal objects of other 
+       components created in recurrences.
+
 2004-08-17  Rodrigo Moya <rodrigo@novell.com>
 
        Fixes #61782
index 3445f0c..a91f9fc 100644 (file)
@@ -1063,6 +1063,7 @@ e_cal_backend_groupwise_create_object (ECalBackendSync *backend, EDataCal *cal,
                        g_free (server_uid);
                        /* if successful, update the cache */
                        e_cal_backend_cache_put_component (priv->cache, comp);
+                       *calobj = e_cal_component_get_as_string (comp);
                } else {
                        
                        GList *list = NULL, *tmp;
@@ -1084,6 +1085,18 @@ e_cal_backend_groupwise_create_object (ECalBackendSync *backend, EDataCal *cal,
                                e_cal_component_commit_sequence (e_cal_comp);
                                sanitize_component (backend, e_cal_comp, g_ptr_array_index (uid_array, i));
                                e_cal_backend_cache_put_component (priv->cache, e_cal_comp);
+                               
+                               if (i == 0) {
+                                       *calobj = e_cal_component_get_as_string (e_cal_comp);   
+                               }
+
+                               if (i != 0) {
+                                       char *temp;
+                                       temp = e_cal_component_get_as_string (e_cal_comp);
+                                       e_cal_backend_notify_object_created (E_CAL_BACKEND (cbgw), g_strdup(temp));
+                                       g_free (temp);
+                               }
+
                                g_object_unref (e_cal_comp);
                        }
                        g_ptr_array_free (uid_array, TRUE);
@@ -1093,8 +1106,6 @@ e_cal_backend_groupwise_create_object (ECalBackendSync *backend, EDataCal *cal,
                break;
        }
 
-       *calobj = e_cal_component_get_as_string (comp);
-
        g_object_unref (comp);
 
        return GNOME_Evolution_Calendar_Success;