116 { |
116 { |
117 FUNC_LOG; |
117 FUNC_LOG; |
118 iFieldIcon = CMRImage::NewL( |
118 iFieldIcon = CMRImage::NewL( |
119 NMRBitmapManager::EMRBitmapOccasion, |
119 NMRBitmapManager::EMRBitmapOccasion, |
120 this ); |
120 this ); |
121 |
121 iPriorityIcon = CMRImage::NewL( |
|
122 NMRBitmapManager::EMRBitmapLockField, |
|
123 this ); |
122 iRichTextViewer = CESMRRichTextViewer::NewL( this ); |
124 iRichTextViewer = CESMRRichTextViewer::NewL( this ); |
123 CESMRField::ConstructL( iRichTextViewer ); // ownership transferred |
125 CESMRField::ConstructL( iRichTextViewer ); // ownership transferred |
124 iRichTextViewer->SetEdwinSizeObserver( this ); |
126 iRichTextViewer->SetEdwinSizeObserver( this ); |
125 iRichTextViewer->SetParent( this ); |
127 iRichTextViewer->SetParent( this ); |
126 iRichTextViewer->SetLinkObserver( this ); |
128 iRichTextViewer->SetLinkObserver( this ); |
|
129 iCurrentPriority = EFSCalenMRPriorityNormal; |
127 } |
130 } |
128 |
131 |
129 // --------------------------------------------------------------------------- |
132 // --------------------------------------------------------------------------- |
130 // CESMRViewerDetailedSubjectField::SetTitlePaneObserver |
133 // CESMRViewerDetailedSubjectField::SetTitlePaneObserver |
131 // --------------------------------------------------------------------------- |
134 // --------------------------------------------------------------------------- |
197 |
200 |
198 if( !IsLocked() ) |
201 if( !IsLocked() ) |
199 { |
202 { |
200 if( entry.PriorityL() == EFSCalenMRPriorityHigh ) |
203 if( entry.PriorityL() == EFSCalenMRPriorityHigh ) |
201 { |
204 { |
|
205 if( iPriorityIcon ) |
|
206 { |
|
207 delete iPriorityIcon; |
|
208 iPriorityIcon = NULL; |
|
209 } |
202 iPriorityIcon = CMRImage::NewL( |
210 iPriorityIcon = CMRImage::NewL( |
203 NMRBitmapManager::EMRBitmapPriorityHigh, |
211 NMRBitmapManager::EMRBitmapPriorityHigh, |
204 this, |
212 this, |
205 ETrue ); |
213 ETrue ); |
|
214 iCurrentPriority = EFSCalenMRPriorityHigh; |
206 } |
215 } |
207 if( entry.PriorityL() == EFSCalenMRPriorityLow ) |
216 if( entry.PriorityL() == EFSCalenMRPriorityLow ) |
208 { |
217 { |
|
218 if( iPriorityIcon ) |
|
219 { |
|
220 delete iPriorityIcon; |
|
221 iPriorityIcon = NULL; |
|
222 } |
209 iPriorityIcon = CMRImage::NewL( |
223 iPriorityIcon = CMRImage::NewL( |
210 NMRBitmapManager::EMRBitmapPriorityLow, |
224 NMRBitmapManager::EMRBitmapPriorityLow, |
211 this, |
225 this, |
212 ETrue ); |
226 ETrue ); |
|
227 iCurrentPriority = EFSCalenMRPriorityLow; |
213 } |
228 } |
214 } |
229 } |
215 |
230 |
216 |
231 |
217 if ( MESMRCalEntry::EESMRCalEntryMeetingRequest == entryType ) |
232 if ( MESMRCalEntry::EESMRCalEntryMeetingRequest == entryType ) |
423 return; |
438 return; |
424 } |
439 } |
425 |
440 |
426 CESMRField::LockL(); |
441 CESMRField::LockL(); |
427 |
442 |
428 delete iPriorityIcon; |
443 if( !iPriorityIcon ) |
429 iPriorityIcon = NULL; |
444 { |
430 iPriorityIcon = CMRImage::NewL( |
445 delete iPriorityIcon; |
431 NMRBitmapManager::EMRBitmapLockField, |
446 iPriorityIcon = NULL; |
432 this, |
447 iPriorityIcon = CMRImage::NewL( |
433 ETrue ); |
448 NMRBitmapManager::EMRBitmapLockField, |
|
449 this, |
|
450 ETrue ); |
|
451 } |
434 } |
452 } |
435 |
453 |
436 // --------------------------------------------------------------------------- |
454 // --------------------------------------------------------------------------- |
437 // CESMRViewerDetailedSubjectField::SetMiddleSoftkeyL |
455 // CESMRViewerDetailedSubjectField::SetMiddleSoftkeyL |
438 // --------------------------------------------------------------------------- |
456 // --------------------------------------------------------------------------- |
539 NMRLayoutManager::EMRLayoutSingleRowAColumnGraphic ) ); |
557 NMRLayoutManager::EMRLayoutSingleRowAColumnGraphic ) ); |
540 AknLayoutUtils::LayoutControl( iFieldIcon, rowRect, iconLayout ); |
558 AknLayoutUtils::LayoutControl( iFieldIcon, rowRect, iconLayout ); |
541 } |
559 } |
542 |
560 |
543 // Layouting priority icon |
561 // Layouting priority icon |
544 if( iPriorityIcon ) |
562 if( iPriorityIcon && ( IsLocked() || iCurrentPriority != EFSCalenMRPriorityNormal ) ) |
545 { |
563 { |
546 TAknWindowComponentLayout iconLayout( |
564 TAknWindowComponentLayout iconLayout( |
547 NMRLayoutManager::GetWindowComponentLayout( |
565 NMRLayoutManager::GetWindowComponentLayout( |
548 NMRLayoutManager::EMRLayoutSingleRowDColumnGraphic ) ); |
566 NMRLayoutManager::EMRLayoutSingleRowDColumnGraphic ) ); |
549 AknLayoutUtils::LayoutImage( iPriorityIcon, rowRect, iconLayout ); |
567 AknLayoutUtils::LayoutImage( iPriorityIcon, rowRect, iconLayout ); |
550 } |
568 } |
551 |
569 |
552 TAknLayoutText viewerLayoutText; |
570 TAknLayoutText viewerLayoutText; |
553 |
571 |
554 if( iPriorityIcon ) |
572 if( iPriorityIcon && ( IsLocked() || iCurrentPriority != EFSCalenMRPriorityNormal ) ) |
555 { |
573 { |
556 viewerLayoutText = NMRLayoutManager::GetLayoutText( rowRect, |
574 viewerLayoutText = NMRLayoutManager::GetLayoutText( rowRect, |
557 NMRLayoutManager::EMRTextLayoutSingleRowEditorText ); |
575 NMRLayoutManager::EMRTextLayoutSingleRowEditorText ); |
558 } |
576 } |
559 else |
577 else |