[evolution-etesync/SIMPLE_MEMO_WITH_SUMMARY_CAPABILITY_checking] I#10 - Memos: Summary is overwritten by first line in the description




commit 36e69fbaf07a7fc3fd4946c79ad5ca640fadac0a
Author: Nour E-Din El-Nhass <nouredinosama gmail com>
Date:   Thu May 6 16:20:37 2021 +0200

    I#10 - Memos: Summary is overwritten by first line in the description
    
    Closes https://gitlab.gnome.org/GNOME/evolution-etesync/-/issues/10

 CMakeLists.txt                       | 13 +++++++++++++
 config.h.in                          |  3 +++
 src/calendar/e-cal-backend-etesync.c |  6 +++++-
 3 files changed, 21 insertions(+), 1 deletion(-)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 728af36..01036f5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -133,6 +133,19 @@ unset(CMAKE_REQUIRED_FLAGS)
 unset(CMAKE_REQUIRED_INCLUDES)
 unset(CMAKE_REQUIRED_LIBRARIES)
 
+# *********************************************************
+# E_CAL_STATIC_CAPABILITY_SIMPLE_MEMO_WITH_SUMMARY checking
+# *********************************************************
+
+set(CMAKE_REQUIRED_FLAGS ${LIBECAL_CFLAGS})
+set(CMAKE_REQUIRED_INCLUDES ${LIBECAL_INCLUDE_DIRS})
+set(CMAKE_REQUIRED_LIBRARIES ${LIBECAL_LIBS})
+CHECK_C_SOURCE_COMPILES ("#include <libecal/libecal.h>
+                         int main(void) { const char *str = 
E_CAL_STATIC_CAPABILITY_SIMPLE_MEMO_WITH_SUMMARY; return 0; }" HAVE_SIMPLE_MEMO_WITH_SUMMARY_CAPABILITY)
+unset(CMAKE_REQUIRED_FLAGS)
+unset(CMAKE_REQUIRED_INCLUDES)
+unset(CMAKE_REQUIRED_LIBRARIES)
+
 # ******************************
 # Special directories
 # ******************************
diff --git a/config.h.in b/config.h.in
index 310ba1d..8a1802a 100644
--- a/config.h.in
+++ b/config.h.in
@@ -14,3 +14,6 @@
 
 /* Define to 1 when EBookMetaBackendClass::backend_module_directory exists. */
 #cmakedefine HAVE_BACKEND_MODULE_DIRECTORY 1
+
+/* Define to 1 when libecal has E_CAL_STATIC_CAPABILITY_SIMPLE_MEMO_WITH_SUMMARY. */
+#cmakedefine HAVE_SIMPLE_MEMO_WITH_SUMMARY_CAPABILITY 1
diff --git a/src/calendar/e-cal-backend-etesync.c b/src/calendar/e-cal-backend-etesync.c
index 7e6271c..d012fd2 100644
--- a/src/calendar/e-cal-backend-etesync.c
+++ b/src/calendar/e-cal-backend-etesync.c
@@ -732,7 +732,11 @@ ecb_etesync_get_backend_property (ECalBackend *cal_backend,
                        E_CAL_STATIC_CAPABILITY_TASK_CAN_RECUR,
                        E_CAL_STATIC_CAPABILITY_COMPONENT_COLOR,
                        E_CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS,
-                       E_CAL_STATIC_CAPABILITY_SIMPLE_MEMO,
+                       #ifdef HAVE_SIMPLE_MEMO_WITH_SUMMARY_CAPABILITY
+                               E_CAL_STATIC_CAPABILITY_SIMPLE_MEMO_WITH_SUMMARY,
+                       #else
+                               E_CAL_STATIC_CAPABILITY_SIMPLE_MEMO,
+                       #endif
                        e_cal_meta_backend_get_capabilities (E_CAL_META_BACKEND (cbetesync)),
                        NULL);
        }  else if (g_str_equal (prop_name, E_CAL_BACKEND_PROPERTY_ALARM_EMAIL_ADDRESS)) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]