r2616 - in trunk/src/target/OM-2007.2/libraries/libmokojournal2: . mokojournal
chris at sita.openmoko.org
chris at sita.openmoko.org
Fri Aug 3 13:21:44 CEST 2007
Author: chris
Date: 2007-08-03 13:21:43 +0200 (Fri, 03 Aug 2007)
New Revision: 2616
Modified:
trunk/src/target/OM-2007.2/libraries/libmokojournal2/ChangeLog
trunk/src/target/OM-2007.2/libraries/libmokojournal2/configure.ac
trunk/src/target/OM-2007.2/libraries/libmokojournal2/mokojournal/moko-journal.c
Log:
Check for existence of ECalComponentId
Modified: trunk/src/target/OM-2007.2/libraries/libmokojournal2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/libraries/libmokojournal2/ChangeLog 2007-08-03 10:56:59 UTC (rev 2615)
+++ trunk/src/target/OM-2007.2/libraries/libmokojournal2/ChangeLog 2007-08-03 11:21:43 UTC (rev 2616)
@@ -1,3 +1,9 @@
+2007-08-03 Chris Lord,,, <chris at openedhand.com>
+
+ * configure.ac:
+ * mokojournal/moko-journal.c: (on_entries_removed_cb):
+ Check for existence of ECalComponentId
+
2007-07-29 Holger Freyther <zecke at selfish.org>
Refer to version two of this library
Modified: trunk/src/target/OM-2007.2/libraries/libmokojournal2/configure.ac
===================================================================
--- trunk/src/target/OM-2007.2/libraries/libmokojournal2/configure.ac 2007-08-03 10:56:59 UTC (rev 2615)
+++ trunk/src/target/OM-2007.2/libraries/libmokojournal2/configure.ac 2007-08-03 11:21:43 UTC (rev 2616)
@@ -15,6 +15,16 @@
# base deps
PKG_CHECK_MODULES(DEPS, libecal-1.2 >= $LIBECAL_VERSION)
+# Check for existence of ECalComponentId
+old_cflags=$CFLAGS
+CFLAGS=$DEPS_CFLAGS
+AC_CHECK_TYPE(ECalComponentId, [], [], [#include <libecal/e-cal.h>])
+
+if test $ac_cv_type_ECalComponentId = yes; then
+ AC_DEFINE(HAVE_ECALCOMPONENTID, 1, [Defined if ECalComponentId exists])
+fi
+CFLAGS=$old_cflags
+
if test x$MOKO_DEVEL = xon ; then
AC_MSG_NOTICE([removing -O2 from CFLAGS])
CFLAGS="-g -Wall"
Modified: trunk/src/target/OM-2007.2/libraries/libmokojournal2/mokojournal/moko-journal.c
===================================================================
--- trunk/src/target/OM-2007.2/libraries/libmokojournal2/mokojournal/moko-journal.c 2007-08-03 10:56:59 UTC (rev 2615)
+++ trunk/src/target/OM-2007.2/libraries/libmokojournal2/mokojournal/moko-journal.c 2007-08-03 11:21:43 UTC (rev 2616)
@@ -24,6 +24,9 @@
#include <libical/icaltypes.h>
#include <libecal/e-cal.h>
#include <libecal/e-cal-component.h>
+#ifdef HAVE_CONFIG
+# include <config.h>
+#endif
#include "moko-journal.h"
#include "moko-time-priv.h"
@@ -1449,13 +1452,18 @@
*/
for (cur = a_uids ; cur ; cur = cur->next)
{
- if (cur->data)
+ const gchar *uid;
+
+#ifdef HAVE_ECALCOMPONENTID
+ ECalComponentId *id = cur->data;
+ uid = id->uid;
+#else
+ uid = cur->data;
+#endif
+
+ if (!moko_journal_remove_entry_by_uid (a_journal, uid))
{
- if (!moko_journal_remove_entry_by_uid (a_journal, cur->data))
- {
- g_message ("failed to remove entry of uid %s\n",
- (const char*)cur->data) ;
- }
+ g_message ("failed to remove entry of uid %s\n", uid) ;
}
}
}
More information about the commitlog
mailing list