emailuis/emailui/src/FreestyleEmailDownloadInformationMediator.cpp
branchRCL_3
changeset 11 0396474f30f5
parent 10 f5907b1a1053
child 13 8592a65ad3fb
--- a/emailuis/emailui/src/FreestyleEmailDownloadInformationMediator.cpp	Fri Mar 12 15:41:14 2010 +0200
+++ b/emailuis/emailui/src/FreestyleEmailDownloadInformationMediator.cpp	Mon Mar 15 12:39:10 2010 +0200
@@ -241,13 +241,13 @@
                  countObject.iDownloadsCompletedCount == countObject.iDownloadsStartedCount &&
                  countObject.iSaveRequestedCount > 0 )
                  {
+                 TFsEmailUiUtility::SetDownloadSave( ETrue );
                  TFsEmailUiUtility::ShowFilesSavedToFolderNoteL( countObject.iSaveRequestedCount );
                  }        
             // Show "Download completed" if necessary
             else if ( CompletionNotesInUseL() && completedDownloadsToNotify )
                 {
-                LaunchDownloadCompleteNoteL( download.iPartData,
-                    completedDownloadsToNotify );
+                OpenAttachmentL( download.iPartData, completedDownloadsToNotify );            
                 }
             else if ( download.iNotifyComplete &&
                       countObject.iSaveRequestedCount == 0 )
@@ -450,6 +450,7 @@
 	FUNC_LOG;
 	// now there is at least one download started 
 	iDownloadsStarted = ETrue;
+	TFsEmailUiUtility::SetSaveSelect( ETrue );  
 	// fetch message part
 	CFSMailMessage* mailMessage = iMailClient.GetMessageByUidL( aPart.iMailBoxId, aPart.iFolderId, aPart.iMessageId, EFSMsgDataEnvelope );
 	CleanupStack::PushL( mailMessage );
@@ -628,6 +629,19 @@
 	return cenRepHandler->DownloadNotifications();
 	}
 
+void CFSEmailDownloadInfoMediator::OpenAttachmentL( const TPartData& aPart, 
+        const TInt aCompletedCount )
+    {
+    iPopupLaunchData = aPart;
+    if (aCompletedCount > 1)
+        {
+        iPopupLaunchData.iMessagePartId.SetNullId();    
+        }
+    TRequestStatus* status = &iStatus;
+    User::RequestComplete(status, KErrNone);
+    SetActive();
+    }
+
 void CFSEmailDownloadInfoMediator::LaunchDownloadCompleteNoteL(
         const TPartData& aPart, TInt aCompletedCount )
     {