equal
deleted
inserted
replaced
83 void CCalenReminderField::ConstructL() |
83 void CCalenReminderField::ConstructL() |
84 { |
84 { |
85 TRACE_ENTRY_POINT; |
85 TRACE_ENTRY_POINT; |
86 |
86 |
87 iIsAlarmOnOff = CCalenReminderField::EAlarmNoAlarm; |
87 iIsAlarmOnOff = CCalenReminderField::EAlarmNoAlarm; |
|
88 isAllDayInitialOffsetSet = EFalse; |
88 |
89 |
89 TRACE_EXIT_POINT; |
90 TRACE_EXIT_POINT; |
90 } |
91 } |
91 |
92 |
92 // ----------------------------------------------------------------------------- |
93 // ----------------------------------------------------------------------------- |
231 // |
232 // |
232 void CCalenReminderField::UpdateAlarmTimeWhenStartChangedL() |
233 void CCalenReminderField::UpdateAlarmTimeWhenStartChangedL() |
233 { |
234 { |
234 TRACE_ENTRY_POINT; |
235 TRACE_ENTRY_POINT; |
235 |
236 |
236 // Updating operation is executed only if alarm date/time field exists. |
237 // Updating operation is executed only if alarm date/time field exists. |
237 if( iUnifiedEditor.Edited().IsAlarmActivated() ) |
238 if( iUnifiedEditor.Edited().IsAlarmActivated() ) |
238 { |
239 { |
239 TTime start = iUnifiedEditor.Edited().EventDateTime(); |
240 TTime start = iUnifiedEditor.Edited().EventDateTime(); |
240 TTime alarm = start + iAlarmOffset; |
241 TTime alarm; |
|
242 //For a new allday event when the start time is changed for the first time |
|
243 //alarm time must be updated correctly |
|
244 if(iUnifiedEditor.Edited().IsAllDayEvent() && !isAllDayInitialOffsetSet |
|
245 && iUnifiedEditor.EditorDataHandler().IsCreatingNew()) |
|
246 { |
|
247 alarm = CalenDateUtils::DefaultTime(start)+iAlarmOffset; |
|
248 isAllDayInitialOffsetSet = ETrue; |
|
249 } |
|
250 else |
|
251 { |
|
252 alarm = start + iAlarmOffset; |
|
253 } |
241 alarm = CalenDateUtils::LimitToValidTime( alarm ); |
254 alarm = CalenDateUtils::LimitToValidTime( alarm ); |
242 iUnifiedEditor.Edited().SetAlarmDateTimeL( alarm ); |
255 iUnifiedEditor.Edited().SetAlarmDateTimeL( alarm ); |
243 SetDataToEditorL(); |
256 SetDataToEditorL(); |
244 } |
257 } |
245 |
258 |