Revision: 201039 RCL_3 PDK_3.0.4
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 13 Oct 2010 14:27:34 +0300
branchRCL_3
changeset 77 da6ac9d688df
parent 71 17302fa075e1
child 82 e841c3c9d96d
Revision: 201039 Kit: 201041
email/imap4mtm/imapmailstore/inc/cfetchbodyinfo.h
email/imap4mtm/imapmailstore/src/cfetchbodyinfo.cpp
email/imap4mtm/imapprotocolcontroller/bwins/impapprotocolcontrollerU.DEF
email/imap4mtm/imapprotocolcontroller/eabi/impapprotocolcontrollerU.DEF
email/imap4mtm/imapprotocolcontroller/inc/cimapopfetchbody.h
email/imap4mtm/imapprotocolcontroller/inc/cimapprotocolcontroller.h
email/imap4mtm/imapprotocolcontroller/inc/cimapupdateflagoperation.h
email/imap4mtm/imapprotocolcontroller/src/cimapopfetchbody.cpp
email/imap4mtm/imapprotocolcontroller/src/cimapprotocolcontroller.cpp
email/imap4mtm/imapprotocolcontroller/src/cimapupdateflagoperation.cpp
email/imap4mtm/imapservermtm/inc/cimap4servermtm.h
email/imap4mtm/imapservermtm/src/cimap4servermtm.cpp
email/imap4mtm/imapsession/src/cimapfetchbody.cpp
email/imap4mtm/imapsettings/src/cimapsettings.cpp
email/imum/help/data/xhtml.zip
email/pop3andsmtpmtm/clientmtms/src/cemailaccounts.cpp
email/pop3andsmtpmtm/popservermtm/src/POPSMTM.CPP
messagingappbase/mce/group/mce.rss
messagingappbase/mce/help/data/xhtml.zip
messagingappbase/mce/inc/MceMainViewListView.h
messagingappbase/mce/inc/MceMessageListContainer.h
messagingappbase/mce/inc/MceMessageListContainerBase.h
messagingappbase/mce/inc/MceMessageListView.h
messagingappbase/mce/inc/MceOneRowMessageListContainer.h
messagingappbase/mce/inc/mceui.h
messagingappbase/mce/src/MceMainViewListItemArray.cpp
messagingappbase/mce/src/MceMainViewListView.cpp
messagingappbase/mce/src/MceMessageListContainer.cpp
messagingappbase/mce/src/MceMessageListContainerBase.cpp
messagingappbase/mce/src/MceMessageListItemArray.cpp
messagingappbase/mce/src/MceMessageListView.cpp
messagingappbase/mce/src/MceMessageListboxItemDrawer.cpp
messagingappbase/mce/src/MceOneRowMessageListArrayLoader.cpp
messagingappbase/mce/src/MceOneRowMessageListContainer.cpp
messagingappbase/mce/src/mceui.cpp
messagingappbase/mcesettings/inc/MceSettingsDialog.h
messagingappbase/mcesettings/src/MceSettingsGeneralSettingsDialog.cpp
messagingappbase/msgavkon/conf/messaging.confml
messagingappbase/msgavkon/conf/messaging_102824A0.crml
messagingappbase/msgavkon/msgindicatorplugin/inc/MsgWaitingObserver.h
messagingappbase/msgavkon/msgindicatorplugin/src/MsgWaitingObserver.cpp
messagingappbase/msgavkon/muiu_internal/flagger/inc/MuiuFlagger.h
messagingappbase/msgavkon/muiu_internal/inc/MessagingInternalCRKeys.h
messagingappbase/msgavkon/muiu_internal/servicesinternal/inc/MuiuContactService.h
messagingappbase/msgavkon/muiu_internal/servicesinternal/inc/MuiuLock.h
messagingappbase/msgavkon/muiu_internal/settingsarray/src/MuiuSettingsArray.cpp
messagingappbase/msgeditor/mediacontrolsrc/MsgImageControl.cpp
messagingappbase/msgeditor/viewsrc/MsgAttachmentControl.cpp
messagingappbase/msgeditor/viewsrc/MsgEditorView.cpp
messagingappbase/msgerrorwatcher/inc/MsgSentItemsObserver.h
messagingappbase/msgerrorwatcher/src/MsgSentItemsObserver.cpp
messagingappbase/ncnlist/inc/CVoiceMailManager.h
messagingappbase/ncnlist/src/CVoiceMailManager.cpp
messagingappbase/smilparser/Rom/Gmxml.iby
mobilemessaging/audiomsg/src/audiomessageappui.cpp
mobilemessaging/mmsui/viewer/MmsViewer.mmp
mobilemessaging/mmsui/viewersrc/UniMmsViewerAppUi.cpp
mobilemessaging/postcard/postcardinc/PostcardController.h
mobilemessaging/postcard/postcardsrc/PostcardController.cpp
mobilemessaging/smilui/player/SmilPlayer.mmp
mobilemessaging/smilui/playerinc/SmilPlayerIndicatorController.h
mobilemessaging/smilui/playersrc/SmilPlayerIndicatorController.cpp
mobilemessaging/smsui/viewersrc/MsgSmsViewerAppUi.cpp
mobilemessaging/smum/group/SMUM.RSS
mobilemessaging/smum/inc/SmumSettingsDialogGSM.h
mobilemessaging/smum/loc/smum.loc
mobilemessaging/smum/src/SmumSettingsDialogGSM.cpp
mobilemessaging/unieditor/application/bld/UniEditor.mmp
mobilemessaging/unieditor/application/inc/UniEditorAppUi.h
mobilemessaging/unieditor/application/inc/UniEditorLaunchOperation.h
mobilemessaging/unieditor/application/inc/UniEditorLaunchOperation.inl
mobilemessaging/unieditor/application/inc/UniEditorProcessImageOperation.h
mobilemessaging/unieditor/application/src/UniEditorAppUi.cpp
mobilemessaging/unieditor/application/src/UniEditorLaunchOperation.cpp
mobilemessaging/unieditor/application/src/UniEditorProcessImageOperation.cpp
mobilemessaging/unieditor/application/src/UniEditorSaveOperation.cpp
mobilemessaging/unieditor/application/src/UniEditorSendUiOperation.cpp
mobilemessaging/unieditor/help/data/xhtml.zip
mobilemessaging/unieditor/inc/UniMsvEntry.h
msg_plat/messaging_center_ui_utilities_api/inc/MessagingDomainCRKeys.h
msg_plat/messaging_center_ui_utilities_api/inc/muiumsginfo.h
msg_plat/messaging_editor_api/inc/MsgEditorView.h
msg_pub/plugin_bio_control_api/inc/MMsgBioControl.h
--- a/email/imap4mtm/imapmailstore/inc/cfetchbodyinfo.h	Wed Sep 15 12:08:45 2010 +0300
+++ b/email/imap4mtm/imapmailstore/inc/cfetchbodyinfo.h	Wed Oct 13 14:27:34 2010 +0300
@@ -54,6 +54,7 @@
 	IMPORT_C CImCaf* Caf() const;
 	IMPORT_C TInt32 BytesFetched();
 	IMPORT_C void IncrementBytesFetched(TInt32 aByteCount);
+	TBool iEmbed;
 private:
 	CFetchBodyInfo(TMsvId aPartId);
 	void ConstructL();
--- a/email/imap4mtm/imapmailstore/src/cfetchbodyinfo.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/email/imap4mtm/imapmailstore/src/cfetchbodyinfo.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -34,6 +34,7 @@
 CFetchBodyInfo::CFetchBodyInfo(TMsvId aPartId)
  : iPartId(aPartId)
 	{
+		iEmbed = EFalse;
 	}	
 
 CFetchBodyInfo::~CFetchBodyInfo()
--- a/email/imap4mtm/imapprotocolcontroller/bwins/impapprotocolcontrollerU.DEF	Wed Sep 15 12:08:45 2010 +0300
+++ b/email/imap4mtm/imapprotocolcontroller/bwins/impapprotocolcontrollerU.DEF	Wed Oct 13 14:27:34 2010 +0300
@@ -32,5 +32,4 @@
 	?WaitForBackground@CImapProtocolController@@QAEXAAVTRequestStatus@@@Z @ 31 NONAME ; void CImapProtocolController::WaitForBackground(class TRequestStatus &)
 	?GetAccessPointIdForConnection@CImapProtocolController@@QBEHAAK@Z @ 32 NONAME ; int CImapProtocolController::GetAccessPointIdForConnection(unsigned long &) const
 	?UpdateFlagL@CImapProtocolController@@QAEXAAVTRequestStatus@@@Z @ 33 NONAME ; void CImapProtocolController::UpdateFlagL(class TRequestStatus &)
-	?UpdateEntriesFlagL@CImapProtocolController@@QAEXAAVTRequestStatus@@ABVCMsvEntrySelection@@H@Z @ 34 NONAME ; void CImapProtocolController::UpdateEntriesFlagL(class TRequestStatus &, class CMsvEntrySelection const &, int)
 
--- a/email/imap4mtm/imapprotocolcontroller/eabi/impapprotocolcontrollerU.DEF	Wed Sep 15 12:08:45 2010 +0300
+++ b/email/imap4mtm/imapprotocolcontroller/eabi/impapprotocolcontrollerU.DEF	Wed Oct 13 14:27:34 2010 +0300
@@ -77,5 +77,4 @@
 	_ZTVN4Meta13TMetaVarLen16I6RBuf16EE @ 76 NONAME ABSENT
 	_ZNK23CImapProtocolController29GetAccessPointIdForConnectionERm @ 77 NONAME
 	_ZN23CImapProtocolController11UpdateFlagLER14TRequestStatus @ 78 NONAME
-	_ZN23CImapProtocolController18UpdateEntriesFlagLER14TRequestStatusRK18CMsvEntrySelectioni @ 79 NONAME
 
--- a/email/imap4mtm/imapprotocolcontroller/inc/cimapopfetchbody.h	Wed Sep 15 12:08:45 2010 +0300
+++ b/email/imap4mtm/imapprotocolcontroller/inc/cimapopfetchbody.h	Wed Oct 13 14:27:34 2010 +0300
@@ -111,7 +111,7 @@
 	// Header and bodystructure parsing
 	TBool ProcessBodyStructureL();
 	void PopulateImHeaderL(CImapRfc822HeaderFields& aHeaderFields, TMsvEmailEntry& aEntry, CImHeader& imHeader);
-	void BuildTreeL(TMsvId aParent, CImapBodyStructure* aBodyStructure, const TDesC8& aPath, const TMsvId aThisMessage, TInt& aAttachments, TBool& aIsMHTML, TInt& aRelatedAttachments);
+	void BuildTreeL(TMsvId aParent, CImapBodyStructure* aBodyStructure, const TDesC8& aPath, const TMsvId aThisMessage, TInt& aAttachments, TBool& aIsMHTML, TInt& aRelatedAttachments, TBool aIsEmbed = EFalse);
 	void BuildContentEntryL(const TMsvId aParent, CImapBodyStructure* aBodyStructure, const TDesC8& aPath, const TMsvId aThisMessage, TInt& aAttachments, TBool& aIsMHTML, TInt& aRelatedAttachments);
 	void ProcessTextSubtypeL(CImapBodyStructure* aBodyStructure, CImMimeHeader& aMime, TMsvEmailEntry& aMessage, TBool& aIsMHTML);
 	void ProcessParameterListL(const CImapBodyStructure::RAttributeValuePairList& aParamList, CImMimeHeader& aMime, TMsvEmailEntry& aMessage, TFileName& aAttachmentFilename);
@@ -215,6 +215,7 @@
 	
 	// CAF support
 	CImCaf* iCaf;
+	TBool iEmbed;
 	};
 
 #endif	//__CIMAPOPFETCHBODY_H__
--- a/email/imap4mtm/imapprotocolcontroller/inc/cimapprotocolcontroller.h	Wed Sep 15 12:08:45 2010 +0300
+++ b/email/imap4mtm/imapprotocolcontroller/inc/cimapprotocolcontroller.h	Wed Oct 13 14:27:34 2010 +0300
@@ -115,7 +115,6 @@
 	IMPORT_C TImap4CompoundProgress Progress();
 	IMPORT_C void CancelAndCleanup();
 	IMPORT_C void UpdateFlagL(TRequestStatus& aStatus);
-	IMPORT_C void UpdateEntriesFlagL(TRequestStatus& aStatus,const CMsvEntrySelection& aSourceSel, TBool aFlagChanged);
 
 	// mobility API from MImMobileServer
 	void PrepareForNewCarrier(TImMobilityAction aAction, TBool aIsSeamless);
--- a/email/imap4mtm/imapprotocolcontroller/inc/cimapupdateflagoperation.h	Wed Sep 15 12:08:45 2010 +0300
+++ b/email/imap4mtm/imapprotocolcontroller/inc/cimapupdateflagoperation.h	Wed Oct 13 14:27:34 2010 +0300
@@ -43,12 +43,6 @@
 						 			  CMsvServerEntry& aServerEntry,
 						 			  CImapSettings& aImapSettings
 						 			  );
-	static CImapUpdateFlagOperation* NewL(CImapSyncManager& aSyncManager,
-	                                      CMsvServerEntry& aServerEntry,
-	                                      CImapSettings& aImapSettings,
-	                                      const CMsvEntrySelection& aSourceSel,
-	                                      TBool aFlagChanged
-	                                      );
 	virtual void StartOperation(TRequestStatus& aStatus, CImapSession& aSession);
 	
 ////////////	virtual void StartOperation(TRequestStatus& aStatus);//
@@ -62,7 +56,6 @@
 						 CImapSettings& aImapSettings
 						 );
 	void ConstructL();
-	void ConstructL(const CMsvEntrySelection& aSourceSel,TBool aFlagChanged);
 
 	TBool DoRunLoopL();
 	void DoCancel();
@@ -74,13 +67,6 @@
 	RArray<TUint> iMessageUids;
 	
 	RArrayMessageFlagInfo iFlagInfoResponseArray;
-	
-	CMsvEntrySelection* iSourceSel;
-	TBool iMarkFlag;
-	TBool iEntrySelection;
-	TInt iProgressMsgsToDo;
-	TInt iProgressMsgsDone;
-
 	};
 
 #endif	// __CIMAPUPDATEFLAGOPERATION_H__
--- a/email/imap4mtm/imapprotocolcontroller/src/cimapopfetchbody.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/email/imap4mtm/imapprotocolcontroller/src/cimapopfetchbody.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -501,7 +501,7 @@
 	fetchInfo->SetRelativePathL(aMimeHeader.RelativePath()); 
 	fetchInfo->SetIsText(aIsText);
 	fetchInfo->SetContentTransferEncoding(aMimeHeader.ContentTransferEncoding());
-
+	fetchInfo->iEmbed = iEmbed;
 	if (aIsText)
 		{
 		fetchInfo->SetCharsetId(aMimeHeader.MimeCharset());
@@ -1129,7 +1129,7 @@
 								  const TMsvId aThisMessage, 
 								  TInt& aAttachments, 
 								  TBool& aIsMHTML, 
-								  TInt& aRelatedAttachments)
+								  TInt& aRelatedAttachments, TBool aIsEmbed)
 	{
 	__LOG_FORMAT((iSession->LogId(), "CImapOpFetchBody::BuildTreeL(message=%x, parent=%x", aThisMessage, aParent));
 
@@ -1138,10 +1138,18 @@
 		{
 		// Build the content entry for the message part
 		HBufC8* newpath=HBufC8::NewLC(aPath.Length()+4);
+		if(aIsEmbed && aBodyStructure->BodyStructureType() == CImapBodyStructure::ETypeText)
+            {
 		*newpath=aPath;
+		    iEmbed = ETrue;
+            }
+		else
+            {
+		    *newpath=aPath;
 		if (aPath.Length())
 			newpath->Des().Append(KIMAP_REL_PATH_SEPARATOR);
 		newpath->Des().AppendNum(1);
+            }
 		BuildContentEntryL(aParent, aBodyStructure, newpath->Des(), aThisMessage, aAttachments, aIsMHTML, aRelatedAttachments);
 		CleanupStack::PopAndDestroy(newpath);
 		}
@@ -1596,7 +1604,7 @@
         }	
 	if (bodystructure)
 	    {
-        BuildTreeL(aMessage.Id(), bodystructure, aPath, aMessage.Id(), attachments, isMHTML, relatedAttachments);
+        BuildTreeL(aMessage.Id(), bodystructure, aPath, aMessage.Id(), attachments, isMHTML, relatedAttachments, ETrue);
 	    }
 	
 	__LOG_FORMAT((iSession->LogId(), "  Built embedded message id %x attachments %d MHTML %d", aMessage.Id(), attachments, isMHTML));
--- a/email/imap4mtm/imapprotocolcontroller/src/cimapprotocolcontroller.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/email/imap4mtm/imapprotocolcontroller/src/cimapprotocolcontroller.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -3510,49 +3510,17 @@
 	__LOG_TEXT(KDefaultLog, "CImapProtocolController::UpdateFlagL()");
 	__ASSERT_DEBUG(iImapCompound==NULL, TImapServerPanic::ImapPanic(TImapServerPanic::ECreateCompoundIsNotNull));
 	ResetProgress();
+	if (!CompleteIfBackgroundOpInProgress(aStatus))	
+		{
+		iImapCompound = CImapUpdateFlagOperation::NewL(*iImapSyncManager,
+												   iEntry,
+												   *iImapSettings
+												   );
+		iRequestedOp = EUpdateFlag;
+		StartPrimaryOperation();
+		Queue(aStatus);
+		SetActive();
+		}
+	}
 	
-    if (!CompleteIfBackgroundOpInProgress(aStatus)) 
-            {
-        
-            iImapCompound = CImapUpdateFlagOperation::NewL(*iImapSyncManager,
-                                                       iEntry,
-                                                       *iImapSettings
-                                                       );
-            
-            iRequestedOp = EUpdateFlag;
-            StartPrimaryOperation();
-            Queue(aStatus);
-            SetActive();
-            }
-
-	    }	
-
-
-
-/**
-Updates  the selection of  messages read/unread status from the remote server.
-@param aStatus
-*/  
-EXPORT_C void CImapProtocolController::UpdateEntriesFlagL( TRequestStatus& aStatus,const CMsvEntrySelection& aSourceSel ,TBool aFlagChanged)
- 
-    {
-    __LOG_TEXT(KDefaultLog, "CImapProtocolController::UpdateEntriesFlagL()");
-    __ASSERT_DEBUG(iImapCompound==NULL, TImapServerPanic::ImapPanic(TImapServerPanic::ECreateCompoundIsNotNull));
-    ResetProgress();
-    
-   if (!CompleteIfBackgroundOpInProgress(aStatus)) 
-        {
-    
-        iImapCompound = CImapUpdateFlagOperation::NewL(*iImapSyncManager,
-                                                   iEntry,
-                                                   *iImapSettings,
-                                                   aSourceSel,
-                                                   aFlagChanged);
-        iRequestedOp = EUpdateFlag;
-        StartPrimaryOperation();
-        Queue(aStatus);
-        SetActive();
-        }
-        
-    }   
-
+
--- a/email/imap4mtm/imapprotocolcontroller/src/cimapupdateflagoperation.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/email/imap4mtm/imapprotocolcontroller/src/cimapupdateflagoperation.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -66,40 +66,6 @@
 	CActiveScheduler::Add(this);
 	}
 
