[evolution] I#183 - Set of DATE/DATE-TIME doesn't reset VALUE parameter



commit fd2e9f0b01cc21c3158128a731781445690c4c7d
Author: Milan Crha <mcrha redhat com>
Date:   Wed Oct 17 12:11:02 2018 +0200

    I#183 - Set of DATE/DATE-TIME doesn't reset VALUE parameter
    
    Closes https://gitlab.gnome.org/GNOME/evolution/issues/183

 src/calendar/gui/e-comp-editor-event.c         | 6 ++++++
 src/calendar/gui/e-comp-editor-property-part.c | 3 +++
 2 files changed, 9 insertions(+)
---
diff --git a/src/calendar/gui/e-comp-editor-event.c b/src/calendar/gui/e-comp-editor-event.c
index e3a87b2745..fa9a69ad7c 100644
--- a/src/calendar/gui/e-comp-editor-event.c
+++ b/src/calendar/gui/e-comp-editor-event.c
@@ -512,11 +512,17 @@ ece_event_fill_component (ECompEditor *comp_editor,
                }
 
                if (set_dtstart) {
+                       /* Remove the VALUE parameter, to correspond to the actual value being set */
+                       icalproperty_remove_parameter_by_kind (dtstart_prop, ICAL_VALUE_PARAMETER);
+
                        icalproperty_set_dtstart (dtstart_prop, dtstart);
                        cal_comp_util_update_tzid_parameter (dtstart_prop, dtstart);
                }
 
                if (set_dtend) {
+                       /* Remove the VALUE parameter, to correspond to the actual value being set */
+                       icalproperty_remove_parameter_by_kind (dtend_prop, ICAL_VALUE_PARAMETER);
+
                        icalproperty_set_dtend (dtend_prop, dtend);
                        cal_comp_util_update_tzid_parameter (dtend_prop, dtend);
                }
diff --git a/src/calendar/gui/e-comp-editor-property-part.c b/src/calendar/gui/e-comp-editor-property-part.c
index 5407ff846d..094b978c49 100644
--- a/src/calendar/gui/e-comp-editor-property-part.c
+++ b/src/calendar/gui/e-comp-editor-property-part.c
@@ -692,6 +692,9 @@ ecepp_datetime_fill_component (ECompEditorPropertyPart *property_part,
                value = e_comp_editor_property_part_datetime_get_value (part_datetime);
 
                if (prop) {
+                       /* Remove the VALUE parameter, to correspond to the actual value being set */
+                       icalproperty_remove_parameter_by_kind (prop, ICAL_VALUE_PARAMETER);
+
                        klass->ical_set_func (prop, value);
                        cal_comp_util_update_tzid_parameter (prop, value);
                } else {


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