equal
deleted
inserted
replaced
24 #include <FreestyleEmailUi.rsg> |
24 #include <FreestyleEmailUi.rsg> |
25 |
25 |
26 #include "cfsmailbox.h" |
26 #include "cfsmailbox.h" |
27 #include <FreestyleEmailUi.rsg> |
27 #include <FreestyleEmailUi.rsg> |
28 |
28 |
29 #include "cpbkxremotecontactlookupserviceuicontext.h" |
|
30 |
|
31 #include "FSEmailBuildFlags.h" |
29 #include "FSEmailBuildFlags.h" |
32 #include "ncsheadercontainer.h" |
30 #include "ncsheadercontainer.h" |
33 #include "ncscomposeviewcontainer.h" |
31 #include "ncscomposeviewcontainer.h" |
34 #include "ncsemailaddressobject.h" |
32 #include "ncsemailaddressobject.h" |
35 #include "ncsutility.h" |
33 #include "ncsutility.h" |
213 { |
211 { |
214 // We're loosing focus (probably going to message body) |
212 // We're loosing focus (probably going to message body) |
215 // Commit changes and make sure no controls are focused. |
213 // Commit changes and make sure no controls are focused. |
216 TRAP_IGNORE( CommitFieldL( focused ) ); |
214 TRAP_IGNORE( CommitFieldL( focused ) ); |
217 focused->SetFocus( EFalse, aDrawNow ); |
215 focused->SetFocus( EFalse, aDrawNow ); |
|
216 iFocused = NULL; |
218 } |
217 } |
219 |
218 |
220 // Remove MSK label when header loses focus |
219 // Remove MSK label when header loses focus |
221 TRAP_IGNORE( SetMskL() ); |
220 TRAP_IGNORE( SetMskL() ); |
222 } |
221 } |
240 CCoeControl* focused = FindFocused(); |
239 CCoeControl* focused = FindFocused(); |
241 if ( focused ) |
240 if ( focused ) |
242 { |
241 { |
243 iFocused = focused; |
242 iFocused = focused; |
244 } |
243 } |
245 iFocused->SetFocus( aShow, EDrawNow ); |
244 if ( iFocused ) |
|
245 { |
|
246 iFocused->SetFocus( aShow, EDrawNow ); |
|
247 } |
246 } |
248 } |
247 |
249 |
248 // ----------------------------------------------------------------------------- |
250 // ----------------------------------------------------------------------------- |
249 // CNcsHeaderContainer::Draw() const |
251 // CNcsHeaderContainer::Draw() const |
250 // Draws the display |
252 // Draws the display |
367 if ( pOldCtrl ) |
369 if ( pOldCtrl ) |
368 { |
370 { |
369 pOldCtrl->SetFocus( EFalse, ENoDrawNow ); |
371 pOldCtrl->SetFocus( EFalse, ENoDrawNow ); |
370 } |
372 } |
371 pNewCtrl->SetFocus( ETrue, ENoDrawNow ); |
373 pNewCtrl->SetFocus( ETrue, ENoDrawNow ); |
372 |
374 iFocused = pNewCtrl; |
373 // Commit changes to previously focused field. |
375 // Commit changes to previously focused field. |
374 if ( pOldCtrl ) |
376 if ( pOldCtrl ) |
375 { |
377 { |
376 CommitFieldL( pOldCtrl ); |
378 CommitFieldL( pOldCtrl ); |
377 } |
379 } |
791 |
793 |
792 return ret; |
794 return ret; |
793 } |
795 } |
794 |
796 |
795 // --------------------------------------------------------------------------- |
797 // --------------------------------------------------------------------------- |
|
798 // CNcsHeaderContainer::GetToLineHeight |
|
799 // --------------------------------------------------------------------------- |
|
800 // |
|
801 TInt CNcsHeaderContainer::GetToLineHeight() const |
|
802 { |
|
803 FUNC_LOG; |
|
804 TInt lineHeight = 0; |
|
805 |
|
806 if(iToField) |
|
807 { |
|
808 TRect lineRect; |
|
809 TRAPD(err, iToField->GetLineRectL(lineRect) ); |
|
810 if(err == KErrNone) |
|
811 { |
|
812 lineHeight = lineRect.iBr.iY - lineRect.iTl.iY; |
|
813 } |
|
814 } |
|
815 return lineHeight; |
|
816 } |
|
817 |
|
818 // --------------------------------------------------------------------------- |
796 // CNcsHeaderContainer::GetTotalHeight |
819 // CNcsHeaderContainer::GetTotalHeight |
797 // --------------------------------------------------------------------------- |
820 // --------------------------------------------------------------------------- |
798 // |
821 // |
799 TInt CNcsHeaderContainer::GetTotalHeight() const |
822 TInt CNcsHeaderContainer::GetTotalHeight() const |
800 { |
823 { |
818 void CNcsHeaderContainer::SetAttachmentLabelTextsLD( |
841 void CNcsHeaderContainer::SetAttachmentLabelTextsLD( |
819 CDesCArray* aAttachmentNames, CDesCArray* aAttachmentSizes ) |
842 CDesCArray* aAttachmentNames, CDesCArray* aAttachmentSizes ) |
820 { |
843 { |
821 FUNC_LOG; |
844 FUNC_LOG; |
822 iAttachmentField->SetTextsLD( aAttachmentNames, aAttachmentSizes ); |
845 iAttachmentField->SetTextsLD( aAttachmentNames, aAttachmentSizes ); |
823 ShowAttachmentLabelL(); |
846 if( aAttachmentNames ) |
824 DrawAttachmentFocusNow(); |
847 { |
|
848 ShowAttachmentLabelL(); |
|
849 DrawAttachmentFocusNow(); |
|
850 } |
825 } |
851 } |
826 |
852 |
827 // ----------------------------------------------------------------------------- |
853 // ----------------------------------------------------------------------------- |
828 // CNcsHeaderContainer::FocusedAttachmentLabelIndex |
854 // CNcsHeaderContainer::FocusedAttachmentLabelIndex |
829 // |
855 // |
1738 { |
1764 { |
1739 CNcsAddressInputField* aifFocused = NULL; |
1765 CNcsAddressInputField* aifFocused = NULL; |
1740 aifFocused = static_cast<CNcsAddressInputField*>( focused ); |
1766 aifFocused = static_cast<CNcsAddressInputField*>( focused ); |
1741 aifFocused->AddAddressL( aEml ); |
1767 aifFocused->AddAddressL( aEml ); |
1742 } |
1768 } |
|
1769 DoScrollL(); |
1743 } |
1770 } |
1744 |
1771 |
1745 // --------------------------------------------------------------------------- |
1772 // --------------------------------------------------------------------------- |
1746 // CNcsHeaderContainer::IncludeAddressL |
1773 // CNcsHeaderContainer::IncludeAddressL |
1747 // --------------------------------------------------------------------------- |
1774 // --------------------------------------------------------------------------- |