-// NewL for Selection
-CImapUpdateFlagOperation* CImapUpdateFlagOperation::NewL(CImapSyncManager& aSyncManager,
-                                                         CMsvServerEntry& aServerEntry,
-                                                         CImapSettings& aImapSettings, 
-                                                         const CMsvEntrySelection& aSourceSel , TBool aFlagChanged)
-
-    {
-    
-    CImapUpdateFlagOperation* self = new (ELeave) CImapUpdateFlagOperation(aSyncManager,
-                                                                     aServerEntry,
-                                                                     aImapSettings);
-    CleanupStack::PushL(self);
-    self->ConstructL(aSourceSel,aFlagChanged);
-    CleanupStack::Pop(self);
-    return self;
-    }
-//// ConstructL for Selection   
-void CImapUpdateFlagOperation::ConstructL(const CMsvEntrySelection& aSourceSel, TBool aFlagChanged)
-    {
-  
-    iSourceSel=new (ELeave) CMsvEntrySelection;
-    CheckSelectionL(aSourceSel, iSourceSel, ETrue, EFalse, EFalse, ETrue);
-
-    // Initialise the progress counters 
-    iProgressMsgsToDo=iSourceSel->Count();
-    iProgressMsgsDone=0;
-    iMarkFlag = aFlagChanged;
-    iEntrySelection = ETrue;
-    // Add to the active scheduler
-    CActiveScheduler::Add(this);
-    }
-
-
-
 void CImapUpdateFlagOperation::StartOperation(TRequestStatus& aStatus, CImapSession& aSession)
 //void CImapUpdateFlagOperation::StartOperation(TRequestStatus& aStatus)
 	{
@@ -123,79 +89,37 @@
 		{
 	
 	case EUpdateFlag:
-		{
-		HBufC8* uidSeq = NULL;
-        if(!iEntrySelection) //Entry iMarkFlag is Flase
-            {
-            TMsvEmailEntry entry = iServerEntry.Entry();
-            TUint id = entry.UID();
-            iMessageUids.AppendL(id);
-            if(entry.Unread())
-                {
-                entry.SetSeenIMAP4Flag(EFalse);
-                }
-            else
-                {
-                entry.SetSeenIMAP4Flag(ETrue);	
-                }
-                    
-                    
-            User::LeaveIfError(iServerEntry.ChangeEntry(entry));
-    
-            uidSeq = CImapSession::CreateSequenceSetLC(iMessageUids);
-    
-            // finished with the UID array. Clear it.
-            iMessageUids.Reset();
-            if(entry.SeenIMAP4Flag())
-                {
-                // issue the store command
-                iSession->StoreL(iStatus, uidSeq->Des(), KImapAddFlags, KImapFlagSeen, ETrue, iFlagInfoResponseArray);
-                
-                }
-            else
-                {
-                // issue the store command
-                iSession->StoreL(iStatus, uidSeq->Des(), KStoreFlagsClearCommand, KImapFlagSeen, ETrue, iFlagInfoResponseArray);
-                }
-            }
-        else  //Selection iMarkFlag is Trure
-            {
-            TMsvEntry *aNewEntry1;
+		{		
+		TMsvEmailEntry entry = iServerEntry.Entry();
+		TUint id = entry.UID();
+		iMessageUids.AppendL(id);
+		if(entry.Unread())
+			{
+			entry.SetSeenIMAP4Flag(EFalse);
+			}
+		else
+			{
+			entry.SetSeenIMAP4Flag(ETrue);	
+			}
+				
+				
+		User::LeaveIfError(iServerEntry.ChangeEntry(entry));
+
+		HBufC8* uidSeq = CImapSession::CreateSequenceSetLC(iMessageUids);
+
+		// finished with the UID array. Clear it.
+		iMessageUids.Reset();
+		if(entry.SeenIMAP4Flag())
+			{
+			// issue the store command
+			iSession->StoreL(iStatus, uidSeq->Des(), KImapAddFlags, KImapFlagSeen, ETrue, iFlagInfoResponseArray);
 			
-			TInt  count = iSourceSel->Count();
-			while (count--)
-				{
-				iServerEntry.GetEntryFromId(iSourceSel->At(count), aNewEntry1);
-				TMsvEmailEntry entry(*aNewEntry1);
-				iMessageUids.AppendL(entry.UID());
-					
-				if(iMarkFlag) // True  means  Unread
-					 {
-					 entry.SetSeenIMAP4Flag(EFalse);
-					 }
-				 else
-					 {
-					 entry.SetSeenIMAP4Flag(ETrue);  
-					 }
-				SetEntryL((*iSourceSel)[count]);
-				User::LeaveIfError(iServerEntry.ChangeEntry(entry));
-				}// end of while
-
-			uidSeq = CImapSession::CreateSequenceSetLC(iMessageUids);
-	
-			// finished with the UID array. Clear it.
-			iMessageUids.Reset();
-			if(!iMarkFlag) //read
-				{
-				// issue the store command
-				iSession->StoreL(iStatus, uidSeq->Des(), KImapAddFlags, KImapFlagSeen, ETrue, iFlagInfoResponseArray);
-				}
-			else   //Unread
-				{
-				// issue the store command
-				iSession->StoreL(iStatus, uidSeq->Des(), KStoreFlagsClearCommand, KImapFlagSeen, ETrue, iFlagInfoResponseArray);
-				}
-             } //End of else (Selection)
+			}
+		else
+			{
+			// issue the store command
+			iSession->StoreL(iStatus, uidSeq->Des(), KStoreFlagsClearCommand, KImapFlagSeen, ETrue, iFlagInfoResponseArray);
+			}
 	
 		iProgressState = TImap4GenericProgress::EBusy;
 		CleanupStack::PopAndDestroy(uidSeq);
--- a/email/imap4mtm/imapservermtm/inc/cimap4servermtm.h	Wed Sep 15 12:08:45 2010 +0300
+++ b/email/imap4mtm/imapservermtm/inc/cimap4servermtm.h	Wed Oct 13 14:27:34 2010 +0300
@@ -119,7 +119,7 @@
 						TRequestStatus& aStatus );
 	TBool CommandExpected();
 	const TDesC8& Progress();
-	TInt ChangeEntriesL(const CMsvEntrySelection& aSelection, TInt aMark, TRequestStatus& aStatus);
+	
 protected:
 	IMPORT_C TInt Extension_(TUint aExtensionId, TAny *&a0, TAny *a1);
 
--- a/email/imap4mtm/imapservermtm/src/cimap4servermtm.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/email/imap4mtm/imapservermtm/src/cimap4servermtm.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -504,65 +504,6 @@
 
 
 /**
-ChangeEntriesL update the message read/Unread status in  Local and remote, 
-using the IMAP COPY command.
-
-@param aSelection The selection of message TMsvIds that are changed.
-@param aMark The selection marked as read  or unread.If 1 is Unread 0 for read.
-@param aStatus The request status to be completed when the operation has finished.
-*/
-
-TInt CImap4ServerMtm::ChangeEntriesL( const CMsvEntrySelection& aSelection, TInt aMark, TRequestStatus& aStatus ) 
-    {
-    __LOG_TEXT(KDefaultLog, "CImap4ServerMtm::ChangeEntriesL()");
-   
-    TMsvEntry* aNewEntry1 = new (ELeave) TMsvEntry;
-    CleanupStack::PushL(aNewEntry1);
-    
-    TBool flagChanged;
-    
-    if(aMark ==  0) 
-        flagChanged = EFalse; //Selection to update as Read.
-    else
-        flagChanged = ETrue; ////Selection to update as UnRead.
-    
-    TInt count  = aSelection.Count();
-    while(count--)
-        { 
-        iServerEntry->GetEntryFromId(aSelection[count],aNewEntry1);
-        TMsvEmailEntry entry(*aNewEntry1);
-        if(flagChanged)
-             {
-            entry.SetSeenIMAP4Flag(EFalse);
-             }
-         else
-             {
-             entry.SetSeenIMAP4Flag(ETrue);  
-             }
-        //Local Updation.
-        User::LeaveIfError(iServerEntry->SetEntry(entry.Id()));
-        User::LeaveIfError(iServerEntry->ChangeEntry(entry));
-        }
-     //if not offline
-     if (iImapProtocolController->Connected())
-        {
-        //to update read/unread flags at remote server
-        iImapProtocolController->UpdateEntriesFlagL(iStatus,aSelection,flagChanged);    
-        iState= EMtmStateUpdateFlag;
-        Queue(aStatus);
-        SetActive(); 
-        }
-    else
-        {
-        Queue(aStatus);
-        User::RequestComplete(iRequest, KErrNone);
-        }
-    CleanupStack::PopAndDestroy(1); //aNewEntry1
-	return KErrNone;
-    }
-
-
-/**
 Performs the IMAP specific MTM commands.
 
 @param aSelection A selection of messages. The use is dependant upon 
--- a/email/imap4mtm/imapsession/src/cimapfetchbody.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/email/imap4mtm/imapsession/src/cimapfetchbody.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -281,7 +281,7 @@
 	const CImapCapabilityInfo& capabilityInfo = iParent.CapabilityInfo();
 	TBool binaryCapExist = capabilityInfo.QueryFlag(CImapCapabilityInfo::EBinaryCap);	
 #endif
-	if (iRequestCount == 0)
+	if (iRequestCount == 0 && !iFetchBodyInfo.iEmbed)
 		{
 		bufLength += iFetchBodyInfo.RelativePath()->Length();
 		
@@ -347,7 +347,7 @@
 	delete iOutputBuffer;
 	iOutputBuffer=buffer;
 
-	if (iRequestCount == 0)
+	if (iRequestCount == 0 && !iFetchBodyInfo.iEmbed)
 		{
 		if(iPeek)
 			{
@@ -378,6 +378,7 @@
 		}
 	else
 		{
+		iFetchBodyInfo.iEmbed = EFalse;
 		if(iPeek)
 			{
 #if (defined SYMBIAN_EMAIL_CAPABILITY_SUPPORT)	
--- a/email/imap4mtm/imapsettings/src/cimapsettings.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/email/imap4mtm/imapsettings/src/cimapsettings.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -170,7 +170,7 @@
 void CImapSettings::ReadResourceFileL()
 	{
 	RFs fs;
-	User::LeaveIfError(fs.Connect());
+	fs.Connect();
 	CleanupClosePushL(fs);
 	
 	//	NB need to check on all drives - won't necessarily be on
Binary file email/imum/help/data/xhtml.zip has changed
--- a/email/pop3andsmtpmtm/clientmtms/src/cemailaccounts.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/email/pop3andsmtpmtm/clientmtms/src/cemailaccounts.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -2307,8 +2307,9 @@
 	aPopSettings.Reset();	
 	CRepository& popRepository = PopRepositoryL();
 
-	TInt temp = 0;
-	TBuf<KMaxSettingStringLength> tempDesc;			
+	TInt temp = 0;			
+	HBufC* heapBuf = HBufC::NewLC( KMaxSettingStringLength );
+	TPtr tempDesc(heapBuf->Des());
 	TInt error = popRepository.Get(aAccountId + EPOPServerAddressId, tempDesc);
 	if (error == KErrNone)
 		{		
@@ -2322,6 +2323,8 @@
 		{
 		User::Leave(error);
 		}
+	
+	CleanupStack::PopAndDestroy( heapBuf );
 
 	error = popRepository.Get(aAccountId + EPOPPortNumberId, temp);	
 	if (error == KErrNone)
@@ -2340,7 +2343,9 @@
 	User::LeaveIfError(popRepository.Get(aAccountId + EPOPFlagsId, temp));	
 	aPopSettings.SetSettingsFlags(static_cast<TUint32>(temp));
 		
-	TBuf8<KMaxSettingStringLength> tempDesc8;			
+	HBufC8* heapBuf8 = HBufC8::NewLC( KMaxSettingStringLength );
+	TPtr8 tempDesc8(heapBuf8->Des());
+	
 	error = popRepository.Get(aAccountId + EPOPLoginNameId, tempDesc8);	
 	if (error == KErrNone)
 		{		
@@ -2392,6 +2397,8 @@
 			aPopSettings.SetTlsSslDomainL(tempDesc8);
 			}
 		}
+	CleanupStack::PopAndDestroy( heapBuf8 );
+	
 	}
 
 void CEmailAccounts::DoLoadSmtpSettingsL(TUint32 aAccountId, CImSmtpSettings& aSmtpSettings)
@@ -2400,7 +2407,9 @@
 	CRepository& smtpRepository = SmtpRepositoryL();
 
 	TInt temp = 0;
-	TBuf<KMaxSettingStringLength> tempDesc;			
+	HBufC* heapBuf = HBufC::NewLC( KMaxSettingStringLength );
+	TPtr tempDesc( heapBuf->Des() );
+	
 	TInt error = smtpRepository.Get(aAccountId + ESMTPServerAddressId, tempDesc);	
 	if (error == KErrNone)
 		{		
@@ -2488,6 +2497,8 @@
 		User::Leave(error);
 		}
 
+	CleanupStack::PopAndDestroy( heapBuf );
+	
 	User::LeaveIfError(smtpRepository.Get(aAccountId + ESMTPBodyEncodingId, temp));	
 	aSmtpSettings.SetBodyEncoding(static_cast<TMsgOutboxBodyEncoding>(temp));
 
@@ -2499,8 +2510,9 @@
 
 	User::LeaveIfError(smtpRepository.Get(aAccountId + ESMTPSendMessageOptionId, temp));	
 	aSmtpSettings.SetSendMessageOption(static_cast<TImSMTPSendMessageOption>(temp));
-
-	TBuf8<KMaxSettingStringLength> tempDesc8;			
+	HBufC8* heapBuf8 = HBufC8::NewLC(KMaxSettingStringLength);
+	TPtr8 tempDesc8( heapBuf8->Des() );
+	
 	error = smtpRepository.Get(aAccountId + ESMTPLoginNameId, tempDesc8);	
 	if (error == KErrNone)
 		{		
@@ -2557,6 +2569,9 @@
 			aSmtpSettings.SetTlsSslDomainL(tempDesc8);
 			}
 		}	
+	
+	CleanupStack::PopAndDestroy( heapBuf8 );
+	
 	}
 
 void CEmailAccounts::DoLoadImapSettingsL(TUint32 aAccountId, CImImap4Settings& aImapSettings)
@@ -2565,7 +2580,9 @@
 	CRepository& imapRepository = ImapRepositoryL();
 
 	TInt temp = 0;
-	TBuf<KMaxSettingStringLength> tempDesc;			
+	HBufC* heapBuf = HBufC::NewLC( KMaxSettingStringLength );
+	TPtr tempDesc(heapBuf->Des());
+	
 	TInt error = imapRepository.Get(aAccountId + EIMAPServerAddressId, tempDesc);	
 	if (error == KErrNone)
 		{		
@@ -2580,6 +2597,8 @@
 		User::Leave(error);
 		}
 
+	CleanupStack::PopAndDestroy( heapBuf );
+	
 	error = imapRepository.Get(aAccountId + EIMAPPortNumberId, temp);	
 	if (error == KErrNone)
 		{		
@@ -2597,7 +2616,9 @@
 	User::LeaveIfError(imapRepository.Get(aAccountId + EIMAPFlagsId, temp));	
 	aImapSettings.SetSettingsFlags(static_cast<TUint32>(temp));
 		
-	TBuf8<KMaxSettingStringLength> tempDesc8;			
+	HBufC8* heapBuf8 = HBufC8::NewLC( KMaxSettingStringLength );
+	TPtr8 tempDesc8( heapBuf8->Des() );
+	
 	error = imapRepository.Get(aAccountId + EIMAPLoginNameId, tempDesc8);	
 	if (error == KErrNone)
 		{		
@@ -2682,6 +2703,9 @@
 			aImapSettings.SetTlsSslDomainL(tempDesc8);
 			}
 		}
+	
+	CleanupStack::PopAndDestroy( heapBuf8 );
+	
 	}
 
 void CEmailAccounts::LoadIAPPrefSettingsL(TUint32 aAccountId, CImIAPPreferences& aIAP, CRepository& aRepository)
--- a/email/pop3andsmtpmtm/popservermtm/src/POPSMTM.CPP	Wed Sep 15 12:08:45 2010 +0300
+++ b/email/pop3andsmtpmtm/popservermtm/src/POPSMTM.CPP	Wed Oct 13 14:27:34 2010 +0300
@@ -1432,14 +1432,6 @@
 			{	
 			CommandComplete( eCode );
 			}
-		else if(iState.iLastCurrentOperation == EPopConnectedAndIdle && iState.iCurrentOperation == EPopDisconnected && eCode != KErrNone)
-		    {
-            // Some email servers doesn’t wait for QUIT command, in such cases need to close RConnection
-            delete iSessionManager; 
-            iSessionManager = NULL;
-			
-            iPopProgress.iErrorCode = eCode;
-		    }
 		else
 			{
 			iPopProgress.iErrorCode = eCode;
--- a/messagingappbase/mce/group/mce.rss	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/mce/group/mce.rss	Wed Oct 13 14:27:34 2010 +0300
@@ -330,10 +330,6 @@
             {
             txt="";
             menu_pane = r_mce_folder_menu;
-            },
-        MENU_TITLE 
-            {
-            menu_pane = R_AVKON_MENUPANE_MARK_MULTIPLE;
             }
         };
     }
@@ -546,6 +542,13 @@
             },
         MENU_ITEM
             {
+            command = EMceCmdEditList;
+            txt = qtn_mce_edit;
+            cascade=r_mce_edit_menu;
+            },
+
+        MENU_ITEM
+            {
             command = EMceCmdMailboxSettings;
             txt = qtn_mce_mail_settings;
             },
@@ -636,6 +639,48 @@
         };
     }
 
+//----------------------------------------------------
+//
+//    r_mce_edit_menu
+//
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_mce_edit_menu
+    {
+    items=
+        {
+        MENU_ITEM
+            {
+            command = EAknCmdMark;
+            txt = qtn_mce_mark;
+            flags = EEikMenuItemSpecific;
+            },
+        MENU_ITEM
+            {
+            command = EAknCmdUnmark;
+            txt = qtn_mce_unmark;
+            flags = EEikMenuItemSpecific;
+            },
+#ifdef RD_READ_MESSAGE_DELETION
+        MENU_ITEM
+            {
+            command = EAknCmdMarkReadMsgs;
+            txt = qtn_options_list_mark_read;
+            },
+#endif //RD_READ_MESSAGE_DELETION
+        MENU_ITEM
+            {
+            command = EAknMarkAll;
+            txt = qtn_mce_mark_all;
+            },
+        MENU_ITEM
+            {
+            command = EAknUnmarkAll;
+            txt = qtn_mce_unmark_all;
+            }
+        };
+    }
 
 //----------------------------------------------------
 //
Binary file messagingappbase/mce/help/data/xhtml.zip has changed
--- a/messagingappbase/mce/inc/MceMainViewListView.h	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/mce/inc/MceMainViewListView.h	Wed Oct 13 14:27:34 2010 +0300
@@ -55,7 +55,6 @@
     public CAknView,
     public MMceMainViewListItemArrayObserver,
     public MEikListBoxObserver,
-    public MEikScrollBarObserver,
     public MMsvSessionObserver
     {
     public:
@@ -183,15 +182,6 @@
         void HandleListBoxEventL(
             CEikListBox* aListBox,
             TListBoxEvent aEventType);
-			
-    protected:  // Functions from base classes
-
-        /**
-        * From MEikScrollBarObserver
-        */
-        void HandleScrollEventL(
-             CEikScrollBar* aScrollBar, 
-             TEikScrollEvent aEventType);
 
     private:
 
--- a/messagingappbase/mce/inc/MceMessageListContainer.h	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/mce/inc/MceMessageListContainer.h	Wed Oct 13 14:27:34 2010 +0300
@@ -158,8 +158,7 @@
         /**
         * From CMceMessageListContainerBase 
         */
-        virtual void ItemCountChangedL( TBool aItemsAdded,
-                CArrayFix<TInt>* aAddedIndexes = 0 );
+        virtual void ItemCountChangedL( TBool aItemsAdded );
 
         /**
         * From CMceMessageListContainerBase 
@@ -361,11 +360,6 @@
         * From CMceMessageListContainerBase 
         */
         void SetContainerFlag( TMceContainerFlags aFlag, TBool aState );
-		
-        /**
-        * From CMceMessageListContainerBase 
-        */
-        void SetMarkingModeOff();
 
     public:     // Functions from base classes
 
@@ -534,8 +528,6 @@
         TMessageListOperationType   iLastOperationType;
         TBool 			            iDialerEvent ;
         
-        CMsvEntrySelection* 		iAddedMsvIds;
-        
     };
     
 #endif
--- a/messagingappbase/mce/inc/MceMessageListContainerBase.h	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/mce/inc/MceMessageListContainerBase.h	Wed Oct 13 14:27:34 2010 +0300
@@ -24,7 +24,6 @@
 //  INCLUDES
 #include <coecntrl.h> // CCoeControl
 #include <msvapi.h>
-#include <aknmarkingmodeobserver.h>
 //#include "MceListContainer.h"
 //#include "MceMessageListContTimer.h"
 
@@ -58,8 +57,7 @@
 */
 class  CMceMessageListContainerBase :
     public CCoeControl,
-    public MEikCommandObserver,
-    public MAknMarkingModeObserver
+    public MEikCommandObserver
     {
     public:  // Constructors and destructor
 
@@ -67,24 +65,6 @@
         * Destructor.
         */
         virtual ~CMceMessageListContainerBase();
-		
-    public: // From MAknMarkingModeObserver 
-            
-        /**
-         * This method is called when marking mode is activated or deactivated.
-         * 
-         * @param aActivated @c ETrue if marking mode was activate, @c EFalse
-         *                   		  if marking mode was deactivated.
-         */
-        void MarkingModeStatusChanged( TBool aActivated );
-
-        /**
-         * This method is called just before marking mode is closed. Client can 
-         * either accept or decline closing.
-         * 
-         * @return @c ETrue if marking mode should be closed, otherwise @c EFalse.
-         */
-        TBool ExitMarkingMode() const;           
 
     public:
     
@@ -201,8 +181,7 @@
         /**
         * TODO: that is not needed if container would be msv session observer
         */
-        virtual void ItemCountChangedL( TBool aItemsAdded, CArrayFix<TInt>*
-                aAddedIndexes = 0 ) = 0;
+        virtual void ItemCountChangedL( TBool aItemsAdded ) = 0;
         
         /**
         * Redraw the listbox.
@@ -480,12 +459,6 @@
         *  Updates icon array in case MTM is released (one row list)
         */
         virtual void UpdateIconArrayL() = 0;
-		
-        /**
-        *  Sets Marking mode Off
-        */
-       
-        virtual void SetMarkingModeOff() = 0;
         
     protected:
     
--- a/messagingappbase/mce/inc/MceMessageListView.h	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/mce/inc/MceMessageListView.h	Wed Oct 13 14:27:34 2010 +0300
@@ -27,7 +27,6 @@
 #include <msvapi.h>
 #include <AiwServiceHandler.h>
 #include <coemain.h>
-#include <eiklbo.h>
 
 #include "MceMessageListContainer.h" 
 
@@ -634,29 +633,6 @@
          *  screen. aClearer is used in CMceUi::HandleGainingForeground() when returning from viewers.
          */
         void  GetLocalScreenClearer( CAknLocalScreenClearer** &aClearer );
-        /**
-        * Set the iMarkingModeOn variable if MarkingMode is switched on
-        * @aValue: The value to be set to iMarkingModeOn variable
-        * Since 9.2
-        */
-        void SetMarkingMode( TBool aMarkingModeOn );
-		/**
-        * Get the iMarkingModeOn variable
-        * @return: the value of iMarkingModeOn
-        * Since 9.2
-        */
-        TBool MarkingMode() const;
-		/**
-        * Get iMsgListContainer->MessageCount() variable
-        * @return: The value of MessageCount()
-        * Since 9.2
-        */
-        TInt MessageCount() const;
-		/**
-        * Set the MarkingMode off and inform the same to container
-        * Since 9.2
-        */
-		void SetMarkingModeOff();
             
     private:    // Data
 
@@ -702,8 +678,6 @@
 		TBool 						iReadUnread; 
 		//Variable for context command
 		TBool                       iContextCommand;
-		//To indicate if marking mode is on/off
-		TBool                       iMarkingModeOn;
     };
 
 inline void CMceMessageListView::UpdateViewL()
--- a/messagingappbase/mce/inc/MceOneRowMessageListContainer.h	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/mce/inc/MceOneRowMessageListContainer.h	Wed Oct 13 14:27:34 2010 +0300
@@ -133,8 +133,7 @@
         /**
         * From CMceMessageListContainerBase
         */
-        virtual void ItemCountChangedL( TBool aItemsAdded,
-                CArrayFix<TInt>* aAddedIndexes = 0 );
+        virtual void ItemCountChangedL( TBool aItemsAdded );
 
         /**
         * From CMceMessageListContainerBase
@@ -334,11 +333,6 @@
         * From CMceMessageListContainerBase 
         */
         void UpdateIconArrayL( );
-		
-        /**
-        * From CMceMessageListContainerBase 
-        */
-        void SetMarkingModeOff();
 
     public:     // Functions from base classes
 
--- a/messagingappbase/mce/inc/mceui.h	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/mce/inc/mceui.h	Wed Oct 13 14:27:34 2010 +0300
@@ -1154,8 +1154,6 @@
          * otherwise EFalse
          */
         TBool                           iIadUpdateVal;
-		//To check if simdialog is open or not
-        TBool                           iSimDialogOpen;
     };
 
 #endif
--- a/messagingappbase/mce/src/MceMainViewListItemArray.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/mce/src/MceMainViewListItemArray.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -1200,10 +1200,10 @@
         TInt bitmapidx = EMceBitmapIndexConversation;
         if(iDefaultViewSettings == KMceConversationview )
            {
-           TInt unreadMessages = 0;
-		   //To check  whether unread message presents in inbox
-           TRAPD( err, iBitmapResolver.FindVisibleCountWithUnreadMessageL( KMsvGlobalInBoxIndexEntryId, unreadMessages ));
-           if ( err == KErrNone && unreadMessages )
+           TInt msgCount = 0;
+           TInt unreadCount = 0;                   
+           TRAPD(Errcode,iBitmapResolver.HasUnreadMessagesL(KMsvGlobalInBoxIndexEntryId,msgCount,unreadCount));         
+           if( unreadCount > 0 ) 
                {
                bitmapidx =  EMceBitmapIndexConversationNew ;
                }
--- a/messagingappbase/mce/src/MceMainViewListView.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/mce/src/MceMainViewListView.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -364,8 +364,7 @@
         iMceUi->ResetResourceChange();
         }
     listBox->SetListBoxObserver(this);
- 	//To observe scrollbar events
-    listBox->ScrollBarFrame()->SetScrollBarFrameObserver( this );
+
     iMsgListContainer->ActivateL();
     if ( !iListViewFlags.MceFlag( EMceUiFlagsContainerAddedToStack ) )
         {
@@ -455,11 +454,9 @@
                 iMsgListContainer->SetMskL();                
                 }
         break;
-        case EEventPanningStarted:
         case EEventFlickStarted:
             iFlick = ETrue;
             break;        
-        case EEventPanningStopped:
         case EEventFlickStopped:
             iFlick = EFalse;
             break;
@@ -1221,30 +1218,4 @@
        return KErrNotFound;
        }
     }
