save the file when we add the component to the toplevel.
authorRodrigo Moya <rodrigo@novell.com>
Wed, 26 Jan 2005 17:31:07 +0000 (17:31 +0000)
committerRodrigo Moya <rodrigo@src.gnome.org>
Wed, 26 Jan 2005 17:31:07 +0000 (17:31 +0000)
2005-01-26  Rodrigo Moya <rodrigo@novell.com>

* backends/file/e-cal-backend-file.c (add_component): save the file
when we add the component to the toplevel.
(remove_component): make sure we always save the file.

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

index 3109ea5..5ea070b 100644 (file)
@@ -1,3 +1,9 @@
+2005-01-26  Rodrigo Moya <rodrigo@novell.com>
+
+       * backends/file/e-cal-backend-file.c (add_component): save the file
+       when we add the component to the toplevel.
+       (remove_component): make sure we always save the file.
+
 2005-01-26  JP Rosevear  <jpr@novell.com>
 
        * libecal/e-cal.c (e_cal_send_objects): fix leak in the error case
index ea6c3a6..f06f830 100644 (file)
@@ -477,6 +477,8 @@ add_component (ECalBackendFile *cbfile, ECalComponent *comp, gboolean add_to_top
                g_assert (icalcomp != NULL);
 
                icalcomponent_add_component (priv->icalcomp, icalcomp);
+
+               save (cbfile);
        }
 
        /* Update the set of categories */
@@ -553,6 +555,8 @@ remove_component (ECalBackendFile *cbfile, const char *uid, ECalBackendFileObjec
 
        g_hash_table_remove (priv->comp_uid_hash, uid);
        free_object ((gpointer) uid, (gpointer) obj_data, NULL);
+
+       save (cbfile);
 }
 
 /* Scans the toplevel VCALENDAR component and stores the objects it finds */
@@ -1659,7 +1663,6 @@ sanitize_component (ECalBackendFile *cbfile, ECalComponent *comp)
 
 }      
 
-
 static ECalBackendSyncStatus
 e_cal_backend_file_create_object (ECalBackendSync *backend, EDataCal *cal, char **calobj, char **uid)
 {