619 } |
619 } |
620 |
620 |
621 if (aResourceId == R_FSEMAILUI_SEARCHLIST_SUBMENU_ACTIONS) |
621 if (aResourceId == R_FSEMAILUI_SEARCHLIST_SUBMENU_ACTIONS) |
622 { |
622 { |
623 CFSEmailUiMailListModelItem* item = dynamic_cast<CFSEmailUiMailListModelItem*>(iModel->Item(HighlightedIndex())); |
623 CFSEmailUiMailListModelItem* item = dynamic_cast<CFSEmailUiMailListModelItem*>(iModel->Item(HighlightedIndex())); |
624 CFSMailMessage* messagePtr = &item->MessagePtr(); |
624 if(item) // Coverity error fix Item could have been NULL |
625 TInt menuIndex( 0 ); |
|
626 |
|
627 //Get # of recipients |
|
628 TInt numRecipients(0); |
|
629 if ( messagePtr ) |
|
630 { |
625 { |
631 numRecipients =TFsEmailUiUtility::CountRecepients( messagePtr ); |
626 CFSMailMessage* messagePtr = &item->MessagePtr(); |
632 if ( numRecipients == 1 ) |
627 TInt menuIndex( 0 ); |
|
628 |
|
629 //Get # of recipients |
|
630 TInt numRecipients(0); |
|
631 if ( messagePtr ) |
633 { |
632 { |
634 //check if the malbox ownmailaddress is same as the recipients email address. If not, then assume that the |
633 numRecipients =TFsEmailUiUtility::CountRecepients( messagePtr ); |
635 //email is a distribution list and we need to inc num of Recipients so that "Reply ALL" option appears in UI. |
634 if ( numRecipients == 1 ) |
636 if ( messagePtr->GetToRecipients().Count() ) |
|
637 { |
635 { |
638 if ( iAppUi.GetActiveMailbox()->OwnMailAddress().GetEmailAddress().Compare(messagePtr->GetToRecipients()[0]->GetEmailAddress()) ) |
636 //check if the malbox ownmailaddress is same as the recipients email address. If not, then assume that the |
|
637 //email is a distribution list and we need to inc num of Recipients so that "Reply ALL" option appears in UI. |
|
638 if ( messagePtr->GetToRecipients().Count() ) |
639 { |
639 { |
640 numRecipients++; |
640 if ( iAppUi.GetActiveMailbox()->OwnMailAddress().GetEmailAddress().Compare(messagePtr->GetToRecipients()[0]->GetEmailAddress()) ) |
641 } |
|
642 } |
|
643 if ( messagePtr->GetCCRecipients().Count() ) |
|
644 { |
|
645 if ( iAppUi.GetActiveMailbox()->OwnMailAddress().GetEmailAddress().Compare(messagePtr->GetCCRecipients()[0]->GetEmailAddress()) ) |
|
646 { |
641 { |
647 numRecipients++; |
642 numRecipients++; |
648 } |
643 } |
649 } |
644 } |
650 if ( messagePtr->GetBCCRecipients().Count() ) |
645 if ( messagePtr->GetCCRecipients().Count() ) |
651 { |
|
652 if ( iAppUi.GetActiveMailbox()->OwnMailAddress().GetEmailAddress().Compare(messagePtr->GetBCCRecipients()[0]->GetEmailAddress()) ) |
|
653 { |
646 { |
654 numRecipients++; |
647 if ( iAppUi.GetActiveMailbox()->OwnMailAddress().GetEmailAddress().Compare(messagePtr->GetCCRecipients()[0]->GetEmailAddress()) ) |
|
648 { |
|
649 numRecipients++; |
|
650 } |
655 } |
651 } |
656 } |
652 if ( messagePtr->GetBCCRecipients().Count() ) |
|
653 { |
|
654 if ( iAppUi.GetActiveMailbox()->OwnMailAddress().GetEmailAddress().Compare(messagePtr->GetBCCRecipients()[0]->GetEmailAddress()) ) |
|
655 { |
|
656 numRecipients++; |
|
657 } |
|
658 } |
|
659 } |
|
660 |
657 } |
661 } |
658 |
662 |
659 } |
663 if ( numRecipients > 1 ) |
660 if ( numRecipients > 1 ) |
664 { |
661 { |
665 aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsReplyAll, EFalse ); |
662 aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsReplyAll, EFalse ); |
666 } |
663 } |
667 else if ( aMenuPane->MenuItemExists( EFsEmailUiCmdActionsReplyAll, menuIndex ) ) |
664 else if ( aMenuPane->MenuItemExists( EFsEmailUiCmdActionsReplyAll, menuIndex ) ) |
668 { |
665 { |
669 aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsReplyAll, ETrue ); |
666 aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsReplyAll, ETrue ); |
670 } |
667 } |
671 } |
668 } |
672 } |
669 |
673 |
670 if ( !iSearchOngoing && aResourceId == R_FSEMAILUI_SEARCHLIST_MENUPANE ) |
674 if ( !iSearchOngoing && aResourceId == R_FSEMAILUI_SEARCHLIST_MENUPANE ) |
671 { |
675 { |
813 { |
817 { |
814 TInt res = R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT; |
818 TInt res = R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT; |
815 if( Layout_Meta_Data::IsLandscapeOrientation() ) |
819 if( Layout_Meta_Data::IsLandscapeOrientation() ) |
816 { |
820 { |
817 // landscape must use different layout |
821 // landscape must use different layout |
818 res = R_AVKON_STATUS_PANE_LAYOUT_IDLE_FLAT; |
822 res = R_AVKON_STATUS_PANE_LAYOUT_USUAL_EXT; |
819 } |
823 } |
820 |
824 |
821 if ( StatusPane()->CurrentLayoutResId() != res ) |
825 if ( StatusPane()->CurrentLayoutResId() != res ) |
822 { |
826 { |
823 TRAP_IGNORE( |
827 TRAP_IGNORE( |
1895 if ( iFirstStartCompleted ) // Safety |
1899 if ( iFirstStartCompleted ) // Safety |
1896 { |
1900 { |
1897 CFSMailBox* activeMailbox = iAppUi.GetActiveMailbox(); |
1901 CFSMailBox* activeMailbox = iAppUi.GetActiveMailbox(); |
1898 if ( activeMailbox && aMailbox.Id() == activeMailbox->GetId().Id() ) // Safety, in list events that only concern active mailbox are handled |
1902 if ( activeMailbox && aMailbox.Id() == activeMailbox->GetId().Id() ) // Safety, in list events that only concern active mailbox are handled |
1899 { |
1903 { |
1900 if ( iModel && iModel->Count() && aEvent == TFSEventMailDeleted ) |
1904 if ( iModel && iModel->Count() && (aEvent == TFSEventMailDeleted || aEvent == TFSEventMailDeletedFromViewer) ) |
1901 { |
1905 { |
1902 RArray<TFSMailMsgId>* removedEntries = static_cast<RArray<TFSMailMsgId>*>(aParam1); |
1906 RArray<TFSMailMsgId>* removedEntries = static_cast<RArray<TFSMailMsgId>*>(aParam1); |
1903 if ( removedEntries && removedEntries->Count() ) |
1907 if ( removedEntries && removedEntries->Count() ) |
1904 { |
1908 { |
1905 RemoveMsgItemsFromListIfFoundL( *removedEntries ); |
1909 RemoveMsgItemsFromListIfFoundL( *removedEntries ); |