-// ---------------------------------------------------------
-// CMceMainViewListView::HandleScrollEventL
-// To take old bitmapindex for list items When 
-// stylus is down on scroll bar thumb and dragged
-// Calculate new bitmapindex when scrollbar thumb drag is stopped
-// ---------------------------------------------------------
-//
-void CMceMainViewListView::HandleScrollEventL(CEikScrollBar* aScrollBar,
-        TEikScrollEvent aEventType)
-    {
-    switch (aEventType)
-        {
-        case EEikScrollThumbDragVert:
-            iFlick = ETrue;
-            break;
-        case EEikScrollThumbReleaseVert:
-            iFlick = EFalse;
-            break;
-        default:
-            break;
-        }
-    CAknDoubleLargeStyleListBox* listBox =
-            REINTERPRET_CAST( CAknDoubleLargeStyleListBox*,
-                    iMsgListContainer->ListBox() );
-    listBox->HandleScrollEventL( aScrollBar, aEventType );
-    }
 //  End of File
--- a/messagingappbase/mce/src/MceMessageListContainer.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/mce/src/MceMessageListContainer.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -90,7 +90,6 @@
     delete iListBox;
     delete iListItems;
     delete iSelectedEntries;
-    delete iAddedMsvIds;
     }
 
 // ----------------------------------------------------
@@ -139,7 +138,7 @@
     iListBox->Model()->SetOwnershipType( ELbmDoesNotOwnItemArray );
     
     iListBox->SetListBoxObserver( &iOwningView );
-    iListBox->SetMarkingModeObserver( this );
+
     iSelectedEntries = new (ELeave) CMsvEntrySelection;
     
     iListBox->CreateScrollBarFrameL( ETrue );
@@ -151,8 +150,6 @@
     
     iPreviousInputMethod = EFalse;
     
-    iAddedMsvIds = new (ELeave) CMsvEntrySelection;
-    
     User::LeaveIfError( iQwertyModeStatusProperty.Attach( 
         KCRUidAvkon, KAknQwertyInputModeActive ));
   
@@ -272,27 +269,15 @@
 // ----------------------------------------------------
 // CMceMessageListContainer::ItemCountChangedL
 // ----------------------------------------------------
-void CMceMessageListContainer::ItemCountChangedL( TBool aItemsAdded,
-        CArrayFix<TInt>* aAddedIndexes )
+void CMceMessageListContainer::ItemCountChangedL( TBool aItemsAdded )
     {
     if ( aItemsAdded )
         {
-        if( aAddedIndexes )
-            {
-            iListBox->HandleItemAdditionL( *aAddedIndexes );
-            }
-        else
-            {
-            iListBox->HandleItemAdditionL();
-            }        
+        iListBox->HandleItemAdditionL();     
         }
     else
         {
         iListBox->HandleItemRemovalL();
-        if( iOwningView.MarkingMode() && iListItems->MessageCount() <= 0 )
-            {
-            SetMarkingModeOff();
-            }
         }
     }
     
@@ -460,9 +445,32 @@
 // ----------------------------------------------------
 // CMceMessageListContainer::RefreshSelectionIndexesL
 // ----------------------------------------------------
-void CMceMessageListContainer::RefreshSelectionIndexesL( TBool /*aForceUpdate*/ )
+void CMceMessageListContainer::RefreshSelectionIndexesL( TBool aForceUpdate )
     {
+    const CListBoxView::CSelectionIndexArray* selection = 
+        iListBox->View()->SelectionIndexes();
 
+    if ( selection->Count() > 0 || aForceUpdate )
+        {
+        CArrayFixFlat<TInt>* newSelection = new ( ELeave )
+            CArrayFixFlat<TInt>( KMceListContainerGranuality );
+        CleanupStack::PushL( newSelection );
+        const TInt count = iSelectedEntries->Count();
+        for ( TInt loop = count; loop >0; loop--)
+            {
+            TInt index = iListItems->ItemIndex( (*iSelectedEntries)[loop-1] );
+            if ( index > KErrNotFound )
+                {
+                newSelection->AppendL( index );
+                }
+            else
+                {
+                iSelectedEntries->Delete( loop-1 );
+                }
+            }
+        iListBox->SetSelectionIndexesL( newSelection );
+        CleanupStack::PopAndDestroy( newSelection );
+        }
     
     }
 
@@ -656,10 +664,6 @@
 
             if ( aKeyEvent.iCode == EKeyLeftArrow || aKeyEvent.iCode == EKeyRightArrow )
                 {
-                if( iOwningView.MarkingMode() )
-                    {
-                    return EKeyWasConsumed;
-                    }
                 return EKeyWasNotConsumed;
                 }
 
@@ -1319,39 +1323,6 @@
 #ifdef _DEBUG
     RDebug::Print(_L("CMceMessageListContainer2: iAnchorItemId 0x%x, iAnchorItemIndex %d"), iAnchorItemId, iAnchorItemIndex);
 #endif
-    // listitem addition handling when all the new item indexes can be resolved
-    if( iOwningView.MarkingMode() && iAddedMsvIds->Count() > 0 )
-        {
-        TBool allItemsInTheList( ETrue );
-        CArrayFix<TInt>* addedIndexes = new( ELeave ) CArrayFixFlat<TInt> (
-                KMceListContainerGranuality );
-        CleanupStack::PushL( addedIndexes );
-        for( TInt i( 0 ); i < iAddedMsvIds->Count(); i++ )
-            {
-            TMsvId msvId = (*iAddedMsvIds)[i];                 
-            TInt index = iListItems->ItemIndex( msvId );
-            if ( index > KErrNotFound )
-                {
-                addedIndexes->AppendL( index );
-                }
-            else
-                {
-                allItemsInTheList = EFalse;
-                break;
-                }
-            }
-        if( allItemsInTheList )
-            {
-            ItemCountChangedL( ETrue, addedIndexes );
-            iAddedMsvIds->Reset();
-            }
-        CleanupStack::PopAndDestroy( addedIndexes );
-        addedIndexes = NULL;
-        }
-    else if( iAddedMsvIds->Count() > 0 )
-        {
-        iAddedMsvIds->Reset();
-        }
     switch ( aEvent )
         {
         case MMsvSessionObserver::EMsvEntriesDeleted:
@@ -1386,31 +1357,11 @@
             }
         break;
         case MMsvSessionObserver::EMsvEntriesCreated:    
-            {
-            if( iOwningView.MarkingMode() )
-                {
-                // list item count not updated fast enough in hw so let's 
-                // collect added ids for future handling
-                for( TInt i( 0 ); i < aSelection.Count(); i++ )
-                    {
-                    TMsvId msvId = (aSelection)[ i ];
-                    if( iAddedMsvIds->Find( msvId ) == KErrNotFound  )
-                        {
-                        iAddedMsvIds->AppendL( msvId );
-                        }
-                    }
-                }
-            else
-                {
-                ItemCountChangedL( ETrue );
-                }
-            }
         case MMsvSessionObserver::EMsvEntriesChanged:
             {
-            if( aEvent == MMsvSessionObserver::EMsvEntriesChanged  )
-                {
-                ItemCountChangedL( ETrue );
-                }
+            
+            ItemCountChangedL( ETrue );
+            
             if ( iLastOperationType != EMessageListOperationConnect &&
                  iAnchorItemId != KErrNotFound )
                 {
@@ -1589,12 +1540,4 @@
     // do nothing for two row list.
     }
 
-void CMceMessageListContainer::SetMarkingModeOff()
-    {
-    if( iListBox )
-        {
-        iListBox->SetMarkingMode( EFalse );
-        }
-    }
-
 //  End of File
--- a/messagingappbase/mce/src/MceMessageListContainerBase.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/mce/src/MceMessageListContainerBase.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -21,7 +21,6 @@
 // INCLUDE FILES
 
 #include "MceMessageListContainerBase.h"
-#include "MceMessageListView.h"
 #include <bldvariant.hrh>
 
 // CONSTANTS
@@ -39,23 +38,4 @@
     {
     }
 
-// -----------------------------------------------------------------------------
-// CMceMessageListContainerBase::MarkingModeStatusChanged()
-//
-// -----------------------------------------------------------------------------
-//
-void CMceMessageListContainerBase::MarkingModeStatusChanged( TBool aActivated )
-    {
-    iOwningView.SetMarkingMode( aActivated );
-    }
-
-// -----------------------------------------------------------------------------
-// CMceMessageListContainerBase::ExitMarkingMode()
-//
-// -----------------------------------------------------------------------------
-//
-TBool CMceMessageListContainerBase::ExitMarkingMode() const
-    {
-    return ETrue;
-    }
 // End of file
--- a/messagingappbase/mce/src/MceMessageListItemArray.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/mce/src/MceMessageListItemArray.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -228,11 +228,6 @@
     delete iListBoxText;
     delete iNumberOfMessagesStrings;
     delete iUiRegistry;
-    if(iMsgIndex)
-        {
-        delete iMsgIndex;
-        iMsgIndex = NULL;
-        }
     }
 
 
--- a/messagingappbase/mce/src/MceMessageListView.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/mce/src/MceMessageListView.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -94,7 +94,7 @@
 // These are for opening the viewer in inbox. 
 // try to open viewer immediately if there is no other viewer is open
 const TInt KMceLaunchViewerStartTime = 1; 
-//0.3 sec delay is taken to ensure previously launched viewer is closed as to avoid the crashes and KErrCancel/KErrInUse errors due to launching of new viewer when currently running 
+//0.3 sec is taken to ensure previously launched viewer is closed as to avoid the crashes and KErrCancel/KErrInUse errors due to launching of new viewer when currently running 
 //viewer is still in the process of exiting
 const TInt KMceLaunchViewerStartTimeWhenEditorOpen = 300000; 
 const TInt KMceLaunchViewerRetryTime = 500000; // wait 0.5 secs for the next trial
@@ -483,12 +483,6 @@
         iDateTimeNotifier->Start();            
         }
      
-    // if we are in marking mode then "press" rsk
-    // cancel to return to normal mode
-    if( iMarkingModeOn )
-        {
-        SetMarkingModeOff();
-        }
     MCELOGGER_LEAVEFN("CMceMessageListView::DoActivateL()");
     }
 
@@ -560,7 +554,33 @@
                 iMceUi->GoOfflineL( iMsgListContainer->FolderEntry().iServiceId );
                 }
             break;
-            }          
+            }
+        case EAknCmdMark:
+            {
+            iMsgListContainer->AddCurrentItemToSelectionL();
+            SetMSKButtonL();
+            break;
+            }
+        case EAknCmdUnmark:
+            {
+            iMsgListContainer->RemoveCurrentItemFromSelection();
+            SetMSKButtonL();
+            break;
+            }
+        case EAknUnmarkAll:
+            {
+            iMsgListContainer->ClearSelection();
+            SetMSKButtonL();
+            break;
+            }
+
+        case EAknMarkAll:
+            {
+            iMsgListContainer->AddAllToSelectionL();
+            SetMSKButtonL();
+            break;
+            }
+            
         case  EAknCmdMarkReadMsgs:
             {
             FindAllReadMsgAndMarkL();
@@ -1011,6 +1031,10 @@
     switch ( aResourceId )
         {
         case R_MCE_FOLDER_MENU:
+            if(!listPopulated)
+                {
+            	aMenuPane->SetItemDimmed( EMceCmdEditList, ETrue );
+                }
             aMenuPane->SetItemDimmed( EAknCmdHelp,
                 !FeatureManager::FeatureSupported( KFeatureIdHelp ) );
 
@@ -1081,7 +1105,9 @@
                 }
             
             break;
-
+        case R_MCE_EDIT_MENU:
+            EditMenuL( aMenuPane );
+            break;
         case R_MCE_FETCH_MENU:
             FetchMenuL( aMenuPane );
             break;        
@@ -1420,12 +1446,12 @@
 		}
     if ( iFolderId == KMsvGlobalOutBoxIndexEntryId )
         {
-        aMenuPane->SetItemDimmed( EAknCmdMarkingModeEnter, ETrue );
+        aMenuPane->SetItemDimmed( EMceCmdEditList, ETrue );
         }
     else if ( count > 0 && totalCount == subfolderCount )
         {
         // only folders in the list, then "Edit" submenu would be empty so delete it
-        aMenuPane->SetItemDimmed( EAknCmdMarkingModeEnter, ETrue );
+        aMenuPane->SetItemDimmed( EMceCmdEditList, ETrue );
         aMenuPane->SetItemDimmed( EMceCmdSort, ETrue );  
         }
 
@@ -1569,7 +1595,7 @@
 void CMceMessageListView::FolderMenuNoItemsL( CEikMenuPane* aMenuPane ) const
     {
     aMenuPane->SetItemDimmed( EAknCmdOpen, ETrue );
-    aMenuPane->SetItemDimmed( EAknCmdMarkingModeEnter, ETrue );
+    aMenuPane->SetItemDimmed( EMceCmdEditList, ETrue );
     aMenuPane->SetItemDimmed( EMceCmdDelete, ETrue );
     aMenuPane->SetItemDimmed( EMceCmdUndelete, ETrue );
     aMenuPane->SetItemDimmed( EMceCmdMove, ETrue );
@@ -2214,7 +2240,7 @@
 	aMenuPane->SetItemDimmed( EMceCmdNewFolder, ETrue );
 	aMenuPane->SetItemDimmed( EMceCmdRenameFolder, ETrue );
 	aMenuPane->SetItemDimmed( EMceCmdCopy, ETrue );
-	aMenuPane->SetItemDimmed( EAknCmdMarkingModeEnter, ETrue );
+	aMenuPane->SetItemDimmed( EMceCmdEditList, ETrue );
 	aMenuPane->SetItemDimmed( EMceCmdMailboxSettings, ETrue );
 	// + MessageDetails
 	}
@@ -2278,7 +2304,7 @@
 	// SyncML Outbox
 	if ( SyncMlOutboxInbox( KMsvGlobalOutBoxIndexEntryIdValue ) )
 		{		
-		aMenuPane->SetItemDimmed( EAknCmdMarkingModeEnter, ETrue );
+		aMenuPane->SetItemDimmed( EMceCmdEditList, ETrue );
 		aMenuPane->SetItemDimmed( EAknCmdOpen, ETrue );
 		aMenuPane->SetItemDimmed( EMceCmdFetch, ETrue );
 		aMenuPane->SetItemDimmed( EMceCmdMarkAsRead, ETrue );
@@ -4230,45 +4256,5 @@
     {
     aClearer = &iLocalScreenClearer;
     }
-// ----------------------------------------------------
-// CMceMessageListView::SetMarkingMode( TBool aMarkingModeOn )
-// ---------------------------------------------------- 
-
-void CMceMessageListView::SetMarkingMode( TBool aMarkingModeOn )
-    {
-    iMarkingModeOn = aMarkingModeOn;
-    }
-// ----------------------------------------------------
-// CMceMessageListView::MarkingMode() const
-// ---------------------------------------------------- 
-
-TBool CMceMessageListView::MarkingMode() const
-    {
-    return iMarkingModeOn;  
-    }	
-// ----------------------------------------------------
-// CMceMessageListView::MessageCount() const
-// ---------------------------------------------------- 
-
-TInt CMceMessageListView::MessageCount() const
-    {
-    if ( iMsgListContainer )
-        {
-        return iMsgListContainer->MessageCount();
-        }
-    return 0;
-    }
-// ----------------------------------------------------
-// CMceMessageListView::SetMarkingModeOff()
-// ---------------------------------------------------- 
-
-void CMceMessageListView::SetMarkingModeOff()
-    {
-    if( iMsgListContainer )
-        {
-        iMsgListContainer->SetMarkingModeOff();
-        }
-    iMarkingModeOn = EFalse;
-    }
 
 //  End of File
--- a/messagingappbase/mce/src/MceMessageListboxItemDrawer.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/mce/src/MceMessageListboxItemDrawer.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -22,7 +22,6 @@
 // INCLUDE FILES
 #include "MceMessageListContainer.h"
 #include "MceMessageListboxItemDrawer.h"
-#include "MceIds.h"
 
 
 // ================= MEMBER FUNCTIONS =======================
@@ -58,12 +57,7 @@
     {
     TListItemProperties properties;
     properties.SetColor( iTextColor );
-	//only for MyFolders set the Hidden Selection, no folder should be able to be selected
-    if ( iMessageListContainer.CurrentFolderId() == KMceDocumentsEntryId )
-        {
-    	properties.SetHiddenSelection( iMessageListContainer.IsItemFolder( aItemIndex )  ||
-            iMessageListContainer.SyncMlOutboxOpened() );
-	}
+
     return properties;
     }
 
--- a/messagingappbase/mce/src/MceOneRowMessageListArrayLoader.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/mce/src/MceOneRowMessageListArrayLoader.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -142,10 +142,9 @@
     delete iFolderEntry;
     delete iEntriesToBeAdded;
     delete iEntriesReceivedDuringListCreation;
-    if ( iCmailSelectionList )
+    if ( iEmailFramework )
         {
         delete iCmailSelectionList ;
-		iCmailSelectionList = NULL;
         }
     iMarkedArray.Close();
     }
