Patch to EBookBackendCache

Jörgen Scheibengruber <[email protected]> Wed, 13 Aug 2008 23:12:10 +0300
Newsgroups gmane.comp.gnome.evolution.patches
Message-ID <[email protected]>
--=-jN2pfYjlXnEG+Q46j2or
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hi,

here comes a patch for e-book-backend-cache.c. The method
e_book_backend_cache_set_time () currently allows you to set the
time exactly once, and will return failure later on. I don't
think this is intended behaviour --- at least it is not what
I would need in the google contacts backend. So this patch will
overwrite the old time-stamp when a new one is set instead.

PS: I'm not suscribed to the list ;-)

Br,
J=C3=B6rgen

--=-jN2pfYjlXnEG+Q46j2or
Content-Disposition: attachment; filename=e-book-backend-cache.diff
Content-Type: text/x-patch; name=e-book-backend-cache.diff; charset=UTF-8
Content-Transfer-Encoding: 7bit

Index: libedata-book/e-book-backend-cache.c
===================================================================
--- libedata-book/e-book-backend-cache.c	(Revision 9341)
+++ libedata-book/e-book-backend-cache.c	(Arbeitskopie)
@@ -499,7 +499,10 @@
 e_book_backend_cache_set_time (EBookBackendCache *cache, const char *t)
 {
 	g_return_if_fail (E_IS_BOOK_BACKEND_CACHE (cache));
-	e_file_cache_add_object (E_FILE_CACHE (cache), "last_update_time", t);
+	if (e_file_cache_get_object (E_FILE_CACHE (cache), "last_update_time"))
+		e_file_cache_replace_object (E_FILE_CACHE (cache), "last_update_time", t);
+	else
+		e_file_cache_add_object (E_FILE_CACHE (cache), "last_update_time", t);
 }
 
 char *

--=-jN2pfYjlXnEG+Q46j2or
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Evolution-patches mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/evolution-patches

--=-jN2pfYjlXnEG+Q46j2or--