[evolution-mapi] Bug #607438 - 'Mark as complete' in task doesn't stick in view
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-mapi] Bug #607438 - 'Mark as complete' in task doesn't stick in view
- Date: Wed, 9 Jun 2010 09:37:56 +0000 (UTC)
commit f9dac5797fbcd1b0bf799af39209bd9639fac2de
Author: Milan Crha <mcrha redhat com>
Date: Wed Jun 9 11:37:25 2010 +0200
Bug #607438 - 'Mark as complete' in task doesn't stick in view
src/calendar/e-cal-backend-mapi.c | 7 +++++--
src/libexchangemapi/exchange-mapi-cal-utils.c | 11 ++++++-----
src/libexchangemapi/exchange-mapi-utils.c | 4 ++--
3 files changed, 13 insertions(+), 9 deletions(-)
---
diff --git a/src/calendar/e-cal-backend-mapi.c b/src/calendar/e-cal-backend-mapi.c
index 4596662..7ac4aaf 100644
--- a/src/calendar/e-cal-backend-mapi.c
+++ b/src/calendar/e-cal-backend-mapi.c
@@ -442,8 +442,8 @@ mapi_cal_get_changes_cb (FetchItemsCallbackData *item_data, gpointer data)
e_cal_component_commit_sequence (comp);
comp_str = e_cal_component_get_as_string (comp);
- e_cal_backend_notify_object_created (E_CAL_BACKEND (cbmapi), (const gchar *) comp_str);
e_cal_backend_cache_put_component (priv->cache, comp);
+ e_cal_backend_notify_object_created (E_CAL_BACKEND (cbmapi), (const gchar *) comp_str);
g_free (comp_str);
}
@@ -472,8 +472,8 @@ mapi_cal_get_changes_cb (FetchItemsCallbackData *item_data, gpointer data)
e_cal_component_commit_sequence (comp);
modif_comp_str = e_cal_component_get_as_string (comp);
- e_cal_backend_notify_object_modified (E_CAL_BACKEND (cbmapi), cache_comp_str, modif_comp_str);
e_cal_backend_cache_put_component (priv->cache, comp);
+ e_cal_backend_notify_object_modified (E_CAL_BACKEND (cbmapi), cache_comp_str, modif_comp_str);
g_object_unref (comp);
g_free (cache_comp_str);
@@ -1845,6 +1845,9 @@ e_cal_backend_mapi_modify_object (ECalBackendSync *backend, EDataCal *cal, const
*old_object = e_cal_component_get_as_string (cache_comp);
*new_object = e_cal_component_get_as_string (comp);
+ e_cal_backend_cache_put_component (priv->cache, comp);
+ e_cal_backend_notify_object_modified (E_CAL_BACKEND (cbmapi), *old_object, *new_object);
+
g_object_unref (comp);
g_object_unref (cache_comp);
exchange_mapi_util_free_recipient_list (&recipients);
diff --git a/src/libexchangemapi/exchange-mapi-cal-utils.c b/src/libexchangemapi/exchange-mapi-cal-utils.c
index c0a948e..33fe867 100644
--- a/src/libexchangemapi/exchange-mapi-cal-utils.c
+++ b/src/libexchangemapi/exchange-mapi-cal-utils.c
@@ -877,7 +877,8 @@ exchange_mapi_cal_util_mapi_props_to_comp (ExchangeMapiConnection *conn, icalcom
e_cal_component_remove_all_alarms (comp);
} else if (icalcomponent_isa (ical_comp) == ICAL_VTODO_COMPONENT) {
- const double *complete = 0;
+ const double *complete = NULL;
+ const uint64_t *status = NULL;
/* NOTE: Exchange tasks are DATE values, not DATE-TIME values, but maybe someday, we could expect Exchange to support it;) */
if (get_mapi_SPropValue_array_date_timeval (&t, properties, PROP_TAG(PT_SYSTIME, 0x8104)) == MAPI_E_SUCCESS)
@@ -885,10 +886,10 @@ exchange_mapi_cal_util_mapi_props_to_comp (ExchangeMapiConnection *conn, icalcom
if (get_mapi_SPropValue_array_date_timeval (&t, properties, PROP_TAG(PT_SYSTIME, 0x8105)) == MAPI_E_SUCCESS)
icalcomponent_set_due (ical_comp, icaltime_from_timet_with_zone (t.tv_sec, 1, default_zone));
- ui32 = (const uint32_t *)find_mapi_SPropValue_data(properties, PROP_TAG(PT_LONG, 0x8101));
- if (ui32) {
- icalcomponent_set_status (ical_comp, get_taskstatus_from_prop(*ui32));
- if (*ui32 == olTaskComplete
+ status = (const uint64_t *)find_mapi_SPropValue_data(properties, PROP_TAG(PT_LONG, 0x8101));
+ if (status) {
+ icalcomponent_set_status (ical_comp, get_taskstatus_from_prop(*status));
+ if (*status == olTaskComplete
&& get_mapi_SPropValue_array_date_timeval (&t, properties, PROP_TAG(PT_SYSTIME, 0x810F)) == MAPI_E_SUCCESS) {
prop = icalproperty_new_completed (icaltime_from_timet_with_zone (t.tv_sec, 1, default_zone));
icalcomponent_add_property (ical_comp, prop);
diff --git a/src/libexchangemapi/exchange-mapi-utils.c b/src/libexchangemapi/exchange-mapi-utils.c
index cb395bd..53eda69 100644
--- a/src/libexchangemapi/exchange-mapi-utils.c
+++ b/src/libexchangemapi/exchange-mapi-utils.c
@@ -1011,14 +1011,14 @@ exchange_mapi_utils_add_spropvalue (TALLOC_CTX *mem_ctx, struct SPropValue **val
g_return_val_if_fail (n_values != NULL, FALSE);
if ((prop_tag & 0xFFFF) == PT_DOUBLE) {
- uint32_t zero = 0;
+ uint64_t zero = 0;
/* add an empty fake value and rewrite it */
*values_array = add_SPropValue (mem_ctx, *values_array, n_values, PROP_TAG(PT_LONG, 0x0001), &zero);
((*values_array)[(*n_values) - 1]).ulPropTag = prop_tag;
((*values_array)[(*n_values) - 1]).dwAlignPad = 0;
- ((*values_array)[(*n_values) - 1]).value.dbl = *((gdouble *) prop_value);
+ memcpy (&((*values_array)[(*n_values) - 1]).value.dbl, prop_value, 8);
} else {
*values_array = add_SPropValue (mem_ctx, *values_array, n_values, prop_tag, prop_value);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]