@@ -2131,12 +2130,7 @@
 // ----------------------------------------------------
 void CMceOneRowListItemArrayLoader::CreateCmailEntryIndexL() 
     {
-	if(iCmailSelectionList)
-	{
-	delete iCmailSelectionList;
-	iCmailSelectionList = NULL;
-	}
-	iCmailSelectionList = new( ELeave ) CMsvEntrySelection() ;
+    iCmailSelectionList = new( ELeave ) CMsvEntrySelection() ;
      
     //Find email messages 
     CMsvEntrySelection *smtpselection = iFolderEntry->ChildrenWithMtmL( KUidMsgTypeSMTP );
--- a/messagingappbase/mce/src/MceOneRowMessageListContainer.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/mce/src/MceOneRowMessageListContainer.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -195,7 +195,6 @@
     iTreeListBox->EnableTabModeFunctionIndicatorsL( ETrue );
     iTreeListBox->SetFlags( iTreeListBox->Flags() ^ KAknTreeListLooping ^ KAknTreeListMarkable );
     iTreeListBox->AddObserverL( this );
-    iTreeListBox->SetMarkingModeObserver( this );
 
     iBgContext = CAknsBasicBackgroundControlContext::NewL(
         KAknsIIDQsnBgAreaMain, iAvkonAppUi->ApplicationRect(), EFalse );
@@ -796,14 +795,9 @@
 // CMceOneRowMessageListContainer::ItemCountChangedL
 // ----------------------------------------------------
 //
-void CMceOneRowMessageListContainer::ItemCountChangedL( TBool /* aItemsAdded */,
-        CArrayFix<TInt>* /* aAddedIndexes */ )
+void CMceOneRowMessageListContainer::ItemCountChangedL( TBool /* aItemsAdded */ )
     {
     ResetListbox();
-    if( iOwningView.MarkingMode() && iListItems->MessageCount() <= 0 )
-        {
-        SetMarkingModeOff();
-        }
     }
 
 
@@ -1230,10 +1224,6 @@
         default:
             break;
         };
-    if( iOwningView.MarkingMode() && iListItems->MessageCount() <= 0 )
-        {
-        SetMarkingModeOff();
-        }
     }
 
 
@@ -2583,19 +2573,4 @@
         }
     return isMailMtm;
     }
-// ----------------------------------------------------
-// CMceOneRowMessageListContainer::SetMarkingModeOff
-// ----------------------------------------------------
-void CMceOneRowMessageListContainer::SetMarkingModeOff()
-    {
-    RWsSession wsSession = CCoeEnv::Static()->WsSession();
-    TKeyEvent keyEvent;
-    keyEvent.iCode = EKeyCBA2;  
-    keyEvent.iScanCode = EStdKeyDevice1;
-    keyEvent.iModifiers = 0;
-    keyEvent.iRepeats = 0;
-    wsSession.SimulateKeyEvent( keyEvent );
-    wsSession.Flush();
-    }   
-
 //  End of File
--- a/messagingappbase/mce/src/mceui.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/mce/src/mceui.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -22,7 +22,6 @@
 // INCLUDE FILES
 #include <bldvariant.hrh>
 #include <featmgr.h>
-#include <mtmuidef.hrh> 
 
 #include <messagingvariant.hrh>
 #include <centralrepository.h>
@@ -205,7 +204,7 @@
 _LIT( KMmsMessageDumpDirectory, "C:\\Private\\1000484b\\mmsvar");
 _LIT( KRootPath, "C:\\" );
 const TInt KMmsCodecClientChunkSize = 1024;
-#define KMtmUiFunctionSimDialog  ( KMtmFirstFreeMtmUiFunctionId + 1 )
+
 // LOCAL FUNCTION PROTOTYPES
 
 //  ==================== LOCAL FUNCTIONS ====================
@@ -233,8 +232,7 @@
     iAnchorId( NULL ),
     iEmailClientIntegration(EFalse),
     iSelectableEmail(EFalse),
-    iEmailFramework(EFalse),
-    iSimDialogOpen(EFalse)
+    iEmailFramework(EFalse)
     {
     iMceUiFlags.SetMceFlag( EMceUiFlagsExitOnMsvMediaAvailableEvent );
     }
@@ -833,7 +831,6 @@
     switch (aCommand)
         {
         case EEikCmdExit:
-            iSimDialogOpen = EFalse;
             Exit();
             break;
         case EMceCmdExit:
@@ -4492,10 +4489,6 @@
     TBuf8<1> buf;
     if (!(aFunction.iFlags&EMtudAsynchronous))
         {
-        if(aFunction.iFuncId == KMtmUiFunctionSimDialog)
-            {
-            iSimDialogOpen = ETrue;
-            }
         mtmUi.InvokeSyncFunctionL(aFunction.iFuncId, *sel, buf);
         }
     else
@@ -4982,11 +4975,6 @@
         {
         return;
         }
-    if( !MceViewActive( EMceDeliveryReportsViewActive ) &&
-            iMceListView->MarkingMode() )
-        {
-        return;
-        }
     TInt count = iTabsArray->Count();
     TMsvId newId = KMsvGlobalInBoxIndexEntryId;
     if ( aIndex < count )
@@ -6666,35 +6654,18 @@
 // ----------------------------------------------------
 void CMceUi::ResetAndHide()
     {
-    if( MceViewActive( EMceMessageViewActive ) && iMceListView
-            && iMceListView->MarkingMode() )
-        {
-        iMceListView->SetMarkingModeOff();
-        iMceListView->SetMarkingMode( EFalse );
-        RemoveTabs();
-        delete iDecoratedTabGroup;
-        iDecoratedTabGroup = NULL;
-        delete iTabsArray;
-        iTabsArray = NULL;
-        SetCustomControl(1);    // Disable bring-to-foreground on view activation
-        TRAP_IGNORE( CAknViewAppUi::CreateActivateViewEventL( \
-            KMessagingCentreMainViewUid, \
-            TUid::Uid(KMceHideInBackground), \
-            KNullDesC8 ) ) ;
-        }    
     // Messaging was not exiting properly when "exit" is pressed from settings dialog.
     // iMceUiFlags.MceFlag( EMceUiFlagsSettingsDialogOpen ) will be true 
     // when we exit from any of the settings Dialog. 
     // Closing of Settings dialogs will be taken care by AVKON. 
-    else if (!(MceViewActive( EMceMainViewActive) && IsForeground()) ||  
-	      iMceUiFlags.MceFlag( EMceUiFlagsSettingsDialogOpen ) || iSimDialogOpen )
+    if( !(MceViewActive( EMceMainViewActive ) && IsForeground() ) ||  
+	      iMceUiFlags.MceFlag( EMceUiFlagsSettingsDialogOpen ) )
         {
         SetCustomControl(1);    // Disable bring-to-foreground on view activation
         TRAP_IGNORE( CAknViewAppUi::CreateActivateViewEventL( \
             KMessagingCentreMainViewUid, \
             TUid::Uid(KMceHideInBackground), \
             KNullDesC8 ) ) ;
-        iSimDialogOpen = EFalse;
         }
     else
         {
--- a/messagingappbase/mcesettings/inc/MceSettingsDialog.h	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/mcesettings/inc/MceSettingsDialog.h	Wed Oct 13 14:27:34 2010 +0300
@@ -25,7 +25,7 @@
 
 #include <ConeResLoader.h>
 #include <msvapi.h>
-#include "MceSettingsTitlePaneHandlerDialog.h"
+#include "mcesettingstitlepanehandlerdialog.h"
 #include <MsgArrays.h>
 
 
--- a/messagingappbase/mcesettings/src/MceSettingsGeneralSettingsDialog.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/mcesettings/src/MceSettingsGeneralSettingsDialog.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -434,12 +434,10 @@
             {
             if ( iMemoryInUse )
                 {
-                delete (*iMceSettingsArray)[EMceGeneralSettingsMailListType].iMuiuSettingsItemArray;
                 iMceSettingsArray->Delete(EMceGeneralSettingsMailListType);
                 }
             else
                 {
-                delete (*iMceSettingsArray)[MceGeneralSettingsMailListType].iMuiuSettingsItemArray;
                 iMceSettingsArray->Delete(MceGeneralSettingsMailListType);
                 }
             }
Binary file messagingappbase/msgavkon/conf/messaging.confml has changed
Binary file messagingappbase/msgavkon/conf/messaging_102824A0.crml has changed
--- a/messagingappbase/msgavkon/msgindicatorplugin/inc/MsgWaitingObserver.h	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/msgavkon/msgindicatorplugin/inc/MsgWaitingObserver.h	Wed Oct 13 14:27:34 2010 +0300
@@ -49,10 +49,6 @@
         virtual ~CWaitingObserver();
         
         TInt GetMsgCount(const TIndicatorMessageType aMsgType);
-		/**
-         * Check the KMuiuSupressAllNotificationConfiguration value
-         */        
-        TBool CheckSupressNotificationSettingL();
                 
     public: // From CActive
     
--- a/messagingappbase/msgavkon/msgindicatorplugin/src/MsgWaitingObserver.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/msgavkon/msgindicatorplugin/src/MsgWaitingObserver.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -18,7 +18,6 @@
 
 
 #include <etelmm.h>
-#include <MessagingDomainCRKeys.h>
 #include "MsgWaitingObserver.h"
 #include "msgindicatorpluginlog.h"
 #include "msgindicatorpluginimplementation.h"
@@ -170,21 +169,19 @@
     MSGPLUGINLOGGER_WRITE_FORMAT( "::UpdateIndicatorStatus: Fax count %d", iMsgWaiting.iFaxMsgs );
 
     iMsgWaiting = iMsgWaitingPckg();
-    if(!CheckSupressNotificationSettingL())
+
+    if(iMsgWaiting.iDisplayStatus & RMobilePhone::KDisplayVoicemailActive)
         {
-    	if(iMsgWaiting.iDisplayStatus & RMobilePhone::KDisplayVoicemailActive)
-        	{
-        	if ( !iIndicatorPlugin.IsALSSupported() )
-            	{
-            	MSGPLUGINLOGGER_WRITE( "iIndicatorPlugin.UpdateTextL( EAknIndicatorVoiceMailWaiting )");
-            	iIndicatorPlugin.UpdateL( EAknIndicatorVoiceMailWaiting );
-            	}
-        	else
-            	{
-            	MSGPLUGINLOGGER_WRITE( "iIndicatorPlugin.UpdateTextL( EAknIndicatorVoiceMailWaitingOnLine1 )");
-            	iIndicatorPlugin.UpdateL( EAknIndicatorVoiceMailWaitingOnLine1 );
-            	}
-        	}
+        if ( !iIndicatorPlugin.IsALSSupported() )
+            {
+            MSGPLUGINLOGGER_WRITE( "iIndicatorPlugin.UpdateTextL( EAknIndicatorVoiceMailWaiting )");
+            iIndicatorPlugin.UpdateL( EAknIndicatorVoiceMailWaiting );
+            }
+        else
+            {
+            MSGPLUGINLOGGER_WRITE( "iIndicatorPlugin.UpdateTextL( EAknIndicatorVoiceMailWaitingOnLine1 )");
+            iIndicatorPlugin.UpdateL( EAknIndicatorVoiceMailWaitingOnLine1 );
+            }
         }
     if ( iMsgWaiting.iDisplayStatus & RMobilePhone::KDisplayAuxVoicemailActive )
         {
@@ -197,29 +194,5 @@
         iIndicatorPlugin.UpdateL( EAknIndicatorFaxMessage );
         }
 	}	    
-// -------------------------------------------------------------------
-// Check the KMuiuSupressAllNotificationConfiguration value
-// -------------------------------------------------------------------
-//
-TBool CWaitingObserver::CheckSupressNotificationSettingL()
-{
-    TBool result = EFalse; 
-    TInt value = 0;
-    CRepository* repository = NULL;
-   
-   TRAPD( err, repository = CRepository::NewL( KCRUidMuiuMessagingConfiguration ) );
-   if( err == KErrNone && repository != NULL )
-       {
-       CleanupStack::PushL( repository ); 
-       err = repository->Get( KMuiuSupressAllNotificationConfiguration, value );
-       
-       if(err == KErrNone && (value & KMuiuNotificationSupressedForVoiceMail ))
-           {
-           result = ETrue;
-           }
-        } 
-       MSGPLUGINLOGGER_WRITE_FORMAT( "CWaitingObserver:  SupressNotification %d", result );
-       CleanupStack::PopAndDestroy( repository );
-       return result;
-}	    
+	    
 //  End of File
--- a/messagingappbase/msgavkon/muiu_internal/flagger/inc/MuiuFlagger.h	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/msgavkon/muiu_internal/flagger/inc/MuiuFlagger.h	Wed Oct 13 14:27:34 2010 +0300
@@ -22,7 +22,7 @@
 #define CMUIUFLAGGER_H
 
 //  INCLUDES
-#include "MuiuFlags.h"
+#include "muiuflags.h"
 #include <e32cmn.h>
 
 // CONSTANTS
--- a/messagingappbase/msgavkon/muiu_internal/inc/MessagingInternalCRKeys.h	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/msgavkon/muiu_internal/inc/MessagingInternalCRKeys.h	Wed Oct 13 14:27:34 2010 +0300
@@ -132,9 +132,7 @@
 const TUint32 KSmumPreviousSimSmscNumber            = 0x00000018;
 const TUint32 KSmumShowSMSCTimeStamp                = 0x00000019;
 const TUint32 KSmsSettingsDiscardUnknownPortMsgs    = 0x0000001A;
-// REQ:417-48417 Message forward with sender info
-const TUint32 KForwardWithSenderInfo                = 0x0000001B;
-// End REQ:417-48417
+
 //
 // Send UI Settings API
 const TUid KCRUidSendUi = {0x101F8873};
--- a/messagingappbase/msgavkon/muiu_internal/servicesinternal/inc/MuiuContactService.h	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/msgavkon/muiu_internal/servicesinternal/inc/MuiuContactService.h	Wed Oct 13 14:27:34 2010 +0300
@@ -21,7 +21,7 @@
 #define MUIUCONTACTSERVICE_H
 
 #include <e32base.h> // CBase
-#include "MuiuMsvUiServiceUtilitiesInternal.h"
+#include "muiumsvuiserviceutilitiesinternal.h"
 
 class CMuiuContactAddressMatcher;
 class CMsgVoIPExtension;
--- a/messagingappbase/msgavkon/muiu_internal/servicesinternal/inc/MuiuLock.h	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/msgavkon/muiu_internal/servicesinternal/inc/MuiuLock.h	Wed Oct 13 14:27:34 2010 +0300
@@ -22,7 +22,7 @@
 
 class CRepository;
 
-#include "MessagingInternalCRKeys.h"
+#include "messaginginternalcrkeys.h"
 
 
 // Lock identifier for messaging settings access
--- a/messagingappbase/msgavkon/muiu_internal/settingsarray/src/MuiuSettingsArray.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/msgavkon/muiu_internal/settingsarray/src/MuiuSettingsArray.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -111,9 +111,9 @@
             item.iLabelText.Copy( *txt );
             TBool flag = EFalse;
             //If string retrived from resource is "Message sent as" 
-            CleanupStack::PushL( txt );
             flag = IsMessageSentStringL( txt );
-            CleanupStack::PopAndDestroy( txt );
+
+            delete txt;
             
             const TMuiuSettingsType type = ( TMuiuSettingsType ) reader.ReadInt16();
             item.iType = type;
@@ -127,24 +127,25 @@
             
             if ( type == EMuiuSettingsSelectionList && array_id )
                 {
-                TResourceReader arrayReader;
-                env->CreateResourceReaderLC( arrayReader, array_id );
+                CDesCArrayFlat* array = 
+                                new( ELeave ) CDesCArrayFlat( KMuiuSettingsArrayGranularity );
+                CleanupStack::PushL( array );
+                TResourceReader reader2;
+                env->CreateResourceReaderLC( reader2, array_id );
                 
-                CDesCArrayFlat* array = arrayReader.ReadDesCArrayL();
-                
-                if ( !flag && array )
+                const TInt count = reader2.ReadInt16();
+                for ( TInt loop = 0; loop < count; loop++ )
                     {
-                    item.iMuiuSettingsItemArray = array;
-                    CleanupStack::PushL( array );
-                    AppendL( item );
-                    CleanupStack::Pop( array );
+                    HBufC* txt = reader2.ReadHBufCL();
+                    CleanupStack::PushL( txt );
+                    array->AppendL( *txt );
+                    CleanupStack::PopAndDestroy(); // txt
                     }
-                else
-                    {
-                    delete array;
-                    }
-                
-                CleanupStack::PopAndDestroy();
+                CleanupStack::PopAndDestroy(); //reader2
+                item.iMuiuSettingsItemArray = array;
+                if(!flag)
+                AppendL( item );
+                CleanupStack::Pop( array ); //array
                 }
             else
                 {
--- a/messagingappbase/msgeditor/mediacontrolsrc/MsgImageControl.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/msgeditor/mediacontrolsrc/MsgImageControl.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -150,26 +150,18 @@
             
     TSize sourceSize( iSourceImage->Size() );
     TSize targetSize = TSize(
-    	Min( sourceSize.iWidth, iMaxSize.iWidth - iFrame->FrameBorderSize().iWidth ),
-		Min( sourceSize.iHeight, iMaxSize.iHeight - iFrame->FrameBorderSize().iHeight ) );
-
-    // In case of KImageTypePNGUid and KImageTypeBMPUid 
-    // with and without IsAnimation, call CreateImageViewerL with
-    // Flags zero. This to avoid image corruption  when IsAnimation is flase and 
-    // Image resize happened based on control size.
+    Min( sourceSize.iWidth, iMaxSize.iWidth - iFrame->FrameBorderSize().iWidth ),
+    Min( sourceSize.iHeight, iMaxSize.iHeight - iFrame->FrameBorderSize().iHeight ) );
 
-    TUint32 flagOptions = 0;
+    // Avoiding the usage of MIHLImageViewer::EOptionUseBilinearInterpolation
+    // because it should be only used for small images because of the memory requirements
+    // and it is much slower than the regular scaling
+    //For any type of image, nearest neighbour method(default) will be used to resize it. 
     
-    if ( !iSourceImage->IsAnimation() &&
-           iSourceImage->ImageType() == KImageTypeGIFUid )
-        {
-        	flagOptions |= MIHLImageViewer::EOptionUseBilinearInterpolation;
-      	}
- 	  iEngine = IHLViewerFactory::CreateImageViewerL( targetSize,
+    iEngine = IHLViewerFactory::CreateImageViewerL( targetSize,
                                                     *iSourceImage, 
                                                     *iDestinationBitmap, 
-                                                    *this, 
-                                                    flagOptions);                        	
+                                                    *this);                        	
     }
 
 // ---------------------------------------------------------
--- a/messagingappbase/msgeditor/viewsrc/MsgAttachmentControl.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/msgeditor/viewsrc/MsgAttachmentControl.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -145,9 +145,6 @@
     iEditor->SetReadOnly( ETrue );
     iEditor->AddFlagToUserFlags( CEikEdwin::EAvkonDisableCursor );
     
-	// To Dis-able Smiley support for attachment field.
-    iEditor->RemoveFlagFromUserFlags(CEikEdwin::EAvkonEnableSmileySupport);
-    
     iControlModeFlags |= EMsgControlModeForceFocusStop;
     
     SetPlainTextMode( ETrue );
--- a/messagingappbase/msgeditor/viewsrc/MsgEditorView.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/msgeditor/viewsrc/MsgEditorView.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -70,6 +70,7 @@
 const TInt KMsgNumberOfControls = 2;
 
 const TInt KMsgMaximumScrollPartLength = 64;
+const TInt KSelectionOffset = 50;
 _LIT( KMsgEditorAppUiResourceFileName, "msgeditorappui.rsc" );
 
 // ========== MODULE DATA STRUCTURES =======================
@@ -808,11 +809,16 @@
         {
         TBool handled( EFalse );
 
-	if ( IsFocused() )
-	{           
-        TPointerEvent pointerEvent( aPointerEvent );
-            
-        iEditorObserver.EditorObserver( MMsgEditorObserver::EMsgControlPointerEvent, 
+        if( IsReadOnly() )
+            {
+            handled = HandleScrollEventL(aPointerEvent);
+            }
+
+        if ( !handled && IsFocused() )
+            {
+            TPointerEvent pointerEvent( aPointerEvent );
+                         
+            iEditorObserver.EditorObserver( MMsgEditorObserver::EMsgControlPointerEvent, 
             ControlFromPosition( aPointerEvent.iPosition, ETrue ),
             &pointerEvent, 
             &handled );
@@ -830,6 +836,219 @@
     }
 #endif // RD_SCALABLE_UI_V2
 
+// ---------------------------------------------------------
+// CMsgEditorView::HandleScrollEventL
+//
+// Handle text scrolling from pointer event
+// ---------------------------------------------------------
+//
+
+TBool CMsgEditorView::HandleScrollEventL(const TPointerEvent& aPointerEvent)
+    {
+    TBool handled = EFalse;
+
+    if ( IsFocused() )
+        {
+        switch(aPointerEvent.iType)
+            {
+            case TPointerEvent::EButton1Down:
+                {
+                if(!iScrollBar->VerticalScrollBar()->Rect().Contains(aPointerEvent.iPosition))
+                    {
+                    iIsScrolling = ETrue;
+                    
+                    iHaveScrolled = EFalse;
+                    iFirstPointerDown = aPointerEvent;
+                    iScrollPos = aPointerEvent.iPosition;
+
+                    handled = ETrue;
+                    }
+                else
+                    {
+                    iIsScrolling = EFalse;
+                    }
+                }
+                break;
+                
+            case TPointerEvent::EDrag:
+                {
+
+                if(iIsScrolling)
+                    {
+                    if(!iHaveScrolled)
+                        {
+                        TInt xOffset = aPointerEvent.iPosition.iX - iScrollPos.iX;
+                        if(Abs(xOffset) > KSelectionOffset) // this is a selection
+                            {
+                            iIsScrolling = EFalse;
+                            ThrowOutPointerEventL(iFirstPointerDown);
+                            break;
+                            }
+                        }
+
+                    TInt yOffset = aPointerEvent.iPosition.iY - iScrollPos.iY;
+                    if(Abs(yOffset) > iLineHeight)
+                        {
+                        TInt scrolled = ScrollL(yOffset);
+                        if(scrolled)
+                            {
+                            iScrollPos.iY += scrolled;
+                            }
+                        else
+                            {
+                            ScrollPageL(yOffset);
+                            iScrollPos.iY = aPointerEvent.iPosition.iY;
+                            }
+                        
+                        iHaveScrolled = ETrue;
+                        }
+                    
+                    handled = ETrue;
+                    }
+                }
+                break;
+                
+            case TPointerEvent::EButton1Up:
+                {
+                if(iIsScrolling)
+                    {
+                    iIsScrolling = EFalse;
+                    
+                    if(!iHaveScrolled) // mainly perform a click
+                        {
+                        ThrowOutPointerEventL(iFirstPointerDown);
+
+                        iFirstPointerDown.iType = TPointerEvent::EDrag;
+                        ThrowOutPointerEventL(iFirstPointerDown);
+                        
+                        ThrowOutPointerEventL(aPointerEvent);
+                        }
+                    
+                    handled = ETrue;
+                    }
+                }
+                break;
+                
+            default:
+                break;
+            }
+        }
+
+    return handled;
+    }
+	
+	// ---------------------------------------------------------
+// CMsgEditorView::ThrowOutPointerEventL
+//
+//
+// Throw the pointer event to the other handler
+// ---------------------------------------------------------
+//
+
+void CMsgEditorView::ThrowOutPointerEventL(const TPointerEvent& aPointerEvent)
+    {
+    TBool lastPosHandled = EFalse;
+    
+    TPointerEvent pointerEvent( aPointerEvent );
+    iEditorObserver.EditorObserver( MMsgEditorObserver::EMsgControlPointerEvent, 
+                                    ControlFromPosition( aPointerEvent.iPosition, ETrue ), 
+                                    &pointerEvent, &lastPosHandled );
+
+    if ( !lastPosHandled )
+        {
+        CCoeControl::HandlePointerEventL( aPointerEvent );
+        }
+    }
+	
+	
+	// ---------------------------------------------------------
+// CMsgEditorView::ScrollPartL
+//
+// Move current view up or down with screen height. 
+//
+// ---------------------------------------------------------
+//
+
+void CMsgEditorView::ScrollPartL(TInt aOffset)
+    {
+    TKeyEvent keyEvent;
+    keyEvent.iModifiers = 0;
+    if(aOffset < 0)
+        {
+        keyEvent.iCode = EKeyDownArrow;
+        keyEvent.iScanCode = EStdKeyDownArrow;
+        }
+    else
+        {
+        keyEvent.iCode = EKeyUpArrow;
+        keyEvent.iScanCode = EStdKeyUpArrow;
+        }
+    
+    OfferKeyEventL(keyEvent, EEventKeyDown);
+    OfferKeyEventL(keyEvent, EEventKey);
+    OfferKeyEventL(keyEvent, EEventKeyUp);
+    
+    
+    CItemFinder* finder = ItemFinder();
+    if(finder) 
+		{
+		finder->ResetCurrentItem();
+		}
+    }
+	
+// ---------------------------------------------------------
+// CMsgEditorView::ScrollPageL
+//
+// Change to the previous or the next part(slide) if possible. 
+//
+// ---------------------------------------------------------
+//
+
+void CMsgEditorView::ScrollPageL(TInt aOffset)
+    {
+    CMsgBaseControl* headerFocus = iHeader ? iHeader->FocusedControl() : NULL;
+    CMsgBaseControl* bodyFocus = iBody ? iBody->FocusedControl() : NULL;
+
+    if(aOffset < 0)
+        {
+        if ( iCurrentFocus == EMsgHeaderFocused )
+            {
+            iCurrentFocus = EMsgBodyFocused;
+            }
+        if(headerFocus) 
+			{
+			headerFocus->NotifyViewEvent( EMsgViewEventPrepareFocusTransitionDown, 0 );
+			}
+        if(bodyFocus)
+            {
+            TBool isFocused = bodyFocus->IsFocused();
+            bodyFocus->SetFocus(ETrue);
+            bodyFocus->NotifyViewEvent( EMsgViewEventPrepareFocusTransitionDown, 0 );
+            bodyFocus->SetFocus(isFocused);
+            }
+        }
+    else
+        {
+        if(bodyFocus)
+            {
+            TBool isFocused = bodyFocus->IsFocused();
+            bodyFocus->SetFocus(ETrue);
+            bodyFocus->NotifyViewEvent( EMsgViewEventPrepareFocusTransitionUp, 0 );
+            bodyFocus->SetFocus(isFocused);
+            }
+        if(headerFocus) 
+			{
+			headerFocus->NotifyViewEvent( EMsgViewEventPrepareFocusTransitionUp, 0 );
+			}
+        if ( iCurrentFocus==EMsgBodyFocused && 0==iVisiblePart)
+            {
+            iCurrentFocus = EMsgHeaderFocused;
+            }
+        }
+
+    ScrollPartL(aOffset);
+    }
+
 
 // ---------------------------------------------------------
 // CMsgEditorView::ViewInitialized
@@ -2620,15 +2839,15 @@
     TInt newFocus;
     CMsgBodyControl* body = static_cast<CMsgBodyControl*>( ControlById( EMsgComponentIdBody ) );
     CEikRichTextEditor* bodyEditor = NULL;
+    TBool toBodyBeginning = (aAfterFocus == MMsgEditorObserver::EMsgCursorToBodyBeginning);
 
     if ( body )
         {
         bodyEditor = &body->Editor();
-        body->SetupAutomaticFindAfterFocusChangeL(
-                            aAfterFocus == MMsgEditorObserver::EMsgCursorToBodyBeginning );
+        body->SetupAutomaticFindAfterFocusChangeL( toBodyBeginning );
         }
 
-    if ( aAfterFocus == MMsgEditorObserver::EMsgCursorToBodyBeginning )
+    if ( toBodyBeginning )
         {
         newFocus = iBody->FirstFocusableControl( 0, EMsgFocusDown );
         
@@ -2642,6 +2861,11 @@
                 bodyEditor->SetCursorPosL( 0, EFalse );
                 }
             }
+        
+        // go to the first line
+        CMsgBaseControl* bodyFocus = iBody->FocusedControl();
+        if(bodyFocus) bodyFocus->NotifyViewEvent( EMsgViewEventPrepareFocusTransitionUp, 0 );
+        EnsureCorrectFormPosition(EFalse);
         }
     else if ( aAfterFocus == MMsgEditorObserver::EMsgCursorToBodyEnd )
         {
@@ -2670,6 +2894,11 @@
                 
             forceScrollUp = ETrue;
             }
+
+        // go to the last line
+        CMsgBaseControl* bodyFocus = iBody->FocusedControl();
+        if(bodyFocus) bodyFocus->NotifyViewEvent( EMsgViewEventPrepareFocusTransitionDown, 0 );
+        EnsureCorrectFormPosition(ETrue);
         }
     return forceScrollUp;
     }
@@ -2871,6 +3100,20 @@
             {
             TInt scrolledPixels = iViewFocusPosition - AknScrollBarModel()->FocusPosition();
             
+            if( IsReadOnly() )
+                {
+                TInt screenHeight = MsgEditorCommons::EditorViewHeigth() - iBaseLineOffset;
+
+                if(scrolledPixels > screenHeight)
+                    {
+                    scrolledPixels = screenHeight;
+                    }
+                else if(scrolledPixels < -screenHeight)
+                    {
+                    scrolledPixels = -screenHeight;
+                    }
+                }
+
             // Round to the previous full line.
             MsgEditorCommons::RoundToPreviousLine( scrolledPixels, iLineHeight );
         
@@ -2927,7 +3170,8 @@
                 {
                 // Thumb position is forced to the top most position of currently scrolled slide.
                 TInt currentHeight( 0 );
-                TInt screenHeight = iViewRect.Height() - iBaseLineOffset;
+                TInt screenHeight = MsgEditorCommons::EditorViewHeigth() - iBaseLineOffset;
+                TInt singlePartHeight = Max( screenHeight, iVisiblePartHeight / 10 );
 
                 for ( TInt current = 0; current < currentPart; current++ )
                     {
@@ -2937,12 +3181,12 @@
                         }
                     else
                         {
-                        currentHeight += screenHeight;
+                        currentHeight += singlePartHeight;
                         }
                     }
                 
                 iScrollBar->DrawBackground( ETrue, EFalse );
-                iScrollBar->SetVFocusPosToThumbPos( currentHeight );
+                iScrollBar->SetVFocusPosToThumbPos( currentHeight + screenHeight/20 );
                 
                 if ( currentPart != iPopUpPart )
                     {
@@ -2971,6 +3215,84 @@
 #endif // RD_SCALABLE_UI_V2
 
 // ---------------------------------------------------------
+// CMsgEditorView::ScrollL
+//
+// Scroll text in current part (slide)
+// ---------------------------------------------------------
+//
+TInt CMsgEditorView::ScrollL(TInt aScrolledPixels)
+    {
+    TInt scrolledPixels = aScrolledPixels;
+    TInt focusPos = iViewFocusPosition;
+    TInt currentPart( CurrentScrollPart( AknScrollBarModel()->FocusPosition() ) );
+
+    if ( currentPart == iVisiblePart )
+        {
+        if ( iPopUpPart != -1 )
+            {
+            // Hide the popup if visible
+            static_cast<CAknDoubleSpanScrollBar*>( iScrollBar->VerticalScrollBar() )->SetScrollPopupInfoTextL( KNullDesC );
+            iPopUpPart = -1;
+            }    
+        }
+
+    if ( iPopUpPart == -1 )
+        {
+        // Round to the previous full line.
+        MsgEditorCommons::RoundToPreviousLine( scrolledPixels, iLineHeight );
+    
+        if ( scrolledPixels != 0 )
+            {
+            ScrollViewL( Abs( scrolledPixels ), scrolledPixels>0?EMsgScrollUp:EMsgScrollDown, EFalse );
+            EnsureCorrectScrollPartL( AknScrollBarModel()->FocusPosition() );
+            }
+        }
+    
+    TInt pixelsScrolled = iViewFocusPosition - AknScrollBarModel()->FocusPosition();
+    TMsgScrollDirection scrollDirection = pixelsScrolled > 0 ? EMsgScrollUp : EMsgScrollDown;
+
+    // If scrolled position is outside of visible part, then there is no need to 
+    // reset thumb position and no page number pop-up need be shown.
+    if ( (currentPart!=iVisiblePart) && EnsureVisiblePartScrollComplete ( AknScrollBarModel()->FocusPosition(), scrollDirection ) )
+        {
+        // Thumb position is forced to the top most position of currently scrolled slide.
+        TInt currentHeight( 0 );
+        //TInt screenHeight = iViewRect.Height() - iBaseLineOffset;
+        TInt screenHeight = MsgEditorCommons::EditorViewHeigth() - iBaseLineOffset;
+        TInt singlePartHeight = Max( screenHeight, iVisiblePartHeight / 10 );
+
+        for ( TInt current = 0; current < currentPart; current++ )
+            {
+            if ( current == iVisiblePart )
+                {
+                currentHeight += iVisiblePartHeight;
+                }
+            else
+                {
+                currentHeight += singlePartHeight;
+                }
+            }
+        
+        iScrollBar->DrawBackground( ETrue, EFalse );
+        iScrollBar->SetVFocusPosToThumbPos( currentHeight );
+        
+        if ( currentPart != iPopUpPart )
+            {
+            ShowScrollPopupInfoTextL( static_cast<CAknDoubleSpanScrollBar*>( iScrollBar->VerticalScrollBar() ), 
+                                      currentPart + 1 );
+            iPopUpPart = currentPart;
+            }
+        }
+    else
+        {
+        iScrollBar->SetVFocusPosToThumbPos( iViewFocusPosition );
+        iScrollBar->DrawScrollBarsNow();
+        }
+
+    return (focusPos - iViewFocusPosition);
+    }
+
+// ---------------------------------------------------------
 // CMsgEditorView::Draw
 // Draws skin background for the view area. With video control
 // this should not be done since we might accidentally draw over
@@ -3069,9 +3391,10 @@
     TBool result = ETrue;
     
     TInt screenHeight = MsgEditorCommons::EditorViewHeigth() - iBaseLineOffset;
+    TInt singlePartHeight = Max( screenHeight, iVisiblePartHeight / 10 );
 
     for ( TInt current = 0; current < iVisiblePart ; current++ )
-        scrollTillPosition += screenHeight;
+        scrollTillPosition += singlePartHeight;
     
     if ( aDirection == EMsgScrollDown )
         {
@@ -3253,19 +3576,20 @@
     TInt bottomPart( -1 );
     
     TInt topPosition( aFocusPosition );
-    TInt bottomPosition( topPosition + iViewRect.Height() - iBaseLineOffset );
     
     TInt screenHeight = MsgEditorCommons::EditorViewHeigth() - iBaseLineOffset;
-    
+    TInt singlePartHeight = Max( screenHeight, iVisiblePartHeight / 10 );
+
     for ( TInt current = 0; current < iScrollParts; current++ )
         {
         if ( current == iVisiblePart )
             {
             currentHeight += iVisiblePartHeight;
+            bottomPart = current;
             }
         else
             {
-            currentHeight += screenHeight;
+            currentHeight += singlePartHeight;
             }
         
         if ( topPart == -1 &&
@@ -3274,11 +3598,6 @@
             topPart = current;
             }
         
-        if ( bottomPart == -1 &&
-             bottomPosition <= currentHeight )
-            {
-            bottomPart = current;
-            }
         }
     
     if ( topPart == -1 )
@@ -3577,9 +3896,24 @@
             {
             // Boundary check for form scrolling. Do not scroll up (down) if first (last) control is
             // fully visible. Also do not scroll form if scrolling would make scroll part change.
-            if ( aDirection == EMsgScrollDown ? lastControl->Rect().iBr.iY > iViewRect.Height() :
-                                                firstControl->Rect().iTl.iY < iViewRect.Height() &&
-                 CurrentScrollPart( iViewFocusPosition - aPixelsToScroll + pixelsLeftToScroll + directionMultiplier * iLineHeight ) == iVisiblePart )
+            
+            TBool needScroll = EFalse;
+            TInt height = iViewRect.Height(); 
+
+            if(aDirection == EMsgScrollDown)
+                {
+                TInt length = lastControl->Rect().iBr.iY;
+                needScroll = (length > height);
+                }
+            else
+                {
+                TInt length = firstControl->Rect().iTl.iY;
+                needScroll = (length < height);
+                }
+            
+            TBool isCurrent = (CurrentScrollPart( iViewFocusPosition - aPixelsToScroll + pixelsLeftToScroll + directionMultiplier * iLineHeight ) == iVisiblePart);
+
+            if ( needScroll && isCurrent )
                 {
                 
                 if ( pixelsLeftToScroll > 0 )
--- a/messagingappbase/msgerrorwatcher/inc/MsgSentItemsObserver.h	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/msgerrorwatcher/inc/MsgSentItemsObserver.h	Wed Oct 13 14:27:34 2010 +0300
@@ -141,6 +141,13 @@
         * @param aSelection Enties to be deleted
         */
         void DeleteMessagesFromSentFolderL( CMsvEntrySelection* aSelection );
+		
+		/**
+        * Delete the messages specified by aSelection
+        * aSelection is expected to have count 1
+        * @param aSelection Enties to be deleted
+        */
+        void DeleteSingleEntryL(CMsvEntrySelection* aSelection);
 
     private: //from CActive
 
@@ -166,6 +173,11 @@
         CMsvOperation* iOp;
         TUint iRetryCounter;
         TInt iMsgStoreDrive;
+        
+        class CMsvEntrySelection*	iQudUPEntryBeingDeleted;
+        class CMsvEntrySelection*	iQueuedUPEntriesToBeDeleted;
+        TInt						iRetryCounterIfEntryDelFailed;
+        
     };
 
 #endif      // MSGSENTITEMSOBSERVER_H
--- a/messagingappbase/msgerrorwatcher/src/MsgSentItemsObserver.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/msgerrorwatcher/src/MsgSentItemsObserver.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -25,6 +25,7 @@
 #include <centralrepository.h>    // link against centralrepository.lib
 #include <cenrepnotifyhandler.h>  // link against CenRepNotifHandler.lib
 #include <messaginginternalcrkeys.h> // for Central Repository keys
+#include <MSVIPC.h>
 
 #include "MsgSentItemsObserver.h"
 
@@ -35,6 +36,8 @@
 // CONSTANTS
 //const TUid KUidMceApp = { 0x100058C5 }; //needed to request shared data notifications
 const TMsvId KWatcherSentFolderId = KMsvSentEntryIdValue;
+
+// Entry deletion could fail with KErrInUse if it is being operated by MW while deleting
 const TUint KMaxRetries = 3;
 const TInt KMaxNumOfItems = 20; //Deafult value in case of error reading CommsDb
 //const TInt KMsgErrorDiskSpaceForDelete = ( 5 * 1024 ); // minimum disk space needed when deleting messages
@@ -99,6 +102,10 @@
     delete iSentItemsFolder;
     delete iEntry;
     delete iOp;
+    
+    delete iQudUPEntryBeingDeleted;
+    delete iQueuedUPEntriesToBeDeleted;
+    
     }
 
 // ---------------------------------------------------------
@@ -125,7 +132,10 @@
     iRepository = CRepository::NewL( KCRUidMuiuSettings );
     iNotifyHandler = CCenRepNotifyHandler::NewL( *this, *iRepository );
     iNotifyHandler->StartListeningL();
-
+    
+    iQudUPEntryBeingDeleted = new(ELeave) CMsvEntrySelection;
+    iQueuedUPEntriesToBeDeleted= new(ELeave) CMsvEntrySelection;
+    
 #ifdef USE_LOGGER
     MEWLOGGER_LEAVEFN( "SentItems: ConstructL" );
 #endif
@@ -140,16 +150,6 @@
 void CMsgSentItemsObserver::RunL()
     {
     //iSession->FileSession().ReleaseReserveAccess( iMsgStoreDrive );
-#ifdef USE_LOGGER
-    if( iStatus==KErrNone )
-        {
-        MEWLOGGER_WRITE( "SentItems: deletion successful" );
-        }
-    else
-        {
-        MEWLOGGER_WRITEF( _L("SentItems: deletion error %d"), iStatus.Int() );
-        } 
-#endif
     //Check if new messages have appeared into Sent Items while deleting
     //the previous one(s).
 #ifdef USE_LOGGER
@@ -160,6 +160,38 @@
         iRetryCounter++;
         TRAP_IGNORE( DeleteOldMessagesFromSentFolderL() );
         }
+    
+    
+    const TDesC8& temp = iOp->ProgressL();
+    TMsvLocalOperationProgress* prog = ( (TMsvLocalOperationProgress*) temp.Ptr());
+
+#ifdef USE_LOGGER
+    MEWLOGGER_WRITEF( _L("SentItems: deletion iStatus %d"), iStatus.Int() );
+	// prog->iNumberFailed should be either 0(if successful) or 1(if failed) as we are deletingone entry at a time
+    MEWLOGGER_WRITEF( _L("Failed Deletions: %d"), prog->iNumberFailed );
+    MEWLOGGER_WRITEF( _L("Delete Error Code: %d"), prog->iError );
+#endif
+    
+    if(iStatus.Int() == KErrNone && prog->iNumberFailed && prog->iError == KErrInUse && iRetryCounterIfEntryDelFailed < KMaxRetries)
+        {
+        DeleteSingleEntryL(iQudUPEntryBeingDeleted);
+        iRetryCounterIfEntryDelFailed ++;
+#ifdef USE_LOGGER
+        MEWLOGGER_WRITEF( _L("iRetryCounterIfEntryDelFailed : %d"), iRetryCounterIfEntryDelFailed );
+#endif
+        return;
+        }
+    iRetryCounterIfEntryDelFailed = 0;
+    
+    if( iQueuedUPEntriesToBeDeleted->Count() )
+        {
+        iQudUPEntryBeingDeleted->Reset();
+        iQudUPEntryBeingDeleted->AppendL(iQueuedUPEntriesToBeDeleted->At(0));
+        iQueuedUPEntriesToBeDeleted->Delete(0);
+        
+        DeleteSingleEntryL(iQudUPEntryBeingDeleted);
+        }
+    
     }
 
 // ---------------------------------------------------------
@@ -324,11 +356,28 @@
 //
 void CMsgSentItemsObserver::DeleteMessagesFromSentFolderL( CMsvEntrySelection* aSelection )
     {
+    iQueuedUPEntriesToBeDeleted->AppendL(aSelection->Back(0), aSelection->Count());
     if ( !IsActive() )
         {
+        iQudUPEntryBeingDeleted->Reset();
+        iQudUPEntryBeingDeleted->AppendL(iQueuedUPEntriesToBeDeleted->At(0));
+        iQueuedUPEntriesToBeDeleted->Delete(0);
+        
+		// If multiple entries are sent for deletion, then it won't be possible to track
+		// the entries that failed to delete
+        DeleteSingleEntryL(iQudUPEntryBeingDeleted);
+        }
+    
+    }
+
+
+void CMsgSentItemsObserver::DeleteSingleEntryL(CMsvEntrySelection* aSelection)
+    {
+
 #ifdef USE_LOGGER
         MEWLOGGER_WRITEF( _L("SentItems: deleting %d messages from sent folder"), aSelection->Count() );
 #endif
+        
         const TMsvId id = aSelection->At( 0 );
         delete iEntry;
         iEntry = 0;
@@ -355,8 +404,9 @@
         //    {
             SetActive();
         //    }
+            
         }
-    }
+
 
 //  End of File  
 
--- a/messagingappbase/ncnlist/inc/CVoiceMailManager.h	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/ncnlist/inc/CVoiceMailManager.h	Wed Oct 13 14:27:34 2010 +0300
@@ -99,11 +99,6 @@
          */
 		void NotifyAboutSIMChange();
 		
-        /**
-         * Check the KMuiuSupressAllNotificationConfiguration value
-         */		
-		TBool CheckSupressNotificationSettingL();
-		
     private:
 
         /**
--- a/messagingappbase/ncnlist/src/CVoiceMailManager.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/ncnlist/src/CVoiceMailManager.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -26,7 +26,6 @@
 #include  <NcnListInternalCRKeys.h>		// For CR key handling
 #include  <RSSSettings.h>				// For ALS detection
 #include  <startupdomainpskeys.h>
-#include  <MessagingDomainCRKeys.h>
 
 #include "NcnDebug.h"
 #include "NcnCRHandler.h"
@@ -77,12 +76,7 @@
 	//Clear soft notifications	that might be drawn automatically by avkon
 	//TSW Error TWOK-6PNT26	
 	ClearVoiceMailSoftNotes();
-	//clear Voicemail indicators only when KMuiuSupressAllNotificationConfiguration(VVM) is enabled.
-	if(CheckSupressNotificationSettingL())
-		{	
-     	iModel.MsgWaitingManager().SetIndicator( MNcnMsgWaitingManager::ENcnIndicatorVMLine1, EFalse );
-     	iModel.MsgWaitingManager().SetIndicator( MNcnMsgWaitingManager::ENcnIndicatorVMLine2, EFalse );
-		}
+			
  	//Get SIM change status at the startup. If the SIM will change after
  	//boot-up we get notifed by the Model so no need to subscribe for this key
  	//TSW ID EHCN-6NRAZE
@@ -185,16 +179,13 @@
     NCN_RDEBUG_INT(_L("CVoiceMailManager : %d voice mails in line 1 (ALS supported)"), aVoiceMailsInLine1 );
     NCN_RDEBUG_INT(_L("CVoiceMailManager : %d voice mails in line 2 (ALS supported)"), aVoiceMailsInLine2 );
     
-    if(!CheckSupressNotificationSettingL())
-        {
-        iModel.NcnNotifier().SetNotification( MNcnNotifier::ENcnVoiceMailOnLine1Notification, aVoiceMailsInLine1 );
-        iModel.NcnNotifier().SetNotification( MNcnNotifier::ENcnVoiceMailOnLine2Notification, aVoiceMailsInLine2 );
-        NCN_RDEBUG( _L("CVoiceMailManager: UpdateNoteAndIndicationWithALS With VVM off") );
-        // Indications
-        // SysApp checks ALS support and decides whether to use o_o or O_o (left O full), if ALS supported
-        iModel.MsgWaitingManager().SetIndicator( MNcnMsgWaitingManager::ENcnIndicatorVMLine1, aVoiceMailsInLine1 ? ETrue : EFalse );
-        iModel.MsgWaitingManager().SetIndicator( MNcnMsgWaitingManager::ENcnIndicatorVMLine2, aVoiceMailsInLine2 ? ETrue : EFalse );
-        }
+    iModel.NcnNotifier().SetNotification( MNcnNotifier::ENcnVoiceMailOnLine1Notification, aVoiceMailsInLine1 );
+    iModel.NcnNotifier().SetNotification( MNcnNotifier::ENcnVoiceMailOnLine2Notification, aVoiceMailsInLine2 );
+    
+    // Indications
+    // SysApp checks ALS support and decides whether to use o_o or O_o (left O full), if ALS supported
+    iModel.MsgWaitingManager().SetIndicator( MNcnMsgWaitingManager::ENcnIndicatorVMLine1, aVoiceMailsInLine1 ? ETrue : EFalse );
+    iModel.MsgWaitingManager().SetIndicator( MNcnMsgWaitingManager::ENcnIndicatorVMLine2, aVoiceMailsInLine2 ? ETrue : EFalse );      
     }
             
 // ---------------------------------------------------------
@@ -252,16 +243,12 @@
 		{
 		NCN_RDEBUG_INT(_L("CVoiceMailManager : %d voice mails in line 1 (ALS not supported)"), voiceMailsInLine1 );
 		
-		 if(!CheckSupressNotificationSettingL())
-            {
-			NCN_RDEBUG( _L("CVoiceMailManager:SetIndicator and Notification ALS not supported With VVM off") );
-            //Soft notification. The SN must not contain any reference to line numbers
-            iModel.NcnNotifier().SetNotification( MNcnNotifier::ENcnVoiceMailNotification, voiceMailsInLine1 );	
-    
-            // SysApp checks ALS support and decides whether to use o_o or O_o (left O full), if ALS supported
-            // ENcnIndicatorVMLine1 is mapped to KDisplayVoicemailActive in CNcnMsgWaitingManager
-            iModel.MsgWaitingManager().SetIndicator( MNcnMsgWaitingManager::ENcnIndicatorVMLine1, ETrue );
-            }
+		//Soft notification. The SN must not contain any reference to line numbers
+		iModel.NcnNotifier().SetNotification( MNcnNotifier::ENcnVoiceMailNotification, voiceMailsInLine1 );	
+
+		// SysApp checks ALS support and decides whether to use o_o or O_o (left O full), if ALS supported
+		// ENcnIndicatorVMLine1 is mapped to KDisplayVoicemailActive in CNcnMsgWaitingManager
+		iModel.MsgWaitingManager().SetIndicator( MNcnMsgWaitingManager::ENcnIndicatorVMLine1, ETrue );
 		}
 	else if( iIsALSSupported == TRUE )		
 	    {
@@ -328,30 +315,4 @@
 		return EFalse;		
 		}
 	}
-
-// -------------------------------------------------------------------
-// Check the KMuiuSupressAllNotificationConfiguration value
-// -------------------------------------------------------------------
-//
-TBool CVoiceMailManager::CheckSupressNotificationSettingL()
-{
-    TBool result = EFalse; 
-    TInt value = 0;
-    CRepository* repository = NULL;
-   
-   TRAPD( err, repository = CRepository::NewL( KCRUidMuiuMessagingConfiguration ) );
-   if( err == KErrNone && repository != NULL )
-       {
-       CleanupStack::PushL( repository ); 
-       err = repository->Get( KMuiuSupressAllNotificationConfiguration, value );
-       
-       if(err == KErrNone && (value & KMuiuNotificationSupressedForVoiceMail ))
-           {
-           result = ETrue;
-           }
-        }  
-       NCN_RDEBUG_INT( _L("CNcnNotifier::CheckSupressNotificationSetting() -  result: %d"), result );
-       CleanupStack::PopAndDestroy( repository );
-       return result;
-}
 //  End of File
--- a/messagingappbase/smilparser/Rom/Gmxml.iby	Wed Sep 15 12:08:45 2010 +0300
+++ b/messagingappbase/smilparser/Rom/Gmxml.iby	Wed Oct 13 14:27:34 2010 +0300
@@ -19,7 +19,7 @@
 #define __GMXML_IBY__
 
 #include <legacyminidomparser.iby>
-file=ABI_DIR\BUILD_DIR\smildtd.dll	System\libs\smildtd.dll
+file=ABI_DIR\BUILD_DIR\SMILDTD.dll	System\libs\SMILDTD.dll
 
 
 #endif
--- a/mobilemessaging/audiomsg/src/audiomessageappui.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/mobilemessaging/audiomsg/src/audiomessageappui.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -343,14 +343,7 @@
     delete iInsertOperation;
     if ( iWaitDialog )
     	{
-		// iWaitDialog->ProcessFinishedL is for
-		// cancellation\closing  of wait dialog is asynchronous operation. it never gets so
-		// far that dialog would be really deleted before the application terminates.
-		// so to avoid memory leak , deleting the iWaitDialog.
-    	iWaitDialog->SetCallback( NULL );
     	TRAP_IGNORE( iWaitDialog->ProcessFinishedL() );
-    	delete iWaitDialog;
-		iWaitDialog = NULL;
     	}    
     delete iIdle;
     delete iAbsorber;
--- a/mobilemessaging/mmsui/viewer/MmsViewer.mmp	Wed Sep 15 12:08:45 2010 +0300
+++ b/mobilemessaging/mmsui/viewer/MmsViewer.mmp	Wed Oct 13 14:27:34 2010 +0300
@@ -34,7 +34,8 @@
 UID             0x100039CE 0x100058DF
 
 VENDORID        VID_DEFAULT
-CAPABILITY      CAP_APPLICATION NetworkControl
+// DRM capability is added for 9.2 onwards as there was a requirement for which this change is introduced
+CAPABILITY      CAP_APPLICATION NetworkControl DRM 
 VERSION 	10.0
 PAGED
 
--- a/mobilemessaging/mmsui/viewersrc/UniMmsViewerAppUi.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/mobilemessaging/mmsui/viewersrc/UniMmsViewerAppUi.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -1105,7 +1105,6 @@
     if ( !iFindItemMenu )
         {
         iFindItemMenu = CFindItemMenu::NewL( EFindItemMenuPlaceHolder );
-        iFindItemMenu->SetCallSubMenuVisibility ( EFalse ); // Click-To-Call
         if ( iHeader->SenderType( ) == EMuiuAddressTypeEmail )
             {
             // Set sender type to find menu
--- a/mobilemessaging/postcard/postcardinc/PostcardController.h	Wed Sep 15 12:08:45 2010 +0300
+++ b/mobilemessaging/postcard/postcardinc/PostcardController.h	Wed Oct 13 14:27:34 2010 +0300
@@ -227,6 +227,23 @@
                                 const TDesC& aFileName,
                                 const TInt aFileBitmapId,
                                 const TInt aFileMaskId = -1 );
+        
+        
+
+        /**
+        *   DoLoadIconforUpandDownarrowL
+        *   Calls AknsUtils::CreateColorIconLC to load icons defined by parameters.
+        *   Param IN aId - the id of the icon in AknsConstants.h
+        *            aFileName - the name of the file where icons are loaded
+        *            aFileBitmapId - the id of the bitmap file
+        *   Returns - icon created by the function
+        */
+        CGulIcon* DoLoadIconforUpandDownarrowL(  const TAknsItemID& aId,
+                                   const TDesC& aFileName,
+                                   const TInt aFileBitmapId,
+                                   const TInt aFileMaskId = -1 );
+        
+        
                                
     private: //Data
 
--- a/mobilemessaging/postcard/postcardsrc/PostcardController.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/mobilemessaging/postcard/postcardsrc/PostcardController.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -457,13 +457,13 @@
         EMbmPostcardQgn_prop_mms_postcard_address_inactive_mask
         );
 
-    iUpperArrow = DoLoadIconL(
+    iUpperArrow = DoLoadIconforUpandDownarrowL(
         KAknsIIDQgnIndiMmsPostcardUp,
         fileName, 
         EMbmPostcardQgn_indi_mms_postcard_up,
         EMbmPostcardQgn_indi_mms_postcard_up_mask
         );
-    iLowerArrow = DoLoadIconL(
+    iLowerArrow = DoLoadIconforUpandDownarrowL(
         KAknsIIDQgnIndiMmsPostcardDown,
         fileName, 
         EMbmPostcardQgn_indi_mms_postcard_down,
@@ -482,14 +482,51 @@
                                 const TInt aFileBitmapId,
                                 const TInt aFileMaskId  )
     {
+    
+    
     CGulIcon* icon = NULL;
+    
+   
     icon = AknsUtils::CreateGulIconL(
         AknsUtils::SkinInstance(),
         aId,
         aFileName,
         aFileBitmapId,
         aFileMaskId
-        );
+        );  
+    
+    return icon;
+     
+    }
+
+// ---------------------------------------------------------
+// CPostcardController::DoLoadIconforUpandDownarrowL()
+// ---------------------------------------------------------
+//
+CGulIcon* CPostcardController::DoLoadIconforUpandDownarrowL( 
+                                const TAknsItemID& aId,
+                                const TDesC& aFileName,
+                                const TInt aFileBitmapId,
+                                const TInt aFileMaskId  )
+    {
+    
+    CFbsBitmap* bitmap = NULL;
+    CFbsBitmap* mask = NULL;
+
+   
+    AknsUtils::CreateColorIconLC( AknsUtils::SkinInstance(), 
+                                 aId,
+                                 KAknsIIDQsnIconColors,
+                                 EAknsCIQsnIconColorsCG6,
+                                 bitmap, 
+                                 mask,
+                                 aFileName, 
+                                 aFileBitmapId,
+                                 aFileMaskId,
+                                 KRgbBlack); 
+  
+    CGulIcon* icon = CGulIcon::NewL( bitmap, mask );
+    CleanupStack::Pop( 2 ); // bitmap, mask
 
     return icon;
     }
--- a/mobilemessaging/smilui/player/SmilPlayer.mmp	Wed Sep 15 12:08:45 2010 +0300
+++ b/mobilemessaging/smilui/player/SmilPlayer.mmp	Wed Oct 13 14:27:34 2010 +0300
@@ -53,7 +53,6 @@
 SOURCE  SmilPlayerPresentationController.cpp
 SOURCE  SmilPlayerTimeIndicatorTimer.cpp
 SOURCE  SmilPlayerVolumeIndicatorController.cpp
-SOURCE  SmilPlayerPauseIndicatorTimer.cpp
 SOURCE  SmilPlayerLinkParser.cpp
 SOURCE  SmilPlayerPresentationControl.cpp
 SOURCE  SmilPlayerIndicatorController.cpp
--- a/mobilemessaging/smilui/playerinc/SmilPlayerIndicatorController.h	Wed Sep 15 12:08:45 2010 +0300
+++ b/mobilemessaging/smilui/playerinc/SmilPlayerIndicatorController.h	Wed Oct 13 14:27:34 2010 +0300
@@ -23,7 +23,6 @@
 #include <coecntrl.h>
 #include <coecobs.h>
 #include "SmilPlayerTimeObserver.h"
-#include "SmilPlayerPauseObserver.h"
 
 // FORWARD DECLARATIONS
 class CSmilPlayerPresentationController;
@@ -42,8 +41,7 @@
 NONSHARABLE_CLASS(CSmilPlayerIndicatorController) : public CCoeControl,
                                                     public MCoeForegroundObserver,
                                                     public MCoeControlObserver,
-                                                    public MSmilPlayerTimeObserver,
-                                                    public MSmilPlayerPauseObserver
+                                                    public MSmilPlayerTimeObserver
     {
     public: // Constructors and destructor
 
@@ -111,12 +109,6 @@
         TBool IsDurationFinite() const;
         
         /**
-        * From MSmilPlayerPauseObserver
-        * See the documentation from the SmilPlayerPauseObserver.h
-        */
-        void TogglePauseIndicator() const;
-        
-        /**
         * From MCoeForegroundObserver 
         * See the documentation from the coemain.h
         */   
@@ -220,10 +212,6 @@
                                       const TInt aBitmapIndex,
                                       const TInt aMaskIndex ) const;
                                       
-        /**
-        * Sets pause indicator blinking on/off.
-        */
-        void SetPauseIndicatorBlinking( TBool aValue );
         
         /**
         * Handles skin change event.
@@ -269,9 +257,6 @@
         /** View class for play indicator. */
         CEikImage* iPlayIndicator;
         
-        /** Timer for pause indicator. */
-        CSmilPlayerPauseIndicatorTimer* iPauseTimer;
-        
         /** Specifies whether time indicator should be shown. */
         TBool iShowTimeIndicator;
     };
--- a/mobilemessaging/smilui/playersrc/SmilPlayerIndicatorController.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/mobilemessaging/smilui/playersrc/SmilPlayerIndicatorController.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -37,7 +37,6 @@
 #include "SmilPlayerIndicatorController.h"
 #include "SmilPlayerPresentationController.h"
 #include "SmilPlayerVolumeIndicatorController.h"
-#include "SmilPlayerPauseIndicatorTimer.h"
 #include "SmilPlayerTimeIndicatorTimer.h"
 
 // CONSTANTS
@@ -100,8 +99,6 @@
                               KAknsIIDQgnIndiMmsPlay,
                               EMbmSmilplayerQgn_indi_mms_play,
                               EMbmSmilplayerQgn_indi_mms_play_mask );
-
-    iPauseTimer = CSmilPlayerPauseIndicatorTimer::NewL( this );
     
     MakeVisible( EFalse );
     }
@@ -140,7 +137,6 @@
         
     delete iTimeModel;
     delete iPauseIndicator;
-    delete iPauseTimer;
 
     delete iPlayIndicator;
 
@@ -228,7 +224,6 @@
 //
 void CSmilPlayerIndicatorController::Stop()
     {
-    iPauseTimer->Cancel();    
     iPauseIndicator->MakeVisible( EFalse );
     
     iPlayIndicator->MakeVisible( EFalse );
@@ -243,10 +238,8 @@
 //
 void CSmilPlayerIndicatorController::Start()
     {
-    iPauseTimer->Cancel();    
-    iPauseIndicator->MakeVisible( EFalse );
-
-    iPlayIndicator->MakeVisible( ETrue );
+    iPauseIndicator->MakeVisible( ETrue );
+    iPlayIndicator->MakeVisible( EFalse );
         
     iTimeModel->Start();
     }
@@ -259,9 +252,10 @@
 //
 void CSmilPlayerIndicatorController::Pause()
     {
-    iPlayIndicator->MakeVisible( EFalse );
     
-    SetPauseIndicatorBlinking( ETrue );
+    iPlayIndicator->MakeVisible( ETrue );
+    iPauseIndicator->MakeVisible( EFalse );
+    DrawDeferred();
     
     iTimeModel->Pause();
     }
@@ -276,9 +270,10 @@
 void CSmilPlayerIndicatorController::Resume()
     {
     iTimeModel->Resume();
-    SetPauseIndicatorBlinking( EFalse );
+    iPauseIndicator->MakeVisible( ETrue );
+    iPlayIndicator->MakeVisible( EFalse );
+    DrawDeferred();
     
-    iPlayIndicator->MakeVisible( ETrue );    
     }
 
         
@@ -296,29 +291,6 @@
     }
 
 // ----------------------------------------------------------------------------
-// CSmilPlayerIndicatorController::SetPauseIndicatorBlinking
-// Controls pause indicator blinking. State changes are notified to volume
-// controller (if present) so that volume indicator's left arrow state can
-// be changed accordingly if needed.
-// ----------------------------------------------------------------------------
-//
-void CSmilPlayerIndicatorController::SetPauseIndicatorBlinking( TBool aValue )
-    {        
-    iPauseIndicator->MakeVisible( aValue );
-    
-    if( aValue )
-        {        
-        //start blinking timer
-        iPauseTimer->StartTimer();
-        }
-    else
-        {
-        //stop blinking timer
-        iPauseTimer->Cancel();
-        }
-    }
-
-// ----------------------------------------------------------------------------
 // CSmilPlayerIndicatorController::VolumeValue
 // Asks current volume level from volume controller if present and returns it
 // caller. Otherwise return zero.
@@ -404,18 +376,6 @@
     }
 
 // ----------------------------------------------------------------------------
-// CSmilPlayerIndicatorController::TogglePauseIndicator
-// Toggles pause indicator (i.e. sets it visible if it was previous invisible and
-// other way around.
-// ----------------------------------------------------------------------------
-//
-void CSmilPlayerIndicatorController::TogglePauseIndicator() const
-    {
-    iPauseIndicator->MakeVisible( !iPauseIndicator->IsVisible() );
-    iPauseIndicator->DrawDeferred();    
-    }
-
-// ----------------------------------------------------------------------------
 // CSmilPlayerIndicatorController::HandleGainingForeground
 // Starts pause indicator blinking if presentation is on the paused state. 
 // Pause indicator blinking was stopped when player was sent to background so
@@ -424,11 +384,7 @@
 //
 void CSmilPlayerIndicatorController::HandleGainingForeground()
     {
-    if ( iPresController->Presentation() &&
-         iPresController->Presentation()->State() == CSmilPresentation::EPaused )
-        {
-        SetPauseIndicatorBlinking( ETrue );
-        }
+
     }
 
 // ----------------------------------------------------------------------------
@@ -438,11 +394,7 @@
 //
 void CSmilPlayerIndicatorController::HandleLosingForeground()
     {
-    if ( iPresController->Presentation() &&
-         iPresController->Presentation()->State() == CSmilPresentation::EPaused )
-        {
-        SetPauseIndicatorBlinking( EFalse );
-        }
+
     }
 
 // ----------------------------------------------------------------------------
--- a/mobilemessaging/smsui/viewersrc/MsgSmsViewerAppUi.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/mobilemessaging/smsui/viewersrc/MsgSmsViewerAppUi.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -895,7 +895,6 @@
             {
             // Prepare FindItem
             iFindItemMenu = CFindItemMenu::NewL( EFindItemMenuPlaceHolder );
-            iFindItemMenu->SetCallSubMenuVisibility ( EFalse ); // Click-To-Call
             iFindItemMenu->AttachItemFinderMenuL( R_SMSV_OPTIONSMENUPANE );
             }
         }
--- a/mobilemessaging/smum/group/SMUM.RSS	Wed Sep 15 12:08:45 2010 +0300
+++ b/mobilemessaging/smum/group/SMUM.RSS	Wed Oct 13 14:27:34 2010 +0300
@@ -324,15 +324,6 @@
             type = EMuiuSettingsSelectionList;
             array_id = r_sms_settings_message_conversion;
             },
-        // REQ:417-48417 Message forward with sender info
-        // must pay attention to the order: order of item in rss file is same with the enum defined in head file.
-        MUIU_SETTINGS_ITEM
-            {
-            title = qtn_mce_setting_sms_forward;
-            type = EMuiuSettingsSelectionList;
-            array_id = r_sms_settings_yes_no;
-            },
-        // End REQ:417-48417
         MUIU_SETTINGS_ITEM
             {
             title = qtn_mce_settings_sms_connection;
--- a/mobilemessaging/smum/inc/SmumSettingsDialogGSM.h	Wed Sep 15 12:08:45 2010 +0300
+++ b/mobilemessaging/smum/inc/SmumSettingsDialogGSM.h	Wed Oct 13 14:27:34 2010 +0300
@@ -72,11 +72,8 @@
     ESmumCharSupportInUseLBI,    //= 3
     ESmumDeliveryReportLBI,      //= 4
     ESmumValidityPeriodLBI,      //= 5
-    // REQ:417-48417 Message forward with sender info
-    ESmumForwardWithSenderInfoLBI, //= 6
-    // End REQ:417-48417
-    ESmumPreferredConnectionLBI, //= 7
-    ESmumReplyViaSameCentreLBI   //= 8
+    ESmumPreferredConnectionLBI, //= 6
+    ESmumReplyViaSameCentreLBI   //= 7
     };
 
 enum TSmumMainSmsSendingOptSettingLBIndex
@@ -332,9 +329,6 @@
         TInt 					iRemoveReplyScSetting;
         TInt					iStoreSettingsIndex;
         TInt                    iMskId;
-        // REQ:417-48417 Message forward with sender info
-        TBool                   iForwardWithSenderSupported;
-        // End REQ:417-48417
     };
 
 #endif      // SMUMSETTINGSDIALOGGSM_H   
--- a/mobilemessaging/smum/loc/smum.loc	Wed Sep 15 12:08:45 2010 +0300
+++ b/mobilemessaging/smum/loc/smum.loc	Wed Oct 13 14:27:34 2010 +0300
@@ -631,9 +631,3 @@
 //d:queued when the phone is outside coverage area
 //l:list_setting_pane_t1
 #define qtn_mce_settings_sms_queuing		"Message queuing"
-
-//d:REQ:417-48417 Message forward with sender info
-//l:list_setting_pane_t1
-//r:9.2
-#define qtn_mce_setting_sms_forward       "Forward with sender info"
-// End REQ:417-48417
--- a/mobilemessaging/smum/src/SmumSettingsDialogGSM.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/mobilemessaging/smum/src/SmumSettingsDialogGSM.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -150,9 +150,6 @@
     // Prepare FeatureManager, read values to members and uninitialize FeatureManager
     FeatureManager::InitializeLibL();
     iHelpFeatureSupported = FeatureManager::FeatureSupported( KFeatureIdHelp );
-    // REQ:417-48417 Message forward with sender info
-    iForwardWithSenderSupported = FeatureManager::FeatureSupported(KFeatureIdMsgForwardWithSender);     
-    // End REQ:417-48417
     FeatureManager::UnInitializeLib();
     // Read the supported settings
     iEmailFeatureSupported = SmumUtil::CheckEmailOverSmsSupportL();
@@ -627,23 +624,6 @@
             SetItem( index, iSettings.ReplyPath() ? ESmumSettingsYes : ESmumSettingsNo );
             }
         }
-    
-    // REQ:417-48417 Message forward with sender info
-       if (!iTypeOfSettings && iForwardWithSenderSupported)
-        {  
-        if ( !iSettingsArrayIndex->Find ( ESmumForwardWithSenderInfoLBI, key, index ) )
-            {
-            TInt forwardWithSenderInfo;
-            if ( iCentralRapository->Get( KForwardWithSenderInfo, forwardWithSenderInfo ) != KErrNone )
-                {
-                //In case of any error,set the default value to 0
-                forwardWithSenderInfo = 0;            
-                }
-            SetItem(index, forwardWithSenderInfo? ESmumSettingsYes : ESmumSettingsNo);
-            }                
-        }
-    // End REQ:417-48417
-
     SMUMLOGGER_LEAVEFN(" CSmumMainSettingsDialogGSM::OpeningDialogL");
     }
 
@@ -786,17 +766,6 @@
             iSettings.SetReplyPath( Item( index ) == ESmumSettingsYes );
             }
         }
-        
-    // REQ:417-48417 Message forward with sender info
-    if (!iTypeOfSettings && iForwardWithSenderSupported)
-        {        
-        if (!iSettingsArrayIndex->Find ( ESmumForwardWithSenderInfoLBI, key, index ))
-            {        
-            iCentralRapository->Set(KForwardWithSenderInfo , Item( index ) == ESmumSettingsYes);
-            }
-        }        
-    // End REQ:417-48417
-    
     SMUMLOGGER_LEAVEFN(" CSmumMainSettingsDialogGSM::ClosingDialogL");
     }
 
@@ -1122,15 +1091,6 @@
 	            }					// ServiceCentreInUseLBI are removed
             }
         }
-    // REQ:417-48417 Message forward with sender info
-    if (!iTypeOfSettings)
-        {
-        if (!iForwardWithSenderSupported && variatedValue >= ESmumForwardWithSenderInfoLBI)
-            {
-            variatedValue ++; // if not support this feature, ESmumForwardWithSenderInfoLBI is removed
-            }
-        }
-    // End REQ:417-48417
     return variatedValue;    
     }
 
@@ -1190,21 +1150,6 @@
         	 ESmumSendOptServiceCentreInUseLBI : ESmumServiceCentreInUseLBI );
         needToBeCompressed = ETrue;
         }
-        
-    // REQ:417-48417 Message forward with sender info    
-    if (!iForwardWithSenderSupported && !iTypeOfSettings)
-        {
-        TInt index;
-        TKeyArrayFix key(0, ECmpTInt); 
-        TInt found = iSettingsArrayIndex->Find(ESmumForwardWithSenderInfoLBI, key, index);
-        if (0 == found)
-            {
-            DeleteSettingItemFromArrays(index);
-            needToBeCompressed = ETrue;
-            }
-        }
-    // End REQ:417-48417
-        
     if ( needToBeCompressed )
         {
         iSettingsArray->Compress();
--- a/mobilemessaging/unieditor/application/bld/UniEditor.mmp	Wed Sep 15 12:08:45 2010 +0300
+++ b/mobilemessaging/unieditor/application/bld/UniEditor.mmp	Wed Oct 13 14:27:34 2010 +0300
@@ -131,12 +131,6 @@
 LIBRARY	        peninputclient.lib
 LIBRARY         cenrepnotifhandler.lib
 
-// for CEikRichTextEditor to show global warning note
-LIBRARY          eikctl.lib  
-LIBRARY         uiklaf.lib 
-LIBRARY         form.lib 
-
-
 #ifdef RD_MSG_XHTML_SUPPORT 
 LIBRARY         xhtmlparser.lib
 #endif
--- a/mobilemessaging/unieditor/application/inc/UniEditorAppUi.h	Wed Sep 15 12:08:45 2010 +0300
+++ b/mobilemessaging/unieditor/application/inc/UniEditorAppUi.h	Wed Oct 13 14:27:34 2010 +0300
@@ -257,11 +257,6 @@
         * From CEikAppUi 
         */
         void HandleCommandL( TInt aCommand );
-
-        /**
-        * From CAknAppUi 
-        */
-        void ProcessCommandL(TInt aCommand);
         
         /**
         * Performs the command.
@@ -1254,12 +1249,6 @@
          *     Notification from central repository
          */
        	void HandleNotifyInt( TUint32 aId, TInt aNewValue );
-
-       	/**
-       	 *  Shows the Popup note in ITUT, when message size exceeds or deceeds
-       	 *  a certain limit or it changes from sms to mms and vice versa
-       	 */
-       	void ShowDiscreetPopUpL(const TDesC& aMessage);
        	
        	/**
        	 * Is Inserted objects path are valid.
@@ -1395,6 +1384,7 @@
     	CAknStylusPopUpMenu* iEmbeddedObjectStylusPopup;
 		// sendui+jepg optimization changes
     	TBool  iOptimizedFlow;
+    	TBool iSingleJpegImageProcessing;
     };
 
 #include "UniEditorAppUi.inl"
--- a/mobilemessaging/unieditor/application/inc/UniEditorLaunchOperation.h	Wed Sep 15 12:08:45 2010 +0300
+++ b/mobilemessaging/unieditor/application/inc/UniEditorLaunchOperation.h	Wed Oct 13 14:27:34 2010 +0300
@@ -94,6 +94,17 @@
         * Detach slide loader object
         */
         inline CUniSlideLoader* DetachSlideLoader();
+        
+        /**
+        * get header object
+        */
+        inline CUniEditorHeader* GetHeader();
+
+        /**
+        * get slide loader object
+        */
+        inline CUniSlideLoader* GetSlideLoader();
+
 
         /**
         * Return parse result
--- a/mobilemessaging/unieditor/application/inc/UniEditorLaunchOperation.inl	Wed Sep 15 12:08:45 2010 +0300
+++ b/mobilemessaging/unieditor/application/inc/UniEditorLaunchOperation.inl	Wed Oct 13 14:27:34 2010 +0300
@@ -39,4 +39,22 @@
     return slideLoader;
     }
 
+// ---------------------------------------------------------
+// CUniEditorLaunchOperation::GetHeader
+// ---------------------------------------------------------
+//
+inline CUniEditorHeader* CUniEditorLaunchOperation::GetHeader()
+    {
+    return iHeader;
+    }
+
+// ---------------------------------------------------------
+// CUniEditorLaunchOperation::GetSlideLoader
+// ---------------------------------------------------------
+//
+inline CUniSlideLoader* CUniEditorLaunchOperation::GetSlideLoader()
+    {
+    return iSlideLoader;
+    }
+
 // End of file
--- a/mobilemessaging/unieditor/application/inc/UniEditorProcessImageOperation.h	Wed Sep 15 12:08:45 2010 +0300
+++ b/mobilemessaging/unieditor/application/inc/UniEditorProcessImageOperation.h	Wed Oct 13 14:27:34 2010 +0300
@@ -85,6 +85,11 @@
         * Detaches attachment id.
         */
         void DetachAttachmentId( TMsvAttachmentId& aAttachmentId );
+        
+	    /**
+        * Set Optimized Flow flag
+        */  
+        void SetOptimizedFlow(TBool aOptimizedFlow);
 
     protected:
 
@@ -208,6 +213,7 @@
   //      TSize                       iScaleSizeResult;
         TDataType                   iTargetType;
         TBool                       iExactImageScaling;
+        TBool                       iOptimizedFlow;
     };
 
 #endif //__UNIEDITORPROCESSIMAGEOPERATION_H
--- a/mobilemessaging/unieditor/application/src/UniEditorAppUi.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/mobilemessaging/unieditor/application/src/UniEditorAppUi.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -141,8 +141,6 @@
 #include <UniEditor.rsg>
 #include <MsgEditorAppUi.rsg>
 
-#include <akndiscreetpopup.h>
-#include <aknsconstants.hrh>
 
 #include "UniSendingSettings.h"
 #include "UniPluginApi.h"
@@ -267,11 +265,10 @@
     iWaitResId( -1 ),
     iOriginalSlide( -1 ),
     iNextFocus( EMsgComponentIdNull ),
-    iPopupChangedMmsBuffer(NULL),
-    iPopupChangedSmsBuffer(NULL),
     iEditorFlags( EShowInfoPopups ),
     iMskResId( R_UNIEDITOR_OPTIONS_CLOSE ),
-    iOptimizedFlow(EFalse)
+    iOptimizedFlow(EFalse),
+    iSingleJpegImageProcessing(EFalse)
     {
     }
     
@@ -454,18 +451,6 @@
 		iLongTapDetector->SetTimeDelayBeforeAnimation( KUniLongTapStartDelay );
 		iLongTapDetector->SetLongTapDelay( KUniLongTapTimeDelay );
 		iTapConsumed = EFalse;
-
-		//Korean Req: 415-5434
-		if ( iEditorFlags & EShowInfoPopups )
-     		{
-	        iPopupNote = CAknInfoPopupNoteController::NewL();
-            iPopupNote->SetTimeDelayBeforeShow( 0 );
-            iPopupNote->SetTimePopupInView( 3000 );
-
-			iPopupSmsSizeAboveLimitBuffer = StringLoader::LoadL( R_UNIEDITOR_POPUP_SMS_SIZE_ABOVE_LIMIT, Document()->SmsSizeWarningBytes(), iCoeEnv );
-			iPopupSmsSizeBelowLimitBuffer = StringLoader::LoadL( R_UNIEDITOR_POPUP_SMS_SIZE_UNDER_LIMIT, Document()->SmsSizeWarningBytes(), iCoeEnv );		
-	    	}
-
     }
 
 
@@ -478,7 +463,22 @@
     {
     iEditorFlags |= EEditorExiting;
     
-	
+	//sendui+jepg optimization changes
+    if(iLaunchOperation)
+        {
+        // check Is iLaunchOperation still attached to 
+        // iSlideLoader / iHeader
+        // Set the CUniEditorAppUi
+        // instance to NULL, to avoid crash.
+        if(iLaunchOperation->GetHeader())
+            {
+            iHeader = NULL;            
+            }
+        if(iLaunchOperation->GetSlideLoader())
+            {
+            iSlideLoader = NULL;            
+            }
+        }
     if ( iView )
         {
         // To prevent focus changes caused by input blocker deletion & toolbar extension
@@ -683,10 +683,31 @@
 //
 void CUniEditorAppUi::FinalizeLaunchL()
     {
+	// In all normal cases other then Sendui+Jepeg
+	// iOptimizedFlow will be false and flow should be 
+	// same as the normal launch
+    if(iOptimizedFlow)
+        {
+		//if iOptimizedFlow is True, it means
+		//sendui+Jepg and this is partial complete call
+        iSingleJpegImageProcessing = ETrue;
+        }
+		
     iFinalizeLaunchL = ETrue;
     iSmilModel = &Document()->DataModel()->SmilModel();
-    iHeader = iLaunchOperation->DetachHeader();
-    iSlideLoader = iLaunchOperation->DetachSlideLoader();
+	
+    if(!iOptimizedFlow)
+        {
+		//detach the iHeader and iSlideLoader
+        iHeader = iLaunchOperation->DetachHeader();
+        iSlideLoader = iLaunchOperation->DetachSlideLoader();
+        }
+    else
+        {
+		// get reference to complete partial lauch operation
+        iHeader = iLaunchOperation->GetHeader();
+        iSlideLoader = iLaunchOperation->GetSlideLoader();
+        }
     
     SetMessageTypeLockingL();
     
@@ -773,8 +794,16 @@
         
     if ( iEditorFlags & EShowInfoPopups )
         {
+        iPopupNote = CAknInfoPopupNoteController::NewL();
+        iPopupNote->SetTimeDelayBeforeShow( 0 );
+        iPopupNote->SetTimePopupInView( 3000 );
+
         iPopupChangedMmsBuffer = StringLoader::LoadL( R_UNIEDITOR_POPUP_MSG_CHANGED_MMS, iCoeEnv );
-		iPopupChangedSmsBuffer = StringLoader::LoadL( R_UNIEDITOR_POPUP_MSG_CHANGED_SMS, iCoeEnv );
+        iPopupChangedSmsBuffer = StringLoader::LoadL( R_UNIEDITOR_POPUP_MSG_CHANGED_SMS, iCoeEnv );
+
+        //Korean Req: 415-5434        
+        iPopupSmsSizeAboveLimitBuffer = StringLoader::LoadL( R_UNIEDITOR_POPUP_SMS_SIZE_ABOVE_LIMIT, Document()->SmsSizeWarningBytes(), iCoeEnv );
+        iPopupSmsSizeBelowLimitBuffer = StringLoader::LoadL( R_UNIEDITOR_POPUP_SMS_SIZE_UNDER_LIMIT, Document()->SmsSizeWarningBytes(), iCoeEnv );
 
         }
 
@@ -784,12 +813,41 @@
     MenuBar()->SetMenuType( CEikMenuBar::EMenuOptions );
     
     UpdateToolbarL();
-    
-    iEditorFlags |= ELaunchSuccessful;
-	
-    iView->ExecuteL( ClientRect(), focusedControlId );
+
+	// partial launch need to call execute to make
+	//the editor visible
+    if(iOptimizedFlow)
+        {
+        iView->ExecuteL( ClientRect(), focusedControlId );
+        }
+    else// not optmized Flow, common flow
+        {
+        // partial launch, dont set the flag
+        iEditorFlags |= ELaunchSuccessful;
+        
+		// in case of sendui+jepg , again finalize launch will be called 
+		//after image processing, no need to call iView->ExecuteL
+		// slide will be loaded already by slide loader.
+        if(!iSingleJpegImageProcessing)
+            {
+			//normal flow
+            iView->ExecuteL( ClientRect(), focusedControlId );
+            }
+        
+        //after the lauch complete for sendui+jepg
+        //rest it.
+        iSingleJpegImageProcessing = EFalse;        
+        }
+    
     delete iScreenClearer;
     iScreenClearer = NULL;
+   
+    // show note inserting 
+    if(iOptimizedFlow)
+        {
+        ShowWaitNoteL( R_QTN_UNI_WAIT_INSERTING );
+        }
+ 
 	
     }
     
@@ -1126,17 +1184,7 @@
                     {
                     // No absolute maximum characters defined -> Calculate
                     // character maximum using maximum SMS part limit.
-
-                    if( maxSmsParts > 1 )
-                        {
-                        maxSmsCharacters = maxSmsParts * lengthMany;
-                        }
-                    else
-                        {
-						// for korean variant
-                        maxSmsCharacters = lengthOne;
-                        }
-
+                    maxSmsCharacters = maxSmsParts * lengthMany;
                     }
                 CalculateSMSMsgLen(charsLeft,msgsParts);
                 if( model->ObjectList().Count() == 0 &&
@@ -1403,39 +1451,6 @@
         }
     }
     
-// ---------------------------------------------------------
-// CUniEditorAppUi::ProcessCommandL
-// ---------------------------------------------------------
-//
-void CUniEditorAppUi::ProcessCommandL(TInt aCommand)
-    {
-    switch(aCommand)
-        {
-        case EAknCmdExit:
-            {
-            /*
-            Exit command is handle handled here since handling the same in HandleCommandL is too late for
-            themes effect to shown when application is exiting while progress note is shown.
-            BeginFullScreen is called after ProcessCommandL and before HandleCommandL,  progress note is 
-            shown in ProcessCommandL ie before BeginFullScreen is made.  
-            */
-            
-            //Only after processing the command, option menu is removed
-            //ProcessCommandL is called with some false command id which is unique and not used in any other place
-            const TInt KRandomCommand(8975462);
-            CAknAppUi::ProcessCommandL( KRandomCommand );
-            RemoveWaitNote();
-            ExitAndSaveL();
-            break;
-            }
-        default:
-            break;
-        }
-    
-    CAknAppUi::ProcessCommandL( aCommand );
-    
-    }
-
 
 // ---------------------------------------------------------
 // CUniEditorAppUi::HandleCommandL
@@ -1658,9 +1673,6 @@
             }
         case EEikCmdExit:
             {
-            //Save message when unieditor is closed though FSW
-			//We won't get here when option->exit is selscted since while handling CAknCmdExit in overriden
-			//ProcessCommandL we call Exit() 
             RemoveWaitNote();
             ExitAndSaveL();
             break;
@@ -6482,8 +6494,9 @@
     if ( iEditorFlags & EEditorExiting )
         {
         // Do not handle any event if we are exiting from editor.
-		// rest values. 
+		// rest values.
         iOptimizedFlow = EFalse;
+        iSingleJpegImageProcessing = EFalse;
         return;
         }
     
@@ -6497,18 +6510,14 @@
             if(iLaunchOperation)
                 {
                 iOptimizedFlow = iLaunchOperation->IsOptimizedFlagSet();
-                if(iOptimizedFlow )
-                    {
-                    TRAP_IGNORE(ShowWaitNoteL( R_QTN_UNI_WAIT_INSERTING ));
-                    iOptimizedFlow = EFalse;
-                    return;
-                    }
-                }
-            }
-        
-        DeactivateInputBlocker();
-        iEditorFlags &= ~EMsgEditInProgress;   
-        
+                }
+            }
+		// sendui+jepg-> this required after image processing 
+        if(!iOptimizedFlow)
+            {
+            DeactivateInputBlocker();
+            iEditorFlags &= ~EMsgEditInProgress;   
+            }
         if ( aEvent == EUniEditorOperationCancel &&
              aOperation != EUniEditorOperationSend )
             {
@@ -6527,6 +6536,15 @@
     TRAPD( error, DoEditorOperationEventL( aOperation, aEvent ) );
     if ( error != KErrNone )
         {
+		// error handling
+        if(iOptimizedFlow)
+            {
+            DeactivateInputBlocker();
+            iEditorFlags &= ~EMsgEditInProgress;   
+            }
+        iOptimizedFlow = EFalse;
+        iSingleJpegImageProcessing = EFalse;
+        
         // Handle operation handling error.
         if ( error == KLeaveExit )
             {
@@ -6543,6 +6561,10 @@
                 }
             }
         }
+    //sendui+jepg-> after first call to finallizelauch,rest
+	// it, so that next call will cover the code finallizelaunch
+	//as happened for other launch cases.
+    iOptimizedFlow = EFalse;
     }
 
 // ---------------------------------------------------------
@@ -6695,11 +6717,19 @@
 //
 void CUniEditorAppUi::DoLaunchCompleteL()
     {
-    // Does no harm to call this even if no wait note is set.
-    RemoveWaitNote();        
-
+	//sendui+jepg -> this required after image processing 
+    if(!iOptimizedFlow)
+        {
+        // Does no harm to call this even if no wait note is set.
+        RemoveWaitNote();        
+        }
+		
     TBool shutDown( EFalse );
-    ShowLaunchNotesL( shutDown );
+	// sendui+jepg-> this required after image processing 
+    if(!iOptimizedFlow)
+		{
+        ShowLaunchNotesL( shutDown );
+		}
     
     if ( shutDown )
         {
@@ -7853,7 +7883,8 @@
                     iEditorFlags |= ESmsSizeWarningNoteShown;
                     if( iPopupNote )
                         {
-						ShowDiscreetPopUpL(iPopupSmsSizeAboveLimitBuffer->Des());
+                        iPopupNote->SetTextL( iPopupSmsSizeAboveLimitBuffer->Des() );
+                        iPopupNote->ShowInfoPopupNote();
                         }
                     }
                 }
@@ -7866,7 +7897,8 @@
                     iEditorFlags &= ~ESmsSizeWarningNoteShown;
                     if( iPopupNote )
                         {
-                        ShowDiscreetPopUpL(iPopupSmsSizeBelowLimitBuffer->Des());
+                        iPopupNote->SetTextL( iPopupSmsSizeBelowLimitBuffer->Des() );
+                        iPopupNote->ShowInfoPopupNote();
                         }                
                     }
                 }          
@@ -8099,7 +8131,16 @@
         TBool westernText = ETrue;
 
         CCnvCharacterSetConverter* conv = doc->CharConverter();    
-
+        CCnvCharacterSetConverter::TAvailability  availability;
+        availability = conv->PrepareToConvertToOrFromL(KCharacterSetIdentifierExtendedSms7Bit, FsSession());
+        if (availability == CCnvCharacterSetConverter::ENotAvailable)
+            {
+                availability = conv->PrepareToConvertToOrFromL(KCharacterSetIdentifierSms7Bit, FsSession());
+                if (availability == CCnvCharacterSetConverter::ENotAvailable)
+                    {
+                    UNILOGGER_WRITE( "CCnvCharacterSetConverter -> KCharacterSetIdentifierSms7Bit is not available" );
+                    }
+            }
         if ( conv )
             { 
             for( TInt index = 0; index < KUniEdNumberOfEditors; index++ )
@@ -8564,12 +8605,11 @@
 //
 void CUniEditorAppUi::ShowPopupNoteL( TBool aMms )
     {
-    if( iPopupNote && iPopupChangedMmsBuffer )
-        {
-        // additional check  iPopupChangedMmsBuffer is required as iPopupNote
-        // will be intialized in ConstructL but not iPopupChangedMmsBuffer.
-        // This change is done as part of Korean req.
-            ShowDiscreetPopUpL(aMms? iPopupChangedMmsBuffer->Des(): iPopupChangedSmsBuffer->Des());
+    if( iPopupNote )
+        {
+        iPopupNote->SetTextL( aMms? iPopupChangedMmsBuffer->Des():
+                                    iPopupChangedSmsBuffer->Des() );
+        iPopupNote->ShowInfoPopupNote();
         }
     }
  
@@ -10002,35 +10042,5 @@
     return bCanSave;
     }
 
-// ---------------------------------------------------------
-// CUniEditorAppUi::ShowDiscreetPopUpL
-// Shows the Popup note in ITUT, when message size exceeds or deceeds 
-// a certain limit or it changes from sms to mms and vice versa
-// ---------------------------------------------------------
-//
-void CUniEditorAppUi::ShowDiscreetPopUpL(const TDesC& aMessage)
-	{
-	TInt  bitmapId = KErrNotFound;
-	TInt  maskId = KErrNotFound;
-   
-   // No discreet popup => Uid 0
-   const TUid KDiscreetPopupUidNone =
-	   {
-	   0x0
-	   };
-	
-	CAknDiscreetPopup::ShowGlobalPopupL(aMessage, // 1st text row
-			KNullDesC, // second text row
-			KAknsIIDDefault, // icon skin id
-			KNullDesC, // bitmap file path
-			bitmapId, // bitmap id
-			maskId, // mask id
-			KAknDiscreetPopupDurationLong, // flags
-			0, // command id
-			NULL, // command observer
-			KDiscreetPopupUidNone, // application to be launched
-			KDiscreetPopupUidNone); // view to be activated
-	}
-
 // End of file
 
--- a/mobilemessaging/unieditor/application/src/UniEditorLaunchOperation.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/mobilemessaging/unieditor/application/src/UniEditorLaunchOperation.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -402,9 +402,13 @@
 //
 void CUniEditorLaunchOperation::DoPrepareHeaderL()
     {
-    // Header is always drawn and populated
-    iHeader = CUniEditorHeader::NewL( iDocument.Mtm(), iDocument, iView, iFs );
-    CompleteSelf( KErrNone );
+    if(!iHeader)
+        {
+	    // Header is always drawn and populated
+	    iHeader = CUniEditorHeader::NewL( iDocument.Mtm(), iDocument, iView, iFs );
+        }
+    if(!iOptimizedFlow)
+        CompleteSelf( KErrNone );
     }
 
 // ---------------------------------------------------------
@@ -413,21 +417,28 @@
 //
 void CUniEditorLaunchOperation::DoPrepareBodyL()
     {
-    iSlideLoader = CUniSlideLoader::NewL(
-        iControlObserver,
-        *iDocument.DataModel(),
-        iView,
-        EUniControlEditorMode );
-        
+    if(!iSlideLoader)
+        {
+     	iSlideLoader = CUniSlideLoader::NewL(
+	        iControlObserver,
+	        *iDocument.DataModel(),
+	        iView,
+	        EUniControlEditorMode );
+        }
+    
     if ( iDocument.DataModel()->SmilType() == EMmsSmil )
         {
-        if ( !iDocument.DataModel()->SmilModel().SlideCount() )
+        if(!iOptimizedFlow)
             {
-            iDocument.DataModel()->SmilModel().AddSlideL();
+	        if ( !iDocument.DataModel()->SmilModel().SlideCount() )
+	            {
+	            iDocument.DataModel()->SmilModel().AddSlideL();
+	            }
+            
+	        iSlideLoader->LoadSlideL( *this, 0 );       
+        
+	        SetPending();
             }
-            
-        iSlideLoader->LoadSlideL( *this, 0 );
-        SetPending();
         }
     else
         {
@@ -619,6 +630,8 @@
             iOptimizedFlow = iSendUiOperation->IsOptimizedFlagSet();
             if(iOptimizedFlow)
                 {
+                DoPrepareHeaderL();
+                DoPrepareBodyL();
                 iObserver.EditorOperationEvent(
                             EUniEditorOperationLaunch,
                             EUniEditorOperationComplete ); 
--- a/mobilemessaging/unieditor/application/src/UniEditorProcessImageOperation.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/mobilemessaging/unieditor/application/src/UniEditorProcessImageOperation.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -98,7 +98,8 @@
         CUniEditorDocument& aDocument,
         RFs& aFs ) :
     CUniEditorOperation( aObserver, aDocument, aFs, EUniEditorOperationProcessImage ),
-    iNewAttaId( KMsvNullIndexEntryId )
+    iNewAttaId( KMsvNullIndexEntryId ),
+    iOptimizedFlow(EFalse)
     {
     }
 
@@ -258,6 +259,13 @@
 //
 void CUniEditorProcessImageOperation::DoStartProcessL()
     {
+    
+    if(iOptimizedFlow)
+        {
+         iObserver.EditorOperationEvent( EUniEditorOperationProcessImage,
+                                      EUniEditorOperationPartialComplete );   
+         iOptimizedFlow = EFalse;
+        }
     CreateEmptyAttachmentL();
     
     if ( !iImageProcessor )
@@ -646,5 +654,13 @@
     iNewImageInfo = NULL;
     return tempInfo;
     }
-    
+
+// ---------------------------------------------------------
+// CUniEditorProcessImageOperation::SetOptimizedFlow
+// ---------------------------------------------------------
+//
+void CUniEditorProcessImageOperation::SetOptimizedFlow(TBool aOptimizedFlow)
+    {
+    iOptimizedFlow =  aOptimizedFlow;
+    }
 // End of file
--- a/mobilemessaging/unieditor/application/src/UniEditorSaveOperation.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/mobilemessaging/unieditor/application/src/UniEditorSaveOperation.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -341,20 +341,12 @@
 //
 void CUniEditorSaveOperation::DoSaveObjectL()
     {
-    if ( iDocument.BodyModified() )
-        {
-        // Processing will continue from CUniEditorSaveOperation::ObjectSaveReady when
-        // save has been performed
-        iDocument.DataModel()->ObjectList().SaveAll( *this, CMsvAttachment::EMsvFile );    
-        // TODO: Pass edit store as a parameter to objectlist
-        //iDocument.DataModel()->ObjectList().SaveAll( *this, *iEditStore, CMsvAttachment::EMsvFile );    
-        SetPending();
-        }
-    else
-        {
-        iOperationState = EUniEditorSaveAttachment;
-        CompleteSelf( KErrNone );
-        }
+    // Processing will continue from CUniEditorSaveOperation::ObjectSaveReady when
+    // save has been performed
+    iDocument.DataModel()->ObjectList().SaveAll( *this, CMsvAttachment::EMsvFile );    
+    // TODO: Pass edit store as a parameter to objectlist
+    //iDocument.DataModel()->ObjectList().SaveAll( *this, *iEditStore, CMsvAttachment::EMsvFile );    
+    SetPending();
     }
 
 // ---------------------------------------------------------
--- a/mobilemessaging/unieditor/application/src/UniEditorSendUiOperation.cpp	Wed Sep 15 12:08:45 2010 +0300
+++ b/mobilemessaging/unieditor/application/src/UniEditorSendUiOperation.cpp	Wed Oct 13 14:27:34 2010 +0300
@@ -235,9 +235,6 @@
         if(obj->MediaInfo()->MimeType().CompareF( KMsgMimeImageJpeg )== 0)
             {
             iOptimizedFlow = ETrue;
-            iObserver.EditorOperationEvent( EUniEditorOperationSendUi,
-                                             EUniEditorOperationPartialComplete );   
-            iOptimizedFlow = EFalse;
             }
         }
         
@@ -480,6 +477,7 @@
                 iImageOperation = CUniEditorProcessImageOperation::NewL( *this, iDocument, iFs );
                 }
                 
+            iImageOperation->SetOptimizedFlow(iOptimizedFlow);
             // Processes if needed:
             iImageOperation->Process( static_cast<CMsgImageInfo*>( aObject->MediaInfo() ),
                                       aObject->AttachmentId(),
@@ -583,7 +581,7 @@
 // ---------------------------------------------------------
 //
 void CUniEditorSendUiOperation::HandleOperationEvent( TUniEditorOperationType aOperation,
-                                                      TUniEditorOperationEvent /*aEvent*/ )
+                                                      TUniEditorOperationEvent aEvent )
     {
     TBool remove( EFalse );
     
@@ -592,6 +590,17 @@
     
     if ( aOperation == EUniEditorOperationProcessImage )
         {
+        if( aEvent == EUniEditorOperationPartialComplete)
+            {
+            if(iOptimizedFlow)
+                {           
+                iObserver.EditorOperationEvent( EUniEditorOperationSendUi,
+                                                EUniEditorOperationPartialComplete );
+                iOptimizedFlow = EFalse;                        
+                }
+            return;
+            }
+        iOptimizedFlow = EFalse;
         // Process image error handling
         CArrayFixFlat<TInt>* errors = iImageOperation->GetErrors();
         for ( TInt i = 0; i < errors->Count(); i++ )
Binary file mobilemessaging/unieditor/help/data/xhtml.zip has changed
--- a/mobilemessaging/unieditor/inc/UniMsvEntry.h	Wed Sep 15 12:08:45 2010 +0300
+++ b/mobilemessaging/unieditor/inc/UniMsvEntry.h	Wed Oct 13 14:27:34 2010 +0300
@@ -24,7 +24,7 @@
 
 #include <msvstd.h>
 #include <mmsconst.h>
-#include <unieditorconsts.h>
+#include <UniEditorConsts.h>
 
 // CONSTANTS
 
@@ -112,7 +112,7 @@
 
     };
 
-#include <unimsventry.inl>
+#include <UniMsvEntry.inl>
 
 #endif      // __UNIMSVENTRY_H
             
--- a/msg_plat/messaging_center_ui_utilities_api/inc/MessagingDomainCRKeys.h	Wed Sep 15 12:08:45 2010 +0300
+++ b/msg_plat/messaging_center_ui_utilities_api/inc/MessagingDomainCRKeys.h	Wed Oct 13 14:27:34 2010 +0300
@@ -56,11 +56,4 @@
 const TUint32 KMuiuDLNewEmailFlag       = 8;
 const TUint32 KMuiuDLInstantMessageFlag = 16;
 const TUint32 KMuiuDLAudioMessageFlag   = 32;
-
-//
-// The field controlling the value that takes the decision to supress 
-// the whole notification/indicator for voice mail
-const TUint32 KMuiuSupressAllNotificationConfiguration = 0x00000004;
-const TUint32 KMuiuNotificationSupressedForVoiceMail = 1;
-
 #endif // MESSAGINGDOMAINCRKEYS_H
\ No newline at end of file
--- a/msg_plat/messaging_center_ui_utilities_api/inc/muiumsginfo.h	Wed Sep 15 12:08:45 2010 +0300
+++ b/msg_plat/messaging_center_ui_utilities_api/inc/muiumsginfo.h	Wed Oct 13 14:27:34 2010 +0300
@@ -27,7 +27,7 @@
 
 //  INCLUDES
 #include <e32base.h>
-#include <ConeResLoader.h>
+#include <coneresloader.h>
 
 
 // DATA TYPES
--- a/msg_plat/messaging_editor_api/inc/MsgEditorView.h	Wed Sep 15 12:08:45 2010 +0300
+++ b/msg_plat/messaging_editor_api/inc/MsgEditorView.h	Wed Oct 13 14:27:34 2010 +0300
@@ -634,6 +634,46 @@
          */
          void DoScrollViewL( TInt& aPixelsToScroll, 
                              TMsgScrollDirection aDirection );
+		/**
+		* Handle text scrolling from pointer event.
+		* 
+		* @param aPointerEvent Current pointer event received from HandlePointerEventL.
+		*/					 
+		TBool HandleScrollEventL(const TPointerEvent& aPointerEvent);
+		
+		/**
+		* Throw the pointer event (which is not consumed by text scrolling) to other handler. 
+		* 
+		* @param aPointerEvent Current pointer event received from HandlePointerEventL.
+		*/
+		
+    	void ThrowOutPointerEventL(const TPointerEvent& aPointerEvent);
+		
+		/**
+		* Move current view up or down with screen height. 
+		* 
+		* @param aOffset Offset positive/negative will indicate the direction.
+		*/
+		
+    	void ScrollPartL(TInt aOffset);
+		
+		/**
+		* Change to the previous or the next part(slide) if possible. 
+		* 
+		* @param aOffset Offset positive/negative will indicate the direction.
+		*/
+		
+    	void ScrollPageL(TInt aOffset);
+		
+		/**
+		* Scroll text in current part (slide).  This will not trigger part change.
+		* 
+		* @param aScrolledPixels Pixels wanted to be scrolled.
+		*
+		* @return Pixels scrolled.
+		*/
+		
+    	TInt ScrollL(TInt aScrolledPixels);
 
         
     private:
@@ -664,6 +704,10 @@
     	RConeResourceLoader  iResourceLoader;
     	TMsgFocus            iPrevFocus; 
     	TBool                iMoveUpDownEvent; 
+    	TBool                iHaveScrolled;
+    	TPoint               iScrollPos;
+    	TPointerEvent        iFirstPointerDown;
+    	TBool                iIsScrolling;
     };
 
 #include <MsgEditorView.inl>
--- a/msg_pub/plugin_bio_control_api/inc/MMsgBioControl.h	Wed Sep 15 12:08:45 2010 +0300
+++ b/msg_pub/plugin_bio_control_api/inc/MMsgBioControl.h	Wed Oct 13 14:27:34 2010 +0300
@@ -24,7 +24,7 @@
 //  INCLUDES
 #include <e32std.h>
 #include <e32base.h>
-#include <MsgEditor.hrh>   // for enums
+#include <msgeditor.hrh>   // for enums
 
 // CONSTANTS