Revision: 201007 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 12 Mar 2010 15:41:14 +0200
branchRCL_3
changeset 10 f5907b1a1053
parent 8 e1b6206813b4
child 11 0396474f30f5
Revision: 201007 Kit: 201008
email_plat/email_client_api/inc/emailclientapi.hrh
email_plat/email_crkeys_api/group/bld.inf
email_plat/email_crkeys_api/inc/commonemailcrkeys.h
email_plat/group/bld.inf
email_pub/email_widget_api/tsrc/3rdpartyapitestplugin2/data/2002C324.rss
email_pub/email_widget_api/tsrc/3rdpartyapitestplugin2/rom/3rdpartyapitestplugin2.iby
emailcontacts/contactactionservice/group/fsccontactactionservice.mmp
emailcontacts/contactactionservice/src/cfscactionutils.cpp
emailcontacts/group/bld.inf
emailservices/emailclientapi/group/emailclientapi.mmp
emailservices/emailclientapi/inc/emailclientpluginmanager.h
emailservices/emailclientapi/inc/emailmailboxcache.h
emailservices/emailclientapi/src/emailclientapiimpl.cpp
emailservices/emailclientapi/src/emailmailbox.cpp
emailservices/emaildebug/inc/emailtraceconfig.hrh
emailservices/emailframework/commonlib/group/bld.inf
emailservices/emailframework/commonlib/inc/CFSMailMessagePart.h
emailservices/emailframework/commonlib/inc/cmailboxstateext.h
emailservices/emailframework/commonlib/src/CFSMailBox.cpp
emailservices/emailframework/data/microsoft.svg
emailservices/emailframework/inc/CFSMailBrandManagerImpl.h
emailservices/emailframework/inc/MFSMailBrandManager.h
emailservices/emailframework/inc/emailversionnumbers.hrh
emailservices/emailframework/src/CFSMailBrandManagerImpl.cpp
emailservices/emailinstallationinitiator/sis/makeEmailInstallationInitiatorSisx.bat
emailservices/emailserver/cmailhandlerplugin/conf/20029F4A.txt
emailservices/emailserver/cmailhandlerplugin/conf/CommonemailCRKeys.confml
emailservices/emailserver/cmailhandlerplugin/conf/CommonemailCRKeys_20029F4A.crml
emailservices/emailserver/cmailhandlerplugin/group/bld.inf
emailservices/emailserver/cmailhandlerplugin/inc/PSSubscriber.h
emailservices/emailserver/cmailhandlerplugin/inc/cmailcpshandler.h
emailservices/emailserver/cmailhandlerplugin/inc/cmailcpsif.h
emailservices/emailserver/cmailhandlerplugin/inc/cmailcpsifconsts.h
emailservices/emailserver/cmailhandlerplugin/inc/cmailcpssettings.h
emailservices/emailserver/cmailhandlerplugin/inc/cmailwidgetcenrepkeysinternal.h
emailservices/emailserver/cmailhandlerplugin/inc/commonemailcrkeys.h
emailservices/emailserver/cmailhandlerplugin/rom/cmailhandlerplugin.iby
emailservices/emailserver/cmailhandlerplugin/src/PSSubscriber.cpp
emailservices/emailserver/cmailhandlerplugin/src/cmailcpshandler.cpp
emailservices/emailserver/cmailhandlerplugin/src/cmailcpsif.cpp
emailservices/emailserver/cmailhandlerplugin/src/cmailcpssettings.cpp
emailservices/emailserver/cmailhandlerplugin/src/cmailpluginproxy.cpp
emailservices/emailserver/cmailhandlerplugin/src/fsnotificationhandlerbaseimpl.cpp
emailservices/emailserver/inc/FsEmailGlobalDialogsAppUi.h
emailservices/emailserver/inc/fsnotificationhandlerbase.h
emailservices/emailserver/src/FsEmailGlobalDialogsAppUi.cpp
emailservices/emailservermonitor/inc/emailservermonitor.h
emailservices/emailservermonitor/inc/emailservermonitor.hrh
emailservices/emailservermonitor/inc/emailservermonitorutilities.h
emailservices/emailservermonitor/inc/emailshutter.h
emailservices/emailservermonitor/sis/makeEmailServerMonitorSisx.bat
emailservices/emailservermonitor/src/emailservermonitor.cpp
emailservices/emailservermonitor/src/emailservermonitorutilities.cpp
emailservices/emailservermonitor/src/emailshutter.cpp
emailservices/emailservermonitor/src/main.cpp
emailservices/emailstore/message_store/MsgStoreRfsPlugin/inc/RfsMsgStorePlugin.h
emailservices/emailstore/message_store/MsgStoreRfsPlugin/src/RfsMsgStorePlugin.cpp
emailservices/emailstore/message_store/debuglog/group/bld.inf
emailservices/emailstore/message_store/debuglog/inc/DebugLogConst.h
emailservices/emailstore/message_store/server/group/MessageStoreServer.mmp
emailservices/emailstore/message_store/server/inc/MessageStoreServer.h
emailservices/emailstore/message_store/server/inc/bufferedmessagecreator.h
emailservices/emailstore/message_store/server/src/MessageStoreServer.cpp
emailservices/emailstore/message_store/server/src/MessageStoreSession.cpp
emailservices/emailstore/message_store/server/src/bufferedmessagecreator.cpp
emailservices/emailstore/message_store/server/src/messagestoreutils.cpp
emailuis/emailui/data/FreestyleEmailUi.rss
emailuis/emailui/data/FreestyleEmailUiGlobalSettings.rssi
emailuis/emailui/data/html/btn_middle.png
emailuis/emailui/data/html/email.html
emailuis/emailui/data/html/email.js
emailuis/emailui/data/html/email_rtl.html
emailuis/emailui/data/html/header.js
emailuis/emailui/group/FreestyleEmailUi.mmp
emailuis/emailui/group/bld.inf
emailuis/emailui/inc/FreestyleEmailCenRepHandler.h
emailuis/emailui/inc/FreestyleEmailCenRepKeys.h
emailuis/emailui/inc/FreestyleEmailUiAknStatusIndicator.h
emailuis/emailui/inc/FreestyleEmailUiAppui.h
emailuis/emailui/inc/FreestyleEmailUiConstants.h
emailuis/emailui/inc/FreestyleEmailUiContactHandler.h
emailuis/emailui/inc/FreestyleEmailUiHtmlViewerContainer.h
emailuis/emailui/inc/FreestyleEmailUiLauncherGridVisualiser.h
emailuis/emailui/inc/FreestyleEmailUiMailListModel.h
emailuis/emailui/inc/FreestyleEmailUiMailListVisualiser.h
emailuis/emailui/inc/FreestyleEmailUiUtilities.h
emailuis/emailui/inc/FreestyleEmailUiViewBase.h
emailuis/emailui/inc/FreestyleMessageHeaderHTML.h
emailuis/emailui/inc/OverlayControl.h
emailuis/emailui/inc/fsemailstatuspaneindicatorhandler.h
emailuis/emailui/inc/ncscomposeviewcontainer.h
emailuis/emailui/inc/ncsheadercontainer.h
emailuis/emailui/inc/ncspopuplistbox.h
emailuis/emailui/inc/ncssubjectfield.h
emailuis/emailui/loc/freestyleemailui.loc
emailuis/emailui/rom/freestyleemailui.iby
emailuis/emailui/sis/commonemail.pkg
emailuis/emailui/sis/commonemail_loc.pkg
emailuis/emailui/sis/commonemail_udeb.pkg
emailuis/emailui/sis/commonemail_udeb_loc.pkg
emailuis/emailui/sis/makecommonemailsisx.bat
emailuis/emailui/sis/pkg-localizer.py
emailuis/emailui/src/FreestyleEmailCenRepHandler.cpp
emailuis/emailui/src/FreestyleEmailDownloadInformationMediator.cpp
emailuis/emailui/src/FreestyleEmailUiAknStatusIndicator.cpp
emailuis/emailui/src/FreestyleEmailUiAppui.cpp
emailuis/emailui/src/FreestyleEmailUiContactHandler.cpp
emailuis/emailui/src/FreestyleEmailUiFolderListVisualiser.cpp
emailuis/emailui/src/FreestyleEmailUiGlobalSettingsData.cpp
emailuis/emailui/src/FreestyleEmailUiGlobalSettingsList.cpp
emailuis/emailui/src/FreestyleEmailUiHtmlViewerContainer.cpp
emailuis/emailui/src/FreestyleEmailUiHtmlViewerView.cpp
emailuis/emailui/src/FreestyleEmailUiLauncherGridVisualiser.cpp
emailuis/emailui/src/FreestyleEmailUiMailListModel.cpp
emailuis/emailui/src/FreestyleEmailUiMailListVisualiser.cpp
emailuis/emailui/src/FreestyleEmailUiSendAttachmentsListModel.cpp
emailuis/emailui/src/FreestyleEmailUiSettingsList.cpp
emailuis/emailui/src/FreestyleEmailUiUtilities.cpp
emailuis/emailui/src/FreestyleEmailUiViewBase.cpp
emailuis/emailui/src/FreestyleMessageHeaderHTML.cpp
emailuis/emailui/src/OverlayControl.cpp
emailuis/emailui/src/fsemailstatuspaneindicatorhandler.cpp
emailuis/emailui/src/ncsaifeditor.cpp
emailuis/emailui/src/ncscomposeview.cpp
emailuis/emailui/src/ncscomposeviewcontainer.cpp
emailuis/emailui/src/ncsheadercontainer.cpp
emailuis/emailui/src/ncspopuplistbox.cpp
emailuis/emailui/src/ncssubjectfield.cpp
emailuis/emailui/src/ncsutility.cpp
emailuis/uicomponents/inc/fstreevisualizerbase.h
emailuis/uicomponents/src/fscontrolbuttonvisualiser.cpp
emailuis/uicomponents/src/fstreeplainonelineitemvisualizer.cpp
emailuis/uicomponents/src/fstreeplainonelinenodevisualizer.cpp
emailuis/uicomponents/src/fstreeplaintwolineitemvisualizer.cpp
emailuis/uicomponents/src/fstreevisualizerbase.cpp
emailuis/widget/emailwidgetsettings/inc/emailwidgetsettingslistview.h
emailuis/widget/emailwidgetsettings/src/emailwidgetsettingsappui.cpp
emailuis/widget/emailwidgetsettings/src/emailwidgetsettingslistview.cpp
emailuis/widget/emailwidgetsettings/src/emailwidgetsettingsmailboxes.cpp
emailuis/widget/group/bld.inf
emailuis/widget/hsps/00/manifest.dat
emailuis/widget/rom/emailwidget_resources.iby
emailuis/widget/xuikon/00/emailwidget.css
emailuis/widget/xuikon/00/emailwidget.xml
emailuis/widget/xuikon/37/emailwidget.css
emailuis/widget/xuikon/50/emailwidget.css
emailuis/widget/xuikon/57/emailwidget.css
emailuis/widget/xuikon/94/emailwidget.css
help/inc/cmail.hlp.hrh
ipsservices/ipssosaoplugin/src/IpsSosAOMboxLogic.cpp
ipsservices/ipssossettings/group/ipssossettings.mmp
ipsservices/ipssossettings/src/ipssetgwizardadapter.cpp
meetingrequest/mrgui/mrfieldbuilderpluginextension/group/esmrfieldbuilderpluginextension.mmp
meetingrequest/mrgui/mrfieldbuilderpluginextension/inc/cesmrcontacthandler.h
meetingrequest/mrgui/mrfieldbuilderpluginextension/src/cesmrcontacthandler.cpp
--- a/email_plat/email_client_api/inc/emailclientapi.hrh	Fri Feb 19 22:37:30 2010 +0200
+++ b/email_plat/email_client_api/inc/emailclientapi.hrh	Fri Mar 12 15:41:14 2010 +0200
@@ -11,7 +11,7 @@
 *
 * Contributors:
 *
-* Description: 
+* Description: Interface IDs for sub interfaces
 *
 */
 
@@ -24,9 +24,9 @@
 
 // Interface ids (not ECom) for accessing "sub interfaces" via
 // MEmailInterface* CEmailInterfaceFactory::InterfaceL( const TInt aInterfaceId )
-    // to be checked if all should be published to clients (some are not
-    // meant to be instantiated via factory method but by other means, e.g. 
-    // user never instantiates mailbox from scratch but asks it from MEmailClientApi
+// to be checked if all should be published to clients (some are not
+// meant to be instantiated via factory method but by other means, e.g. 
+// user never instantiates mailbox from scratch but asks it from MEmailClientApi
 
 #define KEmailClientApiInterface 0x20022D63
 #define KEmailIFUidMailbox 0x20022D64
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/email_plat/email_crkeys_api/group/bld.inf	Fri Mar 12 15:41:14 2010 +0200
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Build information file for email crkeys interface
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+../inc/commonemailcrkeys.h 	APP_LAYER_PLATFORM_EXPORT_PATH(commonemailcrkeys.h)
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/email_plat/email_crkeys_api/inc/commonemailcrkeys.h	Fri Mar 12 15:41:14 2010 +0200
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*       repository keys to track which mailbox has the latest new email
+*
+*/
+
+#ifndef _COMMONEMAILCRKEYS_H_
+#define _COMMONEMAILCRKEYS_H_
+
+// central repository key for email data
+const TUid KCmailDataRepository	= { 0x20029F4A };
+
+// key for display text (mailbox name?) of email indicator popup
+const TUint32 KCmailNewEmailDisplayText =  0x00000001 ;
+
+#endif // _COMMONEMAILCRKEYS_H_
--- a/email_plat/group/bld.inf	Fri Feb 19 22:37:30 2010 +0200
+++ b/email_plat/group/bld.inf	Fri Mar 12 15:41:14 2010 +0200
@@ -17,5 +17,6 @@
 
 #include "../email_client_api/group/bld.inf"
 #include "../email_setup_plugin_api/group/bld.inf"
+#include "../email_crkeys_api/group/bld.inf"
 
 // End of File
--- a/email_pub/email_widget_api/tsrc/3rdpartyapitestplugin2/data/2002C324.rss	Fri Feb 19 22:37:30 2010 +0200
+++ b/email_pub/email_widget_api/tsrc/3rdpartyapitestplugin2/data/2002C324.rss	Fri Mar 12 15:41:14 2010 +0200
@@ -17,7 +17,7 @@
 
 #include <emailobserverinterface.hrh>
 #include <ecom/registryinfo.rh>
-#include "t_testpluginconst.hrh"
+#include "../inc/t_testpluginconst.hrh"
 
 RESOURCE REGISTRY_INFO theInfo
     {
--- a/email_pub/email_widget_api/tsrc/3rdpartyapitestplugin2/rom/3rdpartyapitestplugin2.iby	Fri Feb 19 22:37:30 2010 +0200
+++ b/email_pub/email_widget_api/tsrc/3rdpartyapitestplugin2/rom/3rdpartyapitestplugin2.iby	Fri Mar 12 15:41:14 2010 +0200
@@ -15,10 +15,10 @@
 *
 */
 
-#ifndef THIRDPARTYAPITESTPLUGIN_IBY
-#define THIRDPARTYAPITESTPLUGIN_IBY
+#ifndef THIRDPARTYAPITESTPLUGIN2_IBY
+#define THIRDPARTYAPITESTPLUGIN2_IBY
 
 #include <data_caging_paths_for_iby.hrh>
 ECOM_PLUGIN( testplugin2.dll, testplugin2.rsc )
 
-#endif // THIRDPARTYAPITESTPLUGIN_IBY
+#endif // THIRDPARTYAPITESTPLUGIN2_IBY
--- a/emailcontacts/contactactionservice/group/fsccontactactionservice.mmp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailcontacts/contactactionservice/group/fsccontactactionservice.mmp	Fri Mar 12 15:41:14 2010 +0200
@@ -90,7 +90,7 @@
 LIBRARY                 numbergrouping.lib
 LIBRARY                 apgrfx.lib
 LIBRARY                 apparc.lib
-
+LIBRARY                 rcse.lib
 // Dependencies to Phonebook
 LIBRARY                 Pbk2Presentation.lib
 LIBRARY                 Pbk2CommonUi.lib
--- a/emailcontacts/contactactionservice/src/cfscactionutils.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailcontacts/contactactionservice/src/cfscactionutils.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -32,7 +32,7 @@
 #include <CoreApplicationUIsSDKCRKeys.h> 
 #include <settingsinternalcrkeys.h>
 //<cmail> Header neither in Cmail nor in the platform
-//#include <crcseprofileregistry.h>
+#include <crcseprofileregistry.h>
 //</cmail>
 #include <NetworkHandlingDomainPSKeys.h>
 #include <MVPbkStoreContact.h>
@@ -136,7 +136,7 @@
     if ( iRCSEProfileRegistry != NULL )
         {
         //<cmail>
-        //delete iRCSEProfileRegistry;
+        delete iRCSEProfileRegistry;
         //</cmail>
         }
     }
@@ -1155,7 +1155,7 @@
         RArray<TUint32> ids;
         CleanupClosePushL( ids );
         //<cmail>
-        //iRCSEProfileRegistry->GetAllIdsL( ids );
+        iRCSEProfileRegistry->GetAllIdsL( ids );
         //</cmail>
         configured = ids.Count() > 0;
         CleanupStack::PopAndDestroy( &ids );
@@ -1252,12 +1252,12 @@
     if ( FeatureManager::FeatureSupported( KFeatureIdCommonVoip ) )
         {
         //<cmail>
-        //TRAP_IGNORE( iRCSEProfileRegistry = CRCSEProfileRegistry::NewL() );
+        TRAP_IGNORE( iRCSEProfileRegistry = CRCSEProfileRegistry::NewL() );
         //</cmail>
         }
     
     //<cmail>
-    iRCSEProfileRegistry = NULL;
+    //iRCSEProfileRegistry = NULL;
     //</cmail>
 
     }
--- a/emailcontacts/group/bld.inf	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailcontacts/group/bld.inf	Fri Mar 12 15:41:14 2010 +0200
@@ -22,9 +22,9 @@
 //<cmail>
 #include "../contactactionservice/group/bld.inf"
 #include "../contactactionmenu/group/bld.inf"
-#include "../remotecontactlookup/group/bld.inf"
 //</cmail>
 //<cmail> not needed in cmail
+//#include "../remotecontactlookup/group/bld.inf"
 //#include "../fscuicontrols/group/bld.inf"
 //#include "../fsccombinedviewui/group/bld.inf"
 //</cmail>
--- a/emailservices/emailclientapi/group/emailclientapi.mmp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailclientapi/group/emailclientapi.mmp	Fri Mar 12 15:41:14 2010 +0200
@@ -63,6 +63,7 @@
 
 
 LIBRARY bafl.lib
+LIBRARY cone.lib
 LIBRARY euser.lib
 LIBRARY ECom.lib
 LIBRARY FSFWCommonLib.lib
@@ -70,7 +71,7 @@
 LIBRARY efsrv.lib
 LIBRARY viewcli.lib
 LIBRARY estor.lib
-
+LIBRARY centralrepository.lib
 #ifdef TRACE_INTO_FILE
 LIBRARY flogger.lib
 #endif // TRACE_INTO_FILE
--- a/emailservices/emailclientapi/inc/emailclientpluginmanager.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailclientapi/inc/emailclientpluginmanager.h	Fri Mar 12 15:41:14 2010 +0200
@@ -9,7 +9,7 @@
 * Initial Contributors:
 * Nokia Corporation - initial contribution.
 *
-* Contributors:
+* Contributors: Definition for plugin manager interface
 *
 * Description: 
 *
--- a/emailservices/emailclientapi/inc/emailmailboxcache.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailclientapi/inc/emailmailboxcache.h	Fri Mar 12 15:41:14 2010 +0200
@@ -11,7 +11,7 @@
 *
 * Contributors:
 *
-* Description: 
+* Description: Definition for mailbox cache
 *
 */
 
--- a/emailservices/emailclientapi/src/emailclientapiimpl.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailclientapi/src/emailclientapiimpl.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -24,7 +24,9 @@
 #include <viewcli.h>
 #include <vwsdef.h>
 #endif // SYMBIAN_ENABLE_SPLIT_HEADERS
-
+#include <coemain.h> // CCoeEnv
+#include <coeaui.h> // CCoeAppUi
+#include <centralrepository.h>
 #include "emailclientapiimpl.h"
 #include "emailapiutils.h"
 #include "emailmailbox.h"
@@ -35,6 +37,8 @@
 #include "emailmailboxcache.h"
 #include "FreestyleEmailUiConstants.h"
 #include "emailclientapi.hrh"
+#include "FreestyleEmailCenRepKeys.h"
+#include "FreestyleEmailUiConstants.h"
 // ---------------------------------------------------------------------------
 // CEmailClientApi::MailboxL
 // ---------------------------------------------------------------------------
@@ -136,17 +140,47 @@
 // -----------------------------------------------------------------------------
 void CEmailClientApi::LaunchEmailL( const TLaunchPolicy aPolicy )
     {
-    if ( aPolicy != EDefault )
+    if ( aPolicy == EShowLastUnseenMailbox)
         {
-        // no other launch policies supported
-        User::Leave( KErrNotSupported );
+        CRepository* emailRepository = CRepository::NewL( KFreestyleEmailCenRep );
+		CleanupStack::PushL(emailRepository);
+        TInt numberOfMailboxes(0);
+        TInt inboxId(0);
+        TInt pluginId(0);
+        emailRepository->Get(KNumberOfMailboxesWithNewEmails,numberOfMailboxes);
+        if(numberOfMailboxes > 0)
+            {
+            emailRepository->Get(KNumberOfMailboxesWithNewEmails+(numberOfMailboxes*2-1),pluginId);            
+            emailRepository->Get(KNumberOfMailboxesWithNewEmails+(numberOfMailboxes*2),inboxId);
+           
+            TUid pluginUid = {pluginId};
+            TMailListActivationData activationData;
+    
+            activationData.iMailBoxId.SetId(inboxId);
+            activationData.iMailBoxId.SetPluginId(pluginUid);
+            activationData.iFolderId.SetPluginId(pluginUid);
+            TPckgBuf<TMailListActivationData> pkgBuf(activationData);
+    
+            CCoeEnv::Static()->AppUi()->CreateActivateViewEventL( 
+                    TVwsViewId(KFSEmailUiUid, MailListId), KStartListWithFolderId, 
+                    pkgBuf );
+            }
+        else
+            {
+            // We should never come here since the mailbox count should be more than 0 if launchemailL is called
+            // but just to be safe launch the email in launchergrid if something went wrong with the repository
+            const TUid dummy = {0};
+            CCoeEnv::Static()->AppUi()->CreateActivateViewEventL(TVwsViewId(KFSEmailUiUid, AppGridId),
+            dummy, KNullDesC8() );        
+            }
+        CleanupStack::PopAndDestroy();//emailRepository
         }
-    const TUid dummy = {0};
-                
-    CVwsSessionWrapper* viewSrvSession = CVwsSessionWrapper::NewLC();
-    viewSrvSession->ActivateView(TVwsViewId(KFSEmailUiUid, AppGridId),
+    else if ( aPolicy == EDefault )
+        {
+        const TUid dummy = {0};                    
+        CCoeEnv::Static()->AppUi()->CreateActivateViewEventL(TVwsViewId(KFSEmailUiUid, AppGridId),
         dummy, KNullDesC8() );
-    CleanupStack::PopAndDestroy();    
+        }
     }    
 
 // -----------------------------------------------------------------------------
--- a/emailservices/emailclientapi/src/emailmailbox.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailclientapi/src/emailmailbox.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 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"
@@ -15,7 +15,7 @@
 *
 */
 
-#include <e32cmn.h> 
+#include <e32cmn.h>
 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
 #include <viewclipartner.h>
 #include <vwsdefpartner.h>
@@ -39,10 +39,14 @@
 #include "emailclientapi.hrh"
 #include "FreestyleEmailUiConstants.h"
 
+// Constants
+
+_LIT( KNewLine, "\n" );
+
 // -----------------------------------------------------------------------------
-// 
+//
 // -----------------------------------------------------------------------------
-CEmailMailbox* CEmailMailbox::NewL( 
+CEmailMailbox* CEmailMailbox::NewL(
     CPluginData& aPluginData,
     const TMailboxId& aMailboxId )
     {
@@ -54,30 +58,30 @@
     }
 
 // -----------------------------------------------------------------------------
-// 
+//
 // -----------------------------------------------------------------------------
-CEmailMailbox::CEmailMailbox( 
+CEmailMailbox::CEmailMailbox(
     CPluginData& aPluginData,
     const TMailboxId& aMailboxId )
     : iPluginData( aPluginData ),
     iMailboxId( aMailboxId.iId )
-    {        
+    {
     }
 
 // -----------------------------------------------------------------------------
-// 
+//
 // -----------------------------------------------------------------------------
 void CEmailMailbox::ConstructL()
     {
     iPlugin = iPluginData.ClaimInstanceL();
-    iEventMapper = new ( ELeave ) TObserverEventMapper( 
+    iEventMapper = new ( ELeave ) TObserverEventMapper(
         iPlugin, iPluginData.Uid(), iMailboxId );
     iFsMailbox = iPlugin->GetMailBoxByUidL( FsMailboxId() );
-    iSyncObserver = new (ELeave) CEmailMailbox::CEmailRequestObserver();    
+    iSyncObserver = new (ELeave) CEmailMailbox::CEmailRequestObserver();
     }
 
 // -----------------------------------------------------------------------------
-// 
+//
 // -----------------------------------------------------------------------------
 CEmailMailbox::~CEmailMailbox()
     {
@@ -89,7 +93,7 @@
     }
 
 // -----------------------------------------------------------------------------
-// 
+//
 // -----------------------------------------------------------------------------
 TEmailTypeId CEmailMailbox::InterfaceId() const
     {
@@ -97,7 +101,7 @@
     }
 
 // -----------------------------------------------------------------------------
-// 
+//
 // -----------------------------------------------------------------------------
 void CEmailMailbox::Release()
     {
@@ -105,20 +109,20 @@
     }
 
 // -----------------------------------------------------------------------------
-// 
+//
 // -----------------------------------------------------------------------------
 TMailboxId CEmailMailbox::MailboxId() const
     {
     return iMailboxId;
     }
-   
+
 // -----------------------------------------------------------------------------
-// 
+//
 // -----------------------------------------------------------------------------
 MEmailAddress* CEmailMailbox::AddressL() const
     {
     if ( !iAddress )
-        {        
+        {
         iAddress = CEmailAddress::NewL(
             MEmailAddress::ESender, EAPIOwns );
         iAddress->SetDisplayNameL( iFsMailbox->GetName() );
@@ -128,7 +132,7 @@
     }
 
 // -----------------------------------------------------------------------------
-// 
+//
 // -----------------------------------------------------------------------------
 TPtrC CEmailMailbox::MailboxName() const
     {
@@ -141,24 +145,24 @@
 TFSMailMsgId CEmailMailbox::FsMailboxId() const
     {
     return FsMsgId( iPluginData, iMailboxId );
-    }    
+    }
 
 // -----------------------------------------------------------------------------
-// 
+//
 // -----------------------------------------------------------------------------
 TInt CEmailMailbox::GetFoldersL( RFolderArray& aFolders ) const
     {
     TFSMailMsgId rootId = TFSMailMsgId();
     RPointerArray<CFSMailFolder> folders;
-    CleanupResetAndDestroyPushL( folders );    
-    iPlugin->ListFoldersL( FsMailboxId(), rootId, folders );    
+    CleanupResetAndDestroyPushL( folders );
+    iPlugin->ListFoldersL( FsMailboxId(), rootId, folders );
     TInt res( folders.Count() );
     for ( TInt i = 0; i < res; i++ )
         {
-        const CFSMailFolder* fsfolder = folders[i]; 
+        const CFSMailFolder* fsfolder = folders[i];
         const TEntryId id = fsfolder->GetFolderId().Id();
         const TFolderId folderId( id, iMailboxId );
-        CEmailFolder* folder = CEmailFolder::NewLC( iPluginData, folderId, folders[i] );        
+        CEmailFolder* folder = CEmailFolder::NewLC( iPluginData, folderId, folders[i] );
         aFolders.AppendL( folder );
         CleanupStack::Pop();    // folder
         }
@@ -169,7 +173,7 @@
     }
 
 // -----------------------------------------------------------------------------
-// 
+//
 // -----------------------------------------------------------------------------
 MEmailFolder* CEmailMailbox::FolderL( const TFolderId& aFolderId ) const
     {
@@ -177,94 +181,82 @@
             FsMsgId( iPluginData, iMailboxId ),
             FsMsgId( iPluginData, aFolderId ) );
     CleanupStack::PushL( fsFolder );
-    
-    CEmailFolder* folder = CEmailFolder::NewL( iPluginData, 
-                aFolderId, fsFolder);   
+
+    CEmailFolder* folder = CEmailFolder::NewL( iPluginData,
+                aFolderId, fsFolder);
     CleanupStack::Pop();    // folder
-    
-    return folder;             
+
+    return folder;
     }
- 
+
 // -----------------------------------------------------------------------------
-// 
+//
 // -----------------------------------------------------------------------------
-MEmailFolder* CEmailMailbox::FolderByTypeL( 
+MEmailFolder* CEmailMailbox::FolderByTypeL(
     const TFolderType aFolderType ) const
-    {   
+    {
     TFSMailMsgId fsFolderId;
-    
+
     switch ( aFolderType )
-        {                   
+        {
         case EInbox:
-            fsFolderId = iPlugin->GetStandardFolderIdL( FsMailboxId(), EFSInbox ); 
+            fsFolderId = iPlugin->GetStandardFolderIdL( FsMailboxId(), EFSInbox );
         case EOutbox:
-            fsFolderId = iPlugin->GetStandardFolderIdL( FsMailboxId(), EFSOutbox ); 
+            fsFolderId = iPlugin->GetStandardFolderIdL( FsMailboxId(), EFSOutbox );
         case EDrafts:
-            fsFolderId = iPlugin->GetStandardFolderIdL( FsMailboxId(), EFSDraftsFolder ); 
+            fsFolderId = iPlugin->GetStandardFolderIdL( FsMailboxId(), EFSDraftsFolder );
         case EDeleted:
-            fsFolderId = iPlugin->GetStandardFolderIdL( FsMailboxId(), EFSDeleted ); 
+            fsFolderId = iPlugin->GetStandardFolderIdL( FsMailboxId(), EFSDeleted );
         case ESent:
-            fsFolderId = iPlugin->GetStandardFolderIdL( FsMailboxId(), EFSSentFolder ); 
+            fsFolderId = iPlugin->GetStandardFolderIdL( FsMailboxId(), EFSSentFolder );
         case EOther:
         default:
             User::Leave( KErrNotFound );
             break;
         }
-    
+
     const TFolderId folderId( fsFolderId.Id(), iMailboxId );
-    
+
     CFSMailFolder* fsFolder = iPlugin->GetFolderByUidL(
             FsMsgId( iPluginData, iMailboxId ),
             fsFolderId );
     CleanupStack::PushL( fsFolder );
-    
+
     CEmailFolder* folder = CEmailFolder::NewL( iPluginData,
-            folderId, 
+            folderId,
             fsFolder );
-    
+
     CleanupStack::Pop();
-    
-    return folder;    
+
+    return folder;
     }
 
 // -----------------------------------------------------------------------------
-// 
+//
 // -----------------------------------------------------------------------------
 MEmailMessage* CEmailMailbox::MessageL( const TMessageId& aMessageId )
-    {    
-    CFSMailMessage *fsMessage = iPlugin->GetMessageByUidL( 
-            FsMsgId( iPluginData, aMessageId.iFolderId.iMailboxId ), 
-            FsMsgId( iPluginData, aMessageId.iFolderId ), 
-            FsMsgId( iPluginData, aMessageId ), 
+    {
+    CFSMailMessage *fsMessage = iPlugin->GetMessageByUidL(
+            FsMsgId( iPluginData, aMessageId.iFolderId.iMailboxId ),
+            FsMsgId( iPluginData, aMessageId.iFolderId ),
+            FsMsgId( iPluginData, aMessageId ),
             EFSMsgDataEnvelope);
 
-    CleanupStack::PushL( fsMessage );    
+    CleanupStack::PushL( fsMessage );
     CEmailMessage* message = CEmailMessage::NewL( iPluginData, fsMessage, EClientOwns );
     CleanupStack::Pop();  // fsMessage
-    
+
     return message;
     }
 
 // -----------------------------------------------------------------------------
-// 
+//
 // -----------------------------------------------------------------------------
 MEmailMessage* CEmailMailbox::CreateDraftMessageL() const
     {
     CFSMailMessage* fsMessage = iFsMailbox->CreateMessageToSend();
-    CleanupStack::PushL( fsMessage );    
-    MEmailMessage* message = CEmailMessage::NewL( iPluginData, fsMessage, EClientOwns );
-    CleanupStack::Pop();  // fsMessage
-    
-    return message;
-    }
-    
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-MEmailMessage* CEmailMailbox::CreateReplyMessageL( const TMessageId& aMessageId, const TBool aReplyToAll ) const
-    {
-    CFSMailMessage* fsMessage = iFsMailbox->CreateReplyMessage( FsMsgId( iPluginData, aMessageId ), aReplyToAll );   
-    CleanupStack::PushL( fsMessage );    
+    User::LeaveIfNull( fsMessage );
+    CleanupStack::PushL( fsMessage );
     MEmailMessage* message = CEmailMessage::NewL( iPluginData, fsMessage, EClientOwns );
     CleanupStack::Pop();  // fsMessage
 
@@ -272,12 +264,13 @@
     }
 
 // -----------------------------------------------------------------------------
-// 
+//
 // -----------------------------------------------------------------------------
-MEmailMessage* CEmailMailbox::CreateForwardMessageL( const TMessageId& aMessageId ) const
-    {            
-    CFSMailMessage* fsMessage = iFsMailbox->CreateForwardMessage( FsMsgId( iPluginData, aMessageId ) );
-    CleanupStack::PushL( fsMessage );    
+MEmailMessage* CEmailMailbox::CreateReplyMessageL( const TMessageId& aMessageId, const TBool aReplyToAll ) const
+    {
+    CFSMailMessage* fsMessage = iFsMailbox->CreateReplyMessage( FsMsgId( iPluginData, aMessageId ), aReplyToAll );
+    User::LeaveIfNull( fsMessage );
+    CleanupStack::PushL( fsMessage );
     MEmailMessage* message = CEmailMessage::NewL( iPluginData, fsMessage, EClientOwns );
     CleanupStack::Pop();  // fsMessage
 
@@ -285,16 +278,31 @@
     }
 
 // -----------------------------------------------------------------------------
-// 
+//
+// -----------------------------------------------------------------------------
+MEmailMessage* CEmailMailbox::CreateForwardMessageL( const TMessageId& aMessageId ) const
+    {
+    CFSMailMessage* fsMessage = iFsMailbox->CreateForwardMessage(
+        FsMsgId( iPluginData, aMessageId ), KNewLine() );
+    User::LeaveIfNull( fsMessage );
+    CleanupStack::PushL( fsMessage );
+    MEmailMessage* message = CEmailMessage::NewL( iPluginData, fsMessage, EClientOwns );
+    CleanupStack::Pop();  // fsMessage
+
+    return message;
+    }
+
+// -----------------------------------------------------------------------------
+//
 // -----------------------------------------------------------------------------
 void CEmailMailbox::SynchroniseL( MMailboxSyncObserver& aObserver )
     {
     iSyncObserver->SetObserverL( &aObserver );
-    iRequestId = iFsMailbox->RefreshNowL( *iSyncObserver );    
+    iRequestId = iFsMailbox->RefreshNowL( *iSyncObserver );
     }
-    
+
 // -----------------------------------------------------------------------------
-// 
+//
 // -----------------------------------------------------------------------------
 void CEmailMailbox::CancelSynchronise()
     {
@@ -302,15 +310,15 @@
     }
 
 // -----------------------------------------------------------------------------
-// 
+//
 // -----------------------------------------------------------------------------
 void CEmailMailbox::RegisterObserverL( MMailboxContentObserver& aObserver )
     {
     iEventMapper->AddObserverL( aObserver );
     }
-        
+
 // -----------------------------------------------------------------------------
-// 
+//
 // -----------------------------------------------------------------------------
 void CEmailMailbox::UnregisterObserver( MMailboxContentObserver& aObserver )
     {
@@ -318,32 +326,32 @@
     }
 
 // -----------------------------------------------------------------------------
-// 
+//
 // -----------------------------------------------------------------------------
 MEmailMessageSearchAsync* CEmailMailbox::MessageSearchL()
     {
     MEmailMessageSearchAsync* searchAPI = CEmailMessageSearchAsync::NewL( iPluginData, iMailboxId );
     return searchAPI;
     }
-    
+
 void CEmailMailbox::ShowInboxL()
     {
     TMailListActivationData mailListData;
-             
+
     mailListData.iMailBoxId = FsMsgId(iPluginData, iMailboxId);
-             
+
     TPckgBuf<TMailListActivationData> pkgOut( mailListData );
     CVwsSessionWrapper* viewSrvSession = CVwsSessionWrapper::NewLC();
     viewSrvSession->ActivateView(TVwsViewId(KFSEmailUiUid, MailListId), KStartListWithFolderId, pkgOut);
-    CleanupStack::PopAndDestroy();    
+    CleanupStack::PopAndDestroy();
     }
 
 void CEmailMailbox::EditNewMessageL()
     {
     TEditorLaunchParams editorLaunchData;
     editorLaunchData.iMailboxId = FsMsgId(iPluginData, iMailboxId);
-    editorLaunchData.iActivatedExternally = ETrue; 
-    
+    editorLaunchData.iActivatedExternally = ETrue;
+
     TPckgBuf<TEditorLaunchParams> pckgData( editorLaunchData );
     CVwsSessionWrapper* viewSrvSession = CVwsSessionWrapper::NewLC();
     TUid command = TUid::Uid(KEditorCmdCreateNew);
@@ -355,22 +363,22 @@
     {
     CFSMailFolder* fsFolder = NULL;
     TFSMailMsgId fsFolderId = iPlugin->GetStandardFolderIdL( FsMailboxId(), EFSInbox );
-    
+
     }
 */
 // -----------------------------------------------------------------------------
-// 
+//
 // -----------------------------------------------------------------------------
-CEmailMailbox::TObserverEventMapper::TObserverEventMapper( 
-    CFSMailPlugin* aPlugin, 
+CEmailMailbox::TObserverEventMapper::TObserverEventMapper(
+    CFSMailPlugin* aPlugin,
     TUid aPluginUid, const TMailboxId& aMailboxId )
-     : iPlugin( aPlugin ), 
+     : iPlugin( aPlugin ),
        iFsMailboxId( aPluginUid.iUid, aMailboxId.iId )
     {
     }
 
 // -----------------------------------------------------------------------------
-// 
+//
 // -----------------------------------------------------------------------------
 CEmailMailbox::TObserverEventMapper::~TObserverEventMapper()
     {
@@ -418,29 +426,29 @@
 // Maps protocol a plugin event to client event
 // -----------------------------------------------------------------------------
 void CEmailMailbox::TObserverEventMapper::EventL(
-    TFSMailEvent aEvent, 
-    TFSMailMsgId aMailbox, 
-    TAny* aParam1, 
-    TAny* aParam2, 
+    TFSMailEvent aEvent,
+    TFSMailMsgId aMailbox,
+    TAny* aParam1,
+    TAny* aParam2,
     TAny* aParam3 )
     {
     const TEventMapFunc KMailboxEventHandlers[] = {
     CEmailMailbox::TObserverEventMapper::IgnoreEventL,
-    CEmailMailbox::TObserverEventMapper::IgnoreEventL, 
-    CEmailMailbox::TObserverEventMapper::IgnoreEventL, 
-    CEmailMailbox::TObserverEventMapper::IgnoreEventL,
     CEmailMailbox::TObserverEventMapper::IgnoreEventL,
     CEmailMailbox::TObserverEventMapper::IgnoreEventL,
     CEmailMailbox::TObserverEventMapper::IgnoreEventL,
     CEmailMailbox::TObserverEventMapper::IgnoreEventL,
     CEmailMailbox::TObserverEventMapper::IgnoreEventL,
     CEmailMailbox::TObserverEventMapper::IgnoreEventL,
-    CEmailMailbox::TObserverEventMapper::NewMessageL, 
+    CEmailMailbox::TObserverEventMapper::IgnoreEventL,
+    CEmailMailbox::TObserverEventMapper::IgnoreEventL,
+    CEmailMailbox::TObserverEventMapper::IgnoreEventL,
+    CEmailMailbox::TObserverEventMapper::NewMessageL,
     CEmailMailbox::TObserverEventMapper::MessageChangedL,
     CEmailMailbox::TObserverEventMapper::MessageDeletedL,
     CEmailMailbox::TObserverEventMapper::MessageMoved,
     CEmailMailbox::TObserverEventMapper::MessageCopiedL,
-    CEmailMailbox::TObserverEventMapper::NewFolderL, 
+    CEmailMailbox::TObserverEventMapper::NewFolderL,
     CEmailMailbox::TObserverEventMapper::FolderChangeL,
     CEmailMailbox::TObserverEventMapper::FoldersDeletedL,
     CEmailMailbox::TObserverEventMapper::FoldersMovedL,
@@ -453,69 +461,69 @@
     if ( index < sizeof( KMailboxEventHandlers ) / sizeof( KMailboxEventHandlers[ index ] ) )
         {
         // call event handler function
-        TEventMapFunc method = KMailboxEventHandlers[ index ];        
+        TEventMapFunc method = KMailboxEventHandlers[ index ];
         (this->*method)(id, aParam1,aParam2,aParam3 );
         }
     }
 
-void CEmailMailbox::TObserverEventMapper::IgnoreEventL( 
+void CEmailMailbox::TObserverEventMapper::IgnoreEventL(
     TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ )
     {
     }
-    
-void CEmailMailbox::TObserverEventMapper::NewMessageL( 
+
+void CEmailMailbox::TObserverEventMapper::NewMessageL(
     TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ )
     {
     }
-    
-void CEmailMailbox::TObserverEventMapper::MessageChangedL( 
+
+void CEmailMailbox::TObserverEventMapper::MessageChangedL(
     TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ )
     {
     }
-    
-void CEmailMailbox::TObserverEventMapper::MessageDeletedL( 
+
+void CEmailMailbox::TObserverEventMapper::MessageDeletedL(
     TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ )
     {
     }
-    
-void CEmailMailbox::TObserverEventMapper::MessageMoved( 
+
+void CEmailMailbox::TObserverEventMapper::MessageMoved(
     TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ )
     {
     }
-    
-void CEmailMailbox::TObserverEventMapper::MessageCopiedL( 
+
+void CEmailMailbox::TObserverEventMapper::MessageCopiedL(
     TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ )
     {
     }
-    
-void CEmailMailbox::TObserverEventMapper::NewFolderL( 
+
+void CEmailMailbox::TObserverEventMapper::NewFolderL(
     TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ )
     {
     }
-    
-void CEmailMailbox::TObserverEventMapper::FolderChangeL( 
+
+void CEmailMailbox::TObserverEventMapper::FolderChangeL(
     TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ )
     {
     }
-    
-void CEmailMailbox::TObserverEventMapper::FoldersDeletedL( 
+
+void CEmailMailbox::TObserverEventMapper::FoldersDeletedL(
     TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ )
     {
     }
-    
-void CEmailMailbox::TObserverEventMapper::FoldersMovedL( 
+
+void CEmailMailbox::TObserverEventMapper::FoldersMovedL(
     TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ )
     {
     }
-    
-void CEmailMailbox::TObserverEventMapper::ExceptionL( 
+
+void CEmailMailbox::TObserverEventMapper::ExceptionL(
     TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ )
     {
     }
-    
+
 
 // -----------------------------------------------------------------------------
-// 
+//
 // -----------------------------------------------------------------------------
 TBool CEmailMailbox::TObserverEventMapper::Equals( const MMailboxContentObserver& a1, const MMailboxContentObserver& a2 )
     {
@@ -524,7 +532,7 @@
 
 
 CEmailMailbox::CEmailRequestObserver::CEmailRequestObserver() : iObserver( NULL )
-    {    
+    {
     }
 
 
@@ -532,7 +540,7 @@
 {
     if (aEvent.iProgressStatus == TFSProgress::EFSStatus_RequestComplete)
         {
-        iObserver->MailboxSynchronisedL(aEvent.iError);       
+        iObserver->MailboxSynchronisedL(aEvent.iError);
         }
 }
 
--- a/emailservices/emaildebug/inc/emailtraceconfig.hrh	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emaildebug/inc/emailtraceconfig.hrh	Fri Mar 12 15:41:14 2010 +0200
@@ -47,7 +47,7 @@
 
 #endif // ENABLE_TRACES
 
-#ifdef ENABLE_TIMESTAMP_TRACES
+#ifdef __ENABLE_TIMESTAMP_TRACES
 #ifndef _DEBUG
 // Undefine error traces
 #undef ERROR_TRACE
--- a/emailservices/emailframework/commonlib/group/bld.inf	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailframework/commonlib/group/bld.inf	Fri Mar 12 15:41:14 2010 +0200
@@ -30,6 +30,7 @@
 ../inc/cemailextensionbase.h |../../../../inc/cemailextensionbase.h
 ../inc/cmrcalendarinfo.h |../../../../inc/cmrcalendarinfo.h
 ../inc/cmailmessageext.h |../../../../inc/cmailmessageext.h
+../inc/cmailboxstateext.h |../../../../inc/cmailboxstateext.h
 
 ../inc/mmrattachment.h |../../../../inc/mmrattachment.h
 ../inc/mmrattendee.h |../../../../inc/mmrattendee.h
--- a/emailservices/emailframework/commonlib/inc/CFSMailMessagePart.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailframework/commonlib/inc/CFSMailMessagePart.h	Fri Mar 12 15:41:14 2010 +0200
@@ -24,7 +24,7 @@
 #include <badesca.h>
 
 //<cmail>
-#include "CFSMailMessageBase.h"
+#include "cfsmailmessagebase.h"
 #include "mmrinfoobject.h"
 //</cmail>
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/emailframework/commonlib/inc/cmailboxstateext.h	Fri Mar 12 15:41:14 2010 +0200
@@ -0,0 +1,70 @@
+/*
+* Copyright (c) 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Message extension interface
+*
+*/
+
+#ifndef CMAILBOXSTATEEXT_H
+#define CMAILBOXSTATEEXT_H
+
+#include "cemailextensionbase.h"
+#include "CFSMailCommon.h"
+
+// interface UID value passed to CFSMailClient::ExtensionL
+const TUid KEmailMailboxStateExtensionUid        = { 0x2001E28B };
+
+/**
+* Data providider interface.
+*/
+class MEmailMailboxState
+{
+public:
+    /**
+    * Returns currently active folder and related mailbox that
+    * is currently being used.
+    * @param aActiveMailboxId id of currently active mailbox 
+    * @param aActiveFolderId id of currently active mail folder
+    * @return Symbian OS error code
+    */
+    virtual TInt GetActiveFolderId( 
+        TFSMailMsgId& aActiveMailboxId,
+        TFSMailMsgId& aActiveFolderId ) const = 0;
+};
+
+/**
+ * Extension interface for passing UI context data to protocol plugins. 
+ */
+class CMailboxStateExtension : public CEmailExtension
+{
+public:
+    
+    /**
+     * Sets data provider interface
+     * @param aDataProvider data provider
+     */
+    virtual void SetStateDataProvider( MEmailMailboxState* aDataProvider ) = 0;
+
+protected:    
+    inline CMailboxStateExtension();
+
+protected:
+    MEmailMailboxState* iDataProvider;
+};
+
+inline CMailboxStateExtension::CMailboxStateExtension() :
+         CEmailExtension( KEmailMailboxStateExtensionUid )
+    {
+    }
+         
+#endif // CMAILBOXSTATEEXT_H
--- a/emailservices/emailframework/commonlib/src/CFSMailBox.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailframework/commonlib/src/CFSMailBox.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -25,6 +25,8 @@
 #include "cfsmailbox.h"
 #include "cfsmailrequestobserver.h"
 
+#include "cmailboxstateext.h"
+
 const TInt KMaxMruEntries( 150 );
 
 // ================= MEMBER FUNCTIONS ==========================================
@@ -844,6 +846,19 @@
             CleanupStack::Pop(); // calInfo
             }
         }    
+    else if ( aInterfaceUid == KEmailMailboxStateExtensionUid )
+        {
+        if ( !extension )
+            {
+            // check that plugin supports requested extension.
+            if ( CFSMailPlugin* plugin = iRequestHandler->GetPluginByUid( GetId() ) )
+                {
+                // request extension from plugin, leaves if not supported
+                extension = plugin->ExtensionL( aInterfaceUid );            
+                }
+    
+            }
+        }
     else
         {
         User::Leave( KErrNotSupported );
--- a/emailservices/emailframework/data/microsoft.svg	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailframework/data/microsoft.svg	Fri Mar 12 15:41:14 2010 +0200
@@ -1,429 +1,44 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" viewBox="0 0 24 24">
-<rect fill="none" height="24" width="24"/>
-<path fill="#FFFFFF" d="M20.024,19.734c0,0.297-0.238,0.489-0.497,0.489c-0.262,0-0.49-0.185-0.49-0.483c0-0.258,0.197-0.491,0.494-0.491C19.797,19.249,20.024,19.439,20.024,19.734z M19.964,19.738c0-0.248-0.188-0.435-0.433-0.435c-0.252,0-0.438,0.187-0.438,0.435c0,0.252,0.205,0.438,0.438,0.438C19.783,20.176,19.964,19.975,19.964,19.738z M19.769,20.045h-0.106l-0.069-0.151c-0.033-0.074-0.07-0.112-0.11-0.112h-0.06v0.264h-0.088v-0.626h0.177c0.119,0,0.229,0.044,0.229,0.171c0,0.074-0.05,0.146-0.158,0.171v0.002c0.033,0.009,0.07,0.048,0.104,0.117L19.769,20.045z M19.647,19.6c0-0.066-0.034-0.106-0.145-0.106h-0.079v0.213h0.094C19.604,19.706,19.647,19.672,19.647,19.6z"/>
-<radialGradient id="SVGID_1" gradientUnits="userSpaceOnUse" cx="12.33" cy="13.53" r="9.43">
-<stop stop-color="#FFFFFF" offset="0.25"/>
-<stop stop-color="#000000" offset="1"/>
-</radialGradient>
-<path opacity="0.2" fill="url(#SVGID_1)" enable-background="new " d="M3.988,12.398c-0.017,0.01-0.026,0.008-0.038,0.04l-1.926,6.53c-0.011,0.033,0.008,0.068,0.031,0.09c0,0,0.131,0.096,0.133,0.097c0.041,0.028,0.065,0.019,0.078,0.017c3.298-1.234,5.002-0.924,7.124,0.389l0.004,0.006l0,0c0.01,0.005,0.042,0.02,0.071,0.007c0,0,0.084-0.05,0.109-0.064l0,0l0.009-0.007c0.018-0.012,0.042-0.028,0.048-0.058l0.002-0.007l0,0c0.004-0.011,1.983-6.575,1.983-6.575c0.007-0.03-0.006-0.063-0.03-0.082C9.031,11.105,6.954,11.21,3.988,12.398z M12.394,13.491c-0.038,0.026-0.135,0.091-0.152,0.141L10.313,20.1c-0.035,0.098,0.055,0.151,0.066,0.156c2.595,1.692,5.201,1.686,8.082,0.491c0.002,0,0.049-0.029,0.064-0.061c0-0.002,1.885-6.365,1.885-6.367c0.01-0.052-0.004-0.085-0.031-0.114l-0.158-0.123c-0.01-0.011-0.037-0.028-0.105-0.019c-3.7,1.216-5.648,0.668-7.571-0.587C12.505,13.455,12.458,13.447,12.394,13.491z M14.678,5.58c-0.074,0.054-0.139,0.096-0.156,0.156l-1.936,6.485c-0.017,0.067-0.006,0.105,0.06,0.149c2.486,1.691,5.264,1.702,8.062,0.487c0.027-0.009,0.053-0.034,0.066-0.062c0-0.001,1.967-6.543,1.967-6.543c0.021-0.074-0.03-0.124-0.09-0.175c-0.026-0.024-0.063-0.057-0.088-0.067c-0.055-0.024-0.108-0.017-0.124-0.007c-0.001,0-0.002,0-0.002,0l0,0c-3.356,1.343-5.374,1.029-7.61-0.439C14.768,5.54,14.74,5.542,14.678,5.58z M6.245,4.441L6.245,4.441C6.239,4.443,6.217,4.451,6.209,4.48l-1.955,6.549c-0.009,0.032,0.002,0.083,0.026,0.101c0.002,0.002,0.147,0.109,0.15,0.111c0.036,0.014,0.028,0.011,0.098-0.012c3.296-1.268,5.097-0.888,7.107,0.354c0.039,0.021,0.064,0.025,0.089,0.019l0.123-0.053c0.016-0.009,0.037-0.021,0.053-0.063l1.952-6.53c0.006-0.024,0.003-0.058-0.025-0.079C11.438,3.206,9.207,3.261,6.245,4.441z"/>
-<path fill="#FFFFFF" d="M17.984,20.216c0.02-0.011,0.051-0.038,0.061-0.063c0,0,1.875-6.541,1.877-6.543l-0.002-0.003l0,0c0.002-0.011,0.002-0.021,0.002-0.028c0-0.054-0.031-0.086-0.033-0.086c0.002,0-0.154-0.126-0.154-0.126l0,0l0,0c-0.012-0.012-0.039-0.028-0.108-0.021C19.359,13.453,16.719,20.688,17.984,20.216z M20.226,12.327c0.014-0.009,0.052-0.028,0.066-0.063l1.957-6.724c0.021-0.074-0.034-0.135-0.089-0.183c-0.092-0.093-0.152-0.097-0.215-0.074C21.873,5.362,18.964,12.428,20.226,12.327z"/>
-<radialGradient id="SVGID_2" gradientUnits="userSpaceOnUse" cx="11.6" cy="11.99" r="10.38">
-<stop stop-color="#D1E7ED" offset="0"/>
-<stop stop-color="#CDE4EC" offset="0.1"/>
-<stop stop-color="#C0DCE7" offset="0.2"/>
-<stop stop-color="#ADD0E1" offset="0.3"/>
-<stop stop-color="#3982B1" offset="0.65"/>
-<stop stop-color="#3474AA" offset="0.72"/>
-<stop stop-color="#285699" offset="0.9"/>
-<stop stop-color="#244B93" offset="1"/>
-</radialGradient>
-<path fill="url(#SVGID_2)" d="M3.534,11.72c3.933-1.621,5.839-0.756,7.543,0.403l-1.969,6.769c-1.712-1.15-3.574-2.097-7.522-0.465l1.925-6.697L3.534,11.72z"/>
-<radialGradient id="SVGID_3" gradientUnits="userSpaceOnUse" cx="11.79" cy="11.82" r="10.63">
-<stop stop-color="#D8EEED" offset="0"/>
-<stop stop-color="#98D8D7" offset="0.17"/>
-<stop stop-color="#8ED3D3" offset="0.22"/>
-<stop stop-color="#74C6CA" offset="0.31"/>
-<stop stop-color="#49B1BA" offset="0.42"/>
-<stop stop-color="#3BAAB5" offset="0.45"/>
-<stop stop-color="#2D81A4" offset="0.56"/>
-<stop stop-color="#215B94" offset="0.68"/>
-<stop stop-color="#19448B" offset="0.78"/>
-<stop stop-color="#163B87" offset="0.84"/>
-<stop stop-color="#0B317D" offset="1"/>
-</radialGradient>
-<path fill="url(#SVGID_3)" d="M1.729,18.626c0.012,0.003,0.037-0.012,0.037-0.012c0.026,0.021,0.05,0.033,0.05,0.033S1.772,18.656,1.729,18.626z"/>
-<path fill="#152469" d="M9.04,18.969c0,0,0.027,0.022,0.057,0.017l-0.118,0.069c-0.037,0.019-0.077-0.01-0.077-0.01L9.04,18.969z"/>
-<radialGradient id="SVGID_4" gradientUnits="userSpaceOnUse" cx="11.61" cy="12.07" r="10.38">
-<stop stop-color="#D8EEED" offset="0"/>
-<stop stop-color="#98D8D7" offset="0.17"/>
-<stop stop-color="#8ED3D3" offset="0.22"/>
-<stop stop-color="#74C6CA" offset="0.31"/>
-<stop stop-color="#49B1BA" offset="0.42"/>
-<stop stop-color="#3BAAB5" offset="0.45"/>
-<stop stop-color="#2D81A4" offset="0.56"/>
-<stop stop-color="#215B94" offset="0.68"/>
-<stop stop-color="#19448B" offset="0.78"/>
-<stop stop-color="#163B87" offset="0.84"/>
-<stop stop-color="#152469" offset="1"/>
-</radialGradient>
-<path fill="url(#SVGID_4)" d="M1.769,18.616c0,0-0.022,0.011-0.036,0.011l-0.129-0.101l-0.003-0.001c0.021,0.004,0.041,0.001,0.048,0.001L1.769,18.616z"/>
-<path fill="#152469" d="M9.106,18.873c0.014,0.01,0.028,0.021,0.04,0.048c-0.006,0.035-0.034,0.052-0.052,0.066c-0.024,0.005-0.058-0.019-0.058-0.019C9.054,18.954,9.086,18.931,9.106,18.873z"/>
-<path fill="#172E65" d="M1.603,18.527c-0.026-0.021-0.042-0.059-0.032-0.094l0.023-0.009c-0.009,0.05,0.028,0.086,0.052,0.102C1.646,18.527,1.626,18.535,1.603,18.527z"/>
-<radialGradient id="SVGID_5" gradientUnits="userSpaceOnUse" cx="11.6" cy="11.96" r="10.42">
-<stop stop-color="#D8EEED" offset="0"/>
-<stop stop-color="#98D8D7" offset="0.17"/>
-<stop stop-color="#8ED3D3" offset="0.22"/>
-<stop stop-color="#74C6CA" offset="0.31"/>
-<stop stop-color="#49B1BA" offset="0.42"/>
-<stop stop-color="#3BAAB5" offset="0.45"/>
-<stop stop-color="#2D81A4" offset="0.56"/>
-<stop stop-color="#215B94" offset="0.68"/>
-<stop stop-color="#19448B" offset="0.78"/>
-<stop stop-color="#163B87" offset="0.84"/>
-<stop stop-color="#0B317D" offset="1"/>
+<svg baseProfile="tiny" height="44px" version="1.1" viewBox="0 0 44 44" width="44px" x="0px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px">
+<g>
+<path d="M37.778,10.364c-4.158,1.571-7.277,2.283-11.252-0.597   c-0.313-0.222-0.77-0.281-1.186-0.092c0.031-0.379-0.156-0.803-0.51-1.053c-1.781-1.102-5.235-4.021-13.006-0.786   c-0.274,0.114-0.54,0.411-0.621,0.696L8.063,19.427c-0.047,0.229-0.039,0.582,0.263,0.96c0.03,0.037,0.073,0.086,0.127,0.141   c-0.099,0.039-0.198,0.079-0.296,0.121c-0.137,0.059-0.483,0.246-0.631,0.709L4.427,32.214c-0.062,0.307-0.002,0.743,0.41,1.111   l0.207,0.162c0.325,0.258,0.786,0.284,1.078,0.174c4.319-1.614,6.833-1.822,10.51,0.549c0.298,0.188,0.665,0.249,1.093,0.058   c-0.002,0.463,0.269,0.851,0.555,1.007c4.27,2.857,8.704,3.091,13.845,0.901c0.355-0.179,0.578-0.429,0.666-0.735l3.029-10.604   c0.133-0.729-0.289-1.026-0.465-1.183c0.584-0.235,0.895-0.384,1.043-0.881l3.143-10.785C39.862,10.954,38.63,10.058,37.778,10.364   z" fill-opacity="0.2" stroke-opacity="0.2"/>
+<path d="M20.73,22.326c0.004-0.031-0.01-0.106-0.047-0.134   c-2.603-1.686-5.517-3.396-12.201-0.63L5.385,32.406l0,0c-0.001,0.009-0.011,0.09,0.051,0.145c-0.002,0-0.002,0-0.002,0   l0.004,0.003l0.209,0.162c0,0,0-0.001,0,0c0.069,0.044,0.092,0.026,0.135,0.031c5.3-1.982,7.922-1.588,11.382,0.64l-0.002,0.001   c0,0,0.021,0.011,0.047,0.018l0,0c0.09,0.024,0.331-0.151,0.345-0.214c0,0,0.002,0,0.002,0.002l0.002-0.002v0.002L20.73,22.326z    M34.812,24.471l-0.254-0.2c-0.021-0.024-14.95,6.821-14.952,6.846L18.715,34.2v0.001c-0.057,0.17,0.109,0.263,0.109,0.263v-0.001   c2.744,1.841,6.72,3.457,12.913,0.813c0,0,0.004-0.002,0.01-0.002c0.018-0.011,0.074-0.044,0.102-0.101L34.86,24.66   c0-0.002,0-0.002-0.002-0.004C34.878,24.561,34.856,24.521,34.812,24.471z M9.365,19.978L9.365,19.978c0.002,0,0,0.007,0.006,0.006   c0.025-0.004,0.09-0.032,0.09-0.032c7.083-2.807,9.955-0.169,11.38,0.596c0.001,0,0.001,0.002,0.002,0.002   c0.003,0.001,0.003,0.002,0.005,0.002l0,0l0,0c0.07,0.043,0.365-0.054,0.396-0.172l0.001,0.002l0.001-0.007   c0.001-0.001,0.001-0.001,0.001-0.001l0,0l3.121-10.776l0,0V9.595c0.006-0.023-0.029-0.124-0.045-0.131l0,0l0,0   c-2.114-1.278-5.175-3.579-12.132-0.728c-0.045,0.019-3.176,10.882-3.176,10.882l0,0C8.997,19.729,9.262,19.975,9.365,19.978z    M38.604,11.697c0,0.001,0,0.002,0,0.002c0.041-0.121-0.264-0.518-0.48-0.42c-3.604,1.362-15.287,8.693-15.328,8.777l-0.431,1.49   c-0.057,0.169,0.096,0.252,0.096,0.252h0.002c2.858,1.915,6.606,3.415,12.884,0.804c0,0,0.002,0,0.006-0.002   c0.02-0.009,0.076-0.042,0.105-0.101L38.604,11.697L38.604,11.697L38.604,11.697z" fill-opacity="0.5" stroke-opacity="0.5"/>
+<radialGradient cx="22.0581" cy="22.0171" gradientUnits="userSpaceOnUse" id="SVGID_1_" r="20.4721">
+<stop offset="0" style="stop-color:#D1E7EE"/>
+<stop offset="0.0051" style="stop-color:#D1E7EE"/>
+<stop offset="0.7411" style="stop-color:#3474AA"/>
+<stop offset="1" style="stop-color:#244B93"/>
 </radialGradient>
-<path fill="url(#SVGID_5)" d="M1.761,18.609c3.757-1.468,5.44-0.668,7.152,0.433c-1.025-0.659-2.079-1.185-3.534-1.195c-0.975-0.007-2.125,0.24-3.566,0.801C1.813,18.647,1.783,18.635,1.761,18.609z"/>
-<path fill="#094B8F" d="M9.039,18.973c-1.712-1.151-3.485-2.031-7.389-0.445c-0.025-0.016-0.068-0.056-0.057-0.104c3.962-1.688,5.804-0.703,7.517,0.448C9.093,18.937,9.058,18.957,9.039,18.973z"/>
-<path fill="#094B8F" d="M9.041,18.973l-0.139,0.071c-1.711-1.1-3.443-1.862-7.133-0.429l-0.123-0.089C5.551,16.94,7.328,17.822,9.041,18.973z"/>
-<linearGradient id="SVGID_6" gradientUnits="userSpaceOnUse" x1="11.03" y1="12.31" x2="9.4" y2="18.02">
-<stop stop-color="#98D8D7" offset="0"/>
-<stop stop-color="#152469" offset="1"/>
-</linearGradient>
-<path fill="url(#SVGID_6)" d="M9.106,18.876l1.971-6.754c0.022,0.015,0.034,0.024,0.044,0.038l-1.975,6.764C9.136,18.892,9.106,18.876,9.106,18.876z"/>
-<radialGradient id="SVGID_7" gradientUnits="userSpaceOnUse" cx="11.61" cy="11.96" r="10.6">
-<stop stop-color="#D8EEED" offset="0"/>
-<stop stop-color="#98D8D7" offset="0.17"/>
-<stop stop-color="#8ED3D3" offset="0.22"/>
-<stop stop-color="#74C6CA" offset="0.31"/>
-<stop stop-color="#49B1BA" offset="0.42"/>
-<stop stop-color="#3BAAB5" offset="0.45"/>
-<stop stop-color="#2D81A4" offset="0.56"/>
-<stop stop-color="#215B94" offset="0.68"/>
-<stop stop-color="#19448B" offset="0.78"/>
-<stop stop-color="#163B87" offset="0.84"/>
-<stop stop-color="#152469" offset="1"/>
-</radialGradient>
-<path fill="url(#SVGID_7)" d="M11.09,12.075h0.003c0.024,0.017,0.035,0.052,0.028,0.085v0.003c-0.012-0.011-0.021-0.024-0.044-0.04L11.09,12.075z"/>
-<polygon opacity="0.66" fill="#063367" enable-background="new " points="3.489,11.724 3.511,11.729 1.593,18.425 1.57,18.434 "/>
-<linearGradient id="SVGID_8" gradientUnits="userSpaceOnUse" x1="1.57" y1="15.19" x2="3.72" y2="15.19">
-<stop stop-color="#DEF3F1" offset="0"/>
-<stop stop-color="#5085BC" offset="1"/>
-</linearGradient>
-<path opacity="0.42" fill="url(#SVGID_8)" enable-background="new " d="M3.489,11.724l-0.09,0.321l-1.826,6.389c-0.011,0.034,0.006,0.072,0.031,0.093l0.129,0.103c0,0,0-0.003,0,0c0.017,0.01,0.034,0.015,0.047,0.018l1.943-6.735L3.72,11.906L3.511,11.73L3.489,11.724z M1.597,18.423v-0.002c0.009-0.004,0.017-0.006,0.027-0.01C1.614,18.415,1.605,18.417,1.597,18.423z M1.646,18.527c-0.013-0.01-0.028-0.021-0.04-0.037C1.618,18.506,1.634,18.518,1.646,18.527C1.646,18.526,1.646,18.526,1.646,18.527z"/>
-<linearGradient id="SVGID_9" gradientUnits="userSpaceOnUse" x1="8.93" y1="15.58" x2="11.12" y2="15.58">
-<stop stop-color="#DEF3F1" offset="0"/>
-<stop stop-color="#5085BC" offset="1"/>
-</linearGradient>
-<path opacity="0.42" fill="url(#SVGID_9)" enable-background="new " d="M11.116,12.104l-0.041,0.021l-0.163,0.161c0.001,0,0.001,0,0.001,0.001c-0.267,0.909-1.757,6.004-1.984,6.768c0.015,0.004,0.032,0.006,0.048-0.002l0.119-0.07H9.094c0.017-0.013,0.044-0.03,0.052-0.063c0,0.002,0,0.002,0,0.002l1.91-6.541l0.066-0.224c0.002-0.013,0.002-0.023,0-0.035C11.122,12.117,11.12,12.111,11.116,12.104z"/>
-<linearGradient id="SVGID_10" gradientUnits="userSpaceOnUse" x1="3.51" y1="11.53" x2="11.09" y2="11.53">
-<stop stop-color="#094992" offset="0"/>
-<stop stop-color="#8ACDE1" offset="0.67"/>
-<stop stop-color="#E6F6F9" offset="1"/>
-</linearGradient>
-<path fill="url(#SVGID_10)" d="M11.077,12.124l-0.164,0.163c-0.566-0.378-2.131-1.349-3.896-1.204C5.583,11.2,4.32,11.661,3.722,11.91l-0.211-0.182l0.015-0.046c3.952-1.634,5.856-0.766,7.566,0.393H11.09h0.003L11.077,12.124z"/>
-<linearGradient id="SVGID_11" gradientUnits="userSpaceOnUse" x1="3.53" y1="11.68" x2="3.53" y2="11.68">
-<stop stop-color="#7D9EC4" offset="0"/>
-<stop stop-color="#151D89" offset="1"/>
-</linearGradient>
-<path fill="url(#SVGID_11)" d="M3.526,11.682"/>
-<linearGradient id="SVGID_12" gradientUnits="userSpaceOnUse" x1="3.69" y1="11.66" x2="10.94" y2="11.66">
-<stop stop-color="#BAC7E1" offset="0.01"/>
-<stop stop-color="#7090C3" offset="0.22"/>
-<stop stop-color="#C8EAEF" offset="0.54"/>
-<stop stop-color="#FFFFFF" offset="1"/>
-</linearGradient>
-<path opacity="0.33" fill="url(#SVGID_12)" enable-background="new " d="M3.694,11.886c3.953-1.633,5.716-0.554,7.25,0.372l-0.03,0.029c-1.578-0.978-3.257-1.937-7.192-0.375L3.694,11.886z"/>
-<linearGradient id="SVGID_13" gradientUnits="userSpaceOnUse" x1="3.51" y1="11.45" x2="11.09" y2="11.45">
-<stop stop-color="#7090C3" offset="0.01"/>
-<stop stop-color="#C0E7ED" offset="0.54"/>
-<stop stop-color="#FFFFFF" offset="1"/>
-</linearGradient>
-<path opacity="0.33" fill="url(#SVGID_13)" enable-background="new " d="M3.526,11.682c3.952-1.634,5.779-0.8,7.567,0.394l-0.016,0.048c-1.877-1.218-3.633-2-7.566-0.395L3.526,11.682z"/>
-<radialGradient id="SVGID_14" gradientUnits="userSpaceOnUse" cx="3.5" cy="11.7" r="0.02">
-<stop stop-color="#7D9EC4" offset="0"/>
-<stop stop-color="#0A50A1" offset="1"/>
-</radialGradient>
-<path fill="url(#SVGID_14)" d="M3.511,11.729l-0.022-0.005c0.008-0.028,0.028-0.038,0.034-0.04l0.004-0.001C3.526,11.682,3.522,11.695,3.511,11.729z"/>
-<radialGradient id="SVGID_15" gradientUnits="userSpaceOnUse" cx="-1.49" cy="18.16" r="12.8">
-<stop stop-color="#D8EEED" offset="0"/>
-<stop stop-color="#98D8D7" offset="0.17"/>
-<stop stop-color="#8ED3D3" offset="0.22"/>
-<stop stop-color="#74C6CA" offset="0.31"/>
-<stop stop-color="#49B1BA" offset="0.42"/>
-<stop stop-color="#3BAAB5" offset="0.45"/>
-<stop stop-color="#359FB5" offset="0.5"/>
-<stop stop-color="#2988B4" offset="0.63"/>
-<stop stop-color="#257FB4" offset="0.71"/>
-<stop stop-color="#4161AA" offset="1"/>
-</radialGradient>
-<path opacity="0.5" fill="url(#SVGID_15)" enable-background="new " d="M9.043,18.971c-1.713-1.15-3.485-2.03-7.389-0.445c-0.026-0.015-0.068-0.054-0.058-0.105c3.963-1.688,5.804-0.702,7.518,0.449C9.096,18.935,9.062,18.956,9.043,18.971z"/>
-<radialGradient id="SVGID_16" gradientUnits="userSpaceOnUse" cx="11.59" cy="12.21" r="9.66">
-<stop stop-color="#FCF5B0" offset="0"/>
-<stop stop-color="#F7EDA0" offset="0.17"/>
-<stop stop-color="#F3E591" offset="0.28"/>
-<stop stop-color="#FCD118" offset="0.65"/>
-<stop stop-color="#F7A50C" offset="0.8"/>
-<stop stop-color="#F38603" offset="0.93"/>
-<stop stop-color="#F27B00" offset="1"/>
+<path d="M20.684,21.216c-2.604-1.686-5.47-3.405-12.154-0.642c0,0-0.051,0.03-0.064,0.074l-3.081,10.78l0,0   l0,0l0,0c-0.001,0.009-0.011,0.09,0.05,0.144l0,0l0.002,0.003l0.209,0.163c0,0,0.002-0.002,0.002,0   c0.068,0.044,0.09,0.026,0.135,0.031c5.299-1.983,7.921-1.587,11.381,0.639L17.16,32.41c0,0,0.02,0.011,0.047,0.018l0,0   c0.09,0.024,0.331-0.151,0.345-0.215l0,0c0,0.001,0.001,0.001,0.003,0.002v-0.002c0,0.001,0,0.001,0,0.002l3.174-10.865   C20.734,21.316,20.721,21.242,20.684,21.216z" fill="url(#SVGID_1_)"/>
+<radialGradient cx="22.0356" cy="21.9517" gradientTransform="matrix(1 0 0 -1 -0.0225 43.8779)" gradientUnits="userSpaceOnUse" id="SVGID_2_" r="17.3888">
+<stop offset="0" style="stop-color:#FFE23D"/>
+<stop offset="0.2386" style="stop-color:#FFE23D"/>
+<stop offset="0.3435" style="stop-color:#FDDB3A"/>
+<stop offset="0.494" style="stop-color:#F7C832"/>
+<stop offset="0.671" style="stop-color:#EEA925"/>
+<stop offset="0.8325" style="stop-color:#E48717"/>
+<stop offset="1" style="stop-color:#E48717"/>
 </radialGradient>
-<path fill="url(#SVGID_16)" d="M12.108,12.777c1.712,1.149,3.46,1.994,7.481,0.617l-1.877,6.528c-3.945,1.633-5.839,0.71-7.548-0.449L12.108,12.777z"/>
-<linearGradient id="SVGID_17" gradientUnits="userSpaceOnUse" x1="18.01" y1="20.07" x2="17.97" y2="20.22">
-<stop stop-color="#DD980D" offset="0"/>
-<stop stop-color="#A75D0F" offset="1"/>
-</linearGradient>
-<path fill="url(#SVGID_17)" d="M18.047,20.155c-0.02,0.037-0.053,0.058-0.063,0.063c-0.004,0-0.004,0.002-0.004,0.002s-0.035,0.002-0.064-0.021c0.076-0.043,0.1-0.127,0.1-0.127S18.061,20.113,18.047,20.155z"/>
-<linearGradient id="SVGID_18" gradientUnits="userSpaceOnUse" x1="18.01" y1="16.86" x2="19.92" y2="16.86">
-<stop stop-color="#DEB150" offset="0"/>
-<stop stop-color="#FFF8B2" offset="1"/>
-</linearGradient>
-<path fill="url(#SVGID_18)" d="M18.047,20.155c0.008-0.037-0.035-0.069-0.035-0.069l1.871-6.522c0,0,0.03,0.027,0.041,0.05L18.047,20.155z"/>
-<linearGradient id="SVGID_19" gradientUnits="userSpaceOnUse" x1="19.9" y1="13.49" x2="19.9" y2="13.62">
-<stop stop-color="#C67C0C" offset="0.01"/>
-<stop stop-color="#DD980D" offset="1"/>
-</linearGradient>
-<path fill="url(#SVGID_19)" d="M19.922,13.614c0,0-0.008-0.02-0.041-0.046c0.018-0.064,0.006-0.076,0.006-0.076l0.005,0.002C19.891,13.494,19.939,13.539,19.922,13.614z"/>
-<linearGradient id="SVGID_20" gradientUnits="userSpaceOnUse" x1="19.63" y1="13.34" x2="19.7" y2="13.47">
-<stop stop-color="#FED30E" offset="0.01"/>
-<stop stop-color="#A75D0F" offset="1"/>
-</linearGradient>
-<path fill="url(#SVGID_20)" d="M19.734,13.458c0,0-0.051-0.063-0.156-0.045c0.004-0.023,0.014-0.052,0.047-0.064c0.064-0.011,0.094,0.006,0.107,0.021c0.008,0.008,0.012,0.014,0.012,0.014C19.752,13.42,19.734,13.458,19.734,13.458z"/>
-<linearGradient id="SVGID_21" gradientUnits="userSpaceOnUse" x1="19.83" y1="13.45" x2="19.78" y2="13.5">
-<stop stop-color="#FED30E" offset="0.01"/>
-<stop stop-color="#A75D0F" offset="1"/>
-</linearGradient>
-<path fill="url(#SVGID_21)" d="M19.732,13.368l0.156,0.126c0.01,0.041-0.008,0.083-0.008,0.083l-0.154-0.123C19.729,13.454,19.744,13.405,19.732,13.368z"/>
-<polygon opacity="0.66" fill="#B37E00" enable-background="new " points="17.844,19.965 19.727,13.444 19.885,13.569 18.016,20.09 18.01,20.107 "/>
-<linearGradient id="SVGID_22" gradientUnits="userSpaceOnUse" x1="12.09" y1="13.44" x2="19.63" y2="13.44">
-<stop stop-color="#FFF8FB" offset="0"/>
-<stop stop-color="#FEC236" offset="1"/>
-</linearGradient>
-<path fill="url(#SVGID_22)" d="M19.584,13.42c-3.961,1.353-5.776,0.549-7.485-0.604c0.004-0.012,0.01-0.042-0.008-0.07c1.71,1.149,3.603,1.935,7.535,0.604C19.596,13.368,19.592,13.396,19.584,13.42z"/>
-<polygon fill="#D9A200" points="11.791,12.896 11.923,12.808 10.019,19.45 9.869,19.567 9.869,19.552 "/>
-<linearGradient id="SVGID_23" gradientUnits="userSpaceOnUse" x1="18.8" y1="16.71" x2="18.63" y2="16.66">
-<stop stop-color="#B37E00" offset="0"/>
-<stop stop-color="#FF9E00" offset="1"/>
-</linearGradient>
-<path opacity="0.66" fill="url(#SVGID_23)" enable-background="new " d="M17.693,19.929l1.886-6.518c0.003,0,0.007-0.006,0.011-0.006c0.098-0.011,0.145,0.042,0.145,0.042l-1.875,6.51C17.857,19.957,17.779,19.895,17.693,19.929z"/>
-<path fill="#A75D0F" d="M17.982,20.219c-3.867,1.654-6.351,0.635-8.061-0.516l0.018-0.014c1.71,1.15,4.342,2.109,7.977,0.505C17.943,20.217,17.982,20.219,17.982,20.219z"/>
-<linearGradient id="SVGID_24" gradientUnits="userSpaceOnUse" x1="17.92" y1="19.99" x2="17.84" y2="20.17">
-<stop stop-color="#FFD100" offset="0.01"/>
-<stop stop-color="#A8710A" offset="1"/>
-</linearGradient>
-<path opacity="0.66" fill="url(#SVGID_24)" enable-background="new " d="M17.857,19.955l0.158,0.136c0,0-0.021,0.077-0.109,0.112l-0.161-0.134C17.832,20.033,17.857,19.955,17.857,19.955z"/>
-<linearGradient id="SVGID_25" gradientUnits="userSpaceOnUse" x1="10.1" y1="20.18" x2="17.78" y2="20.18">
-<stop stop-color="#DD980D" offset="0"/>
-<stop stop-color="#FDDA10" offset="0.4"/>
-<stop stop-color="#DD980D" offset="1"/>
-</linearGradient>
-<path fill="url(#SVGID_25)" d="M17.697,19.925c-0.016,0.1,0.082,0.163,0.082,0.163c-4.068,1.515-5.859,0.596-7.681-0.501c0.031-0.022,0.048-0.041,0.064-0.111c0.004,0.002,0.012,0.004,0.016,0.007C11.941,20.567,13.988,21.459,17.697,19.925z"/>
-<path fill="#C67C0C" d="M9.94,19.697l0.158-0.114c1.566,0.978,3.763,2.045,7.657,0.482l0.159,0.136C14.297,21.806,11.649,20.847,9.94,19.697z"/>
-<path fill="#DD980D" d="M9.954,19.701l-0.019,0.014c0,0-0.103-0.058-0.067-0.163C9.877,19.655,9.954,19.701,9.954,19.701z"/>
-<linearGradient id="SVGID_26" gradientUnits="userSpaceOnUse" x1="10.05" y1="19.64" x2="9.92" y2="19.5">
-<stop stop-color="#DD980D" offset="0.1"/>
-<stop stop-color="#FDDA10" offset="0.7"/>
-<stop stop-color="#DD980D" offset="1"/>
-</linearGradient>
-<path fill="url(#SVGID_26)" d="M9.869,19.552l0.149-0.123c-0.008,0.11,0.096,0.149,0.096,0.149l-0.163,0.125C9.952,19.703,9.861,19.659,9.869,19.552z"/>
-<linearGradient id="SVGID_27" gradientUnits="userSpaceOnUse" x1="10.05" y1="19.41" x2="10.14" y2="19.57">
-<stop stop-color="#DD980D" offset="0"/>
-<stop stop-color="#FEBF0F" offset="0.4"/>
-<stop stop-color="#FED30E" offset="0.8"/>
-<stop stop-color="#DD980D" offset="1"/>
-</linearGradient>
-<path fill="url(#SVGID_27)" d="M10.006,19.434c0.053-0.021,0.103,0.004,0.159,0.037c-0.02,0.069-0.032,0.094-0.062,0.115C10.068,19.567,9.999,19.522,10.006,19.434z"/>
-<path fill="#DD980D" d="M11.948,12.751l-0.029,0.057l-0.132,0.094c0.009-0.044,0.118-0.123,0.152-0.145C11.943,12.754,11.948,12.751,11.948,12.751z"/>
-<radialGradient id="SVGID_28" gradientUnits="userSpaceOnUse" cx="11.99" cy="12.72" r="0.09">
-<stop stop-color="#FEEB71" offset="0"/>
-<stop stop-color="#DD980D" offset="1"/>
-</radialGradient>
-<path fill="url(#SVGID_28)" d="M12.096,12.815c-0.079-0.044-0.149-0.022-0.177-0.008c0.004-0.015,0.022-0.052,0.022-0.052c0.063-0.04,0.09-0.04,0.15-0.013C12.108,12.773,12.103,12.798,12.096,12.815z"/>
-<linearGradient id="SVGID_29" gradientUnits="userSpaceOnUse" x1="11.14" y1="16.15" x2="10.96" y2="16.1">
-<stop stop-color="#FEEFBB" offset="0.01"/>
-<stop stop-color="#FFBF00" offset="1"/>
-</linearGradient>
-<path fill="url(#SVGID_29)" d="M10.179,19.482c-0.056-0.034-0.12-0.06-0.173-0.036l1.917-6.638c0.029-0.014,0.097-0.037,0.176,0.009L10.179,19.482z"/>
-<linearGradient id="SVGID_30" gradientUnits="userSpaceOnUse" x1="11.72" y1="13.52" x2="19.91" y2="13.52">
-<stop stop-color="#FCA859" offset="0.01"/>
-<stop stop-color="#FDC30F" offset="0.21"/>
-<stop stop-color="#B51C00" offset="1"/>
-</linearGradient>
-<path opacity="0.33" fill="url(#SVGID_30)" enable-background="new " d="M11.824,12.852c0.586,0.509,3.127,2.585,8.066,0.643l-0.156-0.126c-0.016-0.015-0.045-0.03-0.107-0.021c-3.932,1.333-5.824,0.548-7.534-0.604c0,0.002,0,0.002,0,0.002c-0.058-0.03-0.086-0.029-0.149,0.012C11.863,12.812,11.863,12.812,11.824,12.852z"/>
-<linearGradient id="SVGID_31" gradientUnits="userSpaceOnUse" x1="11.79" y1="13.62" x2="19.92" y2="13.62">
-<stop stop-color="#FFF6D8" offset="0.01"/>
-<stop stop-color="#FDDA10" offset="0.53"/>
-<stop stop-color="#F9BD0C" offset="1"/>
-</linearGradient>
-<path opacity="0.33" fill="url(#SVGID_31)" enable-background="new " d="M19.891,13.494L19.891,13.494c-4.941,1.942-7.48-0.135-8.066-0.643c-0.016,0.017-0.026,0.03-0.033,0.043v0.001l-0.002,0.007c0,0,0,0,0,0.002v-0.002v0.004c0.511,0.447,3.063,2.67,8.135,0.66C19.916,13.521,19.891,13.494,19.891,13.494z"/>
-<linearGradient id="SVGID_32" gradientUnits="userSpaceOnUse" x1="17.79" y1="20" x2="17.68" y2="19.9">
-<stop stop-color="#EAB849" offset="0"/>
-<stop stop-color="#EDC15A" offset="0.07"/>
-<stop stop-color="#F3D783" offset="0.28"/>
-<stop stop-color="#F8E8A4" offset="0.48"/>
-<stop stop-color="#FCF5BC" offset="0.67"/>
-<stop stop-color="#FEFCCA" offset="0.85"/>
-<stop stop-color="#FFFFCF" offset="1"/>
-</linearGradient>
-<path fill="url(#SVGID_32)" d="M17.756,20.066c0,0-0.072-0.046-0.059-0.146c0.1-0.026,0.16,0.036,0.16,0.036S17.842,20.028,17.756,20.066z"/>
-<radialGradient id="SVGID_33" gradientUnits="userSpaceOnUse" cx="11.3" cy="10.89" r="9.17">
-<stop stop-color="#EFD815" offset="0"/>
-<stop stop-color="#EFD415" offset="0.11"/>
-<stop stop-color="#EDC614" offset="0.22"/>
-<stop stop-color="#EBB112" offset="0.33"/>
-<stop stop-color="#E89211" offset="0.45"/>
-<stop stop-color="#E36C0E" offset="0.57"/>
-<stop stop-color="#E04C0C" offset="0.65"/>
-<stop stop-color="#CE2907" offset="0.78"/>
-<stop stop-color="#BF0B02" offset="0.92"/>
-<stop stop-color="#B90000" offset="1"/>
+<path d="M34.812,23.492l-0.254-0.201c-0.021-0.022-0.07-0.049-0.17-0.032l0,0l0,0   c-6.318,2.14-9.357,0.88-12.103-0.971c-0.246-0.119-0.484,0.23-0.487,0.257l0.003-0.002l-0.002,0.002h0.002l-0.003,0.004   l-3.082,10.674v0.001c-0.057,0.17,0.109,0.261,0.109,0.261l0,0c2.743,1.841,6.721,3.458,12.914,0.814l0,0   c0,0,0.004-0.003,0.008-0.003c0.018-0.013,0.074-0.044,0.104-0.103l3.012-10.51c0-0.002-0.002-0.002-0.002-0.004   C34.878,23.584,34.856,23.545,34.812,23.492z" fill="url(#SVGID_2_)"/>
+<radialGradient cx="21.9673" cy="22.0635" gradientUnits="userSpaceOnUse" id="SVGID_3_" r="17.6608">
+<stop offset="0" style="stop-color:#FFE23D"/>
+<stop offset="0.0152" style="stop-color:#FFE23D"/>
+<stop offset="0.6701" style="stop-color:#E48717"/>
+<stop offset="0.821" style="stop-color:#E7521F"/>
+<stop offset="0.9373" style="stop-color:#E92F25"/>
+<stop offset="1" style="stop-color:#EA2227"/>
 </radialGradient>
-<path fill="url(#SVGID_33)" d="M11.406,10.901C10.377,10.208,9.27,9.56,7.695,9.548c-1.037-0.007-2.273,0.288-3.844,0.936l1.945-6.74c3.946-1.631,5.843-0.706,7.555,0.452L11.406,10.901z"/>
-<path fill="#BC1B00" d="M11.402,10.898l1.948-6.702c0.021,0.013,0.028,0.023,0.04,0.038l-1.946,6.713C11.436,10.919,11.402,10.898,11.402,10.898z"/>
-<path fill="#BC1B00" d="M4.039,10.679c0.622-0.255,1.198-0.445,1.732-0.574c0.13-0.031,0.245-0.06,0.383-0.085C6.281,9.995,6.405,9.97,6.525,9.95C6.715,9.924,6.9,9.898,7.083,9.884c0.153-0.012,0.302-0.021,0.45-0.021c0.142,0,0.281,0,0.417,0.008C8.07,9.877,8.187,9.886,8.304,9.9C8.402,9.91,8.499,9.923,8.593,9.94c0.199,0.033,0.394,0.077,0.58,0.129c0.757,0.214,1.429,0.579,2.046,0.989c-0.005,0.002-0.019-0.004-0.025-0.007c-0.006-0.002-0.009-0.002-0.014-0.006c-0.835-0.529-1.731-0.99-2.838-1.126c-1.133-0.14-2.454,0.056-4.231,0.762c0,0-0.042,0.019-0.059,0.02C4.039,10.704,4.041,10.693,4.039,10.679z"/>
-<path fill="#BC1B00" d="M11.337,10.999c0,0,0.024,0.017,0.056,0.011l-0.123,0.056c-0.033,0.008-0.072-0.012-0.072-0.012L11.337,10.999z"/>
-<path fill="#B81A00" d="M4.039,10.679c0,0,0.008,0.015,0.014,0.022c-0.011,0.001-0.014,0.005-0.043-0.008c-0.005-0.002-0.01-0.006-0.015-0.01l-0.128-0.099l-0.012-0.01c0.018-0.001,0.03,0.006,0.038,0.006L4.039,10.679z"/>
-<path fill="#E82E00" d="M11.406,10.901c0.012,0.008,0.031,0.014,0.042,0.042c-0.007,0.036-0.038,0.054-0.056,0.066c-0.03,0.008-0.059-0.014-0.059-0.014C11.353,10.981,11.385,10.957,11.406,10.901z"/>
-<path fill="#E32D00" d="M3.856,10.577c-0.019-0.013-0.036-0.069-0.025-0.105l0.025-0.006c-0.011,0.048,0.02,0.104,0.047,0.121C3.904,10.586,3.885,10.597,3.856,10.577z"/>
-<linearGradient id="SVGID_34" gradientUnits="userSpaceOnUse" x1="5.78" y1="3.72" x2="5.82" y2="3.72">
-<stop stop-color="#FD7E36" offset="0"/>
-<stop stop-color="#BD6F4F" offset="1"/>
-</linearGradient>
-<path id="SVGID_37" fill="url(#SVGID_34)" d="M5.796,3.746L5.778,3.742c0.008-0.03,0.028-0.04,0.035-0.042l0.002-0.001C5.815,3.699,5.808,3.715,5.796,3.746z"/>
-<path fill="#E82E00" d="M11.339,11c-1.838-1.277-4.093-2.079-7.44-0.416l0.137,0.097c3.658-1.494,5.564-0.688,7.168,0.372L11.339,11z"/>
-<path fill="#E82E00" d="M11.337,10.999c-1.054-0.688-2.039-1.257-3.6-1.302c-1.14,0.022-2.017,0.17-3.836,0.89c-0.025-0.014-0.061-0.053-0.051-0.103c1.575-0.67,2.826-0.96,3.864-0.951c1.571,0.015,2.66,0.673,3.689,1.365C11.388,10.961,11.354,10.983,11.337,10.999z"/>
-<path fill="#E32D00" d="M5.778,3.742l0.018,0.005l-1.94,6.734c-0.004-0.003-0.023-0.007-0.023-0.007L5.778,3.742z"/>
-<linearGradient id="SVGID_35" gradientUnits="userSpaceOnUse" x1="5.79" y1="3.51" x2="13.36" y2="3.51">
-<stop stop-color="#FC2B20" offset="0"/>
-<stop stop-color="#FF590A" offset="0.24"/>
-<stop stop-color="#FB570B" offset="0.25"/>
-<stop stop-color="#E74C0E" offset="0.33"/>
-<stop stop-color="#D84511" offset="0.42"/>
-<stop stop-color="#D04013" offset="0.52"/>
-<stop stop-color="#CD3F13" offset="0.7"/>
-<stop stop-color="#D04213" offset="0.8"/>
-<stop stop-color="#D84B14" offset="0.87"/>
-<stop stop-color="#E65B16" offset="0.93"/>
-<stop stop-color="#F97219" offset="0.99"/>
-<stop stop-color="#FC7519" offset="1"/>
-</linearGradient>
-<path opacity="0.66" fill="url(#SVGID_35)" enable-background="new " d="M13.351,4.194C11.639,3.036,9.725,2.14,5.796,3.746c0.008-0.033,0.017-0.045,0.017-0.045c3.95-1.632,5.839-0.709,7.549,0.449L13.351,4.194z"/>
-<path opacity="0.33" fill="#FE8411" enable-background="new " d="M13.123,4.417c-1.394-0.904-3.236-2.04-7.164-0.435c0.008-0.033,0.019-0.05,0.019-0.05c3.948-1.633,5.807-0.389,7.159,0.435L13.123,4.417z"/>
-<g opacity="0.6">
-<linearGradient id="SVGID_36" gradientUnits="userSpaceOnUse" x1="3.86" y1="7.25" x2="5.97" y2="7.25">
-<stop stop-color="#FD7E36" offset="0"/>
-<stop stop-color="#BD6F4F" offset="1"/>
-</linearGradient>
-<path opacity="0.6" fill="url(#SVGID_36)" enable-background="new " d="M5.86,3.79c-0.011,0.004-0.05,0-0.05,0l-1.955,6.778l0.139,0.113C4,10.686,4.005,10.689,4.01,10.692c0.024,0.011,0.031,0.011,0.038,0.009l1.921-6.748l0.006-0.021L5.86,3.79z"/>
-</g>
-<linearGradient id="SVGID_38" gradientUnits="userSpaceOnUse" x1="14" y1="4.57" x2="4.22" y2="2.39">
-<stop stop-color="#FE550D" offset="0"/>
-<stop stop-color="#8C1501" offset="1"/>
-</linearGradient>
-<path opacity="0.5" fill="url(#SVGID_38)" enable-background="new " d="M13.135,4.373c0.002,0.002,0.002,0.002,0.002,0.002c0-0.002,0.002-0.002,0.002-0.004L13.135,4.373z"/>
-<linearGradient id="SVGID_39" gradientUnits="userSpaceOnUse" x1="9.57" y1="4.43" x2="9.49" y2="2.08">
-<stop stop-color="#FE550D" offset="0"/>
-<stop stop-color="#8C1501" offset="1"/>
-</linearGradient>
-<path opacity="0.5" fill="url(#SVGID_39)" enable-background="new " d="M13.182,4.219c-0.649-0.435-1.73-1.14-3.309-1.25C8.196,2.85,6.072,3.704,5.86,3.791l0.114,0.143L5.969,3.955C5.975,3.954,5.98,3.95,5.987,3.948c3.913-1.684,6.325-0.163,7.146,0.428l0.004-0.003l0.123-0.101C13.234,4.253,13.209,4.236,13.182,4.219z"/>
-<path opacity="0.5" fill="#FFF4C5" enable-background="new " d="M5.86,3.79c0.211-0.088,2.336-0.941,4.013-0.822c1.579,0.111,2.66,0.816,3.309,1.25c0.027,0.019,0.053,0.034,0.076,0.052l0.121-0.099c-0.006-0.008-0.009-0.018-0.018-0.022c-1.672-1.133-3.519-2.041-7.292-0.554C5.984,3.63,5.901,3.663,5.813,3.699l0,0L5.86,3.79z"/>
-<linearGradient id="SVGID_40" gradientUnits="userSpaceOnUse" x1="11.18" y1="7.61" x2="13.39" y2="7.61">
-<stop stop-color="#FD7E36" offset="0"/>
-<stop stop-color="#FC895B" offset="1"/>
-</linearGradient>
-<path opacity="0.6" fill="url(#SVGID_40)" enable-background="new " d="M13.361,4.151l-0.011,0.042l-0.093,0.077l-0.121,0.101c0,0.002-0.002,0.002-0.002,0.005c-0.407,1.398-1.679,5.761-1.95,6.67c0.003,0.001,0.005,0.002,0.008,0.003c0.002,0.001,0.004,0.002,0.004,0.002l0,0c0,0,0.041,0.021,0.072,0.012l0.123-0.057c-0.001,0.001-0.001,0-0.004,0.001c0.001-0.001,0.002,0,0.003-0.001c0.015-0.012,0.046-0.03,0.053-0.063l0,0v-0.001c0,0,0.001,0,0.001-0.002l0,0l1.864-6.439l0,0l0.049-0.159V4.336l0.029-0.106C13.395,4.211,13.393,4.166,13.361,4.151z"/>
-<linearGradient id="SVGID_41" gradientUnits="userSpaceOnUse" x1="3.85" y1="10.26" x2="11.41" y2="10.26">
-<stop stop-color="#FD9B20" offset="0.25"/>
-<stop stop-color="#FDB830" offset="0.34"/>
-<stop stop-color="#FDD23E" offset="0.43"/>
-<stop stop-color="#FDDB43" offset="0.49"/>
-<stop stop-color="#FE8411" offset="0.75"/>
-<stop stop-color="#FE550D" offset="1"/>
-</linearGradient>
-<path opacity="0.5" fill="url(#SVGID_41)" enable-background="new " d="M11.342,10.996c-1.053-0.688-2.038-1.258-3.6-1.303c-1.141,0.023-2.017,0.169-3.834,0.89c-0.027-0.014-0.061-0.053-0.052-0.102C5.431,9.81,6.683,9.52,7.72,9.529c1.572,0.016,2.662,0.675,3.693,1.367C11.393,10.957,11.358,10.981,11.342,10.996z"/>
-<path fill="#F83503" d="M13.361,4.149h0.002c0.027,0.018,0.033,0.051,0.029,0.083l-0.004,0.004c-0.01-0.013-0.019-0.024-0.037-0.043L13.361,4.149z"/>
-<path id="SVGID_46" fill="url(#SVGID_34)" d="M5.796,3.746L5.778,3.742c0.008-0.03,0.028-0.04,0.035-0.042l0.003-0.001C5.815,3.699,5.808,3.715,5.796,3.746z"/>
-<path opacity="0.66" fill="url(#SVGID_35)" enable-background="new " d="M13.351,4.194C11.639,3.036,9.725,2.14,5.796,3.746c0.008-0.033,0.017-0.045,0.017-0.045c3.95-1.632,5.839-0.709,7.549,0.449L13.351,4.194z"/>
-<radialGradient id="SVGID_44" gradientUnits="userSpaceOnUse" cx="11.55" cy="11.9" r="10.5">
-<stop stop-color="#D1E787" offset="0.01"/>
-<stop stop-color="#CEE583" offset="0.12"/>
-<stop stop-color="#C4DE76" offset="0.25"/>
-<stop stop-color="#B3D361" offset="0.38"/>
-<stop stop-color="#9CC443" offset="0.51"/>
-<stop stop-color="#7FB01D" offset="0.64"/>
-<stop stop-color="#7BAE19" offset="0.65"/>
-<stop stop-color="#578D19" offset="0.78"/>
-<stop stop-color="#366E1A" offset="0.92"/>
-<stop stop-color="#29621A" offset="1"/>
+<path d="M21.25,19.395l3.12-10.775l0,0l0,0l0,0V8.617c0.008-0.023-0.029-0.124-0.043-0.132l0,0l0,0l0,0   c-2.13-1.286-5.074-3.659-12.126-0.722c-0.006,0.006-0.053,0.048-0.059,0.064L9.018,18.641l0,0   c-0.021,0.109,0.246,0.354,0.35,0.357l0,0c0.001,0,0,0.008,0.004,0.007c0.027-0.004,0.091-0.032,0.091-0.032   c7.083-2.807,9.955-0.17,11.38,0.596c0.001,0,0.001,0.002,0.002,0.002c0.002,0.001,0.004,0.002,0.006,0.002l0,0v0.001   c0.069,0.041,0.364-0.055,0.396-0.173l0,0l0.001,0.002l0.001-0.007C21.25,19.396,21.25,19.396,21.25,19.395   C21.25,19.396,21.25,19.396,21.25,19.395z" fill="url(#SVGID_3_)"/>
+<radialGradient cx="22.0356" cy="21.9521" gradientTransform="matrix(1 0 0 -1 -0.0225 43.8779)" gradientUnits="userSpaceOnUse" id="SVGID_4_" r="19.9665">
+<stop offset="0" style="stop-color:#D1E787"/>
+<stop offset="0.0152" style="stop-color:#D1E787"/>
+<stop offset="0.1256" style="stop-color:#C4DD7F"/>
+<stop offset="0.33" style="stop-color:#A2C268"/>
+<stop offset="0.5635" style="stop-color:#739D4A"/>
+<stop offset="1" style="stop-color:#29621A"/>
 </radialGradient>
-<path fill="url(#SVGID_44)" d="M21.92,5.337c-3.941,1.63-5.838,0.712-7.545-0.437l-1.943,6.744c1.705,1.155,3.766,2.104,7.545,0.414L21.92,5.337z"/>
-<linearGradient id="SVGID_45" gradientUnits="userSpaceOnUse" x1="14.38" y1="5.53" x2="21.96" y2="5.53">
-<stop stop-color="#D3ED89" offset="0"/>
-<stop stop-color="#5F811B" offset="1"/>
-</linearGradient>
-<path fill="url(#SVGID_45)" d="M21.912,5.343c-3.943,1.63-5.83,0.713-7.537-0.437c0.004-0.016,0.012-0.044,0-0.072c1.707,1.148,3.641,2.074,7.58,0.445C21.924,5.298,21.92,5.319,21.912,5.343z"/>
-<polygon fill="#8CAC42" points="14.074,4.987 14.215,4.887 12.291,11.571 12.143,11.688 12.143,11.674 "/>
-<linearGradient id="SVGID_47" gradientUnits="userSpaceOnUse" x1="13.42" y1="8.27" x2="13.24" y2="8.22">
-<stop stop-color="#D3ED89" offset="0.4"/>
-<stop stop-color="#5F811B" offset="1"/>
-</linearGradient>
-<path fill="url(#SVGID_47)" d="M12.436,11.646c-0.06-0.034-0.104-0.102-0.156-0.081l1.929-6.678c0.029-0.012,0.104-0.037,0.176,0.018L12.436,11.646z"/>
-<path fill="#5F811B" d="M14.232,4.844l-0.02,0.047l-0.141,0.103c0.012-0.045,0.119-0.121,0.151-0.145C14.23,4.844,14.232,4.844,14.232,4.844z"/>
-<linearGradient id="SVGID_48" gradientUnits="userSpaceOnUse" x1="14.38" y1="4.86" x2="14.21" y2="4.85">
-<stop stop-color="#7AA922" offset="0"/>
-<stop stop-color="#D3ED89" offset="0.2"/>
-<stop stop-color="#D3ED89" offset="0.53"/>
-<stop stop-color="#7AA922" offset="1"/>
-</linearGradient>
-<path fill="url(#SVGID_48)" d="M14.375,4.901c-0.072-0.044-0.139-0.021-0.168-0.009c0.006-0.014,0.018-0.044,0.018-0.044c0.064-0.04,0.09-0.041,0.15-0.012C14.385,4.857,14.387,4.881,14.375,4.901z"/>
-<linearGradient id="SVGID_49" gradientUnits="userSpaceOnUse" x1="20.11" y1="8.8" x2="22.22" y2="8.8">
-<stop stop-color="#7AA922" offset="0.01"/>
-<stop stop-color="#1D4A20" offset="0.17"/>
-<stop stop-color="#26551B" offset="0.38"/>
-<stop stop-color="#7AA922" offset="1"/>
-</linearGradient>
-<polygon opacity="0.81" fill="url(#SVGID_49)" enable-background="new " points="20.107,12.089 22.057,5.375 22.217,5.502 20.256,12.219 "/>
-<path fill="#476E32" d="M20.293,12.268c0.006-0.038-0.033-0.069-0.033-0.069l1.953-6.702c0,0,0.031,0.028,0.039,0.046L20.293,12.268z"/>
-<path fill="#1D3419" d="M20.229,12.33c-1.053,0.479-2.049,0.725-2.975,0.805c-1.6,0.18-2.893-0.166-3.947-0.686c-0.411-0.188-0.781-0.401-1.112-0.624l0.017-0.013c0.334,0.224,0.697,0.443,1.095,0.638c1.072,0.491,2.412,0.817,3.947,0.685c0.873-0.099,1.838-0.356,2.906-0.829C20.191,12.329,20.229,12.33,20.229,12.33z"/>
-<linearGradient id="SVGID_50" gradientUnits="userSpaceOnUse" x1="20.13" y1="12.13" x2="19.96" y2="12.12">
-<stop stop-color="#7AA922" offset="0"/>
-<stop stop-color="#D3ED89" offset="1"/>
-</linearGradient>
-<path fill="url(#SVGID_50)" d="M20.025,12.208c0,0-0.076-0.067-0.064-0.166c0.105-0.025,0.17,0.037,0.17,0.037S20.109,12.173,20.025,12.208z"/>
-<linearGradient id="SVGID_51" gradientUnits="userSpaceOnUse" x1="20.2" y1="12.14" x2="20.09" y2="12.26">
-<stop stop-color="#5F811B" offset="0"/>
-<stop stop-color="#26551B" offset="1"/>
-</linearGradient>
-<path fill="url(#SVGID_51)" d="M20.121,12.076l0.139,0.125c0,0-0.02,0.077-0.105,0.115l-0.146-0.125C20.096,12.155,20.121,12.076,20.121,12.076z"/>
-<linearGradient id="SVGID_52" gradientUnits="userSpaceOnUse" x1="12.36" y1="12.35" x2="20.04" y2="12.35">
-<stop stop-color="#7AA922" offset="0"/>
-<stop stop-color="#D3ED89" offset="0.4"/>
-<stop stop-color="#7AA922" offset="1"/>
-</linearGradient>
-<path fill="url(#SVGID_52)" d="M19.977,12.036c-0.014,0.099,0.061,0.171,0.061,0.171c-3.939,1.631-5.971,0.673-7.679-0.484c0.031-0.021,0.037-0.021,0.055-0.093C14.117,12.787,16.697,13.597,19.977,12.036z"/>
-<path fill="#26551B" d="M12.212,11.819l0.147-0.099c1.707,1.102,3.723,2.05,7.66,0.467l0.141,0.125C16.381,13.979,13.965,13.051,12.212,11.819z"/>
-<path fill="#5F811B" d="M20.293,12.268c-0.018,0.036-0.053,0.058-0.064,0.063c-0.004,0.001-0.004,0.001-0.004,0.001s-0.027,0.005-0.064-0.021c0.078-0.041,0.1-0.127,0.1-0.127S20.305,12.224,20.293,12.268z"/>
-<path fill="#26551B" d="M12.218,11.818l-0.018,0.013c0,0-0.096-0.052-0.06-0.157C12.15,11.778,12.218,11.818,12.218,11.818z"/>
-<linearGradient id="SVGID_53" gradientUnits="userSpaceOnUse" x1="12.31" y1="11.77" x2="12.19" y2="11.63">
-<stop stop-color="#1D3A19" offset="0"/>
-<stop stop-color="#26551B" offset="0.1"/>
-<stop stop-color="#7AA922" offset="0.65"/>
-<stop stop-color="#D3ED89" offset="1"/>
-</linearGradient>
-<path fill="url(#SVGID_53)" d="M12.143,11.674l0.142-0.112c-0.008,0.107,0.084,0.152,0.084,0.152l-0.143,0.11C12.225,11.826,12.134,11.781,12.143,11.674z"/>
-<linearGradient id="SVGID_54" gradientUnits="userSpaceOnUse" x1="12.31" y1="11.55" x2="12.4" y2="11.71">
-<stop stop-color="#5F811B" offset="0"/>
-<stop stop-color="#7AA922" offset="0.4"/>
-<stop stop-color="#5F811B" offset="0.8"/>
-</linearGradient>
-<path fill="url(#SVGID_54)" d="M12.28,11.562c0.048-0.017,0.092,0.035,0.152,0.083c-0.021,0.069-0.035,0.058-0.068,0.078C12.332,11.704,12.271,11.651,12.28,11.562z"/>
-<linearGradient id="SVGID_55" gradientUnits="userSpaceOnUse" x1="22.13" y1="5.44" x2="22.15" y2="5.36">
-<stop stop-color="#5B7F30" offset="0"/>
-<stop stop-color="#D3ED89" offset="1"/>
-</linearGradient>
-<path opacity="0.72" fill="url(#SVGID_55)" enable-background="new " d="M22.229,5.432c0.002,0.026-0.016,0.067-0.016,0.067l-0.152-0.123c0,0,0.021-0.05,0.01-0.087C22.123,5.312,22.221,5.417,22.229,5.432z"/>
-<linearGradient id="SVGID_56" gradientUnits="userSpaceOnUse" x1="21.97" y1="6.52" x2="14.26" y2="4.3">
-<stop stop-color="#1D3419" offset="0"/>
-<stop stop-color="#26551B" offset="0.23"/>
-<stop stop-color="#7AA922" offset="1"/>
-</linearGradient>
-<path opacity="0.33" fill="url(#SVGID_56)" enable-background="new " d="M22.225,5.426c-0.029-0.041-0.074-0.074-0.109-0.109c-0.068-0.06-0.15-0.046-0.17-0.035l-0.002,0.001c-3.932,1.623-5.862,0.698-7.568-0.449c0.004,0.006,0.004,0.016,0.004,0.023c0-0.007,0-0.017-0.004-0.023c-0.062-0.028-0.086-0.027-0.15,0.012C14.199,4.863,14.137,4.91,14.1,4.95C14.76,5.503,17.545,7.688,22.225,5.426z M14.375,4.901L14.375,4.901L14.375,4.901C14.375,4.901,14.375,4.901,14.375,4.901L14.375,4.901c0.004-0.009,0.004-0.017,0.008-0.025C14.379,4.885,14.379,4.895,14.375,4.901z"/>
-<linearGradient id="SVGID_57" gradientUnits="userSpaceOnUse" x1="21.1" y1="8.73" x2="20.93" y2="8.68">
-<stop stop-color="#5F811B" offset="0"/>
-<stop stop-color="#75C145" offset="1"/>
-</linearGradient>
-<path opacity="0.72" fill="url(#SVGID_57)" enable-background="new " d="M19.959,12.052l1.949-6.711c0.105-0.019,0.156,0.042,0.156,0.042l-1.944,6.695C20.121,12.076,20.041,12.017,19.959,12.052z"/>
-<linearGradient id="SVGID_58" gradientUnits="userSpaceOnUse" x1="21.91" y1="5.41" x2="22.26" y2="5.41">
-<stop stop-color="#D3ED89" offset="0"/>
-<stop stop-color="#5F811B" offset="1"/>
-</linearGradient>
-<path opacity="0.6" fill="url(#SVGID_58)" enable-background="new " d="M21.912,5.343c0.006-0.025,0.01-0.037,0.033-0.061c0.02-0.011,0.102-0.025,0.17,0.035c0.064,0.062,0.166,0.131,0.137,0.225c-0.01-0.019-0.039-0.043-0.039-0.043l-0.148-0.118C22.064,5.381,22.016,5.324,21.912,5.343z"/>
-<linearGradient id="SVGID_59" gradientUnits="userSpaceOnUse" x1="21.94" y1="6.6" x2="14.24" y2="4.39">
-<stop stop-color="#93BF81" offset="0"/>
-<stop stop-color="#26551B" offset="0.23"/>
-<stop stop-color="#BDE256" offset="1"/>
-</linearGradient>
-<path opacity="0.3" fill="url(#SVGID_59)" enable-background="new " d="M14.101,4.952c-0.011,0.013-0.021,0.023-0.022,0.034l-0.002,0.002l-0.01,0.023c0.594,0.501,3.408,2.813,8.189,0.486c-0.003-0.025-0.014-0.049-0.031-0.071C17.545,7.688,14.76,5.503,14.101,4.952z"/>
-<path opacity="0.72" fill="url(#SVGID_55)" enable-background="new " d="M22.229,5.432c0.002,0.026-0.016,0.067-0.016,0.067l-0.152-0.123c0,0,0.021-0.05,0.01-0.087C22.123,5.312,22.221,5.417,22.229,5.432z"/>
-<path opacity="0.6" fill="url(#SVGID_58)" enable-background="new " d="M21.912,5.343c0.006-0.025,0.01-0.037,0.033-0.061c0.02-0.011,0.104-0.025,0.17,0.035c0.064,0.062,0.17,0.129,0.138,0.226c-0.011-0.02-0.038-0.044-0.038-0.044l-0.15-0.118C22.064,5.381,22.016,5.324,21.912,5.343z"/>
-</svg>
\ No newline at end of file
+<path d="M38.604,10.724c0.041-0.122-0.264-0.52-0.48-0.42c-3.604,1.36-7.473,2.683-12.17-0.719   c-0.063-0.028-0.143-0.036-0.23,0.016V9.6c0.004-0.006-0.211,0.142-0.252,0.228l-3.106,10.744   c-0.057,0.169,0.097,0.252,0.097,0.252h0.002c2.859,1.916,6.605,3.414,12.883,0.805l0,0c0,0,0.004,0,0.008-0.003   c0.02-0.01,0.074-0.042,0.104-0.101L38.604,10.724L38.604,10.724v-0.003C38.604,10.723,38.604,10.724,38.604,10.724z" fill="url(#SVGID_4_)"/>
+<rect fill="none" height="44" width="43.999"/>
+</g>
+</svg>
--- a/emailservices/emailframework/inc/CFSMailBrandManagerImpl.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailframework/inc/CFSMailBrandManagerImpl.h	Fri Mar 12 15:41:14 2010 +0200
@@ -104,6 +104,13 @@
 	                     const TFSMailMsgId& aMailboxId,
                          TDes& aIconIds  );
 
+	/**
+	 * @see MFSMailBrandManager::GetGraphicIdsL
+	 */
+    TInt GetGraphicIdsL( TFSBrandElement aElement, 
+                         const TDesC& aBrandId,
+                         TDes& aIconIds  );
+    
 private:
 
     /**
--- a/emailservices/emailframework/inc/MFSMailBrandManager.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailframework/inc/MFSMailBrandManager.h	Fri Mar 12 15:41:14 2010 +0200
@@ -142,7 +142,19 @@
      virtual TInt GetGraphicIdsL( TFSBrandElement aElement,
                                   const TFSMailMsgId& aMailboxId,
                                   TDes& aIconIds  ) = 0;
-        
+
+    /**
+     * Returns branded graphic element of given type.
+     *
+     * @param aElementId brand element
+     * @param aBrandId Domain of email address.     
+     * @param aIconIds Icon path and ids
+     *
+     * @return Error code
+     */
+     virtual TInt GetGraphicIdsL( TFSBrandElement aElement,
+                                  const TDesC& aBrandId,
+                                  TDes& aIconIds  ) = 0;        
 };
 
 
--- a/emailservices/emailframework/inc/emailversionnumbers.hrh	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailframework/inc/emailversionnumbers.hrh	Fri Mar 12 15:41:14 2010 +0200
@@ -12,7 +12,7 @@
 * Contributors:
 *
 * Description : Common email version number definitions
-* Version     : %version: 10.1.2 %
+* Version     : %version: 10.1.3 %
 *
 */
 
@@ -25,14 +25,14 @@
  *  version number both major and minor version are stored in separate 32 bit
  *  location.
  */
-#define KEmailBinaryVersionNumber 10.4
+#define KEmailBinaryVersionNumber 10.5
 
 /** ECom version number to be used in Cmail related ECom registeration
  *  resource files.
  *  NOTE: Version number in ECom registeration resource file is saved as one
  *  byte, so 255 is the maximum version number.
  */
-#define KEmailEcomVersionNumber 4
+#define KEmailEcomVersionNumber 5
 
 /** Binary paging setting (paged/non-paged)
  */
--- a/emailservices/emailframework/src/CFSMailBrandManagerImpl.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailframework/src/CFSMailBrandManagerImpl.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -288,6 +288,24 @@
     }
 
 // -----------------------------------------------------------------------------
+// CFSMailBrandManagerImpl::GetGraphicIdsL
+// -----------------------------------------------------------------------------
+TInt CFSMailBrandManagerImpl::GetGraphicIdsL(
+    TFSBrandElement aElement, 
+    const TDesC& aBrandId,
+    TDes& aIconIds  )
+    {
+    FUNC_LOG;
+
+    CFSMailBrand* brand = FindMatchingBrandL( aBrandId );
+    if ( brand == NULL )
+        {
+        return KErrNotFound;
+        }
+    return brand->GetGraphicIdsL( aElement, aIconIds );
+    }
+
+// -----------------------------------------------------------------------------
 // CFSMailBrandManagerImpl::GetTextL
 // -----------------------------------------------------------------------------
 TPtrC CFSMailBrandManagerImpl::GetTextL(
--- a/emailservices/emailinstallationinitiator/sis/makeEmailInstallationInitiatorSisx.bat	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailinstallationinitiator/sis/makeEmailInstallationInitiatorSisx.bat	Fri Mar 12 15:41:14 2010 +0200
@@ -12,8 +12,7 @@
 REM * 
 REM * Contributors:
 REM * 
-REM * Description:
-REM * Script that creates and signs Email installation initiator sisx packages
+REM * Description: Script that creates and signs Email installation initiator sisx packages
 REM * 
 
 @echo #########################################################
Binary file emailservices/emailserver/cmailhandlerplugin/conf/20029F4A.txt has changed
Binary file emailservices/emailserver/cmailhandlerplugin/conf/CommonemailCRKeys.confml has changed
Binary file emailservices/emailserver/cmailhandlerplugin/conf/CommonemailCRKeys_20029F4A.crml has changed
--- a/emailservices/emailserver/cmailhandlerplugin/group/bld.inf	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailserver/cmailhandlerplugin/group/bld.inf	Fri Mar 12 15:41:14 2010 +0200
@@ -36,5 +36,15 @@
 
 ../rom/cmailhandlerplugin.iby                 CORE_APP_LAYER_IBY_EXPORT_PATH(cmailhandlerplugin.iby)
 ../rom/cmailhandlerpluginresources.iby        LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(cmailhandlerpluginresources.iby)
+// CONFML_EXPORT_PATH defined in platform_paths.hrh APP_LAYER_CONFML
+../conf/CommonemailCRKeys.confml              CONFML_EXPORT_PATH(CommonemailCRKeys.confml,s60) 
+../conf/CommonemailCRKeys_20029F4A.crml       CRML_EXPORT_PATH(CommonemailCRKeys_20029F4A.crml,s60)
+../inc/commonemailcrkeys.h                    |../../../../inc/commonemailcrkeys.h
 
 
+// TEMP fiz for wk05/10 SDK, please remvve after wk07
+../conf/20029F4A.txt                          /epoc32/winscw/c/private/10202be9/20029F4A.txt
+../conf/20029F4A.txt                          /epoc32/release/winscw/UDEB/Z/private/10202be9/20029F4A.txt
+../conf/20029F4A.txt                          /epoc32/release/winscw/UREL/Z/private/10202be9/20029F4A.txt
+../conf/20029F4A.txt                          /epoc32/data/Z/private/10202BE9/20029F4A.txt
+
--- a/emailservices/emailserver/cmailhandlerplugin/inc/PSSubscriber.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailserver/cmailhandlerplugin/inc/PSSubscriber.h	Fri Mar 12 15:41:14 2010 +0200
@@ -11,8 +11,7 @@
 *
 * Contributors:
 *
-* Description:
-*       Subscriber class for Publish & Subsribe events
+* Description: Subscriber class for Publish & Subsribe events
 *
 */
 
--- a/emailservices/emailserver/cmailhandlerplugin/inc/cmailcpshandler.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailserver/cmailhandlerplugin/inc/cmailcpshandler.h	Fri Mar 12 15:41:14 2010 +0200
@@ -78,12 +78,6 @@
     void UpdateMailboxesL(TInt aInstance, const TDesC& aContentId);
 
     /**
-     * Updates external (3rd party) account based on contentId
-     * @param aContentId specifies the widget and account related to it
-     */
-    void UpdateExtAccountL( const TDesC& aContentId );
-
-    /**
      *
      */
     void LaunchWidgetSettingsL( const TDesC& aContentId );
@@ -96,7 +90,7 @@
     /**
      *
      */    
-    void LaunchEmailWizardL();
+    void LaunchEmailWizardL( const TDesC& aContentId );
     /**
      * Launches an application based on the given contentId
      * This method is for external (3rd party) accounts
@@ -106,11 +100,6 @@
 
     /**
      *
-     */	
-    TBool AssociateWidgetToSetting( const TDesC& aContentId );
-	
-    /**
-     *
      */		
     void DissociateWidgetFromSettingL( const TDesC& aContentId );    
 
@@ -128,11 +117,6 @@
      * Return total number of 3rd party mailboxes in the system
      */
     TInt TotalExtMailboxCountL();
-
-    /**
-     *
-     */    
-    void ManualAccountSelectionL( const TDesC& aContentId );
     
 	/**
      * Gets correct localised format for time (or date) string
@@ -142,6 +126,16 @@
     // From MEmailObserverListener
     void EmailObserverEvent( EmailInterface::MEmailData& aData );
 
+    /**
+     *
+     */
+    void SetWaitingForNewMailbox( const TDesC& aContentId );
+    
+    /**
+     *
+     */    
+    void CleanWaitingForNewMailbox();
+
 protected:
     /**
      * From CFSNotificationHandlerBase
@@ -228,11 +222,6 @@
 	                           const TInt aFirstRow );
 
     /**
-     * Handles publishing of connection state icon
-     */
-    void UpdateConnectStateL( const TInt aMailBoxNumber, const TInt aRowNumber );       
-
-    /**
      * Handles publishing of mailbox icon
      */
     void UpdateMailBoxIconL( const TInt aMailBoxNumber,
@@ -245,11 +234,6 @@
     void UpdateIndicatorIconL( const TInt aMailBoxNumber, 
                                const TInt aWidgetInstance,
                                const TInt aRowNumber );
-    
-    /**
-     * Handles publishing of empty message time string
-     */
-// void ClearMessageTimeL( const TInt aRowNumber );
 
     // Event handling subroutines
     /**
@@ -287,22 +271,6 @@
     void HandleMailDeletedEventL( TFSMailMsgId aMailbox, TAny* aParam1, TAny* aParam2 );
 
     /**
-     * handles mail changed event
-     * @param aMailbox mailbox id
-     * @param aParam1 contains event specific parameters
-     * @param aParam2 contains event specific parameters
-     */
-    void HandleMailChangedEventL( TFSMailMsgId aMailbox, TAny* aParam1, TAny* aParam2 );
-
-    /**
-     * handles new folder event
-     * @param aMailbox mailbox id
-     * @param aParam1 contains event specific parameters
-     * @param aParam2 contains event specific parameters
-     */
-    void HandleNewFolderEventL( TFSMailMsgId aMailbox, TAny* aParam1, TAny* aParam2 );
-	
-    /**
      * get count of unread messages in inbox
      * @param aMailbox mailbox id
      */    
@@ -366,7 +334,9 @@
      *
      */     
     void PublishMessageL( TInt aWidgetInstance, CFSMailMessage& aMessage,
-                           const TDesC& aSenderName, const TDesC& aTime, TInt aFirstRow);
+                          const TDesC& aSenderName,
+                          const TDesC& aSubject,
+                          const TDesC& aTime, TInt aFirstRow);
    
     /**
      * Checks if the given message is already know/published
@@ -403,8 +373,6 @@
      */
     void SelectAndUpdateExtAccountsL( RPointerArray<CMailExternalAccount>& aAccounts );
     
-    TBool FirstBootL();
-    
     /**
      * Checks whether aAccounts array has entries relating to plugin with id aPluginId
      * @param aPluginId 3rd party plugin identifier (implementation uid)
@@ -438,7 +406,10 @@
     // local cache of mailbox details
     RPointerArray<CMailMailboxDetails> iAccountsArray;
     // array of plugin proxies. One plugin proxy handles one 3rd party plugin and its accounts
-    RPointerArray<CMailPluginProxy> iExternalPlugins;
+    RPointerArray<CMailPluginProxy>    iExternalPlugins;
+    // tells if email wizard is started from widget and it is still running
+    // and to which widget next added account is added.
+    HBufC*                             iWaitingForNewMailbox;
     };
 
 #endif  //__CMAILCPSHANDLER_H__
--- a/emailservices/emailserver/cmailhandlerplugin/inc/cmailcpsif.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailserver/cmailhandlerplugin/inc/cmailcpsif.h	Fri Mar 12 15:41:14 2010 +0200
@@ -61,10 +61,7 @@
      */
     void PublishActiveMailboxNameL( const TInt aInstance, 
 									const TInt aRowNumber, 
-                                    const TDesC& aMailboxName,
-                                    const TInt aMailBoxCount,
-                                    TFSMailMsgId aMailBoxId,
-                                    TFSMailMsgId aFolderId );
+                                    const TDesC& aMailboxName);
 
     /**
      * Publishes mailbox name to widget and action related to widget
@@ -173,7 +170,7 @@
      * 
      */	
 	TInt GetWidgetInstanceCount();
-	
+
 private:
     
     CMailCpsIf( CMailCpsHandler* aMailCpsHandler );
@@ -214,10 +211,7 @@
         const TDesC& aContentId, 
         const TDesC& aTextToAdd,
         const TDesC& aKey,
-        const TDesC8& aTrigger,
-        const TInt aMailBoxCount,
-        TFSMailMsgId aMailBoxId,
-        TFSMailMsgId aFolderId );
+        const TDesC8& aTrigger);
 
     /**
      * Publishes image
@@ -234,7 +228,8 @@
          const TDesC8& aKey,
          TInt aBitmapId,
          TInt aBitmapMaskId,
-         TFSMailMsgId aMailBoxId );
+         TFSMailMsgId aMailBoxId,
+         const TDesC& aBrandId );
 
     /**
      * Removes a published entity from Content Publishing Service
@@ -246,7 +241,7 @@
      * 
      */	    
     TInt FindWidgetInstanceId(const TDesC& aContentId);
-    
+
     /**
      * Resets all the published content values on HomeScreen database
      */
@@ -275,8 +270,6 @@
     TUint 					iSetupUid;
 	// is content allowed to publish	
 	TBool 					iAllowedToPublish[KMaxMailboxCount];
-    // is widget inactive    
-    TBool                   iInactive[KMaxMailboxCount];	
 	// From configuration: are homescreen notifications observed or ignored
 	TBool                   iIgnoreHsNotifications;
     };
--- a/emailservices/emailserver/cmailhandlerplugin/inc/cmailcpsifconsts.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailserver/cmailhandlerplugin/inc/cmailcpsifconsts.h	Fri Mar 12 15:41:14 2010 +0200
@@ -58,9 +58,26 @@
 _LIT(KContTypeSetupIcon, "ct_setup_icon");
 _LIT8(KKeySetupIcon, "key_setup_icon");
 
+_LIT(KContTypeSetupBrandIcon1, "ct_setup_brand_icon_1");
+_LIT8(KKeySetupBrandIcon1, "key_setup_brand_icon_1");
+_LIT(KContTypeSetupBrandIcon2, "ct_setup_brand_icon_2");
+_LIT8(KKeySetupBrandIcon2, "key_setup_brand_icon_2");
+_LIT(KContTypeSetupBrandIcon3, "ct_setup_brand_icon_3");
+_LIT8(KKeySetupBrandIcon3, "key_setup_brand_icon_3");
+_LIT(KContTypeSetupBrandIcon4, "ct_setup_brand_icon_4");
+_LIT8(KKeySetupBrandIcon4, "key_setup_brand_icon_4");
+
+_LIT(KSetupBrand1, "ovi.com");
+_LIT(KSetupBrand2, "yahoo.com");
+_LIT(KSetupBrand3, "hotmail.com");
+_LIT(KSetupBrand4, "gmail.com");
+
 _LIT(KContTypeBodyText, "ct_body_text_");
 _LIT(KKeyBodyText, "key_body_text_");
 
+_LIT(KContTypeSubjectText, "ct_subject_text_");
+_LIT(KKeySubjectText, "key_subject_text_");
+
 _LIT(KContTypeIndicatorIcon, "ct_indicator_icon_");
 _LIT8(KKeyIndicatorIcon, "key_indicator_icon_");
 
@@ -120,16 +137,14 @@
 //  constants for requesting notification
 _LIT( KPubData, "publisher");
 _LIT( KActionName,"notify");
-_LIT8( KDeActive, "deactive");
-_LIT8( KActive, "active");
+_LIT8( KPluginStartup, "pluginstartup");
+_LIT8( KPluginShutdown, "pluginshutdown");
 _LIT8( KSuspend , "suspend");
 _LIT8( KResume, "resume");
-_LIT8( KInactive, "inactive");
-_LIT( KDeActive16, "deactive");
-_LIT( KActive16, "active");
+_LIT( KPluginStartup16, "pluginstartup");
+_LIT( KPluginShutdown16, "pluginshutdown");
 _LIT( KSuspend16, "suspend");
 _LIT( KResume16, "resume");
-_LIT( KInactive16, "inactive");
 _LIT( KSettings16, "settings");
 _LIT( KCPAll, "all");
 _LIT8( KExecute, "execute" );
--- a/emailservices/emailserver/cmailhandlerplugin/inc/cmailcpssettings.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailserver/cmailhandlerplugin/inc/cmailcpssettings.h	Fri Mar 12 15:41:14 2010 +0200
@@ -124,7 +124,8 @@
      * 
      * @return
      */
-    TBool AssociateWidgetToSetting( const TDesC& aContentId );
+    void AssociateWidgetToSetting( const TDesC& aContentId,
+                                   const TFSMailMsgId aMailbox  );
 
     /**
      * 
@@ -256,16 +257,14 @@
     void GetExtMailboxNonZeroKeysL( RArray<TUint32>& aKeys );
 
     /**
-     * 
-     * @param aContentId
+     * Find next free CenRep key to store setting.
+     * @param aContentId Id of widget instance
+     */	
+    TInt GetSettingToAssociate( const TDesC& aContentId );
+
+    /**
+     * @param aKey
      */
-    TBool IsAlreadyAssociated( const TDesC& aContentId );
-	
-    /**
-     * 
-     */	
-    TUint32 GetSettingToAssociate();
-    
     CMailExternalAccount* GetExtMailboxL( TInt aKey );
     
 private: // data
--- a/emailservices/emailserver/cmailhandlerplugin/inc/cmailwidgetcenrepkeysinternal.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailserver/cmailhandlerplugin/inc/cmailwidgetcenrepkeysinternal.h	Fri Mar 12 15:41:14 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008 - 2010 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"
@@ -26,9 +26,6 @@
 // (see also constants below)
 const TUint32 KCmailCPConfiguration = 0x10000001;
 
-// Key to store content ids of added email widgets
-const TUint32 KCMailContentIdList = 0x10000002;
-
 // 1st bit: whether email content publisher listens to commands/events sent by Homescreen framework
 //     value == 0: default behaviour, events are handled as normal
 //     value != 0: publisher ignores HS events
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailservices/emailserver/cmailhandlerplugin/inc/commonemailcrkeys.h	Fri Mar 12 15:41:14 2010 +0200
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*       repository keys to track which mailbox has the latest new email
+*
+*/
+
+#ifndef _COMMONEMAILCRKEYS_H_
+#define _COMMONEMAILCRKEYS_H_
+
+// central repository key for email data
+const TUid KCmailDataRepository	= { 0x20029F4A };
+
+// key for display text (mailbox name?) of email indicator popup
+const TUint32 KCmailNewEmailDisplayText =  0x00000001 ;
+
+#endif // _COMMONEMAILCRKEYS_H_
--- a/emailservices/emailserver/cmailhandlerplugin/rom/cmailhandlerplugin.iby	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailserver/cmailhandlerplugin/rom/cmailhandlerplugin.iby	Fri Mar 12 15:41:14 2010 +0200
@@ -28,6 +28,8 @@
 ECOM_PLUGIN( cmailhandlerplugin.dll, cmailhandlerplugin.rsc )
 SCALABLE_IMAGE(APP_BITMAP_DIR,APP_BITMAP_DIR,cmailhandlerplugin)
 
+data=EPOCROOT##epoc32\data\Z\private\10202BE9\20029F4A.txt  private\10202BE9\20029F4A.txt
+
 
 #endif //FF_EMAIL_FRAMEWORK
 
--- a/emailservices/emailserver/cmailhandlerplugin/src/PSSubscriber.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailserver/cmailhandlerplugin/src/PSSubscriber.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -11,8 +11,7 @@
 *
 * Contributors:
 *
-* Description:
-*       Subscriber class for Publish & Subsribe events
+* Description: Subscriber class for Publish & Subsribe events
 */
 
 #include <e32svr.h>
--- a/emailservices/emailserver/cmailhandlerplugin/src/cmailcpshandler.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailserver/cmailhandlerplugin/src/cmailcpshandler.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 - 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2008 - 2010 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"
@@ -22,8 +22,6 @@
 #include <AknUtils.h>
 #include <apgcli.h>
 #include <centralrepository.h>
-#include <starterdomaincrkeys.h>
-#include <startupdomainpskeys.h>
 #include <emailobserverinterface.hrh>
 #include <emailobserverplugin.h>
 #include <memaildata.h>
@@ -50,7 +48,9 @@
 // CMailCpsHandler::CMailCpsHandler
 // ---------------------------------------------------------
 //
-CMailCpsHandler::CMailCpsHandler( MFSNotificationHandlerMgr& aOwner ) : CFSNotificationHandlerBase( aOwner )
+CMailCpsHandler::CMailCpsHandler( MFSNotificationHandlerMgr& aOwner ): 
+    CFSNotificationHandlerBase( aOwner ),
+    iWaitingForNewMailbox(NULL)
     {
     FUNC_LOG;
     }
@@ -78,9 +78,9 @@
     FUNC_LOG;
 
     CFSNotificationHandlerBase::ConstructL();
-    
+
     iEnv = CEikonEnv::Static( );
-    
+
     SetObserving( ETrue );
 
     // Instantiate helper classes
@@ -128,7 +128,7 @@
     // Get current configuration from settings interface,
     // and pass it on to actual publisher interface
     iLiwIf->SetConfiguration( iSettings->Configuration() );
-    
+
     TInt iiMax( iSettings->Mailboxes().Count() );
     for ( TInt ii = 0; ii < iiMax; ii++ )
         {
@@ -152,24 +152,24 @@
             CleanupStack::PushL( mailbox );
             CMailMailboxDetails* mailboxDetails = CreateMailboxDetailsL( *mailbox );
             CleanupStack::PushL( mailboxDetails );
-            
+
             TBuf<KMaxDescLen> cid;
             TInt next(1);
 
             // Check if same mailbox is already in iAccountsArray once or more
             for ( TInt i = 0; i < iAccountsArray.Count(); i++ )
-                {               
+                {
                 TInt id = (TInt)iAccountsArray[i]->iMailboxId.Id();
                 if (id == mailboxId)
                     {
                     next++;
                     }
                 }
-            iSettings->GetContentId(mailboxId, next, cid);          
+            iSettings->GetContentId(mailboxId, next, cid);
             mailboxDetails->SetWidgetInstance(cid);
             iAccountsArray.AppendL( mailboxDetails );
-            CleanupStack::Pop( mailboxDetails );                            
-            CleanupStack::PopAndDestroy( mailbox );            
+            CleanupStack::Pop( mailboxDetails );
+            CleanupStack::PopAndDestroy( mailbox );
             }
         }
     }
@@ -296,7 +296,7 @@
     {
     FUNC_LOG;
     // Create instance to return
-    CMailMailboxDetails* details = 
+    CMailMailboxDetails* details =
         CMailMailboxDetails::NewL( aMailbox.GetId(), aMailbox.GetName() );
     return details;
     }
@@ -314,6 +314,7 @@
     TRAP_IGNORE( InitializeExternalAccountsL() );
     // Update widget contents after settings change
     TRAP_IGNORE( UpdateFullL() );
+    CleanWaitingForNewMailbox();
     }
 
 // ---------------------------------------------------------
@@ -339,31 +340,54 @@
 void CMailCpsHandler::UpdateMailboxesL(TInt aInstance, const TDesC& aContentId)
     {
     FUNC_LOG;
-    TInt row(1); // start from first row
-    TInt mailbox(0);
-    TBool found( EFalse );
-    // try to find mailbox with matching contentId
-    for ( mailbox = 0; mailbox < iAccountsArray.Count(); mailbox++ )
+    // Look up 3rd party plugin that handles this account
+    CMailPluginProxy* plugin = GetExtPluginL( aContentId );
+    if ( plugin ) // handle external 3rd party accounts 
         {
-        if ( !aContentId.Compare( *iAccountsArray[mailbox]->iWidgetInstance ) )
-            {
-            INFO_1("iAccountsArray.Count() == %d", iAccountsArray.Count());
-            found = ETrue;
-            break;
-            }
+        // Publish its data
+        plugin->UpdateAccountL( aContentId );
         }
+    else // handle internal accounts
+        {   
+        TInt row(1); // start from first row
+        TInt mailbox(0);
+        TBool found( EFalse );
+        // try to find mailbox with matching contentId
+        for ( mailbox = 0; mailbox < iAccountsArray.Count(); mailbox++ )
+            {
+            if ( !aContentId.Compare( *iAccountsArray[mailbox]->iWidgetInstance ) )
+                {
+                INFO_1("iAccountsArray.Count() == %d", iAccountsArray.Count());
+                found = ETrue;
+                break;
+                }
+            }
 
-    // if contentId found from array, update the mailbox
-    if ( found )
-        {
-        // Update fields from left to right
-        UpdateMailBoxIconL( mailbox, aInstance, row );
-        UpdateMailboxNameL( mailbox, aInstance, row );
-        UpdateIndicatorIconL( mailbox, aInstance, row );
-        row++;
-        UpdateMessagesL( mailbox, aInstance, 1, row);
-        row++;
-        UpdateMessagesL( mailbox, aInstance, 2, row);
+        // if contentId found from array, update the mailbox
+        if ( found )
+            {
+            // Update fields from left to right
+            UpdateMailBoxIconL( mailbox, aInstance, row );
+            UpdateMailboxNameL( mailbox, aInstance, row );
+            UpdateIndicatorIconL( mailbox, aInstance, row );
+            row++;
+            UpdateMessagesL( mailbox, aInstance, 1, row);
+            row++;
+            UpdateMessagesL( mailbox, aInstance, 2, row);
+            }
+        else
+            {
+            // Clean mailbox name
+            iLiwIf->PublishActiveMailboxNameL( aInstance, 1, KNullDesC );
+            // Clean mailbox icon
+            TFSMailMsgId mailBoxId; // id not essential here        
+            iLiwIf->PublishMailboxIconL( aInstance, 1, KNullIcon, mailBoxId);
+            // Clean indicator icon
+            iLiwIf->PublishIndicatorIconL( aInstance, 1, KNullIcon);
+            // Clean message rows
+            UpdateEmptyMessagesL( aInstance, 2 );
+            UpdateEmptyMessagesL( aInstance, 3 );
+            }
         }
     }
 
@@ -384,7 +408,7 @@
         mailBoxId = iAccountsArray[aMailBoxNumber]->iMailboxId;
         CFSMailBox* mailbox( NULL );
         mailbox = MailClient().GetMailBoxByUidL( mailBoxId );
-        
+
         if(mailbox)
             {
             mailBoxFound = ETrue;
@@ -393,7 +417,7 @@
 
             TBuf<KMaxDescLen> accountName;
             accountName.Append(*iAccountsArray[aMailBoxNumber]->iMailboxName);
-                                    
+
             TInt unreadCount(GetUnreadCountL(iAccountsArray[aMailBoxNumber]->iMailboxId));
             if ( unreadCount > 0 )
                 {
@@ -403,21 +427,19 @@
                 CDesCArrayFlat* strings = new CDesCArrayFlat( 1 );
                 CleanupStack::PushL( strings );
                 strings->AppendL( accountName ); // replace "%0U" with mailbox name
-            
+
                 CArrayFix<TInt>* ints = new(ELeave) CArrayFixFlat<TInt>( 1 );
                 CleanupStack::PushL( ints );
                 ints->AppendL( unreadCount ); // replace "%1N" with number of unread messages
-            
-                HBufC* mailboxAndCount = StringLoader::LoadLC( R_EMAILWIDGET_TEXT_MAILBOX_AND_MAILCOUNT, 
+
+                HBufC* mailboxAndCount = StringLoader::LoadLC( R_EMAILWIDGET_TEXT_MAILBOX_AND_MAILCOUNT,
                                                                *strings,
                                                                *ints );
-            
+
                 iLiwIf->PublishActiveMailboxNameL(
 				        aWidgetInstance,
-                        aRowNumber, *mailboxAndCount,
-                        iAccountsArray.Count(),
-                        mailBoxId, folderId); 
-            
+                        aRowNumber, *mailboxAndCount);
+
                 CleanupStack::PopAndDestroy(mailboxAndCount);
                 CleanupStack::PopAndDestroy(ints);
                 CleanupStack::PopAndDestroy(strings);
@@ -425,12 +447,10 @@
             else
                 {
                 // show only mailbox name
-            
+
                 iLiwIf->PublishActiveMailboxNameL(
 				        aWidgetInstance,
-                        aRowNumber, accountName,
-                        iAccountsArray.Count(),
-                        mailBoxId, folderId);  
+                        aRowNumber, accountName);
                 }
             }
         }
@@ -438,12 +458,9 @@
         {
         // Publishing empty descriptor for rows that should not contain
         // anything on widget UI.
-        iLiwIf->PublishActiveMailboxNameL( aWidgetInstance, 
+        iLiwIf->PublishActiveMailboxNameL( aWidgetInstance,
 		                                   aRowNumber,
-										   KNullDesC,
-										   NULL,
-										   mailBoxId,
-										   folderId );
+										   KNullDesC);
         }
     }
 
@@ -457,7 +474,7 @@
                                        const TInt aMessageNumber,
                                        const TInt aRow )
     {
-    FUNC_LOG;    
+    FUNC_LOG;
 
     if ( aMailBoxNumber < iAccountsArray.Count() )
         {
@@ -479,7 +496,7 @@
             CleanupStack::PushL( folder );
 
             TInt msgCount = folder->GetMessageCount();
-            
+
             if(msgCount<1 || (msgCount == 1 && aRow == 3))
                 {
                 UpdateEmptyMessagesL( aWidgetInstance, aRow );
@@ -496,22 +513,22 @@
             TFSMailDetails details( EFSMsgDataEnvelope );
             RArray<TFSMailSortCriteria> sorting;
             CleanupClosePushL( sorting );
-    
+
             TFSMailSortCriteria sortCriteria;
             sortCriteria.iField = EFSMailSortByDate;
             sortCriteria.iOrder = EFSMailDescending;
             sorting.Append( sortCriteria );
-            // List all or maximum number of messages   
+            // List all or maximum number of messages
             MFSMailIterator* iterator = folder->ListMessagesL( details, sorting );
-            CleanupDeletePushL( iterator ); // standard CleanupStack::PushL does not work with non-C-class pointer  
-        
+            CleanupDeletePushL( iterator ); // standard CleanupStack::PushL does not work with non-C-class pointer
+
             TFSMailMsgId dummy;
             iterator->NextL( dummy, aMessageNumber, folderMessages);
             TInt count (folderMessages.Count());
             if(!count || (count == 1 && aRow == 3))
                 {
                 UpdateEmptyMessagesL( aWidgetInstance, aRow );
-            
+
                 CleanupStack::PopAndDestroy( iterator );
                 CleanupStack::PopAndDestroy( &sorting );
                 CleanupStack::PopAndDestroy( &folderMessages );
@@ -527,6 +544,8 @@
 
             // Get sender information
             TBuf<KMaxDescLen> sender( NULL );
+            TBuf<KMaxDescLen> subject( NULL );
+            subject.Append(msg->GetSubject());
             CFSMailAddress* fromAddress = msg->GetSender();
             if ( fromAddress )
                 {
@@ -539,20 +558,21 @@
                     sender.Append(fromAddress->GetEmailAddress());
                     }
                 }
-            
-            // Get message time and format it correctly 
+
+            // Get message time and format it correctly
             TTime msgTime = msg->GetDate();
             HBufC* timeString( NULL );
             timeString = GetMessageTimeStringL( msgTime );
-            CleanupDeletePushL( timeString );     
-        
-            // Publish message details           
-            PublishMessageL( aWidgetInstance, 
+            CleanupDeletePushL( timeString );
+
+            // Publish message details
+            PublishMessageL( aWidgetInstance,
                               *msg,
                               sender,
+                              subject,
                               *timeString,
                               aRow );
-        
+
             CleanupStack::PopAndDestroy( timeString );
             CleanupStack::PopAndDestroy( msg );
             CleanupStack::PopAndDestroy( iterator );
@@ -575,43 +595,43 @@
     // Get current local time
     TTime currentTime;
     currentTime.HomeTime();
-    
+
     // Get universal time offset and add it to message time
-    TLocale locale;    
+    TLocale locale;
     TTimeIntervalSeconds universalTimeOffset( locale.UniversalTimeOffset() );
-    aMessageTime += universalTimeOffset;      
-    
+    aMessageTime += universalTimeOffset;
+
     // If daylight saving is on, add one hour offset to message time
     if ( locale.QueryHomeHasDaylightSavingOn() )
         {
         TTimeIntervalHours daylightSaving( 1 );
         aMessageTime += daylightSaving;
         }
-    
+
     // Get datetime objects and compare dates
     TDateTime currentDate = currentTime.DateTime();
     TDateTime messageDate = aMessageTime.DateTime();
     HBufC* formatString( NULL );
-    
-    if ( currentDate.Year() == messageDate.Year() 
-        && currentDate.Month() == messageDate.Month() 
+
+    if ( currentDate.Year() == messageDate.Year()
+        && currentDate.Month() == messageDate.Month()
         && currentDate.Day() == messageDate.Day())
         {
         // Message arrived today
-        formatString = StringLoader::LoadLC( R_QTN_TIME_USUAL_WITH_ZERO );       
+        formatString = StringLoader::LoadLC( R_QTN_TIME_USUAL_WITH_ZERO );
         }
     else
         {
         // Message arrived earlier than today
         formatString = StringLoader::LoadLC( R_QTN_DATE_WITHOUT_YEAR_WITH_ZERO );
         }
-    
+
     // Format time string using chosen time or date formatString
     TBuf<KMaxShortDateFormatSpec*2> timeString;
     TRAP_IGNORE( aMessageTime.FormatL( timeString, formatString->Des() ) );
     CleanupStack::PopAndDestroy( formatString );
     // If format fails, result is empty
-    
+
     HBufC* result = timeString.Alloc();
     TPtr ptr = result->Des();
     AknTextUtils::DisplayTextLanguageSpecificNumberConversion( ptr );
@@ -625,7 +645,8 @@
 // ---------------------------------------------------------
 //
 void CMailCpsHandler::PublishMessageL( TInt aWidgetInstance, CFSMailMessage& aMessage,
-                                        const TDesC& aSenderName, const TDesC& aTime, TInt aRow )
+                                        const TDesC& aSenderName, const TDesC& aSubject,
+                                        const TDesC& aTime, TInt aRow )
     {
     FUNC_LOG;
 
@@ -633,6 +654,7 @@
 
     iLiwIf->PublishMailboxIconL( aWidgetInstance, aRow, GetMailIcon( &aMessage ), msgId );
     iLiwIf->PublishMailDetailL( aWidgetInstance, aRow, aSenderName, ESender );
+    iLiwIf->PublishMailDetailL( aWidgetInstance, aRow, aSubject, ESubject );    
     iLiwIf->PublishMailDetailL( aWidgetInstance, aRow, aTime, ETime );
     }
 
@@ -644,16 +666,22 @@
 void CMailCpsHandler::UpdateEmptyMessagesL( const TInt aWidgetInstance,
                                             const TInt aRow )
     {
-    FUNC_LOG;   
-    
+    FUNC_LOG;
+
     TFSMailMsgId mailBoxId; // id not essential here
-    
+
     iLiwIf->PublishMailDetailL(
             aWidgetInstance,
             aRow,
             KNullDes,
             ESender);
 
+    iLiwIf->PublishMailDetailL(
+            aWidgetInstance,
+            aRow,
+            KNullDes,
+            ESubject);    
+    
     iLiwIf->PublishMailboxIconL(
             aWidgetInstance,
             aRow,
@@ -662,66 +690,42 @@
 
     iLiwIf->PublishMailDetailL(
             aWidgetInstance,
-            aRow, 
+            aRow,
             KNullDes,
             ETime);
     }
-/*
-// ---------------------------------------------------------
-// CMailCpsHandler::UpdateConnectStateL
-// ---------------------------------------------------------
-//
-void CMailCpsHandler::UpdateConnectStateL( const TInt aMailBoxNumber, const TInt aRowNumber )
-    {
-    FUNC_LOG;
-    if ( aMailBoxNumber < iAccountsArray.Count() )
-        {
-        TFSMailMsgId mailBoxId;
-        mailBoxId = iAccountsArray[aMailBoxNumber]->iMailboxId;                
-        CFSMailBox* mailbox( NULL );
-        mailbox = MailClient().GetMailBoxByUidL( mailBoxId );
-        if(mailbox)
-            {
-            iLiwIf->PublishConnectIconL(mailbox->GetMailBoxStatus(), aRowNumber);
-            }
-        }
-    else
-        {
-        iLiwIf->PublishConnectIconL( EFSMailBoxOffline, aRowNumber );
-        }
-    }
-*/
+
 // ---------------------------------------------------------
 // CMailCpsHandler::UpdateMailBoxIconL
 // ---------------------------------------------------------
 //
-void CMailCpsHandler::UpdateMailBoxIconL( const TInt aMailBoxNumber, 
+void CMailCpsHandler::UpdateMailBoxIconL( const TInt aMailBoxNumber,
                                           const TInt aWidgetInstance,
                                           const TInt aRowNumber )
     {
     FUNC_LOG;
-    
+
     TFSMailMsgId mailBoxId; // id required only for getting branded mailbox icon
-    
+
     if ( aMailBoxNumber < iAccountsArray.Count() )
         {
         mailBoxId = iAccountsArray[aMailBoxNumber]->iMailboxId;
-        iLiwIf->PublishMailboxIconL( aWidgetInstance, 
+        iLiwIf->PublishMailboxIconL( aWidgetInstance,
 		                             aRowNumber,
 									 EMbmCmailhandlerpluginQgn_indi_cmail_drop_email_account,
 									 mailBoxId);
         }
     else
-        {    
+        {
         iLiwIf->PublishMailboxIconL( aWidgetInstance, aRowNumber, KNullIcon, mailBoxId);
         }
     }
-    
+
 // ---------------------------------------------------------
 // CMailCpsHandler::UpdateIndicatorIconL
 // ---------------------------------------------------------
 //
-void CMailCpsHandler::UpdateIndicatorIconL( const TInt aMailBoxNumber, 
+void CMailCpsHandler::UpdateIndicatorIconL( const TInt aMailBoxNumber,
                                             const TInt aWidgetInstance,
                                             const TInt aRowNumber )
 
@@ -731,51 +735,35 @@
     if ( aMailBoxNumber < iAccountsArray.Count() )
         {
         TFSMailMsgId mailBoxId;
-        mailBoxId = iAccountsArray[aMailBoxNumber]->iMailboxId;    
-    
+        mailBoxId = iAccountsArray[aMailBoxNumber]->iMailboxId;
+
         if ( iSettings->GetNewMailState( mailBoxId ) )
             {
             iLiwIf->PublishIndicatorIconL( aWidgetInstance,
                                            aRowNumber,
                                            EMbmCmailhandlerpluginQgn_stat_message_mail_uni );
             }
-    
+
         else if( !IsOutboxEmptyL(mailBoxId) )
             {
             iLiwIf->PublishIndicatorIconL( aWidgetInstance,
-                                           aRowNumber,                
+                                           aRowNumber,
                                            EMbmCmailhandlerpluginQgn_indi_cmail_outbox_msg);
             }
         else
-            {    
+            {
             iLiwIf->PublishIndicatorIconL( aWidgetInstance,
                                            aRowNumber,
                                            KNullIcon);
             }
         }
     else
-        {    
+        {
         iLiwIf->PublishIndicatorIconL( aWidgetInstance,
                                        aRowNumber,
                                        KNullIcon);
-        }        
+        }
     }
-    
-/*
-// ---------------------------------------------------------
-// CMailCpsHandler::ClearMessageTimeL
-// ---------------------------------------------------------
-//
-void CMailCpsHandler::ClearMessageTimeL( const TInt aRowNumber )
-    {
-    FUNC_LOG;
-
-    iLiwIf->PublishMailDetailL(
-            aRowNumber, 
-            KNullDes,
-            ETime);
-    }
-*/
 
 // ---------------------------------------------------------
 // CMailCpsHandler::CapabilitiesToContinueL
@@ -830,7 +818,7 @@
         {
         case TFSEventNewMailbox:
             {
-//            HandleNewMailboxEventL( aMailbox );
+            HandleNewMailboxEventL( aMailbox );
             break;
             }
         case TFSEventMailboxRenamed:
@@ -845,12 +833,6 @@
             UpdateFullL();
             break;
             }
-        case TFSEventMailboxSettingsChanged:
-            {
-//            HandleMailboxDeletedEventL( aMailbox );
-//            HandleNewMailboxEventL( aMailbox );
-            break;
-            }            
         case TFSEventNewMail:
             {
             HandleNewMailEventL( aMailbox, aParam1, aParam2 );
@@ -863,20 +845,10 @@
             UpdateFullL();
             break;
             }
-        case TFSEventMailChanged:
-            {
-            HandleMailChangedEventL( aMailbox, aParam1, aParam2 );
-            break;
-            }
-        case TFSEventNewFolder:
-            {
-            HandleNewFolderEventL( aMailbox, aParam1, aParam2 );
-            break;
-            }
         default:
             {
             break;
-            }            
+            }
         }
     }
 
@@ -887,40 +859,10 @@
 void CMailCpsHandler::HandleNewMailboxEventL( const TFSMailMsgId aMailbox )
     {
     FUNC_LOG;
-
-    // Check that max mailbox count is not already reached
-    const TInt iiMax( iAccountsArray.Count() );
-    if( iiMax >= iSettings->MaxMailboxCount() )
+    if (iWaitingForNewMailbox)
         {
-        return;
-        }
-
-    // Check that mailbox is not already in widget
-    for ( TInt ii = 0; ii < iiMax; ii++ )
-        {
-        if( iAccountsArray[ii]->iMailboxId.Id() == aMailbox.Id() )
-            {
-            return;
-            }
+        iSettings->AssociateWidgetToSetting( iWaitingForNewMailbox->Des(), aMailbox );
         }
-    
-    CFSMailBox* mailbox( NULL );
-    mailbox = MailClient().GetMailBoxByUidL( aMailbox );
-    if ( !mailbox )
-        {
-        return; // nothing that could be done
-        }
-    else
-        {
-        CleanupStack::PushL( mailbox );
-        CMailMailboxDetails* mailboxDetails = CreateMailboxDetailsL( *mailbox );
-        CleanupStack::PushL( mailboxDetails );
-        iAccountsArray.AppendL( mailboxDetails );
-        CleanupStack::Pop( mailboxDetails );
-        CleanupStack::PopAndDestroy( mailbox ); 
-        }
-    
-    iSettings->AddMailboxL( aMailbox );
     }
 
 // ---------------------------------------------------------
@@ -980,15 +922,15 @@
     TFSMailMsgId aMailbox, TAny* aParam1, TAny* aParam2 )
     {
     FUNC_LOG;
-    
+
     iSettings->ToggleWidgetNewMailIconL( ETrue, aMailbox );
-    
+
     // Basic assertions
     if ( !aParam1 || !aParam2 )
         {
         User::Leave( KErrArgument );
         }
-    
+
     // Find mailbox instance from array
     CMailMailboxDetails* mailbox = FindMailboxDetails( aMailbox );
     if ( !mailbox )
@@ -1030,7 +972,7 @@
         {
         msgId = (*newEntries)[ii];
 
-        msg = MailClient().GetMessageByUidL( 
+        msg = MailClient().GetMessageByUidL(
             aMailbox, *parentFolder, (*newEntries)[ii], EFSMsgDataEnvelope );
         if ( !msg )
             {
@@ -1053,7 +995,7 @@
             CleanupStack::PopAndDestroy( msg );
             continue;
             }
-        
+
         CMailMessageDetails* messageDetails = CMailMessageDetails::NewL(
             msg->GetMessageId(),
             mailbox,
@@ -1091,17 +1033,17 @@
         {
         User::Leave( KErrArgument );
         }
-    
+
     // Find correct mailbox
     CMailMailboxDetails* mailbox = FindMailboxDetails( aMailbox );
     if ( !mailbox )
         {
-        //<Cmail>  
+        //<Cmail>
         CleanupStack::PopAndDestroy( entries );
         //<Cmail>
         return;
         }
-    
+
     const TInt iiMax( entries->Count() );
     const TInt jjMax( mailbox->iMessageDetailsArray.Count() );
     // Loop through entries in the array
@@ -1129,26 +1071,6 @@
     }
 
 // ---------------------------------------------------------
-// CMailCpsHandler::HandleMailChangedEventL
-// ---------------------------------------------------------
-//
-void CMailCpsHandler::HandleMailChangedEventL(
-    TFSMailMsgId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/ )
-    {
-    FUNC_LOG;
-    }
-
-// ---------------------------------------------------------
-// CMailCpsHandler::HandleNewFolderEventL
-// ---------------------------------------------------------
-//
-void CMailCpsHandler::HandleNewFolderEventL(
-    TFSMailMsgId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/ )
-    {
-    FUNC_LOG;
-    }
-    
-// ---------------------------------------------------------
 // CMailCpsHandler::GetUnreadCountL
 // ---------------------------------------------------------
 //
@@ -1159,7 +1081,7 @@
     TInt unread (0);
     mailbox = MailClient().GetMailBoxByUidL( aMailbox );
     if(mailbox)
-        { 
+        {
         TFSMailMsgId folderId( mailbox->GetStandardFolderId( EFSInbox ) );
         // Check that folder is correct
         CFSMailFolder* folder = MailClient().GetFolderByUidL( aMailbox, folderId );
@@ -1168,11 +1090,11 @@
             return KErrNotFound;
             }
         CleanupStack::PushL( folder );
-    
+
         unread = folder->GetUnreadCount();
 
         CleanupStack::PopAndDestroy( folder );
-    
+
         if (unread > KMaxUnreadCount)
             {
             unread = KMaxUnreadCount;
@@ -1193,7 +1115,7 @@
     TInt unseen (0);
     mailbox = MailClient().GetMailBoxByUidL( aMailbox );
     if(mailbox)
-        { 
+        {
         TFSMailMsgId folderId( mailbox->GetStandardFolderId( EFSInbox ) );
         // Check that folder is correct
         CFSMailFolder* folder = MailClient().GetFolderByUidL( aMailbox, folderId );
@@ -1202,11 +1124,11 @@
             return KErrNotFound;
             }
         CleanupStack::PushL( folder );
-    
+
         unseen = folder->GetUnseenCount();
 
         CleanupStack::PopAndDestroy( folder );
-    
+
         if (unseen > KMaxUnreadCount)
             {
             unseen = KMaxUnreadCount;
@@ -1228,7 +1150,7 @@
     TInt msgCount(0);
     mailbox = MailClient().GetMailBoxByUidL( aMailbox );
     if(mailbox)
-        { 
+        {
         TFSMailMsgId folderId( mailbox->GetStandardFolderId( EFSOutbox ) );
         // Check that folder is correct
         CFSMailFolder* folder = MailClient().GetFolderByUidL( aMailbox, folderId );
@@ -1237,7 +1159,7 @@
             return KErrNotFound;
             }
         CleanupStack::PushL( folder );
-    
+
         msgCount = folder->GetMessageCount();
 
         if ( msgCount<1 )
@@ -1245,37 +1167,40 @@
             CleanupStack::PopAndDestroy( folder );
             return ret;
             }
-        
+
         TFSMailDetails details( EFSMsgDataEnvelope );
         RArray<TFSMailSortCriteria> sorting;
         CleanupClosePushL( sorting );
         TFSMailSortCriteria sortCriteria;
         sortCriteria.iField = EFSMailDontCare;
         sortCriteria.iOrder = EFSMailDescending;
-        sorting.Append( sortCriteria );       
+        sorting.Append( sortCriteria );
         // List all or maximum number of messages
         MFSMailIterator* iterator = folder->ListMessagesL( details, sorting );
-        CleanupStack::PopAndDestroy( &sorting );        
+        CleanupStack::PopAndDestroy( &sorting );
         CleanupDeletePushL( iterator );
-        
+
         RPointerArray<CFSMailMessage> messages;
         CleanupClosePushL( messages );
-        TInt amount( msgCount );
-        iterator->NextL( TFSMailMsgId(), amount, messages );
-        
-        for (TInt i = 0; i < msgCount; i++)
+        iterator->NextL( TFSMailMsgId(), msgCount, messages );
+
+        TInt arrayCount(messages.Count());
+        for (TInt i = 0; i < arrayCount; i++)
             {
-            TFSMailMsgId msgId = messages[0]->GetMessageId();
+            TFSMailMsgId msgId = messages[i]->GetMessageId();
             CFSMailMessage* msg( NULL );
             msg = MailClient().GetMessageByUidL( aMailbox, folderId, msgId, EFSMsgDataEnvelope );
-            CleanupDeletePushL( msg );
-            TFSMailMsgId mailboxId = msg->GetMailBoxId();
-            CleanupStack::PopAndDestroy( msg );
-            
-            if (mailboxId == aMailbox)
+			if (msg)
                 {
-                ret = EFalse;
-                break;
+                CleanupDeletePushL( msg );
+                TFSMailMsgId mailboxId = msg->GetMailBoxId();
+                CleanupStack::PopAndDestroy( msg );
+
+                if (mailboxId == aMailbox)
+                    {
+                    ret = EFalse;
+                    break;
+                    }
                 }
             }
 
@@ -1330,14 +1255,14 @@
 // -----------------------------------------------------------------------------
 TInt CMailCpsHandler::GetUnreadMsgIcon( CFSMailMessage* aMsg )
     {
-    FUNC_LOG;    
+    FUNC_LOG;
     TInt icon(EMbmCmailhandlerpluginQgn_indi_cmail_unread);
 
     // Unread calendar invitation
     if ( aMsg->IsFlagSet( EFSMsgFlag_CalendarMsg ))
         {
         icon = GetUnreadCalMsgIcon( aMsg );
-        }   
+        }
     else    // Normal message icons
         {
         // Check whether msg has attachment or not
@@ -1371,10 +1296,10 @@
                 else
                     {
                     icon = EMbmCmailhandlerpluginQgn_indi_cmail_unread_attach_low_prio;
-                    }  
+                    }
                 }
             else // Normal priority, has attachments
-                {       
+                {
                 if ( aMsg->IsFlagSet( EFSMsgFlag_Answered ) )
                     {
                     icon = EMbmCmailhandlerpluginQgn_indi_cmail_unread_replied_attach;
@@ -1389,7 +1314,7 @@
                     }
                 }
             }
-    
+
         else // No attachments
             {
             if ( aMsg->IsFlagSet( EFSMsgFlag_Important )) // High priority, no attachments
@@ -1405,7 +1330,7 @@
                 else
                     {
                     icon = EMbmCmailhandlerpluginQgn_indi_cmail_unread_high_prio;
-                    }                                                                                                                                           
+                    }
                 }
             else if ( aMsg->IsFlagSet( EFSMsgFlag_Low ) ) // Low priority, no attachments
                 {
@@ -1420,10 +1345,10 @@
                 else
                     {
                     icon = EMbmCmailhandlerpluginQgn_indi_cmail_unread_low_prio;
-                    }  
+                    }
                 }
             else // Normal priority, no attachments
-                {       
+                {
                 if ( aMsg->IsFlagSet( EFSMsgFlag_Answered ) )
                     {
                     icon = EMbmCmailhandlerpluginQgn_indi_cmail_unread_replied;
@@ -1433,7 +1358,7 @@
                     icon = EMbmCmailhandlerpluginQgn_indi_cmail_unread_forwarded;
                     }
                 }
-            }               
+            }
         }
     return icon;
     }
@@ -1443,7 +1368,7 @@
 // -----------------------------------------------------------------------------
 TInt CMailCpsHandler::GetReadMsgIcon( CFSMailMessage* aMsg )
     {
-    FUNC_LOG;    
+    FUNC_LOG;
     TInt icon(EMbmCmailhandlerpluginQgn_indi_cmail_read);
 
     if ( aMsg->IsFlagSet( EFSMsgFlag_CalendarMsg ))
@@ -1468,7 +1393,7 @@
                 else
                     {
                     icon = EMbmCmailhandlerpluginQgn_indi_cmail_read_attach_high_prio;
-                    }                                                                                                                                           
+                    }
                 }
             else if ( aMsg->IsFlagSet( EFSMsgFlag_Low ) ) // Low priority, has attachments
                 {
@@ -1483,10 +1408,10 @@
                 else
                     {
                     icon = EMbmCmailhandlerpluginQgn_indi_cmail_read_attach_low_prio;
-                    }  
+                    }
                 }
             else // Normal priority, has attachments
-                {       
+                {
                 if ( aMsg->IsFlagSet( EFSMsgFlag_Answered ) )
                     {
                     icon = EMbmCmailhandlerpluginQgn_indi_cmail_read_replied_attach;
@@ -1498,8 +1423,8 @@
                 else
                     {
                     icon = EMbmCmailhandlerpluginQgn_indi_cmail_read_attach;
-                    }                                                                                       
-                }           
+                    }
+                }
             }
         else // No attachments
             {
@@ -1516,7 +1441,7 @@
                 else
                     {
                     icon = EMbmCmailhandlerpluginQgn_indi_cmail_read_high_prio;
-                    }                                                                                                                                           
+                    }
                 }
             else if ( aMsg->IsFlagSet( EFSMsgFlag_Low ) ) // Low priority, no attachments
                 {
@@ -1531,10 +1456,10 @@
                 else
                     {
                     icon = EMbmCmailhandlerpluginQgn_indi_cmail_read_low_prio;
-                    }  
+                    }
                 }
             else // Normal priority, no attachments
-                {       
+                {
                 if ( aMsg->IsFlagSet( EFSMsgFlag_Answered ) )
                     {
                     icon = EMbmCmailhandlerpluginQgn_indi_cmail_read_replied;
@@ -1554,42 +1479,42 @@
 // -----------------------------------------------------------------------------
 TInt CMailCpsHandler::GetUnreadCalMsgIcon( CFSMailMessage* aMsg )
     {
-    FUNC_LOG;    
+    FUNC_LOG;
     TInt icon(0);
 
     if ( aMsg->IsFlagSet( EFSMsgFlag_Important ) )
         {
         if ( aMsg->IsFlagSet( EFSMsgFlag_Attachments ) )
             {
-            icon = EMbmCmailhandlerpluginQgn_indi_cmail_calendar_event_unread_attachments_high_prio ;                                               
+            icon = EMbmCmailhandlerpluginQgn_indi_cmail_calendar_event_unread_attachments_high_prio ;
             }
-        else 
+        else
             {
-            icon = EMbmCmailhandlerpluginQgn_indi_cmail_calendar_event_unread_high_prio;                                
-            }           
+            icon = EMbmCmailhandlerpluginQgn_indi_cmail_calendar_event_unread_high_prio;
+            }
         }
     else if ( aMsg->IsFlagSet( EFSMsgFlag_Low ) )
         {
         if ( aMsg->IsFlagSet( EFSMsgFlag_Attachments ) )
             {
-            icon = EMbmCmailhandlerpluginQgn_indi_cmail_calendar_event_unread_attachments_low_prio;                                             
+            icon = EMbmCmailhandlerpluginQgn_indi_cmail_calendar_event_unread_attachments_low_prio;
             }
         else
             {
-            icon = EMbmCmailhandlerpluginQgn_indi_cmail_calendar_event_unread_low_prio;                             
-            }                           
+            icon = EMbmCmailhandlerpluginQgn_indi_cmail_calendar_event_unread_low_prio;
+            }
         }
     else
         {
         if ( aMsg->IsFlagSet( EFSMsgFlag_Attachments ) )
             {
-            icon = EMbmCmailhandlerpluginQgn_indi_cmail_calendar_event_unread_attachments;                                              
+            icon = EMbmCmailhandlerpluginQgn_indi_cmail_calendar_event_unread_attachments;
             }
         else
             {
-            icon = EMbmCmailhandlerpluginQgn_indi_cmail_calendar_event_unread;                              
-            }                       
-        }       
+            icon = EMbmCmailhandlerpluginQgn_indi_cmail_calendar_event_unread;
+            }
+        }
 
     return icon;
     }
@@ -1599,42 +1524,42 @@
 // -----------------------------------------------------------------------------
 TInt CMailCpsHandler::GetReadCalMsgIcon( CFSMailMessage* aMsg )
     {
-    FUNC_LOG;    
+    FUNC_LOG;
     TInt icon(0);
 
     if ( aMsg->IsFlagSet( EFSMsgFlag_Important ) )
         {
         if ( aMsg->IsFlagSet( EFSMsgFlag_Attachments ) )
             {
-            icon = EMbmCmailhandlerpluginQgn_indi_cmail_calendar_event_read_attachments_high_prio ;                                             
+            icon = EMbmCmailhandlerpluginQgn_indi_cmail_calendar_event_read_attachments_high_prio ;
             }
-        else 
+        else
             {
-            icon = EMbmCmailhandlerpluginQgn_indi_cmail_calendar_event_read_high_prio;                              
-            }           
+            icon = EMbmCmailhandlerpluginQgn_indi_cmail_calendar_event_read_high_prio;
+            }
         }
     else if ( aMsg->IsFlagSet( EFSMsgFlag_Low ) )
         {
         if ( aMsg->IsFlagSet( EFSMsgFlag_Attachments ) )
             {
-            icon = EMbmCmailhandlerpluginQgn_indi_cmail_calendar_event_read_attachments_low_prio;                                               
+            icon = EMbmCmailhandlerpluginQgn_indi_cmail_calendar_event_read_attachments_low_prio;
             }
         else
             {
-            icon = EMbmCmailhandlerpluginQgn_indi_cmail_calendar_event_read_low_prio;                               
-            }                           
+            icon = EMbmCmailhandlerpluginQgn_indi_cmail_calendar_event_read_low_prio;
+            }
         }
     else
         {
         if ( aMsg->IsFlagSet( EFSMsgFlag_Attachments ) )
             {
-            icon = EMbmCmailhandlerpluginQgn_indi_cmail_calendar_event_read_attachments;                                                
+            icon = EMbmCmailhandlerpluginQgn_indi_cmail_calendar_event_read_attachments;
             }
         else
             {
-            icon = EMbmCmailhandlerpluginQgn_indi_cmail_calendar_event_read;                                
-            }                       
-        }       
+            icon = EMbmCmailhandlerpluginQgn_indi_cmail_calendar_event_read;
+            }
+        }
 
     return icon;
     }
@@ -1660,7 +1585,7 @@
         {
         return EFalse;
         }
-    
+
     return ETrue;
     }
 
@@ -1688,7 +1613,7 @@
 //
 void CMailCpsHandler::LaunchWidgetSettingsL( const TDesC& aContentId )
     {
-    FUNC_LOG;    
+    FUNC_LOG;
 
     RApaLsSession appArcSession;
     CleanupClosePushL( appArcSession );
@@ -1713,11 +1638,12 @@
     commandLine->SetCommandL( EApaCommandRun );
     commandLine->SetProcessEnvironmentL(process);
     CleanupStack::PopAndDestroy(commandLine);
-    
+
     process.Resume();
-    process.Close();    
-    
-    CleanupStack::PopAndDestroy(&appArcSession);        
+    process.Close();
+
+    CleanupStack::PopAndDestroy(&appArcSession);
+    SetWaitingForNewMailbox( aContentId );
     }
 
 // -----------------------------------------------------------------------------
@@ -1734,7 +1660,7 @@
         {
         TUid mailBoxUid;
         mailBoxUid.iUid = nativeMailboxId;
-        
+
         TFSMailMsgId mailBoxId;
         mailBoxId.SetId(mailBoxUid.iUid);
         TUid pluginUid;
@@ -1745,14 +1671,14 @@
         if ( mailBox )
             {
             TFSMailMsgId inboxFolderId = mailBox->GetStandardFolderId( EFSInbox );
-    
+
             TMailListActivationData tmp;
             tmp.iFolderId = inboxFolderId;
             tmp.iMailBoxId = mailBoxId;
             const TPckgBuf<TMailListActivationData> pkgOut( tmp );
-            iEnv->EikAppUi()->ActivateViewL( TVwsViewId(KUidEmailUi, KMailListId),
-                                             KStartListWithFolderId,
-                                             pkgOut);
+            iEnv->EikAppUi()->ActivateViewL(
+                TVwsViewId(KUidEmailUi, KMailListId),
+                KStartListWithFolderIdFromHomeScreen, pkgOut);
             }
         CleanupStack::PopAndDestroy( mailBox );
         }
@@ -1763,16 +1689,17 @@
     }
 
 // -----------------------------------------------------------------------------
-//  CMailCpsHandler::LaunchEmailUIL()
+//  CMailCpsHandler::LaunchEmailWizardL()
 // -----------------------------------------------------------------------------
 //
-void CMailCpsHandler::LaunchEmailWizardL()
+void CMailCpsHandler::LaunchEmailWizardL( const TDesC& aContentId )
     {
     FUNC_LOG;
     TUid viewUid(KNullUid);
-    iEnv->EikAppUi()->ActivateViewL( TVwsViewId(KUidWizardApp, KUidEmailWizardView), 
-                                     viewUid, 
+    iEnv->EikAppUi()->ActivateViewL( TVwsViewId(KUidWizardApp, KUidEmailWizardView),
+                                     viewUid,
                                      KNullDesC8);
+    SetWaitingForNewMailbox( aContentId );
     }
 
 // -----------------------------------------------------------------------------
@@ -1807,32 +1734,6 @@
     return plugin;
     }
 
-// -----------------------------------------------------------------------------
-//  CMailCpsHandler::UpdateExtAccountL
-// -----------------------------------------------------------------------------
-//
-void CMailCpsHandler::UpdateExtAccountL( const TDesC& aContentId )
-    {
-    FUNC_LOG;
-    // Look up plugin that handles this account
-    CMailPluginProxy* plugin = GetExtPluginL( aContentId );
-    if ( plugin )
-        {
-        // Publish its data
-        plugin->UpdateAccountL( aContentId );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CMailCpsHandler::AssociateWidget
-// ---------------------------------------------------------------------------
-//
-TBool CMailCpsHandler::AssociateWidgetToSetting( const TDesC& aContentId )
-    {
-    FUNC_LOG;
-    return iSettings->AssociateWidgetToSetting( aContentId );
-    }
-
 // ---------------------------------------------------------------------------
 // CMailCpsHandler::DissociateWidget
 // ---------------------------------------------------------------------------
@@ -1840,13 +1741,7 @@
 void CMailCpsHandler::DissociateWidgetFromSettingL( const TDesC& aContentId )
     {
     FUNC_LOG;
-    //Do not dissociate if device is shutting down
-    TInt status( 0 );
-    RProperty::Get( KPSUidStartup, KPSGlobalSystemState, status );
-    if (status != ESwStateShuttingDown)
-        {
-        iSettings->DissociateWidgetFromSettingL( aContentId );
-        }
+    iSettings->DissociateWidgetFromSettingL( aContentId );
     }
 
 // ---------------------------------------------------------------------------
@@ -1886,78 +1781,50 @@
         {
         TUid implUid = plugins[i]->ImplementationUid();
         INFO_1("Instantiating plugin %d", implUid.iUid);
-        EmailInterface::CEmailObserverPlugin* plugin = 
+        EmailInterface::CEmailObserverPlugin* plugin =
             EmailInterface::CEmailObserverPlugin::NewL( implUid, this );
         MEmailData& data( plugin->EmailDataL() );
         totalMailboxCount += data.MailboxesL().Count();
         }
-    
+
     CleanupStack::PopAndDestroy(); // plugins
     return totalMailboxCount;
     }
 
 // ---------------------------------------------------------------------------
-// CMailCpsHandler::ManualAccountSelectionL
-// ---------------------------------------------------------------------------
-//
-void CMailCpsHandler::ManualAccountSelectionL( const TDesC& aContentId )
-    {
-    FUNC_LOG;
-
-    if ( FirstBootL() )
-        {
-        if (!iSettings->FindFromContentIdListL(aContentId))
-            {
-            iSettings->AddToContentIdListL(aContentId);
-            }
-        }
-    else
-        {
-        if (!iSettings->FindFromContentIdListL(aContentId))
-            {
-            iSettings->AddToContentIdListL(aContentId);
-            if ( TotalMailboxCountL() )
-                {
-                LaunchWidgetSettingsL(aContentId);
-                }
-            else
-                {
-                LaunchEmailWizardL();
-                }
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// CMailCpsHandler::FirstBootL
-// ---------------------------------------------------------------------------
-TBool CMailCpsHandler::FirstBootL()
-    {
-    FUNC_LOG;
-    TInt value( 0 );
-    TBool ret(EFalse);
-
-    CRepository* repository(NULL);
-
-    TRAPD( err, repository = CRepository::NewL( KCRUidStartup ) );
-    if ( err == KErrNone )
-        {
-        err = repository->Get( KStartupFirstBoot, value );
-        }
-    delete repository;
-    
-    if (!value)
-        {
-        ret = ETrue;
-        }
-
-    return ret;
-    }
-
-// ---------------------------------------------------------------------------
 // CMailCpsHandler::EmailObserverEvent
 // ---------------------------------------------------------------------------
 void CMailCpsHandler::EmailObserverEvent( EmailInterface::MEmailData& /*aData*/ )
     {
+    FUNC_LOG;
     // Nothing to do
     }
+
+// -----------------------------------------------------------------------------
+//  CMailCpsHandler::SetWaitingForNewMailbox()
+// -----------------------------------------------------------------------------
+//
+void CMailCpsHandler::SetWaitingForNewMailbox( const TDesC& aContentId )
+    {
+    FUNC_LOG;
+    HBufC* newCid = aContentId.Alloc();
+    if ( newCid )
+        {
+        delete iWaitingForNewMailbox;
+        iWaitingForNewMailbox = newCid;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+//  CMailCpsHandler::CleanWaitingForNewMailbox()
+// -----------------------------------------------------------------------------
+//
+void CMailCpsHandler::CleanWaitingForNewMailbox()
+    {
+    FUNC_LOG;
+	if (iWaitingForNewMailbox)
+        {
+        delete iWaitingForNewMailbox;
+        iWaitingForNewMailbox = NULL;
+        }
+    }
--- a/emailservices/emailserver/cmailhandlerplugin/src/cmailcpsif.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailserver/cmailhandlerplugin/src/cmailcpsif.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -67,7 +67,6 @@
     for (TInt i=0; i<KMaxMailboxCount; i++)
         {
         iAllowedToPublish[i] = EFalse;
-        iInactive[i] = EFalse;
         }
     
     AllocateResourcesL();
@@ -187,15 +186,52 @@
             KPubId, KContTypeSetupText,
             iInstIdList[instance]->Des(),
             *setupEmail, 
-            KKeySetupText, KTriggerWizard8, NULL, mailBoxId, folderId);	
-    
+            KKeySetupText, KTriggerWizard8);	
+
     PublishImageL(
             iInstIdList[instance]->Des(),
             KContTypeSetupIcon,
             KKeySetupIcon,
             EMbmCmailhandlerpluginQgn_prop_cmail_new_mailbox,
             EMbmCmailhandlerpluginQgn_prop_cmail_new_mailbox_mask,
-            mailBoxId);
+            mailBoxId,
+            KNullDes);
+            
+    PublishImageL(
+            iInstIdList[instance]->Des(),
+            KContTypeSetupBrandIcon1,
+            KKeySetupBrandIcon1,
+            EMbmCmailhandlerpluginQgn_indi_cmail_drop_email_account,
+            EMbmCmailhandlerpluginQgn_indi_cmail_drop_email_account_mask,
+            mailBoxId,
+            KSetupBrand1);
+
+    PublishImageL(
+            iInstIdList[instance]->Des(),
+            KContTypeSetupBrandIcon2,
+            KKeySetupBrandIcon2,
+            EMbmCmailhandlerpluginQgn_indi_cmail_drop_email_account,
+            EMbmCmailhandlerpluginQgn_indi_cmail_drop_email_account_mask,
+            mailBoxId,
+            KSetupBrand2);
+
+    PublishImageL(
+            iInstIdList[instance]->Des(),
+            KContTypeSetupBrandIcon3,
+            KKeySetupBrandIcon3,
+            EMbmCmailhandlerpluginQgn_indi_cmail_drop_email_account,
+            EMbmCmailhandlerpluginQgn_indi_cmail_drop_email_account_mask,
+            mailBoxId,
+            KSetupBrand3);
+
+    PublishImageL(
+            iInstIdList[instance]->Des(),
+            KContTypeSetupBrandIcon4,
+            KKeySetupBrandIcon4,
+            EMbmCmailhandlerpluginQgn_indi_cmail_drop_email_account,
+            EMbmCmailhandlerpluginQgn_indi_cmail_drop_email_account_mask,
+            mailBoxId,
+            KSetupBrand4);            
 
     CleanupStack::PopAndDestroy(setupEmail);    
     }
@@ -207,10 +243,7 @@
 void CMailCpsIf::PublishActiveMailboxNameL(
     const TInt aInstance,
     const TInt aRowNumber, 
-    const TDesC& aMailboxName,
-    const TInt aMailBoxCount,
-    TFSMailMsgId aMailBoxId,
-    TFSMailMsgId aFolderId)
+    const TDesC& aMailboxName)
     {
     FUNC_LOG;
 
@@ -229,8 +262,7 @@
         KPubId, contentType, 
         iInstIdList[aInstance]->Des(),
         aMailboxName,
-        textKey, KTriggerEmailUi8, aMailBoxCount,
-        aMailBoxId, aFolderId);		
+        textKey, KTriggerEmailUi8);
     }
 
 // ---------------------------------------------------------------------------
@@ -255,7 +287,7 @@
     TFSMailMsgId dummy;
     
     PublishDescriptorL( KPubId, contentType, iInstIdList[aInstance]->Des(),
-        aMailboxName, textKey, aAction, 0, dummy, dummy );
+        aMailboxName, textKey, aAction);
     }
 
 // ---------------------------------------------------------------------------
@@ -289,7 +321,8 @@
               key,
               aIcon,
               aIcon + 1,
-              mailBoxId);
+              mailBoxId,
+              KNullDes);
     }
 
 // ---------------------------------------------------------------------------
@@ -323,7 +356,8 @@
               key,
               aIcon,
               aIcon + 1,
-              aMailBoxId);    
+              aMailBoxId,
+              KNullDes);
     }
 
 // ---------------------------------------------------------------------------
@@ -410,7 +444,11 @@
         {    
         contentType.Copy(KContTypeTime);
         }
-    else
+    else if (aDetail == ESubject)
+        {
+        contentType.Copy(KContTypeSubjectText);
+        }        
+    else //aDetail == ESender
         {
         contentType.Copy(KContTypeBodyText);
         }
@@ -421,6 +459,10 @@
         {
         textKey.Copy(KKeyTime);
         }
+    else if (aDetail == ESubject)
+        {
+        textKey.Copy(KKeySubjectText);
+        }     
     else
         {
         textKey.Copy(KKeyBodyText);
@@ -434,8 +476,7 @@
         KPubId, contentType, 
         iInstIdList[aInstance]->Des(),
         aText,
-        textKey, KNullDes8, NULL,
-        mailBoxId, folderId);  
+        textKey, KNullDes8);  
     }
 
 // ---------------------------------------------------------------------------
@@ -478,10 +519,7 @@
     const TDesC& aContentId, 
     const TDesC& aTextToAdd,
     const TDesC& aKey,
-    const TDesC8& aTrigger,
-    const TInt /*aMailBoxCount*/,
-    TFSMailMsgId /*aMailBoxId*/,
-    TFSMailMsgId /*aFolderId*/ )
+    const TDesC8& aTrigger)
     {
     FUNC_LOG;
 
@@ -545,7 +583,8 @@
         const TDesC8& aKey,
         TInt aBitmapId,
         TInt aBitmapMaskId,
-        TFSMailMsgId aMailBoxId )
+        TFSMailMsgId aMailBoxId,
+        const TDesC& aBrandId )
     {
     FUNC_LOG;
 
@@ -558,9 +597,19 @@
         TBuf<KMaxDescLen> brandedIconIds(KNullDesC);
         
         MFSMailBrandManager& brandManager = iMailCpsHandler->MailClient().GetBrandManagerL();
-        TRAPD( err, error = brandManager.GetGraphicIdsL( EFSMailboxIcon,  aMailBoxId, brandedIconIds ) );        
+        TInt err2(KErrNone);
+        if (aBrandId.Length() > 0)
+            {
+            TRAPD( err, error = brandManager.GetGraphicIdsL( EFSMailboxIcon,  aBrandId, brandedIconIds ) );
+            err2 = err;
+            }
+        else
+            {
+            TRAPD( err, error = brandManager.GetGraphicIdsL( EFSMailboxIcon,  aMailBoxId, brandedIconIds ) );
+            err2 = err;
+            }
 
-        if ( err == KErrNone && error == KErrNone )
+        if ( err2 == KErrNone && error == KErrNone )
             {            
             iconIds.Copy(KMifPrefix);
             iconIds.Append(brandedIconIds);
@@ -677,11 +726,10 @@
 
     // Create the action map for publisher registry
     CLiwDefaultMap* mapAction = CLiwDefaultMap::NewLC();
-    mapAction->InsertL(KActive, TLiwVariant( KData ));
-    mapAction->InsertL(KDeActive, TLiwVariant( KData ));
+    mapAction->InsertL(KPluginStartup, TLiwVariant( KData ));
+    mapAction->InsertL(KPluginShutdown, TLiwVariant( KData ));
     mapAction->InsertL(KSuspend, TLiwVariant( KData ));
     mapAction->InsertL(KResume, TLiwVariant( KData ));
-    mapAction->InsertL(KInactive, TLiwVariant( KData ));    
 
     publishermap->InsertL( KActionMap, TLiwVariant(mapAction));
     CleanupStack::PopAndDestroy(mapAction);
@@ -798,7 +846,7 @@
 
         TInt mapslistcount (changeMapsList->Count());
 
-        for (TInt i = 0; i < changeMapsList->Count(); ++i)
+        for (TInt i = 0; i < mapslistcount; ++i)
             {
              if ( changeMapsList->AtL(i, variant) ) 
                  {
@@ -817,16 +865,7 @@
                              {
                              variant.Get(trigger );
                              }
-                         if (trigger.Compare(KInactive16) == 0)
-                             {
-                             // Homescreen page is about to change.
-                             // Ignore next deactivate event of this particular widget instance.
-                             HBufC* cid = contentid.AllocLC();
-                             TInt widgetInstance = FindWidgetInstanceId(cid->Des());
-                             iInactive[widgetInstance] = ETrue;
-                             CleanupStack::PopAndDestroy( cid );                             
-                             }                         
-                         else if (trigger.Compare(KSuspend16) == 0)
+                         if (trigger.Compare(KSuspend16) == 0)
                              {
                              // Publishing to homescreen suspended.
                              HBufC* cid = contentid.AllocLC();
@@ -844,43 +883,36 @@
                              TInt widgetInstance = FindWidgetInstanceId(cid->Des());
                              PublishSetupWizardL(widgetInstance);
                              iMailCpsHandler->UpdateMailboxesL(widgetInstance, cid->Des());
-                             iMailCpsHandler->UpdateExtAccountL( cid->Des() );
                              // Widget visible on the homescreen. Publishing allowed.
                              iAllowedToPublish[widgetInstance] = ETrue;
-                             iInactive[widgetInstance] = EFalse;
                              CleanupStack::PopAndDestroy( cid );
                              }
-                         else if (trigger.Compare(KActive16) == 0)
+                         else if (trigger.Compare(KPluginStartup16) == 0)
                              {
-                             // Widget added to homescreen (or already on the screen when boot completes).
+                             // Widget added to homescreen
                              HBufC* cid = contentid.AllocLC();
-                             TInt widgetInstance = FindWidgetInstanceId(cid->Des());
-                             if (iInactive[widgetInstance])
+                             iInstIdList.AppendL( contentid.AllocL() );
+                             if ( iMailCpsHandler->TotalMailboxCountL() )
                                  {
-                                 iInactive[widgetInstance] = EFalse;
+                                 iMailCpsHandler->LaunchWidgetSettingsL(cid->Des());
                                  }
                              else
                                  {
-                                 iInstIdList.AppendL( contentid.AllocL() );
-                                 iMailCpsHandler->ManualAccountSelectionL(cid->Des());                                 
+                                 iMailCpsHandler->LaunchEmailWizardL(cid->Des());
                                  }
                              CleanupStack::PopAndDestroy( cid );
                              }
-                         else if (trigger.Compare(KDeActive16) == 0)
+                         else if (trigger.Compare(KPluginShutdown16) == 0)
                              {                            
                              // Widget removed from homescreen.
-                             HBufC* cid = contentid.AllocLC();
-                             ResetPublishedDataL( cid->Des() );
-                             TInt widgetInstance = FindWidgetInstanceId(cid->Des());
+                             HBufC* cid = contentid.AllocLC();                             
+                             ResetPublishedDataL( cid->Des() );							 
+                             iMailCpsHandler->DissociateWidgetFromSettingL( cid->Des() );
+                             TInt widgetInstance = FindWidgetInstanceId( cid->Des() );
                              if (widgetInstance != KErrNotFound )
-                            	 {
-								 if (!iInactive[widgetInstance])
-									 {
-									 iMailCpsHandler->DissociateWidgetFromSettingL( cid->Des() );                                 
-									 iInstIdList.Remove(widgetInstance);                                 
-									 }
-								 iAllowedToPublish[widgetInstance] = EFalse;
-                            	 }
+                                 {
+                                 iInstIdList.Remove(widgetInstance);
+                                 }
                              CleanupStack::PopAndDestroy( cid );
                              }
                          else if (trigger.Compare(KTriggerEmailUi) == 0)
@@ -893,17 +925,17 @@
                                  ( trigger.Compare(KSettings16) == 0))
                              {
                              // If no accounts are created launch email wizard
-                             // otherwice launch widget settings app                             
+                             // otherwice launch widget settings app
+                             HBufC* cid = contentid.AllocLC();
                              if ( iMailCpsHandler->TotalMailboxCountL() )
                                  {
-                                 HBufC* cid = contentid.AllocLC();
                                  iMailCpsHandler->LaunchWidgetSettingsL(cid->Des());
-                                 CleanupStack::PopAndDestroy( cid );                                 
                                  }
                              else
                                  {
-                                 iMailCpsHandler->LaunchEmailWizardL();
+                                 iMailCpsHandler->LaunchEmailWizardL(cid->Des());
                                  }
+                             CleanupStack::PopAndDestroy( cid );
                              }
                          }
                      }
--- a/emailservices/emailserver/cmailhandlerplugin/src/cmailcpssettings.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailserver/cmailhandlerplugin/src/cmailcpssettings.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -443,18 +443,20 @@
 // CMailCpsSettings::AssociateWidgetToSetting
 // ---------------------------------------------------------------------------
 //
-TBool CMailCpsSettings::AssociateWidgetToSetting( const TDesC& aContentId )
+void CMailCpsSettings::AssociateWidgetToSetting( const TDesC& aContentId,
+                                                 const TFSMailMsgId aMailbox )
     {
     FUNC_LOG;
-    TBool alreadyAssociated(ETrue);
-    
-    if (!IsAlreadyAssociated(aContentId))
+    TInt setId (GetSettingToAssociate(aContentId));
+    if (setId>=0)
         {
-        TUint32 key (GetSettingToAssociate());
-        iCenRep->Set( key, aContentId );
-        alreadyAssociated = EFalse;
+        TInt id = aMailbox.Id();
+        TUid pluginId = aMailbox.PluginId();
+        TInt pId(pluginId.iUid);
+        iCenRep->Set( KCMailMailboxIdBase+setId, id );
+        iCenRep->Set( KCMailPluginIdBase+setId, pId );
+        iCenRep->Set( KCMailWidgetContentIdBase+setId, aContentId );        
         }
-    return alreadyAssociated;
     }
 
 // ---------------------------------------------------------------------------
@@ -467,8 +469,6 @@
     TUint32 key(0);
     TUint32 mailboxKey(0);
 
-    RemoveFromContentIdListL( aContentId );
-
     for (TInt i = 0; i < KMaxMailboxCount; i++)
         {
         TBuf<KMaxDescLen> value;
@@ -487,6 +487,45 @@
     }
 
 // ---------------------------------------------------------------------------
+// CMailCpsSettings::GetSettingToAssociate
+// ---------------------------------------------------------------------------
+//
+TInt CMailCpsSettings::GetSettingToAssociate( const TDesC& aContentId )
+    {
+    FUNC_LOG;    
+    TInt ret(KErrNotFound);
+    
+    for (TInt i = 0; i < KMaxMailboxCount; i++)
+        {
+        TBuf<KMaxDescLen> value;
+        TUint32 key(KCMailWidgetContentIdBase+i);
+        iCenRep->Get( key, value );
+        TInt result = value.Compare(aContentId);
+        if (!result)
+            {
+            ret = i;
+            break;
+            }
+        }
+    if (ret < 0 )
+        {
+        for (TInt i = 0; i < KMaxMailboxCount; i++)
+            {       
+            TBuf<KMaxDescLen> value;
+            TUint32 key(KCMailWidgetContentIdBase+i);
+            iCenRep->Get( key, value );
+            TInt result = value.Compare(KDissociated);
+            if (!result)
+                {
+                ret = i;
+                break;
+                }
+            }
+        }
+    return ret;
+    }
+
+// ---------------------------------------------------------------------------
 // CMailCpsSettings::GetContentId
 // ---------------------------------------------------------------------------
 //
@@ -582,52 +621,6 @@
     }
 
 // ---------------------------------------------------------------------------
-// CMailCpsSettings::IsAlreadyAssociated
-// ---------------------------------------------------------------------------
-//
-TBool CMailCpsSettings::IsAlreadyAssociated( const TDesC& aContentId )
-    {
-    FUNC_LOG;
-    TBool ret(EFalse);
-    for (TInt i = 0; i < KMaxMailboxCount; i++)
-        {       
-        TBuf<KMaxDescLen> value;
-        TUint32 key(KCMailWidgetContentIdBase+i);
-        iCenRep->Get( key, value );
-        TInt result = value.Compare(aContentId);
-        if (!result)
-            {
-            ret = ETrue;
-            break;
-            }
-        }
-    return ret;
-    }
-
-// ---------------------------------------------------------------------------
-// CMailCpsSettings::GetSettingToAssociate
-// ---------------------------------------------------------------------------
-//
-TUint32 CMailCpsSettings::GetSettingToAssociate()
-    {
-    FUNC_LOG;
-    TUint32 ret(KErrNone);
-    for (TInt i = 0; i < KMaxMailboxCount; i++)
-        {       
-        TBuf<KMaxDescLen> value;
-        TUint32 key(KCMailWidgetContentIdBase+i);
-        iCenRep->Get( key, value );
-        TInt result = value.Compare(KDissociated);
-        if (!result)
-            {
-            ret = KCMailWidgetContentIdBase + i;
-            break;
-            }
-        }
-    return ret;
-    }
-
-// ---------------------------------------------------------------------------
 // CMailCpsSettings::Configuration
 // ---------------------------------------------------------------------------
 //
@@ -650,77 +643,6 @@
     return ret;
     }
 
-// ---------------------------------------------------------------------------
-// CMailCpsSettings::FindFromContentIdListL
-// ---------------------------------------------------------------------------
-//
-TBool CMailCpsSettings::FindFromContentIdListL( const TDesC& aContentId )
-    {
-    FUNC_LOG;
-    TBool ret(EFalse);
-
-    TBuf<KMaxDescLen> cid;    
-    cid.Copy(KStartSeparator);    
-    cid.Append(aContentId);
-    cid.Append(KEndSeparator);
-    
-    TBuf<KMaxDescLen> value;
-    TUint32 key(KCMailContentIdList);
-    iCenRep->Get( key, value );
-    
-    TInt result = value.Find(cid);
-    
-    if (result >= 0)
-        {
-        ret = ETrue;        
-        }
-
-    return ret;
-    }
-
-// ---------------------------------------------------------------------------
-// CMailCpsSettings::AddToContentIdListL
-// ---------------------------------------------------------------------------
-//
-void CMailCpsSettings::AddToContentIdListL( const TDesC& aContentId )
-    {
-    FUNC_LOG;
-    TBuf<KMaxDescLen> value;
-
-    TUint32 key(KCMailContentIdList);
-    iCenRep->Get( key, value );
-
-    value.Append(KStartSeparator);
-    value.Append(aContentId);
-    value.Append(KEndSeparator);  
-    
-    iCenRep->Set( key, value );    
-    }
-
-// ---------------------------------------------------------------------------
-// CMailCpsSettings::RemoveFromContentIdListL
-// ---------------------------------------------------------------------------
-//
-void CMailCpsSettings::RemoveFromContentIdListL( const TDesC& aContentId )
-    {
-    FUNC_LOG;
-    TBuf<KMaxDescLen> cid;
-    cid.Copy(KStartSeparator);    
-    cid.Append(aContentId);
-    cid.Append(KEndSeparator);
-    
-    TBuf<KMaxDescLen> value;
-    TUint32 key(KCMailContentIdList);
-    iCenRep->Get( key, value );
-    
-    TInt result = value.Find(cid);
-    if (result >= 0)
-        {
-        value.Delete(result, cid.Length());
-        iCenRep->Set( key, value );        
-        }
-    }
-
 // -----------------------------------------------------------------------------
 // CMailCpsSettings::ToggleWidgetNewMailIconL
 // -----------------------------------------------------------------------------
--- a/emailservices/emailserver/cmailhandlerplugin/src/cmailpluginproxy.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailserver/cmailhandlerplugin/src/cmailpluginproxy.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -113,7 +113,6 @@
     FUNC_LOG;
     while ( iAccounts.Count() )
         {
-        ResetAccountL( iAccounts[0]->ContentId() );
         delete iAccounts[0];
         iAccounts.Remove(0);
         }
@@ -131,7 +130,7 @@
         {
         TFSMailMsgId dummy;
         iPublisher.PublishMailboxIconL( instId, KNullDesC );
-        iPublisher.PublishActiveMailboxNameL( instId, 1, KNullDesC, 0, dummy, dummy );
+        iPublisher.PublishActiveMailboxNameL( instId, 1, KNullDesC);
         iPublisher.PublishIndicatorIconL( instId, 1, KNullIcon );
 
         ResetMessageRowL( instId, 2 ); // 1st message row
@@ -238,6 +237,7 @@
             TFSMailMsgId dummy;
             iPublisher.PublishMailboxIconL( aWidgetInstanceId, i+2, KNullIcon, dummy );
             iPublisher.PublishMailDetailL( aWidgetInstanceId, i+2, KNullDesC, ESender );
+            iPublisher.PublishMailDetailL( aWidgetInstanceId, i+2, KNullDesC, ESubject );            
             iPublisher.PublishMailDetailL( aWidgetInstanceId, i+2, KNullDesC, ETime );
             }
         }
@@ -261,6 +261,7 @@
     
     iPublisher.PublishMailboxIconL( aWidgetInstanceId, aRow, iconId, dummy );
     iPublisher.PublishMailDetailL( aWidgetInstanceId, aRow, aMessageData.Sender(), ESender );
+    iPublisher.PublishMailDetailL( aWidgetInstanceId, aRow, aMessageData.Subject(), ESubject );
     HBufC* timeString = CMailCpsHandler::GetMessageTimeStringL( aMessageData.TimeStamp() );
     CleanupStack::PushL( timeString );
     iPublisher.PublishMailDetailL( aWidgetInstanceId, aRow, *timeString, ETime );
--- a/emailservices/emailserver/cmailhandlerplugin/src/fsnotificationhandlerbaseimpl.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailserver/cmailhandlerplugin/src/fsnotificationhandlerbaseimpl.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -15,7 +15,7 @@
 *
 */
 
-
+#include <centralrepository.h>
 //<cmail>
 #include "emailtrace.h"
 #include "cfsmailclient.h"
@@ -24,6 +24,9 @@
 #include "fsnotificationhandlermgr.h"
 #include "fsnotificationhandlerbase.h"
 #include "cmailhandlerpluginpanic.h"
+#include "commonemailcrkeys.h"
+#include "FreestyleEmailCenRepKeys.h"
+#include "FreestyleEmailuiConstants.h"
 
 
 // ======== MEMBER FUNCTIONS ========
@@ -236,7 +239,9 @@
                      *parentFolder,
                      *newEntries ) )
                 {
-                TurnNotificationOn();
+                // it doesn't matter if the mailindicator won't get updated
+                // its better have it not updated compared to a leave
+                TRAP_IGNORE(MailIndicatorHandlingL(aMailbox));                
                 }
             }
          else
@@ -254,7 +259,74 @@
         }
     }
 
-
+void CFSNotificationHandlerBase::MailIndicatorHandlingL(TFSMailMsgId aMailbox)
+    {
+    /** 
+     * There is always a pair of keys for one mailbox
+     * 1st keys is the plugin id (numberOfMailboxes*2-1)
+     * 2nd is the mailboxId (numberOfMailboxes*2)
+     */
+    TInt numberOfMailboxes(0);
+    CRepository* emailRepository = CRepository::NewL( KFreestyleEmailCenRep );
+    CleanupStack::PushL(emailRepository);
+    emailRepository->Get(KNumberOfMailboxesWithNewEmails, numberOfMailboxes);
+    CRepository* commonEmailRepository = CRepository::NewL( KCmailDataRepository );
+    CleanupStack::PushL(commonEmailRepository);
+    if(numberOfMailboxes != 0)
+        {
+        RArray<TInt> repositoryIds;
+        CleanupClosePushL(repositoryIds);
+        TInt tmp(0);
+        for(TInt i = 1 ; i <= numberOfMailboxes * 2; i++ )
+            {                        
+            emailRepository->Get(KNumberOfMailboxesWithNewEmails+i, tmp);
+            repositoryIds.Append(tmp);
+            }                    
+        TInt index = repositoryIds.Find(static_cast<TInt>(aMailbox.Id()));
+        // If it is we delete it from the array
+        if(index != KErrNotFound )
+            {
+            //unless it is the last item, then we don't have to do anything
+            if(index != (repositoryIds.Count()-1))
+                {
+                repositoryIds.Remove(index);
+                repositoryIds.Remove(index-1);               
+                // Rearrange the mailbox/mailplugin ids
+                // in the repository
+                for(TInt j = 0; j < repositoryIds.Count(); j++)
+                    {
+                    emailRepository->Set(KNumberOfMailboxesWithNewEmails + 1 + j, repositoryIds.operator [](j));
+                    }       
+                // And write the current mailbox/plugin ids back to repository as the last items
+                emailRepository->Set(KNumberOfMailboxesWithNewEmails + ( numberOfMailboxes * 2 - 1 ), static_cast<TInt>(aMailbox.PluginId().iUid));
+                emailRepository->Set(KNumberOfMailboxesWithNewEmails + ( numberOfMailboxes * 2 ),static_cast<TInt>(aMailbox.Id()) );
+                commonEmailRepository->Set(KCmailNewEmailDisplayText,MailClient().GetMailBoxByUidL(aMailbox)->GetName());
+                }
+            }
+        else
+            {
+            //Create keys with right values and update the number of mailboxes
+            numberOfMailboxes += 1;
+            emailRepository->Set(KNumberOfMailboxesWithNewEmails, numberOfMailboxes);
+            emailRepository->Create(KNumberOfMailboxesWithNewEmails + (numberOfMailboxes * 2 - 1), static_cast<TInt>(aMailbox.PluginId().iUid));
+            emailRepository->Create(KNumberOfMailboxesWithNewEmails + (numberOfMailboxes * 2), static_cast<TInt>(aMailbox.Id()));  
+            commonEmailRepository->Set(KCmailNewEmailDisplayText,MailClient().GetMailBoxByUidL(aMailbox)->GetName());
+            }
+        repositoryIds.Reset();
+        CleanupStack::PopAndDestroy();//repositoryIds
+        }
+    else
+        {
+        //Create keys with right values and pudate the number of mailboxes
+        numberOfMailboxes += 1;
+        emailRepository->Set(KNumberOfMailboxesWithNewEmails, numberOfMailboxes);
+        emailRepository->Create(KNumberOfMailboxesWithNewEmails + (numberOfMailboxes * 2 - 1), static_cast<TInt>(aMailbox.PluginId().iUid));
+        emailRepository->Create(KNumberOfMailboxesWithNewEmails + (numberOfMailboxes * 2), static_cast<TInt>(aMailbox.Id()));
+        commonEmailRepository->Set(KCmailNewEmailDisplayText,MailClient().GetMailBoxByUidL(aMailbox)->GetName());
+        }
+    CleanupStack::PopAndDestroy(2);// emailRepository, CommonEmailRepository    
+    TurnNotificationOn();
+    }
 
 CFSMailMessage* CFSNotificationHandlerBase::NewestMsgInFolderL(
     /*const*/ CFSMailFolder& aFolder ) const
--- a/emailservices/emailserver/inc/FsEmailGlobalDialogsAppUi.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailserver/inc/FsEmailGlobalDialogsAppUi.h	Fri Mar 12 15:41:14 2010 +0200
@@ -39,6 +39,8 @@
     void BringToForeground();
 
 public:    // From base class CAknAppUi
+    void HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination );
+    void HandleForegroundEventL(TBool aForeground);
     void Exit();
 
 private:
@@ -60,6 +62,10 @@
      * Own.
      */
     CEmailServerShutdownObserver* iShutdownObserver;
+    
+    TBool iForeground;
+    
+    TBool iForegroundNotTopmost;
     };
 
 
--- a/emailservices/emailserver/inc/fsnotificationhandlerbase.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailserver/inc/fsnotificationhandlerbase.h	Fri Mar 12 15:41:14 2010 +0200
@@ -216,7 +216,13 @@
      */      
     CFSMailMessage* NewestMsgInFolderL(
         /*const*/ CFSMailFolder& aFolder ) const;
-
+    
+    
+    /*
+     * function that handles the mailindicator
+     */
+    void MailIndicatorHandlingL(TFSMailMsgId aMailbox);
+    
 private:
 
     /**
--- a/emailservices/emailserver/src/FsEmailGlobalDialogsAppUi.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailserver/src/FsEmailGlobalDialogsAppUi.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -1,10 +1,10 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 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"
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+* at the URL "http://www.eclipse.org/legal/epl-v10.html". 
 *
 * Initial Contributors:
 * Nokia Corporation - initial contribution.
@@ -27,17 +27,20 @@
 // displayable content. We need to keep FSMailServer always on top, because it
 // is hided from task list so it's not possible switch FSMailServer back to
 // foreground if user switches to Idle before dismissing the note.
-const TCoeWinPriority KFsEmailDialogsWinPriorityActive = ECoeWinPriorityAlwaysAtFront;
+// '- 1' is needed for the VKB to work correctly
+const TInt KFsEmailDialogsWinPriorityActive = ECoeWinPriorityAlwaysAtFront - 1;
 
 // To be used as FSMailServer window group priority when there is no displayable
 // content.
-const TCoeWinPriority KFsEmailDialogsWinPriorityInactive = ECoeWinPriorityNeverAtFront;
+const TInt KFsEmailDialogsWinPriorityInactive = ECoeWinPriorityNeverAtFront;
 
 const TInt KPosBringToFront = 0;
 const TInt KPosSendToBack = -1;
 
 const TUid KFSMailServerUidAsTUid = { KFSMailServerUid };
 
+const TInt KDefaultArrayGranularity = 5;
+
 
 // ---------------------------------------------------------------------------
 // Constructor
@@ -62,11 +65,72 @@
     }
 
 // ---------------------------------------------------------------------------
+// Overriden CAknAppUi::HandleWsEventL
+// ---------------------------------------------------------------------------
+//
+void CFsEmailGlobalDialogsAppUi::HandleWsEventL( const TWsEvent& aEvent,
+                                                 CCoeControl* aDestination )
+    {
+    FUNC_LOG;
+    // Updates the foreground flag
+    CAknAppUi::HandleWsEventL( aEvent, aDestination );
+    
+    RWindowGroup& rwin = iEikonEnv->RootWin();
+    
+    TBool isActive =
+        ( rwin.OrdinalPriority() == KFsEmailDialogsWinPriorityActive );
+    
+    if ( aEvent.Type() == EEventWindowGroupListChanged && isActive )
+        {
+        RWsSession& ws = iEikonEnv->WsSession();
+        
+        CArrayFixFlat<TInt>* wgList =
+            new (ELeave) CArrayFixFlat<TInt>( KDefaultArrayGranularity );
+
+        TInt err = ws.WindowGroupList(
+            KFsEmailDialogsWinPriorityActive, wgList );
+        
+        if ( err == KErrNone )
+            {
+            TBool topmost = ( wgList->Count() > 0 ) &&
+                            ( wgList->At( 0 ) == rwin.Identifier() );
+            
+            if ( iForeground && topmost && iForegroundNotTopmost )
+                {
+                // This hack ensures the screen is refreshed when going back
+                // from the VKB window
+                SendToBackground();
+                BringToForeground();
+                }
+            
+            // Update this flag all the time when we are active
+            // The flag is true when VKB window is shown for the password
+            // query.
+            iForegroundNotTopmost = ( iForeground && !topmost );
+            }
+        
+        delete wgList;
+        wgList = NULL;
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// Overriden CAknAppUi::Exit
+// ---------------------------------------------------------------------------
+//
+void CFsEmailGlobalDialogsAppUi::HandleForegroundEventL( TBool aForeground )
+    {
+    FUNC_LOG;
+    iForeground = aForeground;
+    }
+
+// ---------------------------------------------------------------------------
 // Overriden CAknAppUi::Exit
 // ---------------------------------------------------------------------------
 //
 void CFsEmailGlobalDialogsAppUi::Exit()
     {
+    FUNC_LOG;
     // Cancel shutdown observer as we are already shutting down
     if( iShutdownObserver )
         {
@@ -130,8 +194,7 @@
 void CFsEmailGlobalDialogsAppUi::BringToForeground()
     {
     FUNC_LOG;
-    // Enable keyboard focus when showing some content
-    iEikonEnv->RootWin().EnableReceiptOfFocus( ETrue );
+
     
     // Bring own application to foreground
     TApaTaskList taskList( iEikonEnv->WsSession() );
@@ -146,6 +209,11 @@
     iEikonEnv->RootWin().SetOrdinalPosition( 
         KPosBringToFront,
         KFsEmailDialogsWinPriorityActive );
+
+    iEikonEnv->RootWin().EnableGroupListChangeEvents();
+	
+    // Enable keyboard focus when showing some content
+    iEikonEnv->RootWin().EnableReceiptOfFocus( ETrue );	
     }
 
 // ---------------------------------------------------------------------------
@@ -155,6 +223,7 @@
 void CFsEmailGlobalDialogsAppUi::SendToBackground()
     {
     FUNC_LOG;
+    
     // Send own application to background
     TApaTaskList taskList( iEikonEnv->WsSession() );
     TApaTask task = taskList.FindApp( KFSMailServerUidAsTUid );
@@ -170,6 +239,8 @@
     
     // Disable keyboard focus when not showing any content
     iEikonEnv->RootWin().EnableReceiptOfFocus( EFalse );
+    
+    iEikonEnv->RootWin().DisableGroupListChangeEvents();
     }
 
 #ifdef _DEBUG
--- a/emailservices/emailservermonitor/inc/emailservermonitor.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailservermonitor/inc/emailservermonitor.h	Fri Mar 12 15:41:14 2010 +0200
@@ -27,13 +27,17 @@
 
 #include "emailservermonitorconst.h"
 
+/////////////////////////////////////////////////////////////////////////////
+//  FORWARD DECLARATIONS
+class CEmailShutter;
+
 /**
 *  Class CEmailServerMonitor implements functionality that starts up
 *  EmailServer and monitors it. If EmailServer crashes, then
 *  CEmailServerMonitor restarts it. CEmailServerMonitor also starts up needed
 *  email related 3rd party services after IAD update.
 */
-NONSHARABLE_CLASS( CEmailServerMonitor ) : public CActive
+NONSHARABLE_CLASS( CEmailServerMonitor ) : public CActive, public MEmailServerMonitorTimerCallback
     {
     
 public: // Public construcor and destructor
@@ -58,6 +62,21 @@
      * Start email server monitoring.
      */
     void Start();
+    
+    /**
+     * Set pointer to Shutter object
+     */
+    void SetShutter( CEmailShutter* aShutter );
+    
+    /**
+     * If Restart External Services flag is set to true, then external
+     * services will be restarted after Email Server is up and running
+     */
+    void SetRestartExternalServicesFlag( TBool aRestartFlag = ETrue );
+    
+public: // From base class MEmailServerMonitorTimerCallback
+    
+    void TimerEventL( CEmailServerMonitorTimer* aTriggeredTimer );
 
 private: // Private constructors
     /**
@@ -123,6 +142,14 @@
         EEsmStateRestarting
         };
 
+    enum TExternalServiceRestartState
+        {
+        EEsmEsrStateRestartNotNeeded,
+        EEsmEsrStateRestartNeeded,
+        EEsmEsrStateRestartInitiated,
+        EEsmEsrStateFirstServiceRestarted,
+        };
+    
 private: // Member variables
 
     // A session with the application architecture server
@@ -144,6 +171,23 @@
     // server has been running succesfully long enough
     TTime iLastRestartTime;
 
+    /**
+     * Pointer to Shutter
+     * Not owned
+     */
+    CEmailShutter* iShutter;
+
+    /**
+     * Should we restart external services after Email Server is up and running
+     */
+    TExternalServiceRestartState iExternalServicesRestartState;
+    
+    /**
+     * Generic timer used to make delayed restart of the external services
+     * Owned
+     */
+    CEmailServerMonitorTimer* iExternalServiceRestartTimer;
+
     };
 
 
--- a/emailservices/emailservermonitor/inc/emailservermonitor.hrh	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailservermonitor/inc/emailservermonitor.hrh	Fri Mar 12 15:41:14 2010 +0200
@@ -37,5 +37,9 @@
  */
 #define KAlwaysOnlineEmailPluginUidAsTInt 0x200100BA
 
+/** General Settings application UID
+ */
+#define KGeneralSettingsAppUidAsTInt 0x100058EC
+
 
 #endif // EMAILSERVERMONITOR_HRH
--- a/emailservices/emailservermonitor/inc/emailservermonitorutilities.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailservermonitor/inc/emailservermonitorutilities.h	Fri Mar 12 15:41:14 2010 +0200
@@ -23,6 +23,9 @@
 #include <e32base.h>
 #include <e32cmn.h>     // TSecureId
 
+// Forward declarations
+class CEmailServerMonitorTimer;
+
 const TInt KDefaultTimeToWaitInSeconds = 3;
 
 /////////////////////////////////////////////////////////////////////////////
@@ -52,4 +55,93 @@
 TBool IsProcessRunning( TSecureId aUid, RProcess* aProcess = NULL );
 
 
+/**
+*  Generic timer's callback
+*
+*  Classes inherited from this one can be used as a callback for the generic
+*  timer. TimerEvent() is called when the timer elapses.
+*
+*/
+class MEmailServerMonitorTimerCallback
+    {
+public:
+    /**
+     * @param   aTriggeredTimer The timer which launched this event.
+     */
+    virtual void TimerEventL( CEmailServerMonitorTimer* aTriggeredTimer ) = 0;
+    };
+
+/**
+*  Generic timer
+*
+*  Caller gives MEmailServerMonitorTimerCallback inherited pointer as a
+*  parameter, and that pointer is used as a callback when the timer elapses.
+*  Timer interval is given as a parameter for the Start function.
+*
+*/
+class CEmailServerMonitorTimer : public CTimer
+    {
+public:
+    
+    /**
+    * Symbian two-pahse constructor.
+    *
+    * @param aCallback Callback class
+    * @param aPriority Timers priority, EPriorityStandard by default
+    */
+    static CEmailServerMonitorTimer* NewL(
+        MEmailServerMonitorTimerCallback* aCallback,
+        const TInt aPriority = CActive::EPriorityStandard );
+
+    /**
+    * Symbian two-pahse constructor.
+    *
+    * @param aCallback Callback class
+    * @param aPriority Timers priority, EPriorityStandard by default
+    */
+    static CEmailServerMonitorTimer* NewLC(
+        MEmailServerMonitorTimerCallback* aCallback,
+        const TInt aPriority = CActive::EPriorityStandard );
+        
+    /**
+    * Destructor.
+    */
+    ~CEmailServerMonitorTimer();
+        
+    /**
+    * Starts the timer with specified interval, or with the default value.
+    *
+    * @param aInterval Timer interval as microseconds
+    */
+    void Start( TInt aInterval );
+
+    /**
+    * Stops the timer.
+    */
+    void Stop();
+
+    /**
+    * CActive object's RunL
+    */
+    void RunL();
+        
+protected:
+    /**
+    * Constructor.
+    */
+    CEmailServerMonitorTimer( MEmailServerMonitorTimerCallback* aCallback,
+                              const TInt aPriority );
+        
+private:
+    /**
+    * 2nd phase constructor.
+    */
+    void ConstructL();
+
+private:
+    /* Pointer to callback class */
+    MEmailServerMonitorTimerCallback* iCallback;
+    };
+
+
 #endif // EMAILSERVERMONITORUTILITIES_H
--- a/emailservices/emailservermonitor/inc/emailshutter.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailservermonitor/inc/emailshutter.h	Fri Mar 12 15:41:14 2010 +0200
@@ -258,7 +258,7 @@
      * Not owned
      */
     CEmailServerMonitor* iMonitor;
-
+    
     };
 
 
--- a/emailservices/emailservermonitor/sis/makeEmailServerMonitorSisx.bat	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailservermonitor/sis/makeEmailServerMonitorSisx.bat	Fri Mar 12 15:41:14 2010 +0200
@@ -12,8 +12,7 @@
 REM * 
 REM * Contributors:
 REM * 
-REM * Description:
-REM * Script that creates and signs commonemail sisx packages
+REM * Description: Script that creates and signs commonemail sisx packages
 REM * 
 
 @echo #################################################
--- a/emailservices/emailservermonitor/src/emailservermonitor.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailservermonitor/src/emailservermonitor.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -30,9 +30,12 @@
 #include "emailservermonitorutilities.h"
 #include "emailservermonitor.h"
 #include "emailservermonitorconst.h"
+#include "emailshutter.h"
 
 const TUint KOneSecondInMicroSeconds = 1000000;
 
+const TInt KExternalServiceRestartDelay = 5 * KOneSecondInMicroSeconds;
+const TInt KInstallatioFinishedFlagSettingDelay = 2 * KOneSecondInMicroSeconds;
 
 // ======== MEMBER FUNCTION DEFINITIONS ========
 
@@ -68,6 +71,11 @@
     iApaLsSession.Close();
     iProcess.Close();
     iDelayTimer.Close();
+    if( iExternalServiceRestartTimer )
+        {
+        delete iExternalServiceRestartTimer;
+        iExternalServiceRestartTimer = NULL;
+        }
     }
     
 /**
@@ -75,7 +83,11 @@
  * Only NewL can be called
  */
 CEmailServerMonitor::CEmailServerMonitor()
-    : CActive( EPriorityStandard ), iState( EEsmStateIdle ), iRestarts( 0 )
+    : CActive( EPriorityStandard ),
+      iState( EEsmStateIdle ),
+      iRestarts( 0 ),
+      iShutter( NULL ),
+      iExternalServicesRestartState( EEsmEsrStateRestartNotNeeded )
     {
     FUNC_LOG;
     }
@@ -100,12 +112,70 @@
     FUNC_LOG;
     iLastRestartTime.UniversalTime();
     
-    // Set initializing state and complete self
-    // -> functionality will continue in RunL
+    // Initiate delayed restart and set correct state
+    InitiateDelayedRestart();
     iState = EEsmStateInitializing;
-    TRequestStatus* status = &iStatus;
-    SetActive();
-    User::RequestComplete( status, KErrNone );
+    }
+
+/**
+ * Set pointer to shutter.
+ */
+void CEmailServerMonitor::SetShutter( CEmailShutter* aShutter )
+    {
+    iShutter = aShutter;
+    }
+
+/**
+ * Set Restart External Services flag.
+ */
+void CEmailServerMonitor::SetRestartExternalServicesFlag( TBool aRestartFlag /*= ETrue*/ )
+    {
+    if( aRestartFlag )
+        {
+        iExternalServicesRestartState = EEsmEsrStateRestartNeeded;
+        }
+    else
+        {
+        iExternalServicesRestartState = EEsmEsrStateRestartNotNeeded;
+        }
+    }
+
+/**
+ * Called when external service restart timer has expired, so it's time to do
+ * some starting
+ */
+void CEmailServerMonitor::TimerEventL( CEmailServerMonitorTimer* /*aTriggeredTimer*/ )
+    {
+    // Shutter is used in all cases, so verify it exists at the beginning
+    if( iShutter )
+        {
+        switch( iExternalServicesRestartState )
+            {
+            case EEsmEsrStateRestartInitiated:
+                {
+                // Restart external services and change state
+                iShutter->RestartServicesAfterInstallation();
+                iExternalServicesRestartState = EEsmEsrStateFirstServiceRestarted;
+                
+                // Restart the timer to set the installation finished flag
+                // with some more delay
+                iExternalServiceRestartTimer->Start( KInstallatioFinishedFlagSettingDelay );
+                }
+                break;
+                
+            case EEsmEsrStateFirstServiceRestarted:
+                {
+                // Set the installation finished flag and clear state variable
+                iShutter->SetPsKeyInstallationFinished();
+                iExternalServicesRestartState = EEsmEsrStateRestartNotNeeded;
+                }
+                break;
+                
+            default:
+                // Do nothing, shouldn't happen
+                break;
+            }
+        }
     }
 
 /**
@@ -208,6 +278,10 @@
     iState = EEsmStateIdle;
     iProcess.LogonCancel( iStatus );
     iDelayTimer.Cancel();
+    if( iExternalServiceRestartTimer )
+        {
+        iExternalServiceRestartTimer->Cancel();
+        }
     }
 
 /**
@@ -241,6 +315,24 @@
                 INFO( "Initiating new delayed restart" );
                 InitiateDelayedRestart();
                 }
+            // If Email server is up and running and iExternalServicesRestartState
+            // flag is set, initiate delayed restart of external services
+            else if( iExternalServicesRestartState == EEsmEsrStateRestartNeeded )
+                {
+                // Once restart is initiated, update the state
+                iExternalServicesRestartState = EEsmEsrStateRestartInitiated;
+
+                // Create the timer and start it
+                TInt timerError = KErrNone;
+                if( !iExternalServiceRestartTimer )
+                    {
+                    TRAP( timerError, iExternalServiceRestartTimer = CEmailServerMonitorTimer::NewL( this ) );
+                    }
+                if( timerError == KErrNone )
+                    {
+                    iExternalServiceRestartTimer->Start( KExternalServiceRestartDelay );
+                    }
+                }
             }
             break;
             
--- a/emailservices/emailservermonitor/src/emailservermonitorutilities.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailservermonitor/src/emailservermonitorutilities.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -105,3 +105,113 @@
     
     return EFalse;
     }
+
+
+/////////////////////////////////////////////////////////////////////////////////
+// GENERIC TIMER
+//
+
+// -----------------------------------------------------------------------------
+// CEmailServerMonitorTimer::NewL
+// NewL function. Returns timer object.
+// -----------------------------------------------------------------------------
+//
+CEmailServerMonitorTimer* CEmailServerMonitorTimer::NewL(
+    MEmailServerMonitorTimerCallback* aCallback,
+    const TInt aPriority )
+    {
+    FUNC_LOG;
+    CEmailServerMonitorTimer* self = NewLC( aCallback, aPriority );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CEmailServerMonitorTimer::NewL
+// NewL function. Returns timer object.
+// -----------------------------------------------------------------------------
+//
+CEmailServerMonitorTimer* CEmailServerMonitorTimer::NewLC(
+    MEmailServerMonitorTimerCallback* aCallback,
+    const TInt aPriority )
+    {
+    FUNC_LOG;
+    CEmailServerMonitorTimer* self = new (ELeave) CEmailServerMonitorTimer( aCallback, aPriority );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CEmailServerMonitorTimer::NewL
+// NewL function. Returns timer object.
+// -----------------------------------------------------------------------------
+//
+void CEmailServerMonitorTimer::ConstructL()
+    {
+    FUNC_LOG;
+    CTimer::ConstructL();
+    CActiveScheduler::Add( this );
+    }
+
+// -----------------------------------------------------------------------------
+// CEmailServerMonitorTimer::~CEmailServerMonitorTimer
+// D'tor
+// -----------------------------------------------------------------------------
+//
+CEmailServerMonitorTimer::~CEmailServerMonitorTimer()
+    {
+    FUNC_LOG;
+    Cancel();
+    iCallback = NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CEmailServerMonitorTimer::CEmailServerMonitorTimer
+// C'tor
+// -----------------------------------------------------------------------------
+//
+CEmailServerMonitorTimer::CEmailServerMonitorTimer(
+    MEmailServerMonitorTimerCallback* aCallback,
+    const TInt aPriority )
+    : CTimer( aPriority ),
+    iCallback( aCallback )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CEmailServerMonitorTimer::RunL
+// Timer trigger function.
+// -----------------------------------------------------------------------------
+//
+void CEmailServerMonitorTimer::RunL()
+    {
+    FUNC_LOG;
+    if ( iCallback )
+        {
+        iCallback->TimerEventL( this );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CEmailServerMonitorTimer::Start
+// Timer starting function.
+// -----------------------------------------------------------------------------
+//
+void CEmailServerMonitorTimer::Start( TInt aInterval )
+    {
+    FUNC_LOG;
+    Cancel();
+    After( TTimeIntervalMicroSeconds32( aInterval ) );
+    }
+
+// -----------------------------------------------------------------------------
+// CEmailServerMonitorTimer::Stop
+// Timer stopping function
+// -----------------------------------------------------------------------------
+//
+void CEmailServerMonitorTimer::Stop()
+    {
+    FUNC_LOG;
+    Cancel();
+    }
--- a/emailservices/emailservermonitor/src/emailshutter.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailservermonitor/src/emailshutter.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -46,46 +46,47 @@
 // UI Applications to be closed
 const TUid KApplicationsToClose[] =
     {
-    KFSEmailUiUid,              // Freestyle Email UI
-    { SettingWizardUidAsTInt }, // TP Wizard
-    { KMceAppUid },             // MCE
-    { KPhoneBookUid },          // Phonebook 1 & 2
-    { KCalendarAppUid1 }        // Calendar
+    KFSEmailUiUid,                     // Freestyle Email UI
+    { SettingWizardUidAsTInt },        // TP Wizard
+    { KMceAppUid },                    // MCE
+    { KPhoneBookUid },                 // Phonebook 1 & 2
+    { KCalendarAppUid1 },              // Calendar
+    { KGeneralSettingsAppUidAsTInt },  // General settings
     };
 
 // Applications that should not be closed. Should include only system
 // applications that free the email resources by some other means.
 const TUid KApplicationsNotToBeClosed[] =
     {
-    { AI_SID_AIFW_EXE },        // HomeScreen
-    { AI_UID3_AIFW_COMMON },    // HomeScreen
+    { AI_SID_AIFW_EXE },               // HomeScreen
+    { AI_UID3_AIFW_COMMON },           // HomeScreen
     };
 
 // Non-UI clients that need to be closed
 const TUid KOtherClientsToClose[] =
     {
-    { KPcsServerProcessUidAsTInt }, // PCS server
-    { FSMailServerUidAsTInt },      // FSMailServer
+    { KPcsServerProcessUidAsTInt },    // PCS server
+    { FSMailServerUidAsTInt },         // FSMailServer
     };
 
 // Plugin processes that need to be closed
 const TUid KPluginProcessesToClose[] =
     {
     // MfE plugin
-    { 0x20012BEE },      // KUidEasStartup
-    { 0x20012BEC },      // KUidEasTarmAccess
-    { 0x20012BD4 },      // KEasLogSenderServer
-    { 0x20012BE6 },      // KUidEasServer
+    { 0x20012BEE },                    // KUidEasStartup
+    { 0x20012BEC },                    // KUidEasTarmAccess
+    { 0x20012BD4 },                    // KEasLogSenderServer
+    { 0x20012BE6 },                    // KUidEasServer
     // Oz plugin
-    { 0x2002136A },      // monitor
-    { 0x20021367 },      // server
+    { 0x2002136A },                    // monitor
+    { 0x20021367 },                    // server
     };
 
 // Message store processes that need to be closed
 const TUid KMsgStoreProcessesToClose[] =
     {
-    { KUidMessageStoreExe },        // MessageStoreExe.exe
-    { KUidEmailStorePreInstallExe } // MessageStorePreInstallExe
+    { KUidMessageStoreExe },           // MessageStoreExe.exe
+    { KUidEmailStorePreInstallExe }    // MessageStorePreInstallExe
     };
 
 const TInt KEmailUidExtraBuffer = 2 * KEmailPlatformApiUidItemSize;
--- a/emailservices/emailservermonitor/src/main.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailservermonitor/src/main.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -76,11 +76,6 @@
 
     // Start email shutter functionality
     CEmailShutter* shutter = CEmailShutter::NewLC();
-    if( mode == EEsmModeRestartAfterInstallation )
-        {
-        shutter->SetPsKeyInstallationFinished();
-        shutter->RestartServicesAfterInstallation();
-        }
     shutter->StartObservingShutdownEvent();
 
     CEmailServerMonitor* monitor = NULL;
@@ -88,6 +83,11 @@
         {
         // Start email server observing functionality
         monitor = CEmailServerMonitor::NewLC();
+        monitor->SetShutter( shutter );
+        if( mode == EEsmModeRestartAfterInstallation )
+            {
+            monitor->SetRestartExternalServicesFlag();
+            }
         monitor->Start();
         shutter->SetMonitor( monitor );
         }
--- a/emailservices/emailstore/message_store/MsgStoreRfsPlugin/inc/RfsMsgStorePlugin.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailstore/message_store/MsgStoreRfsPlugin/inc/RfsMsgStorePlugin.h	Fri Mar 12 15:41:14 2010 +0200
@@ -56,7 +56,6 @@
     * @return   None
     */
     void ExecuteCustomCommandL( const TRfsReason aType, TDesC& aCommand );
-    TInt GetDriveL( TDriveNumber& aDrive );
 
 private:
     CRfsMsgStorePlugin();
--- a/emailservices/emailstore/message_store/MsgStoreRfsPlugin/src/RfsMsgStorePlugin.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailstore/message_store/MsgStoreRfsPlugin/src/RfsMsgStorePlugin.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -55,8 +55,8 @@
     if ( aType == ENormalRfs || aType == EDeepRfs || aType == EInitRfs )
         {
         TUint driveStatus( 0 );
-				TDriveNumber drive( EDriveC );
-     		GetDriveL( drive );
+        TDriveNumber drive( EDriveC );
+        
         if ( DriveInfo::GetDriveStatus( iFs, drive, driveStatus ) == KErrNone )
             {
             _LIT( KPrivate, ":\\Private\\" );    
@@ -70,9 +70,7 @@
             msgStorePath.AppendNum( KUidMessageStoreExe, EHex );
             msgStorePath.Append( KPathDelimiter );
             CFileMan* fileManager = CFileMan::NewL( iFs );
-            // this will recursively delete all files in all directories under the msgStorePath
-            // but directories under the msgStorePath are not deleted
-            fileManager->Delete( msgStorePath, CFileMan::ERecurse );
+            fileManager->RmDir( msgStorePath );
             delete fileManager;
             }
         }
@@ -116,46 +114,5 @@
     User::LeaveIfError( iFs.Connect() );
     }
     
-// -----------------------------------------------------------------------------
-// CRfsMsgStorePlugin::GetDriveL(TDriveNumber&)
-// -----------------------------------------------------------------------------
-//
-TInt CRfsMsgStorePlugin::GetDriveL( TDriveNumber& aDrive )
-    {
-    _LIT16( KDriveToUseFile, "db_drive.cfg" );
-    TInt ret( KErrNotFound );
-    RFs fs;
-    if( fs.Connect() == KErrNone )
-        {
-        CleanupClosePushL( fs );               //+fs
-        TFileName fileName;
-        _LIT( KCDrive, "C:" );
-        _LIT( KPrivate, "Private" );   
-        fileName.Append(KCDrive());
-        fileName.Append( KPathDelimiter ); 
-        fileName.Append(KPrivate);
-        fileName.Append( KPathDelimiter );                 
-        fileName.AppendNum( KUidMessageStoreExe, EHex );
-        fileName.Append( KPathDelimiter );        
-        fileName.Append( KDriveToUseFile );
-        if( BaflUtils::FileExists( fs, fileName ) )
-            {
-            RFileReadStream reader;
-            if ( reader.Open( fs, fileName, EFileRead ) == KErrNone )
-          		{
-           		CleanupClosePushL( reader );             //+reader
-           		TUint drive = reader.ReadUint32L();
-              CleanupStack::PopAndDestroy( &reader );  //-reader
-              if(drive <=EDriveZ)
-	              {
-	           		aDrive = static_cast<TDriveNumber>( drive );
-           			ret = KErrNone;
-           			}
-           		}
-            }
-        CleanupStack::PopAndDestroy( &fs );    //-fs
-        } // end if
-    return ret;
-    }
 
 // END FILE RfsMsgStorePlugin.cpp
--- a/emailservices/emailstore/message_store/debuglog/group/bld.inf	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailstore/message_store/debuglog/group/bld.inf	Fri Mar 12 15:41:14 2010 +0200
@@ -24,7 +24,7 @@
 ../inc/debuglogmacros.h            |../../../../../inc/debuglogmacros.h
 ../inc/debuglogconst.h             |../../../../../inc/debuglogconst.h
 ../inc/debuglog.h                  |../../../../../inc/debuglog.h
-../inc/GlobalDebugLoggingOptions.h |../../../../../inc/GlobalDebugLoggingOptions.h
+../inc/globaldebugloggingoptions.h |../../../../../inc/globaldebugloggingoptions.h
 
 PRJ_MMPFILES
 DebugLog.mmp
--- a/emailservices/emailstore/message_store/debuglog/inc/DebugLogConst.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailstore/message_store/debuglog/inc/DebugLogConst.h	Fri Mar 12 15:41:14 2010 +0200
@@ -162,7 +162,7 @@
 	#endif // __DEBUG_LOGGING_OPTIONS
 
 	// Finally, allow the logging options to be overriden at the global level.
-	#include "GlobalDebugLoggingOptions.h"
+	#include "globaldebugloggingoptions.h"
 
 #endif // DEBUG_USE_PROJECT_LOGGING_OPTIONS
 
--- a/emailservices/emailstore/message_store/server/group/MessageStoreServer.mmp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailstore/message_store/server/group/MessageStoreServer.mmp	Fri Mar 12 15:41:14 2010 +0200
@@ -56,7 +56,6 @@
 SOURCE        MessageStoreSession.cpp
 SOURCE        BackupRestoreObserver.cpp
 SOURCE        ShutdownServer.cpp
-SOURCE        StoreDriveMonitor.cpp
 
 SOURCE        ContainerStore.cpp
 SOURCE        ContainerStoreContainersTable.cpp
@@ -71,7 +70,7 @@
 SOURCE        MsgStoreSortResultRowSet.cpp
 SOURCE        MsgStoreStringSortResultRowSet.cpp
 SOURCE        ContainerStoreSortingTable.cpp
-SOURCE		  ContainerStoreSearchResultTable.cpp
+SOURCE        ContainerStoreSearchResultTable.cpp
 SOURCE        MessageStoreEncryptHandler.cpp
 SOURCE        ContainerStoreMRUAddressTable.cpp
 SOURCE        MsgStoreInMemorySortRowSet.cpp
--- a/emailservices/emailstore/message_store/server/inc/MessageStoreServer.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailstore/message_store/server/inc/MessageStoreServer.h	Fri Mar 12 15:41:14 2010 +0200
@@ -115,7 +115,6 @@
 							private MCustomBehaviorProvider, 
 							private MBackupRestoreObserver,
                             private MImsPointsecObserver,
-                            private MStoreDriveStateObserver,
                             public  MPSPropertyWatcherObserver
     {
     public:
@@ -187,17 +186,11 @@
         virtual void PointSecLockStarted();
         virtual void PointSecLockEnded();
         
-            
-        //from MStoreDriveStateObserver
-        virtual void DriveStateChangedL( TBool aState );
         
         void LockSystem();
         void UnlockSystemL();
         
-        void FindBiggestCapacityDriveL( TDriveNumber& aDrive );
-        TInt GetDriveL( TDriveNumber& aDrive );
-        void SetDriveL( const TDriveNumber aDrive );
-        
+    
         void SendSystemLockMessage( TInt aEvent );
         void TPtrC8ToRBuf16L( const TPtrC8& aPtr8, RBuf& aBuf ) const;
                 
@@ -212,10 +205,7 @@
         CImsPointsecMonitor*                iPointsecMonitor;
         TBool                               iWipeAfterBackupRestore;
         
-        //monitor the message store drive for mount/unmount
-        CStoreDriveMonitor*                 iStoreDriveMonitor;
-        //True if the message store is locked because drive is unmount 
-        TBool                               iLockedByDriveMonitor;
+
 
         TBool                               iLockedByBackupRestore;
         TBool                               iLockedByPointSec;
--- a/emailservices/emailstore/message_store/server/inc/bufferedmessagecreator.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailstore/message_store/server/inc/bufferedmessagecreator.h	Fri Mar 12 15:41:14 2010 +0200
@@ -11,7 +11,7 @@
 *
 * Contributors:
 *
-* Description:
+* Description: Message creator definition
 *
 */
 #ifndef BUFFEREDMESSAGECREATOR_H
--- a/emailservices/emailstore/message_store/server/src/MessageStoreServer.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailstore/message_store/server/src/MessageStoreServer.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -47,8 +47,6 @@
 
 _LIT8( KNullDescriptor8, "" );
 
-// To support biggest free drive, we have to get rid of hard-coded C: drive
-//const TDriveNumber KDbDriveNumber = EDriveC;
 
 _LIT( KDbFilename, "message_store.db" );
 
@@ -62,8 +60,7 @@
 _LIT( KUninstallParameter, "IMS_UNINSTALL" );
 _LIT( KImsUninstaller, "IMS Uninstaller" );
 _LIT( KUpgradeDetectionFile, "c:\\System\\EsIms\\canary.txt" );
-_LIT16( KDriveToUseFile, "db_drive.cfg" );
-//_LIT( KMsgStorePrivateDir, "c:\\Private\\200029e1\\" );
+
 
 //const TChar KColon(':');
 
@@ -269,7 +266,6 @@
   
   iLockedByBackupRestore = EFalse;
   iLockedByPointSec = EFalse;
-  iLockedByDriveMonitor = EFalse;
   
   } // end constructor
 
@@ -295,8 +291,6 @@
     //must check if PointSec has locked the system or not,
     //only create the container store if PointSec is NOT locked.
     
-    // This will be used to monitor the drive where message store db is located.
-    iStoreDriveMonitor = CStoreDriveMonitor::NewL( *this );
     
     if ( iPointsecMonitor->IsServiceAllowed() )
         {
@@ -346,7 +340,6 @@
 CMessageStoreServer::~CMessageStoreServer()
   {
   delete iUpgradePropertyWatcher;
-  delete iStoreDriveMonitor;
   delete iShutdown;
   delete iMessageStore;
   iMessageStore = NULL;
@@ -438,28 +431,12 @@
 void CMessageStoreServer::CreateContainerStoreL()
     {
     TDriveNumber drive( EDriveC );
-    if ( GetDriveL( drive ) == KErrNotFound )
-        {
-        FindBiggestCapacityDriveL( drive );
-        }
-    //set again the drive to be monitored in case is different than previous
-    iStoreDriveMonitor->SetDriveL( drive );
-    
-    if ( iStoreDriveMonitor->IsDrivePresent() )
-        {
     iMessageStore = CContainerStore::NewL( KDbFilename,
                                            drive,
                                            *this,
                                            *iShutdown,
                                            Priority() - 1);  // lower than server
-        }
-    else
-        {
-        iLockedByDriveMonitor = ETrue;
-        }
-    
-    // monitor the message store drive
-    iStoreDriveMonitor->WaitForChange();
+
 
     } // end CreateContainerStoreL
 
@@ -865,7 +842,7 @@
         //       change would have been backwards incompatible.
         
         TDriveNumber drive( EDriveC );
-        if ( GetDriveL( drive ) == KErrNotFound ) drive = EDriveC;
+		
         TInt result = CContainerStore::WipeEverything( KDbFilename,
                                                        drive );
 
@@ -908,7 +885,7 @@
     
     SendSystemLockMessage( EMsgStoreBackupOrRestoreInProgress );
     
-    if (( !iLockedByPointSec ) && ( !iLockedByDriveMonitor ) )
+    if ( !iLockedByPointSec )
         {
         LockSystem();
         }
@@ -925,7 +902,7 @@
   
     SendSystemLockMessage( EMsgStoreBackupOrRestoreCompleted );
       
-    if (( !iLockedByPointSec ) && ( !iLockedByDriveMonitor ) )
+    if ( !iLockedByPointSec )
         {
         TRAP_IGNORE( UnlockSystemL() );
         }
@@ -943,7 +920,7 @@
         {
         iLockedByPointSec = ETrue;
         SendSystemLockMessage( EMsgStorePointSecLockStarted );
-        if (( !iLockedByBackupRestore ) && ( !iLockedByDriveMonitor ) )
+        if ( !iLockedByBackupRestore )
             {
             LockSystem();
             }
@@ -961,7 +938,7 @@
         {
         iLockedByPointSec = EFalse;
         SendSystemLockMessage( EMsgStorePointSecLockEnded );
-        if ( ( !iLockedByBackupRestore ) && ( !iLockedByDriveMonitor ) )
+        if ( !iLockedByBackupRestore )
             {
             TRAP_IGNORE( UnlockSystemL() );
             }
@@ -1005,7 +982,6 @@
         iShutdown->ShutDownNow();
         }
    else if  ( ( !iLockedByBackupRestore ) 
-           && ( !iLockedByDriveMonitor ) 
            && ( !iLockedByPointSec ) )
         {
 
@@ -1025,145 +1001,7 @@
     __LOG_EXIT
     }
     
-// ==========================================================================
-// FUNCTION: FindBiggestCapacityDrive
-//           To locate the internal drive with the biggest available space.
-// ========================================================================== 
-void CMessageStoreServer::FindBiggestCapacityDriveL( TDriveNumber& aDrive )
-    {
-    __LOG_ENTER( "FindBiggestCapacityDrive" );
-    
-    RFs fs;
-    TInt driveToUse( 2 );  // set default drive to C:
-    
-    if( fs.Connect() == KErrNone )
-        {
-        CleanupClosePushL( fs );               //+fs
-        TDriveList driveList;
-        fs.DriveList( driveList );
-        TInt64 highest( 0 );
-        for (TInt i=0; i<KMaxDrives; i++)
-            {
-            if ( driveList[i] != 0 )     // check if drive exits
-                {
-                TDriveInfo driveInfo;
-                fs.Drive( driveInfo, i );
-                TVolumeInfo driveVolume;
-                fs.Volume( driveVolume, i );
-                                            
-                TUint drvStatus( 0 );
-                User::LeaveIfError( DriveInfo::GetDriveStatus( fs, i, drvStatus ) );
-                                            
-                if ( (drvStatus & DriveInfo::EDriveUserVisible) &&
-                     (drvStatus & DriveInfo::EDriveInternal)  && 
-                     (drvStatus & DriveInfo::EDrivePresent) )
-                    {
-                    if (driveVolume.iFree > highest)
-                        {
-                        driveToUse = i;
-                        highest = driveVolume.iFree;
-                        }
-                    }
-                }
-             }             
-                            
-        __LOG_WRITE_FORMAT2_INFO( "Drive #%d to use, free space=%u", driveToUse, highest );
-                                  
-        CleanupStack::PopAndDestroy( &fs );    //-fs
-        } // end if
-    
-    aDrive = static_cast<TDriveNumber>( driveToUse );
-    SetDriveL( aDrive );   // save it
-    
-    __LOG_EXIT
-    }
 
-// ==========================================================================
-// FUNCTION: GetDrive
-//           To find the previously-defined drive to use.   KErrNotFound will
-//           be returned if not config file found
-//
-// Note    : the config file will be loacted in C: drive 
-//           (C:\Private\2000c8d2\db_drive.cfg)
-// ==========================================================================
-TInt CMessageStoreServer::GetDriveL( TDriveNumber& aDrive )
-    {
-    __LOG_ENTER( "GetDrive" );
-    
-    TInt ret( KErrNotFound );
-        
-    RFs fs;
-    if( fs.Connect() == KErrNone )
-        {
-        CleanupClosePushL( fs );               //+fs
-        TFileName fileName;
-        fs.CreatePrivatePath( EDriveC );
-        User::LeaveIfError(fs.PrivatePath( fileName ));
-        fileName.Append( KDriveToUseFile );
-        _LIT( KCDrive, "C:" );
-        fileName.Insert( 0, KCDrive() );
-        __LOG_WRITE_FORMAT1_INFO( "DriveToUse file=%S", &fileName );
-                   
-        if( BaflUtils::FileExists( fs, fileName ) )
-            {
-            RFileReadStream reader;
-            if ( reader.Open( fs, fileName, EFileRead ) == KErrNone )
-          		{
-           		CleanupClosePushL( reader );             //+reader
-           		TUint drive = reader.ReadUint32L();
-           		__LOG_WRITE_FORMAT1_INFO( "previously-defined drive to use : %d", drive );
-                CleanupStack::PopAndDestroy( &reader );  //-reader
-           		aDrive = static_cast<TDriveNumber>( drive );
-           		ret = KErrNone;
-           		}
-            }
-                   
-        CleanupStack::PopAndDestroy( &fs );    //-fs
-        } // end if
-    
-    __LOG_EXIT
-    return ret;
-    }
-
-// ==========================================================================
-// FUNCTION: SetDrive
-//           To write the chosen drive info to the config file.
-//
-// Note    : the config file will be loacted in C: drive 
-//           (C:\Private\2000c8d2\db_drive.cfg)
-// ==========================================================================
-void CMessageStoreServer::SetDriveL( const TDriveNumber aDrive )
-    {
-    __LOG_ENTER( "SetDrive" );
-    
-    TUint drive = static_cast<TUint32>( aDrive );
-        
-    RFs fs;
-    if( fs.Connect() == KErrNone )
-        {
-        CleanupClosePushL( fs );               //+fs
-        TFileName fileName;
-        User::LeaveIfError(fs.PrivatePath( fileName ));
-        fileName.Append( KDriveToUseFile );
-        _LIT( KCDrive, "C:" );
-        fileName.Insert( 0, KCDrive() );
-        __LOG_WRITE_FORMAT1_INFO( "DriveToUse file=%S", &fileName )
-                   
-        RFileWriteStream writer;
-        if ( writer.Replace( fs, fileName, EFileRead ) == KErrNone )
-            {
-         	CleanupClosePushL( writer );             //+writer
-           	writer.WriteUint32L( drive );
-           	writer.CommitL();
-           	__LOG_WRITE_FORMAT1_INFO( "writing chosen drive #%d to file", drive );
-            CleanupStack::PopAndDestroy( &writer );  //-writer
-           	}
-                 
-        CleanupStack::PopAndDestroy( &fs );    //-fs
-        } // end if
-    
-    __LOG_EXIT
-    }
 
 // ==========================================================================
 // FUNCTION: SendSystemLockMessage
@@ -1243,34 +1081,5 @@
 
 #endif
 
-//from MStoreDriveStateObserver
-void CMessageStoreServer::DriveStateChangedL( TBool aState )
-    {
-    __LOG_ENTER( "DriveStateChangedL" );
-    if ( aState )
-        {
-        //drive mounted
-        if ( iLockedByDriveMonitor )
-             {
-             iLockedByDriveMonitor = EFalse;
-             if ( ( !iLockedByBackupRestore ) && ( !iLockedByPointSec ) )
-                 {
-                 UnlockSystemL();
-                 }
-             }
-        }
-    else
-        {
-        //drive unmounted
-        if ( !iLockedByDriveMonitor )
-            {
-            iLockedByDriveMonitor = ETrue;
-            if ( ( !iLockedByBackupRestore ) && ( !iLockedByPointSec ) )
-                {
-                LockSystem();
-                }
-            }
-        }
-    __LOG_EXIT
-    }
 
+
--- a/emailservices/emailstore/message_store/server/src/MessageStoreSession.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailstore/message_store/server/src/MessageStoreSession.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -21,8 +21,8 @@
 // INCLUDES
 // ========
 
-#include "MsgStoreTypes.h"
-#include "MsgStorePropertyKeys.h"
+#include "msgstoretypes.h"
+#include "msgstorepropertykeys.h"
 
 #include "MessageStoreSession.h"
 #include "MessageStoreServer.h"
--- a/emailservices/emailstore/message_store/server/src/bufferedmessagecreator.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailstore/message_store/server/src/bufferedmessagecreator.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -11,7 +11,7 @@
 *
 * Contributors:
 *
-* Description:
+* Description: Message creator implementation
 *
 */
 
--- a/emailservices/emailstore/message_store/server/src/messagestoreutils.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailservices/emailstore/message_store/server/src/messagestoreutils.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -11,7 +11,7 @@
 *
 * Contributors:
 *
-* Description:
+* Description: Message store utilities implementation
 *
 */
 
--- a/emailuis/emailui/data/FreestyleEmailUi.rss	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/data/FreestyleEmailUi.rss	Fri Mar 12 15:41:14 2010 +0200
@@ -956,6 +956,8 @@
 RESOURCE TBUF r_freestyle_email_ui_viewer_completed    { buf=qtn_cmail_header_completed; }
 RESOURCE TBUF r_freestyle_email_ui_viewer_high_prio    { buf=qtn_cmail_header_high_prio; }
 RESOURCE TBUF r_freestyle_email_ui_viewer_low_prio    { buf=qtn_cmail_header_low_prio; }
+RESOURCE TBUF r_freestyle_email_ui_images_are_not_displayed    { buf=qtn_cmail_viewer_images_not_displayed; }
+RESOURCE TBUF r_freestyle_email_ui_display_images    { buf=qtn_cmail_viewer_display_images; }
 
 // NOTES
 RESOURCE TBUF r_freestyle_email_delete_mail_note				{ buf=qtn_fse_delete_mail_note; }
@@ -1424,7 +1426,7 @@
         //MENU_ITEM { command = EFsEmailUiCmdReadEmail; txt = qtn_fse_message_list_options_read; },
         MENU_ITEM { command = EFsEmailUiCmdZoomLevel; txt = qtn_fse_zoom_level_cascade; cascade = r_fsemailui_htmlviewer_submenu_zoom_level;},                       
         MENU_ITEM { command = EFsEmailUiCmdHelp; txt = qtn_options_help; },
-        MENU_ITEM { command = EFsEmailUiCmdExit; txt = text_softkey_exit; }
+        MENU_ITEM { command = EFsEmailUiCmdExit; txt = qtn_options_exit; }
         };
     }
     
--- a/emailuis/emailui/data/FreestyleEmailUiGlobalSettings.rssi	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/data/FreestyleEmailUiGlobalSettings.rssi	Fri Mar 12 15:41:14 2010 +0200
@@ -107,6 +107,13 @@
 			setting_page_resource = r_global_settings_title_dividers_setting_page_resource;
 			associated_resource = r_global_settings_title_dividers;
 			},
+        AVKON_SETTING_ITEM
+            {
+            name = qtn_mail_setting_download_images;
+            identifier = EGlobalSettingsDownloadHTMLImages;
+            setting_page_resource = r_global_settings_download_html_images_setting_page_resource;
+            associated_resource = r_global_settings_download_html_images;
+            },
 		AVKON_SETTING_ITEM
 			{
 			name = qtn_fse_settings_download_notifications;
@@ -123,13 +130,6 @@
 			},
 		AVKON_SETTING_ITEM
 			{
-			name = qtn_fse_settings_download_html_images;
-			identifier = EGlobalSettingsDownloadHTMLImages;
-			setting_page_resource = r_global_settings_download_html_images_setting_page_resource;
-			associated_resource = r_global_settings_download_html_images;
-			},
-		AVKON_SETTING_ITEM
-			{
 			name = qtn_fse_settings_active_idle;
 			identifier = EGlobalSettingsActiveIdle;
 			}
@@ -526,7 +526,7 @@
 RESOURCE AVKON_SETTING_PAGE r_global_settings_download_html_images_setting_page_resource
     {
     number = -16380;
-    label = qtn_fse_settings_download_html_images;
+    label = qtn_mail_setting_download_images;
     type = EAknCtPopupSettingList;
     editor_resource_id = r_global_settings_download_html_images_editor_resource_id;
     }
@@ -547,12 +547,12 @@
         {
         AVKON_ENUMERATED_TEXT
             {
-            text = qtn_fse_settings_download_html_images_always_ask;
+            text = qtn_mail_option_alternative_no;
             value = 1;
             },
         AVKON_ENUMERATED_TEXT
             {
-            text = qtn_fse_settings_download_html_images_automatic;
+            text = qtn_mail_option_alternative_yes;
             value = 0;
             }
         };
@@ -564,11 +564,11 @@
         {
         LBUF
             {
-            txt = qtn_fse_settings_download_html_images_always_ask;
+            txt = qtn_mail_option_alternative_no;
             },
         LBUF
             {
-            txt = qtn_fse_settings_download_html_images_automatic;
+            txt = qtn_mail_option_alternative_yes;
             }
         };
     }
Binary file emailuis/emailui/data/html/btn_middle.png has changed
--- a/emailuis/emailui/data/html/email.html	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/data/html/email.html	Fri Mar 12 15:41:14 2010 +0200
@@ -1,8 +1,7 @@
-<frameset rows="10%,*" border=0 id="headerBody">
-
-<frame src="header.html" >
+<html>
+<script language="javascript" src="email.js"></script>
+<frameset rows="10%,*" border=0 id="email_frameSet" onLoad="hideImages('body_frame')">
+<frame id="header_frame" src="header.html" >
 <frame id="body_frame" src="temp/body.html" >
-
 </frameset>
-
 </html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailuis/emailui/data/html/email.js	Fri Mar 12 15:41:14 2010 +0200
@@ -0,0 +1,52 @@
+// Original image sources are stored in this array
+var originalImageSources = new Array();
+
+// Cid identifier string, if the image name begins with cid: it's shown
+var cid = new String("cid:");
+
+// Number of images hidden (or replaced with our placeholder image)
+var hiddenCount = 0;
+
+// Replace image sources with our placeholder (if the autoloading is disabled)
+function hideImages(frameId) {
+    if (parent.header_frame.g_autoLoadImages == 0) {
+        var doc = document.getElementById(frameId).contentDocument;
+        if (!doc) {
+            doc = document.frames[frameId].document;
+        }
+        for (i = 0; i < doc.images.length; i++) {
+        	var image = doc.images[i];
+            originalImageSources.push(image.src);
+            if (image.src.length > 0 && image.src.indexOf(cid) == -1) {
+                doc.images[i].src = "../hidden.png";
+                hiddenCount++;
+            }
+        }
+        if (hiddenCount == 0) {
+            parent.header_frame.hideDisplayImagesButton();
+        } else {
+            parent.header_frame.showDisplayImagesButton();
+        }
+    } else {
+        parent.header_frame.updateHeader();
+    }
+    requestLoadImages();
+}
+
+// Restore original images sources
+function restoreImages(frameId) {
+    if (parent.header_frame.g_autoLoadImages == 0) {
+        var doc = document.getElementById(frameId).contentDocument;
+        if (!doc) {
+            doc = document.frames[frameId].document;
+        }
+        for (i = 0; i < originalImageSources.length; i++) {
+            doc.images[i].src = originalImageSources[i];
+        }
+    }
+}
+
+// Causes application to reload images
+function requestLoadImages() {
+    location.href = "cmail://loadImages/";
+}
--- a/emailuis/emailui/data/html/email_rtl.html	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/data/html/email_rtl.html	Fri Mar 12 15:41:14 2010 +0200
@@ -5,16 +5,15 @@
 	{
 	var bodyFrame = document.getElementById("body_frame");
 	bodyFrame.contentWindow.document.body.dir = "rtl";
-	bodyFrame.contentWindow.document.body.align = "right"
+	bodyFrame.contentWindow.document.body.align = "left"
 	}
 onload=setEmailBodyDirection;
 </script>
+<script language="javascript" src="email.js"></script>
 </header>
-<frameset rows="10%,*" border=0>
-
-<frame src="header.html" >
+<frameset rows="10%,*" border="0" id="email_frameSet" onLoad="hideImages('body_frame')">
+<frame id="header_frame" src="header.html" >
 <frame id="body_frame" src="temp/body.html" >
-
 </frameset>
 
 </html>
--- a/emailuis/emailui/data/html/header.js	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/data/html/header.js	Fri Mar 12 15:41:14 2010 +0200
@@ -1,54 +1,79 @@
-function collapseHeader()
-	{
-	handleHeaderDisplay( "header_table", "table_initial" )
-	parent.document.getElementById('headerBody').rows = '10%,*';
+var collapsed = true;
+var displayImagesHidden = false;
+var previousPageYOffset = -1;
+var setScrollPositionInterval;
+
+function collapseHeader(sendEvent) {
+	if (sendEvent) {
+    	location.href = "cmail://collapseHeader/";
+    	}
+    collapsed = true;
+	handleHeaderDisplay( "header_table", "table_initial" );
+	updateHeader();
 	}
-	
-function expandHeader()
-	{
+
+function expandHeader(sendEvent) {
+	if (sendEvent) {
+	    location.href = "cmail://expandHeader/";
+    	}
+	collapsed = false;
 	handleHeaderDisplay( "table_initial", "header_table" )
-	parent.document.getElementById('headerBody').rows = '40%,*';
+	parent.document.getElementById('email_frameSet').rows = "40%, *";
 	}
-	
-function handleHeaderDisplay( tableToHide, tableToShow )
-	{
+
+function updateHeader() {
+    var rows = "40%, *";
+	if (collapsed) {
+    	if (displayImagesHidden || (parent.header_frame.g_autoLoadImages != 0) || (parent.hiddenCount == 0)) {
+            rows = "10%, *";
+        } else {
+            rows = "17%, *";
+	    }
+	}
+    parent.document.getElementById('email_frameSet').rows = rows;
+    }
+
+function handleHeaderDisplay( tableToHide, tableToShow ) {
 	document.getElementById(tableToShow).style.display = "";
 	document.getElementById(tableToHide).style.display = "none";
 	}
 
-var intervalHandler;
-function fetchMoreIfAtBottom()
-   {
-   var element = parent.body_frame.document.body;
+function init(scrollPos) {
+	if (document.getElementById("table_initial").style.display != "none") {
+    	    collapseHeader(false);
+	} else {
+	    expandHeader(false);
+	}
+    window.scrollTo(0, scrollPos);
+	setScrollPositionInterval = setInterval("updateScrollPosition()", 500);
+    }
+
+function displayImagesButtonPressed() {
+    hideDisplayImagesButton();
+    parent.restoreImages("body_frame");
+    requestDisplayImages();
+}
 
-   if ( element == null )
-      {
-      return;
-      }
-    
-    var viewport = parent.pageYOffset;
-    var elementHeight = element.offsetHeight;
-    var elementOffsetTop = element.offsetTop;
-    var screenHeight = screen.availHeight;
-    if ( elementOffsetTop + elementHeight - viewport < screenHeight )
-       {            
-       location.href = "cmail://body/" + viewport
-       clearInterval(intervalHandler);
-       }
+function hideDisplayImagesButton() {
+	document.getElementById("displayImagesTable").style.display = "none";
+    displayImagesHidden = true;
+    updateHeader();
+}
+
+function showDisplayImagesButton() {
+	document.getElementById("displayImagesTable").style.display = "";
+    displayImagesHidden = false;
+    updateHeader();
+}
+
+function requestDisplayImages() {
+    location.href = "cmail://displayImages/";
+}
+
+function updateScrollPosition() {
+    if (previousPageYOffset != parent.pageYOffset) {
+        previousPageYOffset = parent.pageYOffset;
+        location.href = "cmail://body/" + previousPageYOffset;
     }
-	   
-function scrollHandler()
-	{	
-	  intervalHandler = setInterval( "fetchMoreIfAtBottom()", 500);
-	} 
-				
-function init(scrollPos)
-    {
-    collapseHeader();
-    window.scrollTo(0, scrollPos);
-    //start a scrolling event which will trigger the check of bottom reached...
-    //this will take care of short document not does not need scrolling
-    scrollHandler();
-    } 
+}
 
-//onload=init;
\ No newline at end of file
--- a/emailuis/emailui/group/FreestyleEmailUi.mmp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/group/FreestyleEmailUi.mmp	Fri Mar 12 15:41:14 2010 +0200
@@ -27,7 +27,7 @@
 TARGETTYPE      exe
 
 VENDORID        VID_DEFAULT
-CAPABILITY      CAP_APPLICATION NetworkControl
+CAPABILITY      CAP_APPLICATION NetworkControl SwEvent
 
 UID             0x0 0x2001E277
 EPOCHEAPSIZE    0x1000 0x800000
@@ -114,6 +114,7 @@
 SOURCE  cmailcustomstatuspaneindicators.cpp
 SOURCE  OverlayControl.cpp
 SOURCE FSHtmlReloadAO.cpp
+SOURCE fsemailstatuspaneindicatorhandler.cpp
 
 SOURCEPATH      ../group
 
@@ -219,3 +220,4 @@
 LIBRARY MsgEditorModel.lib
 LIBRARY touchfeedback.lib
 LIBRARY ccaclient.lib
+LIBRARY pbk2rclengine.lib
--- a/emailuis/emailui/group/bld.inf	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/group/bld.inf	Fri Mar 12 15:41:14 2010 +0200
@@ -58,8 +58,10 @@
 ../data/html/header.js /epoc32/data/z/private/2001E277/HtmlFile/header.js
 ../data/html/plus.gif /epoc32/data/z/private/2001E277/HtmlFile/plus.gif
 ../data/html/minus.gif /epoc32/data/z/private/2001E277/HtmlFile/minus.gif
+../data/html/email.js /epoc32/data/z/private/2001E277/HtmlFile/email.js
 ../data/html/follow_up.png /epoc32/data/z/private/2001E277/HtmlFile/follow_up.png
 ../data/html/follow_up_complete.png /epoc32/data/z/private/2001E277/HtmlFile/follow_up_complete.png
+../data/html/btn_middle.png /epoc32/data/z/private/2001E277/HtmlFile/btn_middle.png
 ../data/html/todo_high_add.png /epoc32/data/z/private/2001E277/HtmlFile/todo_high_add.png
 ../data/html/todo_low_add.png /epoc32/data/z/private/2001E277/HtmlFile/todo_low_add.png
 
@@ -71,9 +73,11 @@
 ../data/html/header.js /epoc32/release/winscw/udeb/z/private/2001E277/HtmlFile/header.js
 ../data/html/plus.gif /epoc32/release/winscw/udeb/z/private/2001E277/HtmlFile/plus.gif
 ../data/html/minus.gif /epoc32/release/winscw/udeb/z/private/2001E277/HtmlFile/minus.gif
+../data/html/email.js /epoc32/release/winscw/udeb/z/private/2001E277/HtmlFile/email.js
 ../data/html/follow_up.png /epoc32/release/winscw/udeb/z/private/2001E277/HtmlFile/follow_up.png
 ../data/html/follow_up_complete.png /epoc32/release/winscw/udeb/z/private/2001E277/HtmlFile/follow_up_complete.png
 ../data/html/todo_high_add.png /epoc32/release/winscw/udeb/z/private/2001E277/HtmlFile/todo_high_add.png
+../data/html/btn_middle.png /epoc32/release/winscw/udeb/z/private/2001E277/HtmlFile/btn_middle.png
 ../data/html/todo_low_add.png /epoc32/release/winscw/udeb/z/private/2001E277/HtmlFile/todo_low_add.png
 
 // make the files ready for urel emulator
@@ -83,9 +87,11 @@
 ../data/html/header.js /epoc32/release/winscw/urel/z/private/2001E277/HtmlFile/header.js
 ../data/html/plus.gif /epoc32/release/winscw/urel/z/private/2001E277/HtmlFile/plus.gif
 ../data/html/minus.gif /epoc32/release/winscw/urel/z/private/2001E277/HtmlFile/minus.gif
+../data/html/email.js /epoc32/release/winscw/urel/z/private/2001E277/HtmlFile/email.js
 ../data/html/follow_up.png /epoc32/release/winscw/urel/z/private/2001E277/follow_up.png
 ../data/html/follow_up_complete.png /epoc32/release/winscw/urel/z/private/2001E277/follow_up_complete.png
 ../data/html/todo_high_add.png /epoc32/release/winscw/urel/z/private/2001E277/todo_high_add.png
+../data/html/btn_middle.png /epoc32/release/winscw/urel/z/private/2001E277/HtmlFile/btn_middle.png
 ../data/html/todo_low_add.png /epoc32/release/winscw/urel/z/private/2001E277/todo_low_add.png
 
 ../sis/commonemailstub.sis          /epoc32/data/z/system/install/commonemailstub.sis
--- a/emailuis/emailui/inc/FreestyleEmailCenRepHandler.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/inc/FreestyleEmailCenRepHandler.h	Fri Mar 12 15:41:14 2010 +0200
@@ -100,8 +100,8 @@
 	/**
      * Download html images
      */
-    //TInt DownloadHTMLImages();
-    //void SetDownloadHTMLImages( TInt aValue );
+    TInt DownloadHTMLImages();
+    void SetDownloadHTMLImages( TInt aValue );
 	
 	/**
 	 * AttachmentFileTypes enumerator returns
--- a/emailuis/emailui/inc/FreestyleEmailCenRepKeys.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/inc/FreestyleEmailCenRepKeys.h	Fri Mar 12 15:41:14 2010 +0200
@@ -68,6 +68,11 @@
 const TUint32 KFreestyleWLBMIFFilePathWithTargetFilename = {0x00000122};
 const TUint32 KFreestyleWLBMailboxIconID                 = {0x00000123};
 
+// used for email indicator popup-note handling
+// First key tells how many mailboxes have new emails
+const TUint32 KNumberOfMailboxesWithNewEmails                = {0x00001000};
+
+
 //
 // Email local variation flags. Flags are defined in emailvariant.hrh
 const TUint32 KEmailLocalVariationFlags	    	= {0x0000FFFE};
--- a/emailuis/emailui/inc/FreestyleEmailUiAknStatusIndicator.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/inc/FreestyleEmailUiAknStatusIndicator.h	Fri Mar 12 15:41:14 2010 +0200
@@ -11,6 +11,8 @@
 *
 * Contributors:
 *
+* Description: Definition for status indicator
+*
 */ 
 
 
--- a/emailuis/emailui/inc/FreestyleEmailUiAppui.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/inc/FreestyleEmailUiAppui.h	Fri Mar 12 15:41:14 2010 +0200
@@ -119,6 +119,136 @@
 class MAknNaviDecoratorObserver;
 class CCustomStatuspaneIndicators;
 
+/**
+ * TDisplayImagesCache
+ * 
+ * Non-persistant cache for display images per message. When user allows images to be downloaded
+ * for a message, that message's id will be stored into the cache. Later if the message is re-opened 
+ * and it is found in cache, images are allowed to be downloaded no matter what the global setting 
+ * is. Message is added to cache only when the user presses the button, it will be removed from cache
+ * if the mailbox or the message itself is deleted.
+ */
+class TDisplayImagesCache
+    {
+public:
+    
+    /**
+     * Destructor
+     */
+    ~TDisplayImagesCache();
+
+    /**
+     * Add message to cache.
+     */
+    void AddMessageL( const CFSMailMessageBase& aMsg );
+    
+    /**
+     * Remove message from cache.
+     */
+    void RemoveMessage( const CFSMailMessageBase& aMsg );
+    
+    /**
+     * Check if the message is in cache. Returns ETrue if the message is found.
+     */
+    TBool Contains( const CFSMailMessageBase& aMsg ) const;    
+    
+    /**
+     * Removes message from cache.
+     */
+    void RemoveMessage( const TFSMailMsgId& aBoxId, const TFSMailMsgId& aMsgId );
+    
+    /**
+     * Removes mailbox from cache.
+     */
+    void RemoveMailbox( const TFSMailMsgId& aBoxId );
+
+private: // internal methods
+    
+    /**
+     * Adds message to cache.
+     */
+    void AddMessageL( const TFSMailMsgId& aBoxId, const TFSMailMsgId& aMsgId );
+
+    /**
+     * Check if the message is in cache. Returns ETrue if the message is found.
+     */
+    TBool Contains( const TFSMailMsgId& aBoxId, const TFSMailMsgId& aMsgId ) const;    
+
+    /**
+     * Returns index for given mailbox in cache or KErrNotFound if the mailbox cannot
+     * be found.
+     */
+    TInt MailBoxIndex( const TFSMailMsgId& aBoxId ) const;
+    
+    /**
+     * Adds new mailbox and returns index in cache.
+     */
+    void AddMailBoxL( const TFSMailMsgId& aBoxId, TInt& aCacheIndex );
+
+private:    
+    
+    /**
+     * Cache item.
+     */
+    class TItem  
+        {
+    public:
+        /**
+         * Constructor
+         */        
+        TItem( const TFSMailMsgId& aBoxId );
+        
+        /**
+         * Destructor
+         */
+        ~TItem();
+        
+        /**
+         * Returns ETrue if given message Id is found in this box.
+         */
+        TBool Contains( const TFSMailMsgId& aMsgId ) const;
+
+        /**
+         * Adds new message Id into box.
+         */
+        void AddMessageL( const TFSMailMsgId& aMsgId );
+
+        /**
+         * Removes message from box.
+         */
+        void RemoveMessage( const TFSMailMsgId& aMsgId );
+    
+        /**
+         * Comparator for TLinearOrder, compares two items
+         */
+        static TInt CompareItem( const TItem& aItem1, const TItem& aItem2 );
+    
+    private:       
+
+        /**
+         * Comparator for TLinearOrder, compares two message Ids
+         */
+        static TInt CompareMsgId( const TFSMailMsgId& aId1, const TFSMailMsgId& aId2 );
+        
+        /**
+         * Returns index of the message in box or KErrNotFound.
+         */
+        TInt MessageIndex( const TFSMailMsgId& aMsgId ) const;
+    
+    private:
+        
+        // Mailbox Id        
+        TFSMailMsgId iMailBoxId;
+        
+        // Message Ids
+        RArray<TFSMailMsgId> iMessageIds; 
+        };
+    
+    // Cache
+    RArray<TItem> iCache;    
+    };
+
+
 class CFreestyleEmailUiAppUi : public CAknViewAppUi,
     			               public MAlfActionObserver,
     			               public MFSMailRequestObserver,
@@ -341,12 +471,34 @@
     TDisplayMode DisplayMode() const;
     // </cmail>
 
-    /**
+    
+	
+	
+	/**
      * Returns the current flip status.
      * @return True if the flip is open, false otherwise.
      */
     TBool IsFlipOpen() const;
 
+    TDisplayImagesCache& DisplayImagesCache();
+
+    // Set flag for judging if there is a embedded app in FSEmail.
+    void SetEmbeddedApp( TBool aEmbeddedApp );
+    
+    // Return embedded app.
+    TBool EmbeddedApp() const;
+    
+    // Set flag for judging if previous app is embedded.
+    void SetEmbeddedAppToPreviousApp( TBool aEmbeddedApp );
+    
+    // if previous app is embedded.
+    TBool EmbeddedAppIsPreviousApp() const;
+    
+    // Set flag for judging if email editor started from embedded app.
+    void SetEditorStartedFromEmbeddedApp( TBool aEmbeddedApp );
+    
+    // if email editor started from embedded app.
+    TBool EditorStartedFromEmbeddedApp() const;
 
 public: //from MFSMailEventObserver
     /**
@@ -667,6 +819,8 @@
     // Set true, when application is going to be switched to backgound
     // after the view deactivation.
     TBool iSwitchingToBackground;
+    
+    TDisplayImagesCache iDisplayImagesCache;
 
     // For handling the flip state.
     CFreestyleEmailUiPropertySubscriber* iPropertySubscriber;
@@ -674,6 +828,16 @@
 
     /// Focus visibility state
     TBool iFocusVisible;
+    TBool iTouchFeedbackCreated;
+
+    // Embedded app flag.
+    TBool iHasEmbeddedApp;
+    
+    // Flag for judging if previous app is embedded app.
+    TBool iPreviousAppEmbedded;
+    
+    // Flag for judging if email editor started from embedded app.
+    TBool iEditorStartedFromEmbeddedApp;
     };
 
 
--- a/emailuis/emailui/inc/FreestyleEmailUiConstants.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/inc/FreestyleEmailUiConstants.h	Fri Mar 12 15:41:14 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2007 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"
@@ -91,7 +91,7 @@
 	{
 	FsEActionMenuDismissed = -10,
 	FsEActionMenuCasItemSelectedAndExecuted,
-	
+
 	FsEActionMenuOpen = 1,
 	FsEActionMenuOpenCalendarEvent,
 	FsEActionMenuReply,
@@ -170,7 +170,7 @@
 /**
  * Settings launch modes
  */
- enum TMailSettingsLaunchMode 
+ enum TMailSettingsLaunchMode
  	{
  	KMailSettingsOpenMainList = 0x112,
  	KMailSettingsOpenMailboxSettings,
@@ -182,11 +182,11 @@
  	KMailSettingsOpenPluginSettings
  	};
 
- 	
+
 /**
 * editor launch modes
 */
-enum TEditorLaunchMode 
+enum TEditorLaunchMode
 	{
 	KEditorCmdCreateNew,
 	KEditorCmdReply,
@@ -240,11 +240,12 @@
 
 /**
 * List launch parameters
-* Use iRequestRefresh = ETrue to force list refresh when using 
+* Use iRequestRefresh = ETrue to force list refresh when using
 * KStartListReturnToPreviousFolder parameter.
 */
 static const TUid KStartListWithFolderId = { 1 };
 static const TUid KStartListReturnToPreviousFolder = { 2 };
+static const TUid KStartListWithFolderIdFromHomeScreen = { 3 };
 
 class TMailListActivationData
 	{
@@ -254,8 +255,8 @@
 	    {
 	    // no implementation needed
 	    }
-	
-public: // data	
+
+public: // data
 	TFSMailMsgId iMailBoxId;
 	TFSMailMsgId iFolderId;
 	TBool iRequestRefresh;
@@ -268,15 +269,15 @@
 class TMsgViewerActivationData
 	{
 public: // construction
-	inline TMsgViewerActivationData() 
-	    : iMailBoxId(), 
-	      iFolderId(), 
+	inline TMsgViewerActivationData()
+	    : iMailBoxId(),
+	      iFolderId(),
 	      iMessageId(),
 	      iDetails( EFSMsgDataEnvelope ),
 	      iEmbeddedMessage( NULL )
 	      {}
-	
-public: // members	
+
+public: // members
 	TFSMailMsgId iMailBoxId;
 	TFSMailMsgId iFolderId;
 	TFSMailMsgId iMessageId;
@@ -301,8 +302,8 @@
 public: // construction
 	inline TSearchListActivationData()
 	    : iMailBoxId(), iFolderId() {}
-	
-public: // members	
+
+public: // members
 	TFSMailMsgId iMailBoxId;
 	TFSMailMsgId iFolderId;
 	};
@@ -328,7 +329,7 @@
 
 public: // methods
     // default constructor
-	inline THtmlViewerActivationData() 
+	inline THtmlViewerActivationData()
 	    : iActivationDataType( EMailMessage ),
 	      iMailBoxId(),
 	      iFolderId(),
@@ -338,7 +339,7 @@
 	      iUrl( KNullDesC ),
 	      iEmbeddedMessage( NULL ),
           iEmbeddedMessageMode( EFalse ) {}
-	
+
 	// substitution operator
 	inline THtmlViewerActivationData& operator=( const THtmlViewerActivationData& aAnother )
 	    {
@@ -356,8 +357,8 @@
 	        }
 	    return *this;
 	    }
-	
-public: // members	
+
+public: // members
     TActivationDataType iActivationDataType;
     TFSMailMsgId iMailBoxId; // Mail box ID of the message used in activation.
     TFSMailMsgId iFolderId; // Folder ID of the message used in activation.
@@ -377,8 +378,8 @@
 public: // construction
 	inline TAttachmentListActivationData()
 	    : iMailBoxId(), iFolderId(), iMessageId(), iDetails(EFSMsgDataEnvelope), iEmbeddedMsgMode(EFalse) {}
-	
-public: // members	
+
+public: // members
 	TFSMailMsgId iMailBoxId;
 	TFSMailMsgId iFolderId;
 	TFSMailMsgId iMessageId;
@@ -421,11 +422,11 @@
 public: // construction
 	inline TFolderListActivationData()
         : iSourceFolderType( EFSOther ), iCallback( NULL ) {}
-	
-public: // members	
+
+public: // members
 	// Type of the source folder in case of move or copy
 	TFSFolderType iSourceFolderType;
-	
+
 	// Call back used to inform the folder selection query result
 	MFSEmailUiFolderListCallback* iCallback;
 	};
@@ -440,31 +441,31 @@
 	TFSMailMsgId iFolderId;
 	TFSMailMsgId iMessageId;
 	TFSMailMsgId iMessagePartId;
-	
+
 public: // methods
 	// default constructor initializes all IDs as NULL ID
 	inline TPartData()
 	    : iMailBoxId(), iFolderId(), iMessageId(), iMessagePartId()
 	    {
 	    }
-	
+
 	// construction with initial data
-	inline TPartData( TFSMailMsgId aMailBoxId, TFSMailMsgId aFolderId, 
+	inline TPartData( TFSMailMsgId aMailBoxId, TFSMailMsgId aFolderId,
 	           TFSMailMsgId aMessageId, TFSMailMsgId aMessagePartId )
-	    : iMailBoxId( aMailBoxId ), iFolderId( aFolderId ), 
+	    : iMailBoxId( aMailBoxId ), iFolderId( aFolderId ),
 	      iMessageId( aMessageId ), iMessagePartId( aMessagePartId )
-	    {  
+	    {
 	    }
-	
+
 	// construction with initial data except messagePartId
 	inline TPartData( TFSMailMsgId aMailBoxId, TFSMailMsgId aFolderId, TFSMailMsgId aMessageId )
-	    : iMailBoxId( aMailBoxId ), iFolderId( aFolderId ), 
+	    : iMailBoxId( aMailBoxId ), iFolderId( aFolderId ),
 	      iMessageId( aMessageId ), iMessagePartId()
-	    {  
+	    {
 	    }
-	
+
 	// equality operator
-	inline TBool operator==( const TPartData& aPart ) const 
+	inline TBool operator==( const TPartData& aPart ) const
 		{
 		return ( iMailBoxId==aPart.iMailBoxId && iFolderId==aPart.iFolderId &&
 		         iMessageId==aPart.iMessageId && iMessagePartId==aPart.iMessagePartId );
@@ -493,7 +494,7 @@
 static const TInt KBrowserUid = 0x10008D39;
 
 /**
- * UID for identifying Message Reader in the taskList 
+ * UID for identifying Message Reader in the taskList
  */
 static const TUid KMessageReaderUid = { 0x10201B00 };
 
--- a/emailuis/emailui/inc/FreestyleEmailUiContactHandler.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/inc/FreestyleEmailUiContactHandler.h	Fri Mar 12 15:41:14 2010 +0200
@@ -27,9 +27,7 @@
 // CCA Launcher view
 #include <mccaconnection.h>
 
-//<cmail>
-#include "cpbkxremotecontactlookupserviceuicontext.h"
-//</cmail>
+#include <cpbkxremotecontactlookupserviceuicontext.h>
 
 #include "FreestyleEmailUiCLSListsObserver.h"
 
@@ -382,14 +380,14 @@
     void ResetFieldIds();
 
     /*
-     * LaunchRemoteLookupL
      * Launches remote lookup UI
      * @param aQueryString Default query string in user input field
      * @param aResult Structure containing exit reason and selected item
+     * @param aLookupMode The mode in which the lookup is performed.
      */
     void DoRemoteLookupL( CFSMailBox& aMailBox, const TDesC& aQueryString, 
         CPbkxRemoteContactLookupServiceUiContext::TResult& aResult, 
-        CPbkxRemoteContactLookupServiceUiContext::TMode	aContext =
+        CPbkxRemoteContactLookupServiceUiContext::TMode aLookupMode =
             CPbkxRemoteContactLookupServiceUiContext::EModeContactSelector );
 
     // Gets the name and email address from given contact item
--- a/emailuis/emailui/inc/FreestyleEmailUiHtmlViewerContainer.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/inc/FreestyleEmailUiHtmlViewerContainer.h	Fri Mar 12 15:41:14 2010 +0200
@@ -25,15 +25,152 @@
 #include <brctlspecialloadobserver.h>
 #include <brctllinkresolver.h>
 
+#include "FreestyleEmailUiAknStatusIndicator.h"
 #include "FreestyleEmailDownloadInformationMediator.h"
+#include "FreestyleEmailCenRepKeys.h"
 #include "OverlayControl.h"
 
 class CFSMailMessage;
 class CFreestyleEmailUiAppUi;
 class CFreestyleMessageHeaderURLEventHandler;
-class CFreestyleEmailUiAknStatusIndicator;
 struct TAttachmentData;
 
+class CFsEmailUiHtmlViewerContainer;
+class MTouchFeedback;
+
+/**
+ * Single key listener
+ */
+class CEUiHtmlViewerSettingsKeyListener : public CActive
+    {
+public:
+    /**
+     * Observer interface for key value changes
+     */
+    class MObserver
+        {
+    public:
+        /**
+         * Called when key value changes
+         */
+        virtual void KeyValueChangedL( TUint32 aKey ) = 0;
+
+        /**
+         * Listener can query repository instance using this method. No need
+         * to create own repository instance OR to store repository reference.
+         */
+        virtual CRepository& Repository() = 0;
+        };
+public:
+    /**
+     * Constructor
+     */
+    CEUiHtmlViewerSettingsKeyListener( MObserver& aObserver, TUint32 aKey );
+
+    /**
+     * Destructor
+     */
+    ~CEUiHtmlViewerSettingsKeyListener();
+
+private:
+    /**
+     * Start listening value changes
+     */
+    void StartListening();
+
+private: // from CActive
+    /**
+     * @see CActive::RunL
+     */
+    void RunL();
+
+    /**
+     * @see CActive::DoCancel
+     */
+    void DoCancel();
+
+private:
+    /**
+     * Key observer
+     */
+    MObserver& iObserver;
+
+    /**
+     * Key id
+     */
+    TUint32 iKey;
+    };
+
+
+/**
+ * HTML viewer settings class.
+ */
+class CEUiHtmlViewerSettings : public CBase, public CEUiHtmlViewerSettingsKeyListener::MObserver
+    {
+
+public:
+
+    /**
+     * Settings observer interface
+     */
+    class MObserver
+        {
+    public:
+        /**
+         * Called when a setting value has changed.
+         */
+        virtual void ViewerSettingsChangedL( const TUint32 aKey ) = 0;
+        };
+
+public:
+
+    /**
+     * Static constructor
+     */
+    static CEUiHtmlViewerSettings* NewL( MObserver& aObserver );
+
+    /**
+     * Destructor
+     */
+    ~CEUiHtmlViewerSettings();
+
+    /**
+     * Boolean value for auto load image setting
+     */
+    TBool AutoLoadImages() const;
+
+private:
+
+    CEUiHtmlViewerSettings( MObserver& aObserver );
+    void ConstructL();
+    void AddKeyListenerL( TUint32 aKey );
+    void UpdateValue( TUint32 aKey );
+
+private: // from CEUiHtmlViewerSettingsKeyListener::MObserver
+
+    /**
+     * @see CEUiHtmlViewerSettingsKeyListener::MObserver::KeyValueChangedL
+     */
+    void KeyValueChangedL( TUint32 aKey );
+
+    /**
+     * @see CEUiHtmlViewerSettingsKeyListener::MObserver::Repository
+     */
+    CRepository& Repository();
+
+private:
+
+    enum TFlag
+        {
+        EAutoLoadImages = KFreestyleEmailDownloadHTMLImages
+        };
+
+    MObserver& iObserver;
+    CRepository* iRepository;
+    TBitFlags iFlags;
+    RPointerArray<CEUiHtmlViewerSettingsKeyListener> iKeyListeners;
+    };
+
 /**
  * Html viewer container.
  */
@@ -43,7 +180,8 @@
                                       public MBrCtlSoftkeysObserver,
                                       public MFSEmailDownloadInformationObserver,
                                       public MOverlayControlObserver,
-                                      public MBrCtlWindowObserver
+                                      public MBrCtlWindowObserver,
+                                      public CEUiHtmlViewerSettings::MObserver
     {
 public:
 
@@ -58,11 +196,12 @@
     void LoadContentFromFileL( RFile& aFile );
     void LoadContentFromUrlL( const TDesC& aUrl );
     void LoadContentFromMailMessageL( CFSMailMessage* aMailMessage, TBool aResetScrollPos=ETrue );
-    void ResetContent();
+    void ResetContent(const TBool aDisconnect = EFalse);
     void CancelFetch();
     void ClearCacheAndLoadEmptyContent();
     // <cmail>
     void PrepareForExit();
+    void PrepareForMessageNavigation();
     // </cmail>
     
 // from base class CCoeControl
@@ -116,8 +255,15 @@
     void ShowAttachmentDownloadStatusL( TFSProgress::TFSProgressStatus aProgressStatus, const TAttachmentData& aAttachmentData );
     TBool AttachmentDownloadStatusVisible();
     void HideDownloadStatus();
-    void DisplayStatusIndicatorL();
+    void DisplayStatusIndicatorL(TInt aDuration = KStatusIndicatorDefaultDuration);
     
+private: // from CEUiHtmlViewerSettings::MObserver
+
+    /**
+     * @see CEUiHtmlViewerSettings::MObserver::ViewerSettingsChangedL
+     */
+    void ViewerSettingsChangedL( const TUint32 aKey );
+
 private:
 
     // Second phase constructor.
@@ -172,8 +318,8 @@
     void ConvertToHTML( const TDesC8& aContent,
             const TDesC& aFileName, CFSMailMessagePart& aHtmlBodyPart );
     HBufC8* GetCharacterSetL( CFSMailMessagePart& aHtmlBodyPart );
-    TBool IsMessageBodyURL(const TDesC& aUrl);
-    void CreateHyperlinksFromUrlsL( CBufBase& aSource );
+    TBool IsMessageBodyURLL(const TDesC& aUrl);
+	void CreateHyperlinksFromUrlsL( CBufBase& aSource );
     //Returns ETrue of clicking on a link requires a browser to be launched
     TBool NeedToLaunchBrowserL( const TDesC& aUrl );
     //Launch the browser as a standalone app
@@ -186,6 +332,7 @@
     void HandleWindowCommandL( const TDesC& aTargetName, TBrCtlWindowCommand aCommand ); 
        
     TRect CalcAttachmentStatusRect();
+    void TouchFeedback();
 
 private: // data
 
@@ -222,6 +369,11 @@
     //way to keep track of the current image being displayed by the indicator
     TInt iAttachmentDownloadImageHandle;
     CFreestyleEmailUiAknStatusIndicator* iStatusIndicator;
+    CEUiHtmlViewerSettings* iViewerSettings;
+    
+    TBool iHeaderExpanded;
+    // tactile feed back -- not owned
+    MTouchFeedback* iTouchFeedBack;
     };
 
 
--- a/emailuis/emailui/inc/FreestyleEmailUiLauncherGridVisualiser.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/inc/FreestyleEmailUiLauncherGridVisualiser.h	Fri Mar 12 15:41:14 2010 +0200
@@ -40,6 +40,7 @@
 
 #include "FSEmailLauncherItem.h"
 #include "freestyleemailuimailboxdeleter.h"
+#include "FreestyleEmailUiUtilities.h"
 
 // FORWARD DECLARATIONS 
 class CBrushAnimation;
@@ -63,7 +64,8 @@
                      				   	 public MAlfBitmapProvider,
                      				   	 public MFSEmailLauncherItemObserver,
                      				   	 public MEikScrollBarObserver,
-                     				   	 public MFSEmailUiMailboxDeleteObserver
+                     				   	 public MFSEmailUiMailboxDeleteObserver,
+  									     public MFSEmailUiGenericTimerCallback
     {
 public:
     enum TDirection
@@ -184,6 +186,17 @@
 	 */
 	void FlipStateChangedL( TBool aKeyboardFlipOpen );
 
+    /**
+     * Handles application foreground events. When applcation is brought to
+     * foreground, calls the virtual HandleForegroundEventL() method, which
+     * can be implemented by subclasses.
+     */
+    virtual void HandleAppForegroundEventL( TBool aForeground );
+	
+	// Fire timer callback
+	void TimerEventL( CFSEmailUiGenericTimer* aTriggeredTimer );
+
+	
 // <cmail> Toolbar    
 private: // from
     
@@ -404,6 +417,9 @@
     TFSMailMsgId iMailboxToDelete;
     
     CCoeControl* iCoeControl;
+
+    // Timer to postpone the Drawing 
+    CFSEmailUiGenericTimer* iStartupCallbackTimer;
     };
 
 #endif // __FREESTYLEEMAILUI_MAINGRIDUIVISUALISER_H__
--- a/emailuis/emailui/inc/FreestyleEmailUiMailListModel.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/inc/FreestyleEmailUiMailListModel.h	Fri Mar 12 15:41:14 2010 +0200
@@ -24,6 +24,7 @@
 
 // INTERNAL INCLUDES
 #include "FreestyleEmailUiListModel.h"
+#include "fstreelistconstants.h"
 
 // FORWARD DECLARATIONS
 class CFreestyleEmailUiAppUi;
@@ -152,6 +153,11 @@
 	 */
     void Reset();
 
+    /**
+     * Returns ItemIds for items under specific node.
+     */
+    void GetItemIdsUnderNodeL( const TFsTreeItemId aNodeId, RFsTreeItemIdList& aMessageIds ) const;
+    
 protected: // construction
     
     // C++ constructor.
--- a/emailuis/emailui/inc/FreestyleEmailUiMailListVisualiser.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/inc/FreestyleEmailUiMailListVisualiser.h	Fri Mar 12 15:41:14 2010 +0200
@@ -31,6 +31,9 @@
 //</cmail>
 #include "FSEmailBuildFlags.h"
 
+#include <touchfeedback.h>
+#include <touchlogicalfeedback.h>
+
 // INTERNAL INCLUDES
 #include "FreestyleEmailUiViewBase.h"
 #include "FreestyleEmailUiListVisualiser.h"
@@ -38,6 +41,7 @@
 #include "FreestyleEmailUiControlBarCallback.h"
 #include "FreestyleEmailUiUtilities.h"
 #include "FreestyleEmailUiContactHandlerObserver.h"
+#include "cmailboxstateext.h"
 
 // FORWARD DECLARATIONS
 class CAlfTextVisual;
@@ -78,6 +82,7 @@
 class CEUiEmailListTouchManager;
 class MFSMailIterator;
 class CAknStylusPopUpMenu;
+template <class T> struct TDeleteTask;
 
 /**
  * CMailListModelUpdater
@@ -258,7 +263,8 @@
 									 public MFSEmailUiSortListCallback,
 									 public MFsTreeListObserver,
 									 public MFSEmailUiContactHandlerObserver,
-									 public CMailListModelUpdater::MObserver
+									 public CMailListModelUpdater::MObserver,
+									 public MEmailMailboxState
 // </cmail>
 	{
 friend class CMailListUpdater;
@@ -372,7 +378,7 @@
 	TRect SortButtonRect();
 
 	// Update theme colors
-	void UpdateTheme();
+	void UpdateTheme(const TBool aSystemUpdate = ETrue);
 
 	// Navigation functions, used mainly from viewer
 	TBool IsNextMsgAvailable( TFSMailMsgId aCurrentMsgId, TFSMailMsgId& aFoundNextMsgId, TFSMailMsgId& aFoundNextMsgFolder ) const;
@@ -421,6 +427,11 @@
     */
     void NotifyDateChangedL();
 
+    // Sets aActiveMailboxId and aActiveFolderId from iMailFolder if available
+    TInt GetActiveFolderId(TFSMailMsgId& aActiveMailboxId, TFSMailMsgId& aActiveFolderId) const;
+
+    // Creates CMailboxStateExtension with this class set as dataprovider
+    void CreateExtensionL();
 private: // from
 
     /**
@@ -536,7 +547,12 @@
 	// Message deletion internal functions
 	void DeleteFocusedMessageL();
 	void DeleteMarkedMessagesL();
-	static TInt DoDeleteMarkedMessages( TAny* aSelfPtr );
+    void DeleteMessagesUnderNodeL( const TFsTreeItemId aNodeId );
+    void ConfirmAndStartDeleteTaskL( TDeleteTask<CFSEmailUiMailListVisualiser>* aTask );
+    TBool ConfirmDeleteL( const TInt aItemCount, const TFsTreeItemId aItemId ) const;
+    static TInt DoExecuteDeleteTask( TAny* aSelfPtr );
+    void HandleDeleteTaskL( const RFsTreeItemIdList& aEntries );
+    void HandleDeleteTaskLeavingCodeL( const RFsTreeItemIdList& aEntries );
 
 	// Helper functions to access model data
 	TFSMailMsgId MsgIdFromIndex( TInt aItemIdx ) const;
@@ -703,6 +719,8 @@
 
 
 private: // Private objects
+    // Extension to support Ozone-plugin's check for active mailbox
+    CMailboxStateExtension* iExtension;
     // Reference to Alf environment
     CAlfEnv& iEnv;
   	// Mail list updater timer
@@ -780,6 +798,7 @@
 
     TBool iShowReplyAll;
     // Was focus visible in the ListView.
+    TDeleteTask<CFSEmailUiMailListVisualiser>* iDeleteTask;
     TBool iLastFocus;
     //used to prevent Call application execution (on keyup of call button) when call to contact required
     TBool iConsumeStdKeyYes_KeyUp;
@@ -787,6 +806,8 @@
     TBool iForceRefresh;
     // true if message viewer/editor is open to disable background list updates
     TBool iMailOpened;
+    // tactile feed back -- not owned
+    MTouchFeedback* iTouchFeedBack;
   	};
 
 
--- a/emailuis/emailui/inc/FreestyleEmailUiUtilities.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/inc/FreestyleEmailUiUtilities.h	Fri Mar 12 15:41:14 2010 +0200
@@ -111,7 +111,7 @@
 	
     static void ShowGlobalErrorNoteL( TInt aResourceStringId );
     static void ShowGlobalInfoNoteL( TInt aResourceStringId );
-    
+    static void ShowDiscreetInfoNoteL( TInt aResourceStringId );
     /**
     * Creates and shows a local wait note. Caller must pass a member variable pointer
     * which will hold the created wait note instance. This must NOT be an automatic variable.
--- a/emailuis/emailui/inc/FreestyleEmailUiViewBase.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/inc/FreestyleEmailUiViewBase.h	Fri Mar 12 15:41:14 2010 +0200
@@ -72,7 +72,7 @@
      * foreground, calls the virtual HandleForegroundEventL() method, which
      * can be implemented by subclasses.
      */
-    void HandleAppForegroundEventL( TBool aForeground );
+    virtual void HandleAppForegroundEventL( TBool aForeground );
 
     /**
     * Inherited classes should override this to react to skin or layout changes
@@ -317,6 +317,7 @@
     TBool iSendToBackgroundOnDeactivation;
     // View's active status
     TBool iViewActive;
+protected: // to enable overridning 
     TBool iWasActiveControlGroup;
     };
 
--- a/emailuis/emailui/inc/FreestyleMessageHeaderHTML.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/inc/FreestyleMessageHeaderHTML.h	Fri Mar 12 15:41:14 2010 +0200
@@ -37,25 +37,28 @@
                                   RWriteStream& aWriteStream, 
                                   TInt aVisibleWidth, 
                                   TInt aScrollPosition,
-                                  TBidiText::TDirectionality aDirectionality = TBidiText::ELeftToRight);
+                                  const TBool aAutoLoadImages,                                  
+                                  const TBool aExpanded );
     IMPORT_C static void ExportL( CFSMailMessage& aMailMessage, 
                                   RFile& aFile, 
                                   TInt aVisibleWidth, 
                                   TInt aScrollPosition,
-                                  TBidiText::TDirectionality aDirectionality = TBidiText::ELeftToRight);
+                                  const TBool aAutoLoadImages,
+                                  const TBool aExpanded );
     IMPORT_C static void ExportL( CFSMailMessage& aMailMessage, 
                                   RFs& aFs, 
                                   const TPath& aFilePath, 
                                   TInt aVisibleWidth, 
                                   TInt aScrollPosition,
-                                  TBidiText::TDirectionality aDirectionality = TBidiText::ELeftToRight);
+                                  const TBool aAutoLoadImages,
+                                  const TBool aExpanded );
     
     IMPORT_C static CFreestyleMessageHeaderHTML* NewL( CFSMailMessage& aMailMessage,
                                                        RWriteStream& aWriteStream,
                                                        TInt aVisibleWidth,
                                                        TInt aScrollPosition,
-                                                       TBidiText::TDirectionality aDirectionality = TBidiText::ELeftToRight
-                                                       );
+                                                       const TBool aAutoLoadImages,
+                                                       const TBool aExpanded );
     
     ~CFreestyleMessageHeaderHTML();
     
@@ -66,7 +69,8 @@
                                  RWriteStream& aWriteStream,
                                  TInt aVisibleWidth,
                                  TInt aScrollPosition,
-                                 TBidiText::TDirectionality aDirectionality);
+                                 const TBool aAutoLoadImages,
+                                 const TBool aExpanded );
     void ConstructL();
     
     void HTMLStartL() const;
@@ -77,6 +81,8 @@
     void HTMLMetaL() const;
     void HTMLHeaderEndL() const;
 
+    void ExportDisplayImagesTableL() const;
+
     void ExportHTMLBodyL() const;
     void HTMLBodyStartL() const;
     void HTMLBodyEndL() const;
@@ -152,9 +158,9 @@
     RWriteStream&               iWriteStream;
     TInt                        iVisibleWidth;
     TInt                        iScrollPosition;
-    TBidiText::TDirectionality  iDirectionality;
+    TBool                       iAutoLoadImages;
     TBool                       iMirrorLayout;
-     
+    TBool                       iExpanded;
     RPointerArray<CFSMailMessagePart> iAttachments;
 };
 
--- a/emailuis/emailui/inc/OverlayControl.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/inc/OverlayControl.h	Fri Mar 12 15:41:14 2010 +0200
@@ -24,6 +24,10 @@
 #include <coecntrl.h>
 #include <eikenv.h>
 #include <AknIconUtils.h>
+
+#include <touchfeedback.h>
+#include <touchlogicalfeedback.h>
+
 #include <freestyleemailui.mbg>
 #include "FreestyleEmailUiUtilities.h"
 
@@ -93,6 +97,8 @@
 	CFbsBitmap* iBitmap;
 	CFbsBitmap* iMask;
 	MOverlayControlObserver* iObserver;
+    // tactile feed back -- not owned
+    MTouchFeedback* iTouchFeedBack;
 	};
 
 #endif // CTESTOVERLAYCONTROL_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailuis/emailui/inc/fsemailstatuspaneindicatorhandler.h	Fri Mar 12 15:41:14 2010 +0200
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2010 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Handles mailiindicator updating
+*
+*/
+
+
+#ifndef __TFSEMAILSTATUSPANEINDICATORHANDLER_H_
+#define __TFSEMAILSTATUSPANEINDICATORHANDLER_H_
+
+#include "FreestyleEmailUiConstants.h"
+
+class TFsEmailStatusPaneIndicatorHandler
+    {
+public:
+    /*
+     *  Updates the statuspane mailindicator if needed.
+     */ 
+    static void StatusPaneMailIndicatorHandlingL( TInt aMailBoxId  );    
+    };
+#endif /* __TFSEMAILSTATUSPANEINDICATORHANDLER_H */
--- a/emailuis/emailui/inc/ncscomposeviewcontainer.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/inc/ncscomposeviewcontainer.h	Fri Mar 12 15:41:14 2010 +0200
@@ -642,6 +642,10 @@
     */
    virtual TPoint ViewPosition() const;
 
+private:
+
+   void DoUpdateSubjectL();
+
 private: // data
     
     /**
--- a/emailuis/emailui/inc/ncsheadercontainer.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/inc/ncsheadercontainer.h	Fri Mar 12 15:41:14 2010 +0200
@@ -21,9 +21,7 @@
 #define __NCSEMAILHEADERUI_H__
 
 #include <aknlongtapdetector.h>
-
-#include "cpbkxremotecontactlookupenv.h"
-#include "cpbkxremotecontactlookupserviceuicontext.h"
+#include <cpbkxremotecontactlookupserviceuicontext.h>
 
 #include "FreestyleEmailUi.hrh"
 #include "ncsaddressinputfield.h"
@@ -324,6 +322,8 @@
 	
 	void ShowPopupMenuBarL( TBool aShow );
 
+	TInt GetToLineHeight() const;
+	
 	TBool IsToFieldEmpty() const;
 
 	TBool IsCcFieldEmpty() const;
--- a/emailuis/emailui/inc/ncspopuplistbox.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/inc/ncspopuplistbox.h	Fri Mar 12 15:41:14 2010 +0200
@@ -144,6 +144,8 @@
     
     void SetListItemsFromArrayL();
  		
+    TInt RoundToItemHeight(const TInt aPopupHeight) const;
+    
     void SetPopupHeight();
  
     void SetScrollBarVisibilityL();
--- a/emailuis/emailui/inc/ncssubjectfield.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/inc/ncssubjectfield.h	Fri Mar 12 15:41:14 2010 +0200
@@ -140,11 +140,6 @@
     
     void UpdateFontSize();
     
-
-    void HandleFocusChangedL();
-    
-    static TInt DoHandleFocusChanged( TAny* aSelfPtr ); 
-    
     //<cmail>
     void HandlePointerEventL( const TPointerEvent& aPointerEvent );
     //</cmail>
--- a/emailuis/emailui/loc/freestyleemailui.loc	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/loc/freestyleemailui.loc	Fri Mar 12 15:41:14 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 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"
@@ -35,7 +35,7 @@
 // r:TB9.1
 //
 #define qtn_fse_launcher_settings	"Settings"
-	
+
 // <cmail> Removed exit and hide
 // </cmail>
 
@@ -119,7 +119,7 @@
 //
 #define qtn_fse_message_list_sent	"Sent items"
 
-// d:Outbox 
+// d:Outbox
 // l:main_sp_fs_ctrlbar_ddmenu_pane_t1
 // r:TB9.1
 //
@@ -132,25 +132,25 @@
 #define qtn_fse_message_list_search_divider_inbox	"Inbox"
 
 // d:Sent items divider in search results screen
-// l:list_single_dyc_row_text_pane_t1 
+// l:list_single_dyc_row_text_pane_t1
 // r:TB9.1
 //
 #define qtn_fse_message_list_search_divider_sent_items	"Sent items"
 
 // d:Drafts divider in search results screen
-// l:list_single_dyc_row_text_pane_t1 
+// l:list_single_dyc_row_text_pane_t1
 // r:TB9.1
 //
 #define qtn_fse_message_list_search_divider_drafts	"Drafts"
 
 // d:Outbox divider in search results screen
-// l:list_single_dyc_row_text_pane_t1 
+// l:list_single_dyc_row_text_pane_t1
 // r:TB9.1
 //
 #define qtn_fse_message_list_search_divider_outbox	"Outbox"
 
 // d:Deleted items
-// l:main_sp_fs_ctrlbar_ddmenu_pane_t1 
+// l:main_sp_fs_ctrlbar_ddmenu_pane_t1
 // r:TB9.1
 //
 #define qtn_fse_message_list_deleted_items	"Deleted items"
@@ -161,37 +161,37 @@
 //
 #define qtn_fse_viewer_header_subject	"Subject:"
 
-// d:Mail viewer header item, see UI spec for more details 
+// d:Mail viewer header item, see UI spec for more details
 // l:list_single_cmail_header_caption_pane_t1
 // r:TB9.1
 //
 #define qtn_fse_viewer_header_from	"From:"
 
-// d:Mail viewer header item, see UI spec for more details 
+// d:Mail viewer header item, see UI spec for more details
 // l:list_single_cmail_header_caption_pane_t1
 // r:TB9.1
 //
 #define qtn_fse_viewer_header_to	"To:"
 
-// d:Mail viewer header item, see UI spec for more details 
+// d:Mail viewer header item, see UI spec for more details
 // l:list_single_cmail_header_caption_pane_t1
 // r:TB9.1
 //
 #define qtn_fse_viewer_header_cc	"Cc:"
 
-// d:Mail viewer header item, see UI spec for more details 
+// d:Mail viewer header item, see UI spec for more details
 // l:list_single_cmail_header_caption_pane_t1
 // r:TB9.1
 //
 #define qtn_fse_viewer_header_bcc	"Bcc:"
 
-// d:Mail viewer header item, see UI spec for more details 
+// d:Mail viewer header item, see UI spec for more details
 // l:list_single_cmail_header_caption_pane_t1
 // r:TB9.1
 //
 #define qtn_fse_viewer_header_sent	"Sent:"
 
-// d:Mail viewer header item, see UI spec for more details 
+// d:Mail viewer header item, see UI spec for more details
 // l:list_single_cmail_header_detail_pane_t1
 // r:TB9.1
 //
@@ -230,7 +230,7 @@
 // d:Options menu item
 // l:list_single_pane_t1_cp2
 // r:TB9.1
-//	
+//
 #define qtn_fse_message_list_options_settings	"Settings"
 
 // d:Options menu item
@@ -334,7 +334,7 @@
 //
 #define qtn_fse_message_list_options_flag	"Flag"
 
-// d:Popup list header 
+// d:Popup list header
 // l:heading_pane_t1
 // r:TB9.1
 //
@@ -562,7 +562,7 @@
 //
 #define qtn_fse_message_list_options_empty_deleted_items	"Empty deleted items"
 
-// d:Submenu item in options menu 
+// d:Submenu item in options menu
 // l:list_single_popup_submenu_pane_t1
 // r:TB9.1
 //
@@ -687,200 +687,200 @@
 // d:Delete multiple emails query
 // l:popup_note_window/opt2
 // r:TB9.1
-//	
+//
 #define qtn_fse_delete_mails_note	"Delete %N e-mails?"
 
 // d:Date divider text in list
 // l:list_single_dyc_row_text_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_message_list_date_monday_divider	"Monday"
 
 // d:Date divider text in list
 // l:list_single_dyc_row_text_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_message_list_date_tuesday_divider	"Tuesday"
 
 // d:Date divider text in list
 // l:list_single_dyc_row_text_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_message_list_date_wednesday_divider	"Wednesday"
 
 // d:Date divider text in list
 // l:list_single_dyc_row_text_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_message_list_date_thursday_divider	"Thursday"
 
 // d:Date divider text in list
 // l:list_single_dyc_row_text_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_message_list_date_friday_divider	"Friday"
 
 // d:Date divider text in list
 // l:list_single_dyc_row_text_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_message_list_date_saturday_divider	"Saturday"
 
 // d:Date divider text in list
 // l:list_single_dyc_row_text_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_message_list_date_sunday_divider	"Sunday"
 
 // d:Date divider text in list
 // l:list_single_dyc_row_text_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_message_list_date_today_divider	"Today"
 
 // d:Date divider text in list
 // l:list_single_dyc_row_text_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_message_list_date_yesterday_divider	"Yesterday"
 
 // d:Query note for call sender functionality
 // l:popup_note_window/opt2
 // r:TB9.1
-//	
+//
 #define qtn_fse_viewer_call_sender_query	"Call sender\n%U?"
 
 // d:Message size info to list preview pane. The descriptor argument
 // d:contains the number and type of the file size (e.g Message size: 2 MB)
 // l:list_single_dyc_row_text_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_list_message_size	"Message size: %U"
 
 // d:"More" submenu item
 // l:list_single_pane_t1_cp2/opt3
 // r:TB9.1
-//	
+//
 #define qtn_fse_message_list_options_more	"More"
 
 // d:Menu text 'Extra Recepient fields'
 // l:list_single_pane_t1_cp2/opt3
 // r:TB9.2
-//  
+//
 #define qtn_fse_editor_options_extra_recepient_fields "Extra Recepient fields"
 
 // d:Search selection in options menu
 // l:list_single_pane_t1_cp2
 // r:TB9.1
-//	
+//
 #define qtn_fse_message_list_options_search	"Search"
 
-// d:"Title bar" header for searhc screen, see UI spec for details 
+// d:"Title bar" header for searhc screen, see UI spec for details
 // l:fse_search_header_text_1
 // r:TB9.1
-//	
+//
 #define qtn_fse_message_list_search	"Search:"
 
 // d:"Title bar" header for searhc screen, see UI spec for details
 // l:fse_search_header_text_1
 // r:TB9.1
-//	
+//
 #define qtn_fse_message_list_search_for	"Search for:"
 
 // d:"Title bar" header for searhc screen, see UI spec for details
 // l:fse_search_header_text_1
 // r:TB9.1
-//	
+//
 #define qtn_fse_message_list_searching	"Searching:"
 
 // d:"Title bar" header for searhc screen, see UI spec for details
 // l:fse_search_header_text_1
 // r:TB9.1
-//	
+//
 #define qtn_fse_message_list_search_results	"Search results:"
 
 // d:Options menu item
 // l:list_single_pane_t1_cp2
 // r:TB9.1
-//	
+//
 #define qtn_fse_message_list_options_stop_search	"Stop search"
 
 // d:Options menu item
 // l:list_single_pane_t1_cp2
 // r:TB9.1
-//	
+//
 #define qtn_fse_message_list_options_new_search	"New search"
 
 // d:Options menu item
 // l:list_single_pane_t1_cp2
 // r:TB9.1
-//	
+//
 #define qtn_fse_message_list_options_connection_info	"Connection details"
 
 // d:Options menu item
 // l:list_single_popup_submenu_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_viewer_options_copy_to_clipboard	"Copy to clipboard"
 
 // d:Options menu item
 // l:list_single_popup_submenu_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_viewer_options_copy_text	"Copy text"
 
 // d:Options menu item
 // l:list_single_popup_submenu_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_message_list_options_create_meeting	"Create meeting"
 
 // d:Options menu item
 // l:list_single_popup_submenu_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_message_list_options_compose	"New message"
 
 // d:Options menu item
 // l:list_single_popup_submenu_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_viewer_options_call	"Call"
 
 // d:Options menu item
 // l:list_single_popup_submenu_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_viewer_options_create_message	"Create message"
 
 // d:Options menu item
 // l:list_single_popup_submenu_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_viewer_options_create_email	"Create mail"
 
 // d:Options menu item
 // l:list_single_popup_submenu_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_viewer_options_remote_lookup	"Search from remote"
 
 // d:Options menu item
 // l:list_single_popup_submenu_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_viewer_options_open_web	"Open in Web"
 
 // d:Options menu item
 // l:list_single_popup_submenu_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_intra_fseoptions_open_intra	"Open in intranet"
 
 // d:Attachments line in text viewer
 // l:list_single_cmail_header_caption_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_viewer_attachments_text	"Attachments (%N)"
 
 // d:Attachments line in text viewer with the attachment size info.
@@ -888,37 +888,37 @@
 // d:contains the total size including the type (KB or MB).
 // l:list_single_cmail_header_detail_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_viewer_header_attachments	"Attachments (%N) %U"
 
 // d:View HTML message line in text viewer
 // l:list_single_cmail_header_detail_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_viewer_view_fetching_content	"Fetching content"
 
 // d:View HTML message line in text viewer
 // l:list_single_cmail_header_detail_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_viewer_header_view_html_message	"View HTML message"
 
 // d:Selectable line text in popup selection list
 // l:list_single_graphic_pane_t1_cp2
 // r:TB9.1
-//	
+//
 #define qtn_fse_viewer_options_add_to_contacts_create_new	"Create new"
 
 // d:Selectable line text in popup selection list
 // l:list_single_graphic_pane_t1_cp2
 // r:TB9.1
-//	
+//
 #define qtn_fse_viewer_options_add_to_contacts_update_existing	"Update existing"
 
 // d:Confirmation query. Informs that sync status is in offline mode and asks if user wants to go online.
 // l:popup_note_window
 // r:TB9.1
-//	
+//
 #define qtn_fse_query_sync_status_go_online	"Sync is in offline mode. Go online?"
 
 // d:Information note.
@@ -989,7 +989,7 @@
 // l:popup_note_window/opt2
 // r:TB9.1
 //
-#define qtn_fse_confirm_note_message_copied	"Message copied to %U" 
+#define qtn_fse_confirm_note_message_copied	"Message copied to %U"
 
 // d:Information note. Informs that messages are copied to a folder.
 // d:%U is replaced with the name of the folder.
@@ -997,30 +997,30 @@
 // l:popup_note_window/opt2
 // r:TB9.1
 //
-#define qtn_fse_confirm_note_messages_copied	"%N messages copied to %U" 
+#define qtn_fse_confirm_note_messages_copied	"%N messages copied to %U"
 
 // d:Confirmation query. Informs that phone number was not found and asks if search from remote should be started.
 // l:popup_note_window
 // r:TB9.1
-//	
+//
 #define qtn_fse_query_no_phone_number_found_search_server "No number found in Contacts. Search on server?"
 
 // d:Information note.
 // l:popup_note_window/opt2
 // r:TB9.1
-//	
+//
 #define qtn_fse_error_general_no_phone_number "No phone number available"
 
 // d:Information note.
 // l:popup_note_window/opt2
 // r:TB9.1
-//	
+//
 #define qtn_fse_error_general_no_email_address "No e-mail address available"
 
 // d:Information note.
 // l:popup_note_window/opt2
 // r:TB9.1
-//	
+//
 #define qtn_fse_query_no_phone_number_found	"No phone number found in Contacts"
 
 // d:Information note. Informs that meeting will appear in Calendar after next sync.
@@ -1122,79 +1122,79 @@
 // d:Action menu item
 // l:sp_fs_action_menu_list_gene_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_action_menu_open	"Open"
 
 // d:Action menu item
 // l:sp_fs_action_menu_list_gene_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_action_menu_reply	"Reply"
 
 // d:Action menu item
 // l:sp_fs_action_menu_list_gene_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_action_menu_reply_all	"Reply to all"
 
 // d:Action menu item
 // l:sp_fs_action_menu_list_gene_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_action_menu_forward	"Forward"
 
 // d:Action menu item
 // l:sp_fs_action_menu_list_gene_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_action_menu_delete	"Delete"
 
 // d:Action menu item
 // l:sp_fs_action_menu_list_gene_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_action_menu_call_sender	"Call sender"
 
 // d:Action menu item
 // l:sp_fs_action_menu_list_gene_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_action_menu_move_to_drafts	"Move to Drafts"
 
 // d:Action menu item
 // l:sp_fs_action_menu_list_gene_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_action_menu_remove_from_calendar	"Remove from Cal."
 
 // d:Action menu item
 // l:sp_fs_action_menu_list_gene_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_action_menu_accept	"Accept"
 
 // d:Action menu item
 // l:sp_fs_action_menu_list_gene_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_action_menu_tentative	"Tentative"
 
 // d:Action menu item
 // l:sp_fs_action_menu_list_gene_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_action_menu_decline	"Decline"
 
 // d:Action menu item
 // l:sp_fs_action_menu_list_gene_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_action_menu_mark_read	"Mark as read"
 
 // d:Action menu item
 // l:sp_fs_action_menu_list_gene_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_action_menu_mark_unread	"Mark as unread"
 
 // d:Action menu item
@@ -1218,31 +1218,31 @@
 // d:TO-field label text
 // l:list_single_cmail_header_caption_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_header_to "To:"
 
 // d:CC-field label text
 // l:list_single_cmail_header_caption_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_header_cc "Cc:"
 
 // d:BCC-field label text
 // l:list_single_cmail_header_caption_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_header_bcc "Bcc:"
 
 // d:Subject-field label text
 // l:list_single_cmail_header_caption_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_header_subject "Subject:"
 
 // d:attachments label text
 // l:list_single_cmail_header_caption_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_header_attachment_label "Attachs.:"
 
 // d:attachments field text
@@ -1250,7 +1250,7 @@
 // d:%U stands for the size of attachment files including the unit (KB or MB).
 // l:list_single_cmail_header_detail_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_header_attachments "%N attachments (%U)"
 
 // d:attachments field single text
@@ -1258,211 +1258,211 @@
 // d:%1U stands for the size of attachment file.
 // l:list_single_cmail_header_detail_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_header_single_attachment "%0U (%1U)"
 
 // d:Menu text 'Send'
 // l:list_single_pane_t1_cp2
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_options_send "Send"
 
 // d:Menu text 'Show Cc'
 // l:list_single_popup_submenu_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_options_show_cc "Show Cc field"
 
 // d:Menu text 'Hide Cc'
 // l:list_single_popup_submenu_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_options_hide_cc "Hide Cc field"
 
 // d:Menu text 'Show Bcc'
 // l:list_single_popup_submenu_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_options_show_bcc "Show Bcc field"
 
 // d:Menu text 'Hide Bcc'
 // l:list_single_popup_submenu_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_options_hide_bcc "Hide Bcc field"
 
 // d:Menu text 'Priority'
 // l:list_single_pane_t1_cp2/opt3
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_options_priority "Priority"
 
 // d:Menu text priority->'High'
 // l:list_single_popup_submenu_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_options_priority_high "High"
 
 // d:Menu text priority->'Normal'
 // l:list_single_popup_submenu_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_options_priority_normal "Normal"
 
 // d:Menu text priority->'Low'
 // l:list_single_popup_submenu_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_options_priority_low "Low"
 
 // d:Menu text 'More'
 // l:list_single_pane_t1_cp2/opt3
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_options_more "More"
 
 // d:Menu text 'Insert from contacts'
 // l:list_single_pane_t1_cp2
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_options_insert_from_contacts "Add recipient"
 
 // d:Menu text save as draft
 // l:list_single_pane_t1_cp2
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_options_save_as_draft "Save to Drafts"
 
 // d:Menu text 'Add attachment'
 // l:list_single_pane_t1_cp2
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_options_add_attachment "Add attachment"
 
 // d:Menu text 'Remove attachment'
 // l:list_single_pane_t1_cp2
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_options_remove_attachment "Remove attachment"
 
 // d:Menu text Remove all attachments
 // l:list_single_pane_t1_cp2
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_options_remove_all_attachments "Remove all attachments"
 
 // d:Menu text Flag
 // l:list_single_pane_t1_cp2
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_options_flag "Flag"
 
 // d:Save to drafts dialog text
 // l:popup_note_wait_window
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_wait_note_saving_to_drafts "Saving message to Drafts"
 
-// d:Reply prefix. 
-// l:mce_header_field_pane_t1 
-// r:TB9.1
-//	
+// d:Reply prefix.
+// l:mce_header_field_pane_t1
+// r:TB9.1
+//
 #define qtn_ncs_engine_email_reply_prefix_text "RE: "
 
-// d:Forward prefix. 
+// d:Forward prefix.
 // l:mce_header_field_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_ncs_engine_email_forward_prefix_text "FW: "
 
-// d:To prefix. 
+// d:To prefix.
 // l:mce_header_field_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_ncs_engine_email_to_text "To: "
 
 // d:Cc prefix.
 // l:mce_header_field_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_ncs_engine_email_cc_text "Cc: "
 
-// d:From prefix. 
+// d:From prefix.
 // l:mce_header_field_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_ncs_engine_email_from_text "From: "
 
 // d:Sent prefix.
 // l:mce_header_field_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_ncs_engine_email_sent_text "Sent: "
 
-// d:Subject prefix. 
+// d:Subject prefix.
 // l:mce_header_field_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_ncs_engine_email_subject_text "Subject: "
 
-// d:Message line separator. 
+// d:Message line separator.
 // l:list_cmail_body_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_ncs_engine_email_message_line_separator_text "-----Original Message-----"
 
 // d:menu text Quick Text
 // l:list_single_pane_t1_cp2
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_options_insert_template "Insert template"
 
 // d:default text in recipient fields
 // l:list_single_cmail_header_detail_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_recipient_enter "Enter recipient"
 
 // d:default text in subject field
 // l:list_single_cmail_header_detail_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_subject_enter "Enter subject"
 
 // d:follow up item text in flag dialog
 // l:list_single_graphic_pane_t1_cp2
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_list_flag_follow_up "Follow up"
 
 // d:Clear flag item text in flag dialog
 // l:list_single_graphic_pane_t1_cp2
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_list_flag_clear "Clear flag"
 
 // d:Flag dialog title
 // l:heading_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_list_flag "Flag"
 
 // d:Draft dialog title
 // l:heading_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_close_message_query_prompt "Close message:"
 
 // d:Save to drafts item text in draft dialog
 // l:list_single_graphic_pane_t1_cp2
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_close_message_quey_save_to_drafts "Save to Drafts"
 
 // d:Delete item text in draft dialog
 // l:list_single_graphic_pane_t1_cp2
 // r:TB9.1
-//	
+//
 #define qtn_fse_editor_close_message_query_delete_message "Delete message"
 
 // d:Upmost item in addressfield match popup list. For selecting Remote lookup server search
@@ -1475,7 +1475,7 @@
 // l:control_pane_t1/opt7
 // r:TB9.1
 //
-#define qtn_ncs_softkey_select_text "Select" 
+#define qtn_ncs_softkey_select_text "Select"
 
 // d:Softkey Cancel
 // l:control_pane_t1/opt7
@@ -1630,13 +1630,13 @@
 //
 #define qtn_fse_folder_list_options_folder_settings	"Folder settings"
 
-// d:Mail viewer header item, see UI spec for more details 
+// d:Mail viewer header item, see UI spec for more details
 // l:none
 // r:TB9.1
 //
 #define qtn_fse_folder_list_message_count	"(%N)"
 
-// d:Mail viewer header item, see UI spec for more details 
+// d:Mail viewer header item, see UI spec for more details
 // l:none
 // r:TB9.1
 //
@@ -1839,7 +1839,7 @@
 // r:TB9.1
 //
 #define qtn_fse_viewer_attachment_list_options_cancel_all "Cancel all"
-	
+
 // d:Save attachment menu option in attachment list
 // l:list_single_pane_t1_cp2
 // r:TB9.1
@@ -1994,7 +1994,7 @@
 //
 #define qtn_fse_viewer_attachments_text_from "From:"
 
-// d:Download complete popup 
+// d:Download complete popup
 // l:list_single_cmail_header_detail_pane_t1
 // r:TB9.1
 //
@@ -2003,7 +2003,7 @@
 // d:Total number of complete attachments in download complete popup
 // l:list_single_cmail_header_detail_pane_t1
 // r:TB9.1
-//	
+//
 #define qtn_fse_viewer_attachments_downloaded "Attachments (%N)"
 
 // d:Personal Information Management settings list item
@@ -2182,7 +2182,7 @@
 
 // d:heading in body 1st row
 // d:%N stands for number of attachments
-// l:list_single_cmail_header_detail_pane_t1 
+// l:list_single_cmail_header_detail_pane_t1
 // r:TB9.1
 //
 #define qtn_fse_editor_attachments_header_attachments	"Attachments (%N)"
@@ -2253,7 +2253,7 @@
 // d:Header in mailbox selection dialog
 // l:heading_pane_t1
 // r:TB9.1
-//  
+//
 #define qtn_fse_launcher_select_mailbox_query_prompt	"Select mailbox:"
 
 // d:Personal information manager list title
@@ -2292,7 +2292,7 @@
 //
 #define qtn_fse_settings_applications_contacts	"Contacts"
 
-// d:Applications setting list item: Tasks 
+// d:Applications setting list item: Tasks
 // l:list_setting_pane_t1
 // r:TB9.1
 //
@@ -2333,13 +2333,13 @@
 //
 #define qtn_fse_status_email_sent	"E-mail sent"
 
-// d:Mail list options menu settings cascade menu 
+// d:Mail list options menu settings cascade menu
 // l:list_single_popup_submenu_pane_t1
 // r:TB9.1
 //
 #define qtn_fse_message_list_options_settings_mailbox	"Mailbox settings"
 
-// d:Mail list options menu settings cascade menu 
+// d:Mail list options menu settings cascade menu
 // l:list_single_popup_submenu_pane_t1
 // r:TB9.1
 //
@@ -2358,7 +2358,7 @@
 //
 #define qtn_fse_general_creating_new_mailbox	"Creating new mailbox"
 
-// d:Error note for showing that when creating a new mailbox the maximum amount 
+// d:Error note for showing that when creating a new mailbox the maximum amount
 //    of this type of mailboxes was reached.
 // l:popup_note_window/opt2
 // r:TB9.1
@@ -2522,19 +2522,19 @@
 //
 #define qtn_fse_tb_ext_reply "Reply"
 
-// d:Extended toolbar button reply, creates a reply to email message sender and other recipients 
+// d:Extended toolbar button reply, creates a reply to email message sender and other recipients
 // l:popup_preview_text_window_t1
 // r:TB9.2
 //
 #define qtn_fse_tb_ext_reply_all "Reply to all"
 
-// d:Extended toolbar button forward, creates a forward email message to the sender 
+// d:Extended toolbar button forward, creates a forward email message to the sender
 // l:popup_preview_text_window_t1
 // r:TB9.2
 //
 #define qtn_fse_tb_ext_forward "Forward"
 
-// d:Toolbar button for add attachment in editor, opens extended toolbar for attachment selection 
+// d:Toolbar button for add attachment in editor, opens extended toolbar for attachment selection
 // l:popup_preview_text_window_t1
 // r:TB9.2
 //
@@ -2600,7 +2600,7 @@
 //
 #define qtn_cmail_action_menu_mark "Mark"
 
-// d:Displayed in stylus popup menu when activated in message list view 
+// d:Displayed in stylus popup menu when activated in message list view
 // l:sp_fs_action_menu_list_gene_pane_t1
 // r:TB9.2
 //
@@ -2632,7 +2632,7 @@
 #define qtn_mail_launcher_settings_delete_multiple_mailboxes_query  "Delete %N mailboxes?"
 
 // d:Select folders item in folder list in mail list view's control bar
-// l:main_sp_fs_ctrlbar_ddmenu_pane_t1 
+// l:main_sp_fs_ctrlbar_ddmenu_pane_t1
 // r:TB9.2
 //
 #define qtn_cmail_command_area_select_folders "Select folders"
@@ -2724,42 +2724,42 @@
 // d:Copy to clipboard menu item
 // l:list_single_touch_menu_pane_t1
 // r:TB9.2
-//	
+//
 #define qtn_cmail_popup_copy_address	"Copy address"
 
-// d:Searches the contact information of the person who’s the address is. 
+// d:Searches the contact information of the person who’s the address is.
 // l:list_single_touch_menu_pane_t1
 // r:TB9.2
-//	
+//
 #define qtn_cmail_popup_search_server	"Search from server"
 
-// d:Opens the attachment 
+// d:Opens the attachment
 // l:list_single_touch_menu_pane_t1
 // r:TB9.2
-//	
+//
 #define qtn_cmail_popup_open	"Open"
 
-// d:Save the attachment 
+// d:Save the attachment
 // l:list_single_touch_menu_pane_t1
 // r:TB9.2
-//	
+//
 #define qtn_cmail_popup_save	"Save"
 
 // d:Save all the attachments
 // l:list_single_touch_menu_pane_t1
 // r:TB9.2
-//	
+//
 #define qtn_cmail_popup_save_all	"Save all"
 
-// d:Shown if the tapped attachment is being downloaded. Cancels the download.  
+// d:Shown if the tapped attachment is being downloaded. Cancels the download.
 // l:list_single_touch_menu_pane_t1
-// r:TB9.2	
+// r:TB9.2
 #define qtn_cmail_popup_cancel_download	"Cancel download"
 
 // d:Adds the web address to browser bookmarks.
 // l:list_single_touch_menu_pane_t1
 // r:TB9.2
-//	
+//
 #define qtn_cmail_popup_add_bookmark	"Add to bookmarks"
 
 // d:Open attachment in compose view
@@ -2774,9 +2774,39 @@
 //
 #define qtn_mail_stylus_popup_remove	"Remove"
 
-// d:Save to Contacts 
+// d:Save to Contacts
 // l:list_single_touch_menu_pane_t1
 // r:TB9.2
 //
 #define qtn_mail_stylus_popup_add_to_contacts  "Save to Contacts"
 
+// d:Mail viewer header item, see UI spec for more details
+// l:list_single_cmail_header_detail_pane_t1
+// r:TB9.2
+//
+#define qtn_cmail_viewer_images_not_displayed "Images are not displayed"
+
+// d:Mail viewer header item, see UI spec for more details
+// l:list_single_cmail_header_detail_pane_t1
+// r:TB9.2
+//
+#define qtn_cmail_viewer_display_images "Display images"
+
+// d:Load linked HTML images
+// l:list_setting_pane_t1
+// r:TB9.2
+//
+#define qtn_mail_setting_download_images                       "Download images"
+
+// d:Load linked HTML images option yes
+// l:list_setting_pane_t1
+// r:TB9.2
+//
+#define qtn_mail_option_alternative_yes                       "Yes"
+
+// d:Load linked HTML images option no
+// l:list_setting_pane_t1
+// r:TB9.2
+//
+#define qtn_mail_option_alternative_no                       "No"
+
--- a/emailuis/emailui/rom/freestyleemailui.iby	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/rom/freestyleemailui.iby	Fri Mar 12 15:41:14 2010 +0200
@@ -39,8 +39,10 @@
 data=DATAZ_\private\2001E277\HtmlFile\header.js private\2001E277\HtmlFile\header.js
 data=DATAZ_\private\2001E277\HtmlFile\plus.gif private\2001E277\HtmlFile\plus.gif
 data=DATAZ_\private\2001E277\HtmlFile\minus.gif private\2001E277\HtmlFile\minus.gif
+data=DATAZ_\private\2001E277\HtmlFile\email.js private\2001E277\HtmlFile\email.js
 data=DATAZ_\private\2001E277\HtmlFile\follow_up.png private\2001E277\HtmlFile\follow_up.png
 data=DATAZ_\private\2001E277\HtmlFile\follow_up_complete.png private\2001E277\HtmlFile\follow_up_complete.png
+data=DATAZ_\private\2001E277\HtmlFile\btn_middle.png private\2001E277\HtmlFile\btn_middle.png
 data=DATAZ_\private\2001E277\HtmlFile\todo_high_add.png private\2001E277\HtmlFile\todo_high_add.png
 data=DATAZ_\private\2001E277\HtmlFile\todo_low_add.png private\2001E277\HtmlFile\todo_low_add.png
 
--- a/emailuis/emailui/sis/commonemail.pkg	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/sis/commonemail.pkg	Fri Mar 12 15:41:14 2010 +0200
@@ -178,14 +178,6 @@
 "\epoc32\data\z\resource\apps\fscsendplugin.rsc"                 - "c:\resource\apps\fscsendplugin.rsc"
 "\epoc32\data\z\resource\apps\fscsendplugin.mif"                 - "c:\resource\apps\fscsendplugin.mif"
 
-; emailcontacts / remotecontactlookup
-"\epoc32\release\armv5\urel\pbkxrclservice.dll"                  - "c:\sys\bin\pbkxrclservice.dll"
-"\epoc32\data\Z\Resource\Plugins\pbkxrclservice.rsc"             - "c:\resource\plugins\pbkxrclservice.rsc"
-"\epoc32\release\armv5\urel\pbkxrclengine.dll"                   - "c:\sys\bin\pbkxrclengine.dll"
-"\epoc32\data\z\resource\apps\pbkxrclengine.rsc"                 - "c:\resource\apps\pbkxrclengine.rsc"
-"\epoc32\data\z\resource\apps\pbkxrclengine.mif"                 - "c:\resource\apps\pbkxrclengine.mif"
-"\epoc32\data\Z\private\10202BE9\2001F3FE.txt"                   - "c:\private\10202be9\2001F3FE.txt"
-
 ; meetingrequest
 "\epoc32\data\z\resource\esmrgui.rsc"                            - "c:\resource\esmrgui.rsc"
 "\epoc32\data\z\resource\esmrtasks.rsc"                          - "c:\resource\esmrtasks.rsc"
--- a/emailuis/emailui/sis/commonemail_loc.pkg	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/sis/commonemail_loc.pkg	Fri Mar 12 15:41:14 2010 +0200
@@ -187,15 +187,6 @@
 ;"\epoc32\data\z\resource\apps\fscsendplugin.rsc"                 - "c:\resource\apps\fscsendplugin.rsc"
 "\epoc32\data\z\resource\apps\fscsendplugin.mif"                 - "c:\resource\apps\fscsendplugin.mif"
 
-; emailcontacts / remotecontactlookup
-"\epoc32\release\armv5\urel\pbkxrclservice.dll"                  - "c:\sys\bin\pbkxrclservice.dll"
-"\epoc32\data\Z\Resource\Plugins\pbkxrclservice.rsc"             - "c:\resource\plugins\pbkxrclservice.rsc"
-"\epoc32\release\armv5\urel\pbkxrclengine.dll"                   - "c:\sys\bin\pbkxrclengine.dll"
-; Following line is localized, so this Engineering English line is commented out
-;"\epoc32\data\z\resource\apps\pbkxrclengine.rsc"                 - "c:\resource\apps\pbkxrclengine.rsc"
-"\epoc32\data\z\resource\apps\pbkxrclengine.mif"                 - "c:\resource\apps\pbkxrclengine.mif"
-"\epoc32\data\Z\private\10202BE9\2001F3FE.txt"                   - "c:\private\10202be9\2001F3FE.txt"
-
 ; meetingrequest
 ; Following line is localized, so this Engineering English line is commented out
 ;"\epoc32\data\z\resource\esmrgui.rsc"                            - "c:\resource\esmrgui.rsc"
@@ -278,7 +269,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r01"                 - "c:\resource\apps\fsccallplugin.r01"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r01"        - "c:\resource\apps\fscsaveascontactplugin.r01"
     "\epoc32\data\z\resource\apps\fscsendplugin.r01"                 - "c:\resource\apps\fscsendplugin.r01"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r01"                 - "c:\resource\apps\pbkxrclengine.r01"
     "\epoc32\data\z\resource\esmrgui.r01"                            - "c:\resource\esmrgui.r01"
     "\epoc32\data\z\resource\esmrtasks.r01"                          - "c:\resource\esmrtasks.r01"
     "\epoc32\data\z\resource\esmrcasplugindata.r01"                  - "c:\resource\esmrcasplugindata.r01"
@@ -295,7 +285,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r02"                 - "c:\resource\apps\fsccallplugin.r02"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r02"        - "c:\resource\apps\fscsaveascontactplugin.r02"
     "\epoc32\data\z\resource\apps\fscsendplugin.r02"                 - "c:\resource\apps\fscsendplugin.r02"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r02"                 - "c:\resource\apps\pbkxrclengine.r02"
     "\epoc32\data\z\resource\esmrgui.r02"                            - "c:\resource\esmrgui.r02"
     "\epoc32\data\z\resource\esmrtasks.r02"                          - "c:\resource\esmrtasks.r02"
     "\epoc32\data\z\resource\esmrcasplugindata.r02"                  - "c:\resource\esmrcasplugindata.r02"
@@ -312,7 +301,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r03"                 - "c:\resource\apps\fsccallplugin.r03"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r03"        - "c:\resource\apps\fscsaveascontactplugin.r03"
     "\epoc32\data\z\resource\apps\fscsendplugin.r03"                 - "c:\resource\apps\fscsendplugin.r03"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r03"                 - "c:\resource\apps\pbkxrclengine.r03"
     "\epoc32\data\z\resource\esmrgui.r03"                            - "c:\resource\esmrgui.r03"
     "\epoc32\data\z\resource\esmrtasks.r03"                          - "c:\resource\esmrtasks.r03"
     "\epoc32\data\z\resource\esmrcasplugindata.r03"                  - "c:\resource\esmrcasplugindata.r03"
@@ -329,7 +317,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r04"                 - "c:\resource\apps\fsccallplugin.r04"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r04"        - "c:\resource\apps\fscsaveascontactplugin.r04"
     "\epoc32\data\z\resource\apps\fscsendplugin.r04"                 - "c:\resource\apps\fscsendplugin.r04"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r04"                 - "c:\resource\apps\pbkxrclengine.r04"
     "\epoc32\data\z\resource\esmrgui.r04"                            - "c:\resource\esmrgui.r04"
     "\epoc32\data\z\resource\esmrtasks.r04"                          - "c:\resource\esmrtasks.r04"
     "\epoc32\data\z\resource\esmrcasplugindata.r04"                  - "c:\resource\esmrcasplugindata.r04"
@@ -346,7 +333,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r05"                 - "c:\resource\apps\fsccallplugin.r05"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r05"        - "c:\resource\apps\fscsaveascontactplugin.r05"
     "\epoc32\data\z\resource\apps\fscsendplugin.r05"                 - "c:\resource\apps\fscsendplugin.r05"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r05"                 - "c:\resource\apps\pbkxrclengine.r05"
     "\epoc32\data\z\resource\esmrgui.r05"                            - "c:\resource\esmrgui.r05"
     "\epoc32\data\z\resource\esmrtasks.r05"                          - "c:\resource\esmrtasks.r05"
     "\epoc32\data\z\resource\esmrcasplugindata.r05"                  - "c:\resource\esmrcasplugindata.r05"
@@ -363,7 +349,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r06"                 - "c:\resource\apps\fsccallplugin.r06"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r06"        - "c:\resource\apps\fscsaveascontactplugin.r06"
     "\epoc32\data\z\resource\apps\fscsendplugin.r06"                 - "c:\resource\apps\fscsendplugin.r06"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r06"                 - "c:\resource\apps\pbkxrclengine.r06"
     "\epoc32\data\z\resource\esmrgui.r06"                            - "c:\resource\esmrgui.r06"
     "\epoc32\data\z\resource\esmrtasks.r06"                          - "c:\resource\esmrtasks.r06"
     "\epoc32\data\z\resource\esmrcasplugindata.r06"                  - "c:\resource\esmrcasplugindata.r06"
@@ -380,7 +365,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r07"                 - "c:\resource\apps\fsccallplugin.r07"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r07"        - "c:\resource\apps\fscsaveascontactplugin.r07"
     "\epoc32\data\z\resource\apps\fscsendplugin.r07"                 - "c:\resource\apps\fscsendplugin.r07"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r07"                 - "c:\resource\apps\pbkxrclengine.r07"
     "\epoc32\data\z\resource\esmrgui.r07"                            - "c:\resource\esmrgui.r07"
     "\epoc32\data\z\resource\esmrtasks.r07"                          - "c:\resource\esmrtasks.r07"
     "\epoc32\data\z\resource\esmrcasplugindata.r07"                  - "c:\resource\esmrcasplugindata.r07"
@@ -397,7 +381,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r08"                 - "c:\resource\apps\fsccallplugin.r08"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r08"        - "c:\resource\apps\fscsaveascontactplugin.r08"
     "\epoc32\data\z\resource\apps\fscsendplugin.r08"                 - "c:\resource\apps\fscsendplugin.r08"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r08"                 - "c:\resource\apps\pbkxrclengine.r08"
     "\epoc32\data\z\resource\esmrgui.r08"                            - "c:\resource\esmrgui.r08"
     "\epoc32\data\z\resource\esmrtasks.r08"                          - "c:\resource\esmrtasks.r08"
     "\epoc32\data\z\resource\esmrcasplugindata.r08"                  - "c:\resource\esmrcasplugindata.r08"
@@ -414,7 +397,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r09"                 - "c:\resource\apps\fsccallplugin.r09"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r09"        - "c:\resource\apps\fscsaveascontactplugin.r09"
     "\epoc32\data\z\resource\apps\fscsendplugin.r09"                 - "c:\resource\apps\fscsendplugin.r09"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r09"                 - "c:\resource\apps\pbkxrclengine.r09"
     "\epoc32\data\z\resource\esmrgui.r09"                            - "c:\resource\esmrgui.r09"
     "\epoc32\data\z\resource\esmrtasks.r09"                          - "c:\resource\esmrtasks.r09"
     "\epoc32\data\z\resource\esmrcasplugindata.r09"                  - "c:\resource\esmrcasplugindata.r09"
@@ -431,7 +413,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r10"                 - "c:\resource\apps\fsccallplugin.r10"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r10"        - "c:\resource\apps\fscsaveascontactplugin.r10"
     "\epoc32\data\z\resource\apps\fscsendplugin.r10"                 - "c:\resource\apps\fscsendplugin.r10"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r10"                 - "c:\resource\apps\pbkxrclengine.r10"
     "\epoc32\data\z\resource\esmrgui.r10"                            - "c:\resource\esmrgui.r10"
     "\epoc32\data\z\resource\esmrtasks.r10"                          - "c:\resource\esmrtasks.r10"
     "\epoc32\data\z\resource\esmrcasplugindata.r10"                  - "c:\resource\esmrcasplugindata.r10"
@@ -448,7 +429,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r13"                 - "c:\resource\apps\fsccallplugin.r13"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r13"        - "c:\resource\apps\fscsaveascontactplugin.r13"
     "\epoc32\data\z\resource\apps\fscsendplugin.r13"                 - "c:\resource\apps\fscsendplugin.r13"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r13"                 - "c:\resource\apps\pbkxrclengine.r13"
     "\epoc32\data\z\resource\esmrgui.r13"                            - "c:\resource\esmrgui.r13"
     "\epoc32\data\z\resource\esmrtasks.r13"                          - "c:\resource\esmrtasks.r13"
     "\epoc32\data\z\resource\esmrcasplugindata.r13"                  - "c:\resource\esmrcasplugindata.r13"
@@ -465,7 +445,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r14"                 - "c:\resource\apps\fsccallplugin.r14"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r14"        - "c:\resource\apps\fscsaveascontactplugin.r14"
     "\epoc32\data\z\resource\apps\fscsendplugin.r14"                 - "c:\resource\apps\fscsendplugin.r14"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r14"                 - "c:\resource\apps\pbkxrclengine.r14"
     "\epoc32\data\z\resource\esmrgui.r14"                            - "c:\resource\esmrgui.r14"
     "\epoc32\data\z\resource\esmrtasks.r14"                          - "c:\resource\esmrtasks.r14"
     "\epoc32\data\z\resource\esmrcasplugindata.r14"                  - "c:\resource\esmrcasplugindata.r14"
@@ -482,7 +461,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r15"                 - "c:\resource\apps\fsccallplugin.r15"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r15"        - "c:\resource\apps\fscsaveascontactplugin.r15"
     "\epoc32\data\z\resource\apps\fscsendplugin.r15"                 - "c:\resource\apps\fscsendplugin.r15"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r15"                 - "c:\resource\apps\pbkxrclengine.r15"
     "\epoc32\data\z\resource\esmrgui.r15"                            - "c:\resource\esmrgui.r15"
     "\epoc32\data\z\resource\esmrtasks.r15"                          - "c:\resource\esmrtasks.r15"
     "\epoc32\data\z\resource\esmrcasplugindata.r15"                  - "c:\resource\esmrcasplugindata.r15"
@@ -499,7 +477,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r16"                 - "c:\resource\apps\fsccallplugin.r16"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r16"        - "c:\resource\apps\fscsaveascontactplugin.r16"
     "\epoc32\data\z\resource\apps\fscsendplugin.r16"                 - "c:\resource\apps\fscsendplugin.r16"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r16"                 - "c:\resource\apps\pbkxrclengine.r16"
     "\epoc32\data\z\resource\esmrgui.r16"                            - "c:\resource\esmrgui.r16"
     "\epoc32\data\z\resource\esmrtasks.r16"                          - "c:\resource\esmrtasks.r16"
     "\epoc32\data\z\resource\esmrcasplugindata.r16"                  - "c:\resource\esmrcasplugindata.r16"
@@ -516,7 +493,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r17"                 - "c:\resource\apps\fsccallplugin.r17"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r17"        - "c:\resource\apps\fscsaveascontactplugin.r17"
     "\epoc32\data\z\resource\apps\fscsendplugin.r17"                 - "c:\resource\apps\fscsendplugin.r17"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r17"                 - "c:\resource\apps\pbkxrclengine.r17"
     "\epoc32\data\z\resource\esmrgui.r17"                            - "c:\resource\esmrgui.r17"
     "\epoc32\data\z\resource\esmrtasks.r17"                          - "c:\resource\esmrtasks.r17"
     "\epoc32\data\z\resource\esmrcasplugindata.r17"                  - "c:\resource\esmrcasplugindata.r17"
@@ -533,7 +509,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r18"                 - "c:\resource\apps\fsccallplugin.r18"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r18"        - "c:\resource\apps\fscsaveascontactplugin.r18"
     "\epoc32\data\z\resource\apps\fscsendplugin.r18"                 - "c:\resource\apps\fscsendplugin.r18"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r18"                 - "c:\resource\apps\pbkxrclengine.r18"
     "\epoc32\data\z\resource\esmrgui.r18"                            - "c:\resource\esmrgui.r18"
     "\epoc32\data\z\resource\esmrtasks.r18"                          - "c:\resource\esmrtasks.r18"
     "\epoc32\data\z\resource\esmrcasplugindata.r18"                  - "c:\resource\esmrcasplugindata.r18"
@@ -550,7 +525,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r25"                 - "c:\resource\apps\fsccallplugin.r25"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r25"        - "c:\resource\apps\fscsaveascontactplugin.r25"
     "\epoc32\data\z\resource\apps\fscsendplugin.r25"                 - "c:\resource\apps\fscsendplugin.r25"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r25"                 - "c:\resource\apps\pbkxrclengine.r25"
     "\epoc32\data\z\resource\esmrgui.r25"                            - "c:\resource\esmrgui.r25"
     "\epoc32\data\z\resource\esmrtasks.r25"                          - "c:\resource\esmrtasks.r25"
     "\epoc32\data\z\resource\esmrcasplugindata.r25"                  - "c:\resource\esmrcasplugindata.r25"
@@ -567,7 +541,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r26"                 - "c:\resource\apps\fsccallplugin.r26"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r26"        - "c:\resource\apps\fscsaveascontactplugin.r26"
     "\epoc32\data\z\resource\apps\fscsendplugin.r26"                 - "c:\resource\apps\fscsendplugin.r26"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r26"                 - "c:\resource\apps\pbkxrclengine.r26"
     "\epoc32\data\z\resource\esmrgui.r26"                            - "c:\resource\esmrgui.r26"
     "\epoc32\data\z\resource\esmrtasks.r26"                          - "c:\resource\esmrtasks.r26"
     "\epoc32\data\z\resource\esmrcasplugindata.r26"                  - "c:\resource\esmrcasplugindata.r26"
@@ -584,7 +557,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r27"                 - "c:\resource\apps\fsccallplugin.r27"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r27"        - "c:\resource\apps\fscsaveascontactplugin.r27"
     "\epoc32\data\z\resource\apps\fscsendplugin.r27"                 - "c:\resource\apps\fscsendplugin.r27"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r27"                 - "c:\resource\apps\pbkxrclengine.r27"
     "\epoc32\data\z\resource\esmrgui.r27"                            - "c:\resource\esmrgui.r27"
     "\epoc32\data\z\resource\esmrtasks.r27"                          - "c:\resource\esmrtasks.r27"
     "\epoc32\data\z\resource\esmrcasplugindata.r27"                  - "c:\resource\esmrcasplugindata.r27"
@@ -601,7 +573,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r28"                 - "c:\resource\apps\fsccallplugin.r28"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r28"        - "c:\resource\apps\fscsaveascontactplugin.r28"
     "\epoc32\data\z\resource\apps\fscsendplugin.r28"                 - "c:\resource\apps\fscsendplugin.r28"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r28"                 - "c:\resource\apps\pbkxrclengine.r28"
     "\epoc32\data\z\resource\esmrgui.r28"                            - "c:\resource\esmrgui.r28"
     "\epoc32\data\z\resource\esmrtasks.r28"                          - "c:\resource\esmrtasks.r28"
     "\epoc32\data\z\resource\esmrcasplugindata.r28"                  - "c:\resource\esmrcasplugindata.r28"
@@ -618,7 +589,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r29"                 - "c:\resource\apps\fsccallplugin.r29"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r29"        - "c:\resource\apps\fscsaveascontactplugin.r29"
     "\epoc32\data\z\resource\apps\fscsendplugin.r29"                 - "c:\resource\apps\fscsendplugin.r29"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r29"                 - "c:\resource\apps\pbkxrclengine.r29"
     "\epoc32\data\z\resource\esmrgui.r29"                            - "c:\resource\esmrgui.r29"
     "\epoc32\data\z\resource\esmrtasks.r29"                          - "c:\resource\esmrtasks.r29"
     "\epoc32\data\z\resource\esmrcasplugindata.r29"                  - "c:\resource\esmrcasplugindata.r29"
@@ -635,7 +605,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r30"                 - "c:\resource\apps\fsccallplugin.r30"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r30"        - "c:\resource\apps\fscsaveascontactplugin.r30"
     "\epoc32\data\z\resource\apps\fscsendplugin.r30"                 - "c:\resource\apps\fscsendplugin.r30"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r30"                 - "c:\resource\apps\pbkxrclengine.r30"
     "\epoc32\data\z\resource\esmrgui.r30"                            - "c:\resource\esmrgui.r30"
     "\epoc32\data\z\resource\esmrtasks.r30"                          - "c:\resource\esmrtasks.r30"
     "\epoc32\data\z\resource\esmrcasplugindata.r30"                  - "c:\resource\esmrcasplugindata.r30"
@@ -652,7 +621,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r31"                 - "c:\resource\apps\fsccallplugin.r31"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r31"        - "c:\resource\apps\fscsaveascontactplugin.r31"
     "\epoc32\data\z\resource\apps\fscsendplugin.r31"                 - "c:\resource\apps\fscsendplugin.r31"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r31"                 - "c:\resource\apps\pbkxrclengine.r31"
     "\epoc32\data\z\resource\esmrgui.r31"                            - "c:\resource\esmrgui.r31"
     "\epoc32\data\z\resource\esmrtasks.r31"                          - "c:\resource\esmrtasks.r31"
     "\epoc32\data\z\resource\esmrcasplugindata.r31"                  - "c:\resource\esmrcasplugindata.r31"
@@ -669,7 +637,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r32"                 - "c:\resource\apps\fsccallplugin.r32"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r32"        - "c:\resource\apps\fscsaveascontactplugin.r32"
     "\epoc32\data\z\resource\apps\fscsendplugin.r32"                 - "c:\resource\apps\fscsendplugin.r32"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r32"                 - "c:\resource\apps\pbkxrclengine.r32"
     "\epoc32\data\z\resource\esmrgui.r32"                            - "c:\resource\esmrgui.r32"
     "\epoc32\data\z\resource\esmrtasks.r32"                          - "c:\resource\esmrtasks.r32"
     "\epoc32\data\z\resource\esmrcasplugindata.r32"                  - "c:\resource\esmrcasplugindata.r32"
@@ -686,7 +653,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r33"                 - "c:\resource\apps\fsccallplugin.r33"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r33"        - "c:\resource\apps\fscsaveascontactplugin.r33"
     "\epoc32\data\z\resource\apps\fscsendplugin.r33"                 - "c:\resource\apps\fscsendplugin.r33"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r33"                 - "c:\resource\apps\pbkxrclengine.r33"
     "\epoc32\data\z\resource\esmrgui.r33"                            - "c:\resource\esmrgui.r33"
     "\epoc32\data\z\resource\esmrtasks.r33"                          - "c:\resource\esmrtasks.r33"
     "\epoc32\data\z\resource\esmrcasplugindata.r33"                  - "c:\resource\esmrcasplugindata.r33"
@@ -703,7 +669,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r37"                 - "c:\resource\apps\fsccallplugin.r37"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r37"        - "c:\resource\apps\fscsaveascontactplugin.r37"
     "\epoc32\data\z\resource\apps\fscsendplugin.r37"                 - "c:\resource\apps\fscsendplugin.r37"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r37"                 - "c:\resource\apps\pbkxrclengine.r37"
     "\epoc32\data\z\resource\esmrgui.r37"                            - "c:\resource\esmrgui.r37"
     "\epoc32\data\z\resource\esmrtasks.r37"                          - "c:\resource\esmrtasks.r37"
     "\epoc32\data\z\resource\esmrcasplugindata.r37"                  - "c:\resource\esmrcasplugindata.r37"
@@ -720,7 +685,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r39"                 - "c:\resource\apps\fsccallplugin.r39"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r39"        - "c:\resource\apps\fscsaveascontactplugin.r39"
     "\epoc32\data\z\resource\apps\fscsendplugin.r39"                 - "c:\resource\apps\fscsendplugin.r39"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r39"                 - "c:\resource\apps\pbkxrclengine.r39"
     "\epoc32\data\z\resource\esmrgui.r39"                            - "c:\resource\esmrgui.r39"
     "\epoc32\data\z\resource\esmrtasks.r39"                          - "c:\resource\esmrtasks.r39"
     "\epoc32\data\z\resource\esmrcasplugindata.r39"                  - "c:\resource\esmrcasplugindata.r39"
@@ -737,7 +701,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r42"                 - "c:\resource\apps\fsccallplugin.r42"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r42"        - "c:\resource\apps\fscsaveascontactplugin.r42"
     "\epoc32\data\z\resource\apps\fscsendplugin.r42"                 - "c:\resource\apps\fscsendplugin.r42"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r42"                 - "c:\resource\apps\pbkxrclengine.r42"
     "\epoc32\data\z\resource\esmrgui.r42"                            - "c:\resource\esmrgui.r42"
     "\epoc32\data\z\resource\esmrtasks.r42"                          - "c:\resource\esmrtasks.r42"
     "\epoc32\data\z\resource\esmrcasplugindata.r42"                  - "c:\resource\esmrcasplugindata.r42"
@@ -754,7 +717,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r44"                 - "c:\resource\apps\fsccallplugin.r44"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r44"        - "c:\resource\apps\fscsaveascontactplugin.r44"
     "\epoc32\data\z\resource\apps\fscsendplugin.r44"                 - "c:\resource\apps\fscsendplugin.r44"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r44"                 - "c:\resource\apps\pbkxrclengine.r44"
     "\epoc32\data\z\resource\esmrgui.r44"                            - "c:\resource\esmrgui.r44"
     "\epoc32\data\z\resource\esmrtasks.r44"                          - "c:\resource\esmrtasks.r44"
     "\epoc32\data\z\resource\esmrcasplugindata.r44"                  - "c:\resource\esmrcasplugindata.r44"
@@ -771,7 +733,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r45"                 - "c:\resource\apps\fsccallplugin.r45"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r45"        - "c:\resource\apps\fscsaveascontactplugin.r45"
     "\epoc32\data\z\resource\apps\fscsendplugin.r45"                 - "c:\resource\apps\fscsendplugin.r45"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r45"                 - "c:\resource\apps\pbkxrclengine.r45"
     "\epoc32\data\z\resource\esmrgui.r45"                            - "c:\resource\esmrgui.r45"
     "\epoc32\data\z\resource\esmrtasks.r45"                          - "c:\resource\esmrtasks.r45"
     "\epoc32\data\z\resource\esmrcasplugindata.r45"                  - "c:\resource\esmrcasplugindata.r45"
@@ -788,7 +749,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r49"                 - "c:\resource\apps\fsccallplugin.r49"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r49"        - "c:\resource\apps\fscsaveascontactplugin.r49"
     "\epoc32\data\z\resource\apps\fscsendplugin.r49"                 - "c:\resource\apps\fscsendplugin.r49"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r49"                 - "c:\resource\apps\pbkxrclengine.r49"
     "\epoc32\data\z\resource\esmrgui.r49"                            - "c:\resource\esmrgui.r49"
     "\epoc32\data\z\resource\esmrtasks.r49"                          - "c:\resource\esmrtasks.r49"
     "\epoc32\data\z\resource\esmrcasplugindata.r49"                  - "c:\resource\esmrcasplugindata.r49"
@@ -805,7 +765,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r50"                 - "c:\resource\apps\fsccallplugin.r50"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r50"        - "c:\resource\apps\fscsaveascontactplugin.r50"
     "\epoc32\data\z\resource\apps\fscsendplugin.r50"                 - "c:\resource\apps\fscsendplugin.r50"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r50"                 - "c:\resource\apps\pbkxrclengine.r50"
     "\epoc32\data\z\resource\esmrgui.r50"                            - "c:\resource\esmrgui.r50"
     "\epoc32\data\z\resource\esmrtasks.r50"                          - "c:\resource\esmrtasks.r50"
     "\epoc32\data\z\resource\esmrcasplugindata.r50"                  - "c:\resource\esmrcasplugindata.r50"
@@ -822,7 +781,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r51"                 - "c:\resource\apps\fsccallplugin.r51"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r51"        - "c:\resource\apps\fscsaveascontactplugin.r51"
     "\epoc32\data\z\resource\apps\fscsendplugin.r51"                 - "c:\resource\apps\fscsendplugin.r51"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r51"                 - "c:\resource\apps\pbkxrclengine.r51"
     "\epoc32\data\z\resource\esmrgui.r51"                            - "c:\resource\esmrgui.r51"
     "\epoc32\data\z\resource\esmrtasks.r51"                          - "c:\resource\esmrtasks.r51"
     "\epoc32\data\z\resource\esmrcasplugindata.r51"                  - "c:\resource\esmrcasplugindata.r51"
@@ -839,7 +797,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r54"                 - "c:\resource\apps\fsccallplugin.r54"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r54"        - "c:\resource\apps\fscsaveascontactplugin.r54"
     "\epoc32\data\z\resource\apps\fscsendplugin.r54"                 - "c:\resource\apps\fscsendplugin.r54"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r54"                 - "c:\resource\apps\pbkxrclengine.r54"
     "\epoc32\data\z\resource\esmrgui.r54"                            - "c:\resource\esmrgui.r54"
     "\epoc32\data\z\resource\esmrtasks.r54"                          - "c:\resource\esmrtasks.r54"
     "\epoc32\data\z\resource\esmrcasplugindata.r54"                  - "c:\resource\esmrcasplugindata.r54"
@@ -856,7 +813,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r57"                 - "c:\resource\apps\fsccallplugin.r57"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r57"        - "c:\resource\apps\fscsaveascontactplugin.r57"
     "\epoc32\data\z\resource\apps\fscsendplugin.r57"                 - "c:\resource\apps\fscsendplugin.r57"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r57"                 - "c:\resource\apps\pbkxrclengine.r57"
     "\epoc32\data\z\resource\esmrgui.r57"                            - "c:\resource\esmrgui.r57"
     "\epoc32\data\z\resource\esmrtasks.r57"                          - "c:\resource\esmrtasks.r57"
     "\epoc32\data\z\resource\esmrcasplugindata.r57"                  - "c:\resource\esmrcasplugindata.r57"
@@ -873,7 +829,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r59"                 - "c:\resource\apps\fsccallplugin.r59"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r59"        - "c:\resource\apps\fscsaveascontactplugin.r59"
     "\epoc32\data\z\resource\apps\fscsendplugin.r59"                 - "c:\resource\apps\fscsendplugin.r59"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r59"                 - "c:\resource\apps\pbkxrclengine.r59"
     "\epoc32\data\z\resource\esmrgui.r59"                            - "c:\resource\esmrgui.r59"
     "\epoc32\data\z\resource\esmrtasks.r59"                          - "c:\resource\esmrtasks.r59"
     "\epoc32\data\z\resource\esmrcasplugindata.r59"                  - "c:\resource\esmrcasplugindata.r59"
@@ -890,7 +845,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r67"                 - "c:\resource\apps\fsccallplugin.r67"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r67"        - "c:\resource\apps\fscsaveascontactplugin.r67"
     "\epoc32\data\z\resource\apps\fscsendplugin.r67"                 - "c:\resource\apps\fscsendplugin.r67"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r67"                 - "c:\resource\apps\pbkxrclengine.r67"
     "\epoc32\data\z\resource\esmrgui.r67"                            - "c:\resource\esmrgui.r67"
     "\epoc32\data\z\resource\esmrtasks.r67"                          - "c:\resource\esmrtasks.r67"
     "\epoc32\data\z\resource\esmrcasplugindata.r67"                  - "c:\resource\esmrcasplugindata.r67"
@@ -907,7 +861,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r68"                 - "c:\resource\apps\fsccallplugin.r68"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r68"        - "c:\resource\apps\fscsaveascontactplugin.r68"
     "\epoc32\data\z\resource\apps\fscsendplugin.r68"                 - "c:\resource\apps\fscsendplugin.r68"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r68"                 - "c:\resource\apps\pbkxrclengine.r68"
     "\epoc32\data\z\resource\esmrgui.r68"                            - "c:\resource\esmrgui.r68"
     "\epoc32\data\z\resource\esmrtasks.r68"                          - "c:\resource\esmrtasks.r68"
     "\epoc32\data\z\resource\esmrcasplugindata.r68"                  - "c:\resource\esmrcasplugindata.r68"
@@ -924,7 +877,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r70"                 - "c:\resource\apps\fsccallplugin.r70"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r70"        - "c:\resource\apps\fscsaveascontactplugin.r70"
     "\epoc32\data\z\resource\apps\fscsendplugin.r70"                 - "c:\resource\apps\fscsendplugin.r70"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r70"                 - "c:\resource\apps\pbkxrclengine.r70"
     "\epoc32\data\z\resource\esmrgui.r70"                            - "c:\resource\esmrgui.r70"
     "\epoc32\data\z\resource\esmrtasks.r70"                          - "c:\resource\esmrtasks.r70"
     "\epoc32\data\z\resource\esmrcasplugindata.r70"                  - "c:\resource\esmrcasplugindata.r70"
@@ -941,7 +893,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r76"                 - "c:\resource\apps\fsccallplugin.r76"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r76"        - "c:\resource\apps\fscsaveascontactplugin.r76"
     "\epoc32\data\z\resource\apps\fscsendplugin.r76"                 - "c:\resource\apps\fscsendplugin.r76"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r76"                 - "c:\resource\apps\pbkxrclengine.r76"
     "\epoc32\data\z\resource\esmrgui.r76"                            - "c:\resource\esmrgui.r76"
     "\epoc32\data\z\resource\esmrtasks.r76"                          - "c:\resource\esmrtasks.r76"
     "\epoc32\data\z\resource\esmrcasplugindata.r76"                  - "c:\resource\esmrcasplugindata.r76"
@@ -958,7 +909,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r78"                 - "c:\resource\apps\fsccallplugin.r78"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r78"        - "c:\resource\apps\fscsaveascontactplugin.r78"
     "\epoc32\data\z\resource\apps\fscsendplugin.r78"                 - "c:\resource\apps\fscsendplugin.r78"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r78"                 - "c:\resource\apps\pbkxrclengine.r78"
     "\epoc32\data\z\resource\esmrgui.r78"                            - "c:\resource\esmrgui.r78"
     "\epoc32\data\z\resource\esmrtasks.r78"                          - "c:\resource\esmrtasks.r78"
     "\epoc32\data\z\resource\esmrcasplugindata.r78"                  - "c:\resource\esmrcasplugindata.r78"
@@ -975,7 +925,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r79"                 - "c:\resource\apps\fsccallplugin.r79"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r79"        - "c:\resource\apps\fscsaveascontactplugin.r79"
     "\epoc32\data\z\resource\apps\fscsendplugin.r79"                 - "c:\resource\apps\fscsendplugin.r79"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r79"                 - "c:\resource\apps\pbkxrclengine.r79"
     "\epoc32\data\z\resource\esmrgui.r79"                            - "c:\resource\esmrgui.r79"
     "\epoc32\data\z\resource\esmrtasks.r79"                          - "c:\resource\esmrtasks.r79"
     "\epoc32\data\z\resource\esmrcasplugindata.r79"                  - "c:\resource\esmrcasplugindata.r79"
@@ -992,7 +941,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r83"                 - "c:\resource\apps\fsccallplugin.r83"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r83"        - "c:\resource\apps\fscsaveascontactplugin.r83"
     "\epoc32\data\z\resource\apps\fscsendplugin.r83"                 - "c:\resource\apps\fscsendplugin.r83"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r83"                 - "c:\resource\apps\pbkxrclengine.r83"
     "\epoc32\data\z\resource\esmrgui.r83"                            - "c:\resource\esmrgui.r83"
     "\epoc32\data\z\resource\esmrtasks.r83"                          - "c:\resource\esmrtasks.r83"
     "\epoc32\data\z\resource\esmrcasplugindata.r83"                  - "c:\resource\esmrcasplugindata.r83"
@@ -1009,7 +957,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r93"                 - "c:\resource\apps\fsccallplugin.r93"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r93"        - "c:\resource\apps\fscsaveascontactplugin.r93"
     "\epoc32\data\z\resource\apps\fscsendplugin.r93"                 - "c:\resource\apps\fscsendplugin.r93"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r93"                 - "c:\resource\apps\pbkxrclengine.r93"
     "\epoc32\data\z\resource\esmrgui.r93"                            - "c:\resource\esmrgui.r93"
     "\epoc32\data\z\resource\esmrtasks.r93"                          - "c:\resource\esmrtasks.r93"
     "\epoc32\data\z\resource\esmrcasplugindata.r93"                  - "c:\resource\esmrcasplugindata.r93"
@@ -1026,7 +973,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r94"                 - "c:\resource\apps\fsccallplugin.r94"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r94"        - "c:\resource\apps\fscsaveascontactplugin.r94"
     "\epoc32\data\z\resource\apps\fscsendplugin.r94"                 - "c:\resource\apps\fscsendplugin.r94"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r94"                 - "c:\resource\apps\pbkxrclengine.r94"
     "\epoc32\data\z\resource\esmrgui.r94"                            - "c:\resource\esmrgui.r94"
     "\epoc32\data\z\resource\esmrtasks.r94"                          - "c:\resource\esmrtasks.r94"
     "\epoc32\data\z\resource\esmrcasplugindata.r94"                  - "c:\resource\esmrcasplugindata.r94"
@@ -1043,7 +989,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r96"                 - "c:\resource\apps\fsccallplugin.r96"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r96"        - "c:\resource\apps\fscsaveascontactplugin.r96"
     "\epoc32\data\z\resource\apps\fscsendplugin.r96"                 - "c:\resource\apps\fscsendplugin.r96"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r96"                 - "c:\resource\apps\pbkxrclengine.r96"
     "\epoc32\data\z\resource\esmrgui.r96"                            - "c:\resource\esmrgui.r96"
     "\epoc32\data\z\resource\esmrtasks.r96"                          - "c:\resource\esmrtasks.r96"
     "\epoc32\data\z\resource\esmrcasplugindata.r96"                  - "c:\resource\esmrcasplugindata.r96"
@@ -1060,7 +1005,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r102"                 - "c:\resource\apps\fsccallplugin.r102"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r102"        - "c:\resource\apps\fscsaveascontactplugin.r102"
     "\epoc32\data\z\resource\apps\fscsendplugin.r102"                 - "c:\resource\apps\fscsendplugin.r102"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r102"                 - "c:\resource\apps\pbkxrclengine.r102"
     "\epoc32\data\z\resource\esmrgui.r102"                            - "c:\resource\esmrgui.r102"
     "\epoc32\data\z\resource\esmrtasks.r102"                          - "c:\resource\esmrtasks.r102"
     "\epoc32\data\z\resource\esmrcasplugindata.r102"                  - "c:\resource\esmrcasplugindata.r102"
@@ -1077,7 +1021,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r103"                 - "c:\resource\apps\fsccallplugin.r103"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r103"        - "c:\resource\apps\fscsaveascontactplugin.r103"
     "\epoc32\data\z\resource\apps\fscsendplugin.r103"                 - "c:\resource\apps\fscsendplugin.r103"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r103"                 - "c:\resource\apps\pbkxrclengine.r103"
     "\epoc32\data\z\resource\esmrgui.r103"                            - "c:\resource\esmrgui.r103"
     "\epoc32\data\z\resource\esmrtasks.r103"                          - "c:\resource\esmrtasks.r103"
     "\epoc32\data\z\resource\esmrcasplugindata.r103"                  - "c:\resource\esmrcasplugindata.r103"
@@ -1094,7 +1037,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r129"                 - "c:\resource\apps\fsccallplugin.r129"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r129"        - "c:\resource\apps\fscsaveascontactplugin.r129"
     "\epoc32\data\z\resource\apps\fscsendplugin.r129"                 - "c:\resource\apps\fscsendplugin.r129"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r129"                 - "c:\resource\apps\pbkxrclengine.r129"
     "\epoc32\data\z\resource\esmrgui.r129"                            - "c:\resource\esmrgui.r129"
     "\epoc32\data\z\resource\esmrtasks.r129"                          - "c:\resource\esmrtasks.r129"
     "\epoc32\data\z\resource\esmrcasplugindata.r129"                  - "c:\resource\esmrcasplugindata.r129"
@@ -1111,7 +1053,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r157"                 - "c:\resource\apps\fsccallplugin.r157"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r157"        - "c:\resource\apps\fscsaveascontactplugin.r157"
     "\epoc32\data\z\resource\apps\fscsendplugin.r157"                 - "c:\resource\apps\fscsendplugin.r157"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r157"                 - "c:\resource\apps\pbkxrclengine.r157"
     "\epoc32\data\z\resource\esmrgui.r157"                            - "c:\resource\esmrgui.r157"
     "\epoc32\data\z\resource\esmrtasks.r157"                          - "c:\resource\esmrtasks.r157"
     "\epoc32\data\z\resource\esmrcasplugindata.r157"                  - "c:\resource\esmrcasplugindata.r157"
@@ -1128,7 +1069,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r158"                 - "c:\resource\apps\fsccallplugin.r158"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r158"        - "c:\resource\apps\fscsaveascontactplugin.r158"
     "\epoc32\data\z\resource\apps\fscsendplugin.r158"                 - "c:\resource\apps\fscsendplugin.r158"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r158"                 - "c:\resource\apps\pbkxrclengine.r158"
     "\epoc32\data\z\resource\esmrgui.r158"                            - "c:\resource\esmrgui.r158"
     "\epoc32\data\z\resource\esmrtasks.r158"                          - "c:\resource\esmrtasks.r158"
     "\epoc32\data\z\resource\esmrcasplugindata.r158"                  - "c:\resource\esmrcasplugindata.r158"
@@ -1145,7 +1085,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r159"                 - "c:\resource\apps\fsccallplugin.r159"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r159"        - "c:\resource\apps\fscsaveascontactplugin.r159"
     "\epoc32\data\z\resource\apps\fscsendplugin.r159"                 - "c:\resource\apps\fscsendplugin.r159"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r159"                 - "c:\resource\apps\pbkxrclengine.r159"
     "\epoc32\data\z\resource\esmrgui.r159"                            - "c:\resource\esmrgui.r159"
     "\epoc32\data\z\resource\esmrtasks.r159"                          - "c:\resource\esmrtasks.r159"
     "\epoc32\data\z\resource\esmrcasplugindata.r159"                  - "c:\resource\esmrcasplugindata.r159"
@@ -1162,7 +1101,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r160"                 - "c:\resource\apps\fsccallplugin.r160"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r160"        - "c:\resource\apps\fscsaveascontactplugin.r160"
     "\epoc32\data\z\resource\apps\fscsendplugin.r160"                 - "c:\resource\apps\fscsendplugin.r160"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r160"                 - "c:\resource\apps\pbkxrclengine.r160"
     "\epoc32\data\z\resource\esmrgui.r160"                            - "c:\resource\esmrgui.r160"
     "\epoc32\data\z\resource\esmrtasks.r160"                          - "c:\resource\esmrtasks.r160"
     "\epoc32\data\z\resource\esmrcasplugindata.r160"                  - "c:\resource\esmrcasplugindata.r160"
@@ -1179,7 +1117,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r161"                 - "c:\resource\apps\fsccallplugin.r161"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r161"        - "c:\resource\apps\fscsaveascontactplugin.r161"
     "\epoc32\data\z\resource\apps\fscsendplugin.r161"                 - "c:\resource\apps\fscsendplugin.r161"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r161"                 - "c:\resource\apps\pbkxrclengine.r161"
     "\epoc32\data\z\resource\esmrgui.r161"                            - "c:\resource\esmrgui.r161"
     "\epoc32\data\z\resource\esmrtasks.r161"                          - "c:\resource\esmrtasks.r161"
     "\epoc32\data\z\resource\esmrcasplugindata.r161"                  - "c:\resource\esmrcasplugindata.r161"
@@ -1196,7 +1133,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r326"                 - "c:\resource\apps\fsccallplugin.r326"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r326"        - "c:\resource\apps\fscsaveascontactplugin.r326"
     "\epoc32\data\z\resource\apps\fscsendplugin.r326"                 - "c:\resource\apps\fscsendplugin.r326"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r326"                 - "c:\resource\apps\pbkxrclengine.r326"
     "\epoc32\data\z\resource\esmrgui.r326"                            - "c:\resource\esmrgui.r326"
     "\epoc32\data\z\resource\esmrtasks.r326"                          - "c:\resource\esmrtasks.r326"
     "\epoc32\data\z\resource\esmrcasplugindata.r326"                  - "c:\resource\esmrcasplugindata.r326"
@@ -1213,7 +1149,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r327"                 - "c:\resource\apps\fsccallplugin.r327"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r327"        - "c:\resource\apps\fscsaveascontactplugin.r327"
     "\epoc32\data\z\resource\apps\fscsendplugin.r327"                 - "c:\resource\apps\fscsendplugin.r327"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r327"                 - "c:\resource\apps\pbkxrclengine.r327"
     "\epoc32\data\z\resource\esmrgui.r327"                            - "c:\resource\esmrgui.r327"
     "\epoc32\data\z\resource\esmrtasks.r327"                          - "c:\resource\esmrtasks.r327"
     "\epoc32\data\z\resource\esmrcasplugindata.r327"                  - "c:\resource\esmrcasplugindata.r327"
--- a/emailuis/emailui/sis/commonemail_udeb.pkg	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/sis/commonemail_udeb.pkg	Fri Mar 12 15:41:14 2010 +0200
@@ -166,14 +166,6 @@
 "\epoc32\data\z\resource\apps\fscsendplugin.rsc"                 - "c:\resource\apps\fscsendplugin.rsc"
 "\epoc32\data\z\resource\apps\fscsendplugin.mif"                 - "c:\resource\apps\fscsendplugin.mif"
 
-; emailcontacts / remotecontactlookup
-"\epoc32\release\armv5\udeb\pbkxrclservice.dll"                  - "c:\sys\bin\pbkxrclservice.dll"
-"\epoc32\data\Z\Resource\Plugins\pbkxrclservice.rsc"             - "c:\resource\plugins\pbkxrclservice.rsc"
-"\epoc32\release\armv5\udeb\pbkxrclengine.dll"                   - "c:\sys\bin\pbkxrclengine.dll"
-"\epoc32\data\z\resource\apps\pbkxrclengine.rsc"                 - "c:\resource\apps\pbkxrclengine.rsc"
-"\epoc32\data\z\resource\apps\pbkxrclengine.mif"                 - "c:\resource\apps\pbkxrclengine.mif"
-"\epoc32\data\Z\private\10202BE9\2001F3FE.txt"                   - "c:\private\10202be9\2001F3FE.txt"
-
 ; meetingrequest
 "\epoc32\data\z\resource\esmrgui.rsc"                            - "c:\resource\esmrgui.rsc"
 "\epoc32\data\z\resource\esmrtasks.rsc"                          - "c:\resource\esmrtasks.rsc"
--- a/emailuis/emailui/sis/commonemail_udeb_loc.pkg	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/sis/commonemail_udeb_loc.pkg	Fri Mar 12 15:41:14 2010 +0200
@@ -175,15 +175,6 @@
 ;"\epoc32\data\z\resource\apps\fscsendplugin.rsc"                 - "c:\resource\apps\fscsendplugin.rsc"
 "\epoc32\data\z\resource\apps\fscsendplugin.mif"                 - "c:\resource\apps\fscsendplugin.mif"
 
-; emailcontacts / remotecontactlookup
-"\epoc32\release\armv5\udeb\pbkxrclservice.dll"                  - "c:\sys\bin\pbkxrclservice.dll"
-"\epoc32\data\Z\Resource\Plugins\pbkxrclservice.rsc"             - "c:\resource\plugins\pbkxrclservice.rsc"
-"\epoc32\release\armv5\udeb\pbkxrclengine.dll"                   - "c:\sys\bin\pbkxrclengine.dll"
-; Following line is localized, so this Engineering English line is commented out
-;"\epoc32\data\z\resource\apps\pbkxrclengine.rsc"                 - "c:\resource\apps\pbkxrclengine.rsc"
-"\epoc32\data\z\resource\apps\pbkxrclengine.mif"                 - "c:\resource\apps\pbkxrclengine.mif"
-"\epoc32\data\Z\private\10202BE9\2001F3FE.txt"                   - "c:\private\10202be9\2001F3FE.txt"
-
 ; meetingrequest
 ; Following line is localized, so this Engineering English line is commented out
 ;"\epoc32\data\z\resource\esmrgui.rsc"                            - "c:\resource\esmrgui.rsc"
@@ -266,7 +257,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r01"                 - "c:\resource\apps\fsccallplugin.r01"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r01"        - "c:\resource\apps\fscsaveascontactplugin.r01"
     "\epoc32\data\z\resource\apps\fscsendplugin.r01"                 - "c:\resource\apps\fscsendplugin.r01"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r01"                 - "c:\resource\apps\pbkxrclengine.r01"
     "\epoc32\data\z\resource\esmrgui.r01"                            - "c:\resource\esmrgui.r01"
     "\epoc32\data\z\resource\esmrtasks.r01"                          - "c:\resource\esmrtasks.r01"
     "\epoc32\data\z\resource\esmrcasplugindata.r01"                  - "c:\resource\esmrcasplugindata.r01"
@@ -283,7 +273,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r02"                 - "c:\resource\apps\fsccallplugin.r02"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r02"        - "c:\resource\apps\fscsaveascontactplugin.r02"
     "\epoc32\data\z\resource\apps\fscsendplugin.r02"                 - "c:\resource\apps\fscsendplugin.r02"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r02"                 - "c:\resource\apps\pbkxrclengine.r02"
     "\epoc32\data\z\resource\esmrgui.r02"                            - "c:\resource\esmrgui.r02"
     "\epoc32\data\z\resource\esmrtasks.r02"                          - "c:\resource\esmrtasks.r02"
     "\epoc32\data\z\resource\esmrcasplugindata.r02"                  - "c:\resource\esmrcasplugindata.r02"
@@ -300,7 +289,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r03"                 - "c:\resource\apps\fsccallplugin.r03"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r03"        - "c:\resource\apps\fscsaveascontactplugin.r03"
     "\epoc32\data\z\resource\apps\fscsendplugin.r03"                 - "c:\resource\apps\fscsendplugin.r03"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r03"                 - "c:\resource\apps\pbkxrclengine.r03"
     "\epoc32\data\z\resource\esmrgui.r03"                            - "c:\resource\esmrgui.r03"
     "\epoc32\data\z\resource\esmrtasks.r03"                          - "c:\resource\esmrtasks.r03"
     "\epoc32\data\z\resource\esmrcasplugindata.r03"                  - "c:\resource\esmrcasplugindata.r03"
@@ -317,7 +305,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r04"                 - "c:\resource\apps\fsccallplugin.r04"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r04"        - "c:\resource\apps\fscsaveascontactplugin.r04"
     "\epoc32\data\z\resource\apps\fscsendplugin.r04"                 - "c:\resource\apps\fscsendplugin.r04"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r04"                 - "c:\resource\apps\pbkxrclengine.r04"
     "\epoc32\data\z\resource\esmrgui.r04"                            - "c:\resource\esmrgui.r04"
     "\epoc32\data\z\resource\esmrtasks.r04"                          - "c:\resource\esmrtasks.r04"
     "\epoc32\data\z\resource\esmrcasplugindata.r04"                  - "c:\resource\esmrcasplugindata.r04"
@@ -334,7 +321,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r05"                 - "c:\resource\apps\fsccallplugin.r05"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r05"        - "c:\resource\apps\fscsaveascontactplugin.r05"
     "\epoc32\data\z\resource\apps\fscsendplugin.r05"                 - "c:\resource\apps\fscsendplugin.r05"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r05"                 - "c:\resource\apps\pbkxrclengine.r05"
     "\epoc32\data\z\resource\esmrgui.r05"                            - "c:\resource\esmrgui.r05"
     "\epoc32\data\z\resource\esmrtasks.r05"                          - "c:\resource\esmrtasks.r05"
     "\epoc32\data\z\resource\esmrcasplugindata.r05"                  - "c:\resource\esmrcasplugindata.r05"
@@ -351,7 +337,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r06"                 - "c:\resource\apps\fsccallplugin.r06"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r06"        - "c:\resource\apps\fscsaveascontactplugin.r06"
     "\epoc32\data\z\resource\apps\fscsendplugin.r06"                 - "c:\resource\apps\fscsendplugin.r06"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r06"                 - "c:\resource\apps\pbkxrclengine.r06"
     "\epoc32\data\z\resource\esmrgui.r06"                            - "c:\resource\esmrgui.r06"
     "\epoc32\data\z\resource\esmrtasks.r06"                          - "c:\resource\esmrtasks.r06"
     "\epoc32\data\z\resource\esmrcasplugindata.r06"                  - "c:\resource\esmrcasplugindata.r06"
@@ -368,7 +353,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r07"                 - "c:\resource\apps\fsccallplugin.r07"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r07"        - "c:\resource\apps\fscsaveascontactplugin.r07"
     "\epoc32\data\z\resource\apps\fscsendplugin.r07"                 - "c:\resource\apps\fscsendplugin.r07"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r07"                 - "c:\resource\apps\pbkxrclengine.r07"
     "\epoc32\data\z\resource\esmrgui.r07"                            - "c:\resource\esmrgui.r07"
     "\epoc32\data\z\resource\esmrtasks.r07"                          - "c:\resource\esmrtasks.r07"
     "\epoc32\data\z\resource\esmrcasplugindata.r07"                  - "c:\resource\esmrcasplugindata.r07"
@@ -385,7 +369,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r08"                 - "c:\resource\apps\fsccallplugin.r08"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r08"        - "c:\resource\apps\fscsaveascontactplugin.r08"
     "\epoc32\data\z\resource\apps\fscsendplugin.r08"                 - "c:\resource\apps\fscsendplugin.r08"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r08"                 - "c:\resource\apps\pbkxrclengine.r08"
     "\epoc32\data\z\resource\esmrgui.r08"                            - "c:\resource\esmrgui.r08"
     "\epoc32\data\z\resource\esmrtasks.r08"                          - "c:\resource\esmrtasks.r08"
     "\epoc32\data\z\resource\esmrcasplugindata.r08"                  - "c:\resource\esmrcasplugindata.r08"
@@ -402,7 +385,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r09"                 - "c:\resource\apps\fsccallplugin.r09"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r09"        - "c:\resource\apps\fscsaveascontactplugin.r09"
     "\epoc32\data\z\resource\apps\fscsendplugin.r09"                 - "c:\resource\apps\fscsendplugin.r09"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r09"                 - "c:\resource\apps\pbkxrclengine.r09"
     "\epoc32\data\z\resource\esmrgui.r09"                            - "c:\resource\esmrgui.r09"
     "\epoc32\data\z\resource\esmrtasks.r09"                          - "c:\resource\esmrtasks.r09"
     "\epoc32\data\z\resource\esmrcasplugindata.r09"                  - "c:\resource\esmrcasplugindata.r09"
@@ -419,7 +401,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r10"                 - "c:\resource\apps\fsccallplugin.r10"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r10"        - "c:\resource\apps\fscsaveascontactplugin.r10"
     "\epoc32\data\z\resource\apps\fscsendplugin.r10"                 - "c:\resource\apps\fscsendplugin.r10"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r10"                 - "c:\resource\apps\pbkxrclengine.r10"
     "\epoc32\data\z\resource\esmrgui.r10"                            - "c:\resource\esmrgui.r10"
     "\epoc32\data\z\resource\esmrtasks.r10"                          - "c:\resource\esmrtasks.r10"
     "\epoc32\data\z\resource\esmrcasplugindata.r10"                  - "c:\resource\esmrcasplugindata.r10"
@@ -436,7 +417,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r13"                 - "c:\resource\apps\fsccallplugin.r13"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r13"        - "c:\resource\apps\fscsaveascontactplugin.r13"
     "\epoc32\data\z\resource\apps\fscsendplugin.r13"                 - "c:\resource\apps\fscsendplugin.r13"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r13"                 - "c:\resource\apps\pbkxrclengine.r13"
     "\epoc32\data\z\resource\esmrgui.r13"                            - "c:\resource\esmrgui.r13"
     "\epoc32\data\z\resource\esmrtasks.r13"                          - "c:\resource\esmrtasks.r13"
     "\epoc32\data\z\resource\esmrcasplugindata.r13"                  - "c:\resource\esmrcasplugindata.r13"
@@ -453,7 +433,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r14"                 - "c:\resource\apps\fsccallplugin.r14"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r14"        - "c:\resource\apps\fscsaveascontactplugin.r14"
     "\epoc32\data\z\resource\apps\fscsendplugin.r14"                 - "c:\resource\apps\fscsendplugin.r14"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r14"                 - "c:\resource\apps\pbkxrclengine.r14"
     "\epoc32\data\z\resource\esmrgui.r14"                            - "c:\resource\esmrgui.r14"
     "\epoc32\data\z\resource\esmrtasks.r14"                          - "c:\resource\esmrtasks.r14"
     "\epoc32\data\z\resource\esmrcasplugindata.r14"                  - "c:\resource\esmrcasplugindata.r14"
@@ -470,7 +449,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r15"                 - "c:\resource\apps\fsccallplugin.r15"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r15"        - "c:\resource\apps\fscsaveascontactplugin.r15"
     "\epoc32\data\z\resource\apps\fscsendplugin.r15"                 - "c:\resource\apps\fscsendplugin.r15"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r15"                 - "c:\resource\apps\pbkxrclengine.r15"
     "\epoc32\data\z\resource\esmrgui.r15"                            - "c:\resource\esmrgui.r15"
     "\epoc32\data\z\resource\esmrtasks.r15"                          - "c:\resource\esmrtasks.r15"
     "\epoc32\data\z\resource\esmrcasplugindata.r15"                  - "c:\resource\esmrcasplugindata.r15"
@@ -487,7 +465,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r16"                 - "c:\resource\apps\fsccallplugin.r16"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r16"        - "c:\resource\apps\fscsaveascontactplugin.r16"
     "\epoc32\data\z\resource\apps\fscsendplugin.r16"                 - "c:\resource\apps\fscsendplugin.r16"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r16"                 - "c:\resource\apps\pbkxrclengine.r16"
     "\epoc32\data\z\resource\esmrgui.r16"                            - "c:\resource\esmrgui.r16"
     "\epoc32\data\z\resource\esmrtasks.r16"                          - "c:\resource\esmrtasks.r16"
     "\epoc32\data\z\resource\esmrcasplugindata.r16"                  - "c:\resource\esmrcasplugindata.r16"
@@ -504,7 +481,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r17"                 - "c:\resource\apps\fsccallplugin.r17"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r17"        - "c:\resource\apps\fscsaveascontactplugin.r17"
     "\epoc32\data\z\resource\apps\fscsendplugin.r17"                 - "c:\resource\apps\fscsendplugin.r17"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r17"                 - "c:\resource\apps\pbkxrclengine.r17"
     "\epoc32\data\z\resource\esmrgui.r17"                            - "c:\resource\esmrgui.r17"
     "\epoc32\data\z\resource\esmrtasks.r17"                          - "c:\resource\esmrtasks.r17"
     "\epoc32\data\z\resource\esmrcasplugindata.r17"                  - "c:\resource\esmrcasplugindata.r17"
@@ -521,7 +497,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r18"                 - "c:\resource\apps\fsccallplugin.r18"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r18"        - "c:\resource\apps\fscsaveascontactplugin.r18"
     "\epoc32\data\z\resource\apps\fscsendplugin.r18"                 - "c:\resource\apps\fscsendplugin.r18"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r18"                 - "c:\resource\apps\pbkxrclengine.r18"
     "\epoc32\data\z\resource\esmrgui.r18"                            - "c:\resource\esmrgui.r18"
     "\epoc32\data\z\resource\esmrtasks.r18"                          - "c:\resource\esmrtasks.r18"
     "\epoc32\data\z\resource\esmrcasplugindata.r18"                  - "c:\resource\esmrcasplugindata.r18"
@@ -538,7 +513,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r25"                 - "c:\resource\apps\fsccallplugin.r25"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r25"        - "c:\resource\apps\fscsaveascontactplugin.r25"
     "\epoc32\data\z\resource\apps\fscsendplugin.r25"                 - "c:\resource\apps\fscsendplugin.r25"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r25"                 - "c:\resource\apps\pbkxrclengine.r25"
     "\epoc32\data\z\resource\esmrgui.r25"                            - "c:\resource\esmrgui.r25"
     "\epoc32\data\z\resource\esmrtasks.r25"                          - "c:\resource\esmrtasks.r25"
     "\epoc32\data\z\resource\esmrcasplugindata.r25"                  - "c:\resource\esmrcasplugindata.r25"
@@ -555,7 +529,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r26"                 - "c:\resource\apps\fsccallplugin.r26"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r26"        - "c:\resource\apps\fscsaveascontactplugin.r26"
     "\epoc32\data\z\resource\apps\fscsendplugin.r26"                 - "c:\resource\apps\fscsendplugin.r26"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r26"                 - "c:\resource\apps\pbkxrclengine.r26"
     "\epoc32\data\z\resource\esmrgui.r26"                            - "c:\resource\esmrgui.r26"
     "\epoc32\data\z\resource\esmrtasks.r26"                          - "c:\resource\esmrtasks.r26"
     "\epoc32\data\z\resource\esmrcasplugindata.r26"                  - "c:\resource\esmrcasplugindata.r26"
@@ -572,7 +545,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r27"                 - "c:\resource\apps\fsccallplugin.r27"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r27"        - "c:\resource\apps\fscsaveascontactplugin.r27"
     "\epoc32\data\z\resource\apps\fscsendplugin.r27"                 - "c:\resource\apps\fscsendplugin.r27"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r27"                 - "c:\resource\apps\pbkxrclengine.r27"
     "\epoc32\data\z\resource\esmrgui.r27"                            - "c:\resource\esmrgui.r27"
     "\epoc32\data\z\resource\esmrtasks.r27"                          - "c:\resource\esmrtasks.r27"
     "\epoc32\data\z\resource\esmrcasplugindata.r27"                  - "c:\resource\esmrcasplugindata.r27"
@@ -589,7 +561,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r28"                 - "c:\resource\apps\fsccallplugin.r28"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r28"        - "c:\resource\apps\fscsaveascontactplugin.r28"
     "\epoc32\data\z\resource\apps\fscsendplugin.r28"                 - "c:\resource\apps\fscsendplugin.r28"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r28"                 - "c:\resource\apps\pbkxrclengine.r28"
     "\epoc32\data\z\resource\esmrgui.r28"                            - "c:\resource\esmrgui.r28"
     "\epoc32\data\z\resource\esmrtasks.r28"                          - "c:\resource\esmrtasks.r28"
     "\epoc32\data\z\resource\esmrcasplugindata.r28"                  - "c:\resource\esmrcasplugindata.r28"
@@ -606,7 +577,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r29"                 - "c:\resource\apps\fsccallplugin.r29"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r29"        - "c:\resource\apps\fscsaveascontactplugin.r29"
     "\epoc32\data\z\resource\apps\fscsendplugin.r29"                 - "c:\resource\apps\fscsendplugin.r29"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r29"                 - "c:\resource\apps\pbkxrclengine.r29"
     "\epoc32\data\z\resource\esmrgui.r29"                            - "c:\resource\esmrgui.r29"
     "\epoc32\data\z\resource\esmrtasks.r29"                          - "c:\resource\esmrtasks.r29"
     "\epoc32\data\z\resource\esmrcasplugindata.r29"                  - "c:\resource\esmrcasplugindata.r29"
@@ -623,7 +593,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r30"                 - "c:\resource\apps\fsccallplugin.r30"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r30"        - "c:\resource\apps\fscsaveascontactplugin.r30"
     "\epoc32\data\z\resource\apps\fscsendplugin.r30"                 - "c:\resource\apps\fscsendplugin.r30"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r30"                 - "c:\resource\apps\pbkxrclengine.r30"
     "\epoc32\data\z\resource\esmrgui.r30"                            - "c:\resource\esmrgui.r30"
     "\epoc32\data\z\resource\esmrtasks.r30"                          - "c:\resource\esmrtasks.r30"
     "\epoc32\data\z\resource\esmrcasplugindata.r30"                  - "c:\resource\esmrcasplugindata.r30"
@@ -640,7 +609,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r31"                 - "c:\resource\apps\fsccallplugin.r31"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r31"        - "c:\resource\apps\fscsaveascontactplugin.r31"
     "\epoc32\data\z\resource\apps\fscsendplugin.r31"                 - "c:\resource\apps\fscsendplugin.r31"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r31"                 - "c:\resource\apps\pbkxrclengine.r31"
     "\epoc32\data\z\resource\esmrgui.r31"                            - "c:\resource\esmrgui.r31"
     "\epoc32\data\z\resource\esmrtasks.r31"                          - "c:\resource\esmrtasks.r31"
     "\epoc32\data\z\resource\esmrcasplugindata.r31"                  - "c:\resource\esmrcasplugindata.r31"
@@ -657,7 +625,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r32"                 - "c:\resource\apps\fsccallplugin.r32"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r32"        - "c:\resource\apps\fscsaveascontactplugin.r32"
     "\epoc32\data\z\resource\apps\fscsendplugin.r32"                 - "c:\resource\apps\fscsendplugin.r32"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r32"                 - "c:\resource\apps\pbkxrclengine.r32"
     "\epoc32\data\z\resource\esmrgui.r32"                            - "c:\resource\esmrgui.r32"
     "\epoc32\data\z\resource\esmrtasks.r32"                          - "c:\resource\esmrtasks.r32"
     "\epoc32\data\z\resource\esmrcasplugindata.r32"                  - "c:\resource\esmrcasplugindata.r32"
@@ -674,7 +641,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r33"                 - "c:\resource\apps\fsccallplugin.r33"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r33"        - "c:\resource\apps\fscsaveascontactplugin.r33"
     "\epoc32\data\z\resource\apps\fscsendplugin.r33"                 - "c:\resource\apps\fscsendplugin.r33"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r33"                 - "c:\resource\apps\pbkxrclengine.r33"
     "\epoc32\data\z\resource\esmrgui.r33"                            - "c:\resource\esmrgui.r33"
     "\epoc32\data\z\resource\esmrtasks.r33"                          - "c:\resource\esmrtasks.r33"
     "\epoc32\data\z\resource\esmrcasplugindata.r33"                  - "c:\resource\esmrcasplugindata.r33"
@@ -691,7 +657,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r37"                 - "c:\resource\apps\fsccallplugin.r37"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r37"        - "c:\resource\apps\fscsaveascontactplugin.r37"
     "\epoc32\data\z\resource\apps\fscsendplugin.r37"                 - "c:\resource\apps\fscsendplugin.r37"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r37"                 - "c:\resource\apps\pbkxrclengine.r37"
     "\epoc32\data\z\resource\esmrgui.r37"                            - "c:\resource\esmrgui.r37"
     "\epoc32\data\z\resource\esmrtasks.r37"                          - "c:\resource\esmrtasks.r37"
     "\epoc32\data\z\resource\esmrcasplugindata.r37"                  - "c:\resource\esmrcasplugindata.r37"
@@ -708,7 +673,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r39"                 - "c:\resource\apps\fsccallplugin.r39"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r39"        - "c:\resource\apps\fscsaveascontactplugin.r39"
     "\epoc32\data\z\resource\apps\fscsendplugin.r39"                 - "c:\resource\apps\fscsendplugin.r39"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r39"                 - "c:\resource\apps\pbkxrclengine.r39"
     "\epoc32\data\z\resource\esmrgui.r39"                            - "c:\resource\esmrgui.r39"
     "\epoc32\data\z\resource\esmrtasks.r39"                          - "c:\resource\esmrtasks.r39"
     "\epoc32\data\z\resource\esmrcasplugindata.r39"                  - "c:\resource\esmrcasplugindata.r39"
@@ -725,7 +689,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r42"                 - "c:\resource\apps\fsccallplugin.r42"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r42"        - "c:\resource\apps\fscsaveascontactplugin.r42"
     "\epoc32\data\z\resource\apps\fscsendplugin.r42"                 - "c:\resource\apps\fscsendplugin.r42"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r42"                 - "c:\resource\apps\pbkxrclengine.r42"
     "\epoc32\data\z\resource\esmrgui.r42"                            - "c:\resource\esmrgui.r42"
     "\epoc32\data\z\resource\esmrtasks.r42"                          - "c:\resource\esmrtasks.r42"
     "\epoc32\data\z\resource\esmrcasplugindata.r42"                  - "c:\resource\esmrcasplugindata.r42"
@@ -742,7 +705,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r44"                 - "c:\resource\apps\fsccallplugin.r44"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r44"        - "c:\resource\apps\fscsaveascontactplugin.r44"
     "\epoc32\data\z\resource\apps\fscsendplugin.r44"                 - "c:\resource\apps\fscsendplugin.r44"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r44"                 - "c:\resource\apps\pbkxrclengine.r44"
     "\epoc32\data\z\resource\esmrgui.r44"                            - "c:\resource\esmrgui.r44"
     "\epoc32\data\z\resource\esmrtasks.r44"                          - "c:\resource\esmrtasks.r44"
     "\epoc32\data\z\resource\esmrcasplugindata.r44"                  - "c:\resource\esmrcasplugindata.r44"
@@ -759,7 +721,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r45"                 - "c:\resource\apps\fsccallplugin.r45"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r45"        - "c:\resource\apps\fscsaveascontactplugin.r45"
     "\epoc32\data\z\resource\apps\fscsendplugin.r45"                 - "c:\resource\apps\fscsendplugin.r45"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r45"                 - "c:\resource\apps\pbkxrclengine.r45"
     "\epoc32\data\z\resource\esmrgui.r45"                            - "c:\resource\esmrgui.r45"
     "\epoc32\data\z\resource\esmrtasks.r45"                          - "c:\resource\esmrtasks.r45"
     "\epoc32\data\z\resource\esmrcasplugindata.r45"                  - "c:\resource\esmrcasplugindata.r45"
@@ -776,7 +737,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r49"                 - "c:\resource\apps\fsccallplugin.r49"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r49"        - "c:\resource\apps\fscsaveascontactplugin.r49"
     "\epoc32\data\z\resource\apps\fscsendplugin.r49"                 - "c:\resource\apps\fscsendplugin.r49"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r49"                 - "c:\resource\apps\pbkxrclengine.r49"
     "\epoc32\data\z\resource\esmrgui.r49"                            - "c:\resource\esmrgui.r49"
     "\epoc32\data\z\resource\esmrtasks.r49"                          - "c:\resource\esmrtasks.r49"
     "\epoc32\data\z\resource\esmrcasplugindata.r49"                  - "c:\resource\esmrcasplugindata.r49"
@@ -793,7 +753,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r50"                 - "c:\resource\apps\fsccallplugin.r50"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r50"        - "c:\resource\apps\fscsaveascontactplugin.r50"
     "\epoc32\data\z\resource\apps\fscsendplugin.r50"                 - "c:\resource\apps\fscsendplugin.r50"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r50"                 - "c:\resource\apps\pbkxrclengine.r50"
     "\epoc32\data\z\resource\esmrgui.r50"                            - "c:\resource\esmrgui.r50"
     "\epoc32\data\z\resource\esmrtasks.r50"                          - "c:\resource\esmrtasks.r50"
     "\epoc32\data\z\resource\esmrcasplugindata.r50"                  - "c:\resource\esmrcasplugindata.r50"
@@ -810,7 +769,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r51"                 - "c:\resource\apps\fsccallplugin.r51"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r51"        - "c:\resource\apps\fscsaveascontactplugin.r51"
     "\epoc32\data\z\resource\apps\fscsendplugin.r51"                 - "c:\resource\apps\fscsendplugin.r51"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r51"                 - "c:\resource\apps\pbkxrclengine.r51"
     "\epoc32\data\z\resource\esmrgui.r51"                            - "c:\resource\esmrgui.r51"
     "\epoc32\data\z\resource\esmrtasks.r51"                          - "c:\resource\esmrtasks.r51"
     "\epoc32\data\z\resource\esmrcasplugindata.r51"                  - "c:\resource\esmrcasplugindata.r51"
@@ -827,7 +785,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r54"                 - "c:\resource\apps\fsccallplugin.r54"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r54"        - "c:\resource\apps\fscsaveascontactplugin.r54"
     "\epoc32\data\z\resource\apps\fscsendplugin.r54"                 - "c:\resource\apps\fscsendplugin.r54"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r54"                 - "c:\resource\apps\pbkxrclengine.r54"
     "\epoc32\data\z\resource\esmrgui.r54"                            - "c:\resource\esmrgui.r54"
     "\epoc32\data\z\resource\esmrtasks.r54"                          - "c:\resource\esmrtasks.r54"
     "\epoc32\data\z\resource\esmrcasplugindata.r54"                  - "c:\resource\esmrcasplugindata.r54"
@@ -844,7 +801,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r57"                 - "c:\resource\apps\fsccallplugin.r57"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r57"        - "c:\resource\apps\fscsaveascontactplugin.r57"
     "\epoc32\data\z\resource\apps\fscsendplugin.r57"                 - "c:\resource\apps\fscsendplugin.r57"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r57"                 - "c:\resource\apps\pbkxrclengine.r57"
     "\epoc32\data\z\resource\esmrgui.r57"                            - "c:\resource\esmrgui.r57"
     "\epoc32\data\z\resource\esmrtasks.r57"                          - "c:\resource\esmrtasks.r57"
     "\epoc32\data\z\resource\esmrcasplugindata.r57"                  - "c:\resource\esmrcasplugindata.r57"
@@ -861,7 +817,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r59"                 - "c:\resource\apps\fsccallplugin.r59"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r59"        - "c:\resource\apps\fscsaveascontactplugin.r59"
     "\epoc32\data\z\resource\apps\fscsendplugin.r59"                 - "c:\resource\apps\fscsendplugin.r59"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r59"                 - "c:\resource\apps\pbkxrclengine.r59"
     "\epoc32\data\z\resource\esmrgui.r59"                            - "c:\resource\esmrgui.r59"
     "\epoc32\data\z\resource\esmrtasks.r59"                          - "c:\resource\esmrtasks.r59"
     "\epoc32\data\z\resource\esmrcasplugindata.r59"                  - "c:\resource\esmrcasplugindata.r59"
@@ -878,7 +833,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r67"                 - "c:\resource\apps\fsccallplugin.r67"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r67"        - "c:\resource\apps\fscsaveascontactplugin.r67"
     "\epoc32\data\z\resource\apps\fscsendplugin.r67"                 - "c:\resource\apps\fscsendplugin.r67"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r67"                 - "c:\resource\apps\pbkxrclengine.r67"
     "\epoc32\data\z\resource\esmrgui.r67"                            - "c:\resource\esmrgui.r67"
     "\epoc32\data\z\resource\esmrtasks.r67"                          - "c:\resource\esmrtasks.r67"
     "\epoc32\data\z\resource\esmrcasplugindata.r67"                  - "c:\resource\esmrcasplugindata.r67"
@@ -895,7 +849,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r68"                 - "c:\resource\apps\fsccallplugin.r68"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r68"        - "c:\resource\apps\fscsaveascontactplugin.r68"
     "\epoc32\data\z\resource\apps\fscsendplugin.r68"                 - "c:\resource\apps\fscsendplugin.r68"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r68"                 - "c:\resource\apps\pbkxrclengine.r68"
     "\epoc32\data\z\resource\esmrgui.r68"                            - "c:\resource\esmrgui.r68"
     "\epoc32\data\z\resource\esmrtasks.r68"                          - "c:\resource\esmrtasks.r68"
     "\epoc32\data\z\resource\esmrcasplugindata.r68"                  - "c:\resource\esmrcasplugindata.r68"
@@ -912,7 +865,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r70"                 - "c:\resource\apps\fsccallplugin.r70"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r70"        - "c:\resource\apps\fscsaveascontactplugin.r70"
     "\epoc32\data\z\resource\apps\fscsendplugin.r70"                 - "c:\resource\apps\fscsendplugin.r70"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r70"                 - "c:\resource\apps\pbkxrclengine.r70"
     "\epoc32\data\z\resource\esmrgui.r70"                            - "c:\resource\esmrgui.r70"
     "\epoc32\data\z\resource\esmrtasks.r70"                          - "c:\resource\esmrtasks.r70"
     "\epoc32\data\z\resource\esmrcasplugindata.r70"                  - "c:\resource\esmrcasplugindata.r70"
@@ -929,7 +881,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r76"                 - "c:\resource\apps\fsccallplugin.r76"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r76"        - "c:\resource\apps\fscsaveascontactplugin.r76"
     "\epoc32\data\z\resource\apps\fscsendplugin.r76"                 - "c:\resource\apps\fscsendplugin.r76"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r76"                 - "c:\resource\apps\pbkxrclengine.r76"
     "\epoc32\data\z\resource\esmrgui.r76"                            - "c:\resource\esmrgui.r76"
     "\epoc32\data\z\resource\esmrtasks.r76"                          - "c:\resource\esmrtasks.r76"
     "\epoc32\data\z\resource\esmrcasplugindata.r76"                  - "c:\resource\esmrcasplugindata.r76"
@@ -946,7 +897,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r78"                 - "c:\resource\apps\fsccallplugin.r78"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r78"        - "c:\resource\apps\fscsaveascontactplugin.r78"
     "\epoc32\data\z\resource\apps\fscsendplugin.r78"                 - "c:\resource\apps\fscsendplugin.r78"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r78"                 - "c:\resource\apps\pbkxrclengine.r78"
     "\epoc32\data\z\resource\esmrgui.r78"                            - "c:\resource\esmrgui.r78"
     "\epoc32\data\z\resource\esmrtasks.r78"                          - "c:\resource\esmrtasks.r78"
     "\epoc32\data\z\resource\esmrcasplugindata.r78"                  - "c:\resource\esmrcasplugindata.r78"
@@ -963,7 +913,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r79"                 - "c:\resource\apps\fsccallplugin.r79"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r79"        - "c:\resource\apps\fscsaveascontactplugin.r79"
     "\epoc32\data\z\resource\apps\fscsendplugin.r79"                 - "c:\resource\apps\fscsendplugin.r79"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r79"                 - "c:\resource\apps\pbkxrclengine.r79"
     "\epoc32\data\z\resource\esmrgui.r79"                            - "c:\resource\esmrgui.r79"
     "\epoc32\data\z\resource\esmrtasks.r79"                          - "c:\resource\esmrtasks.r79"
     "\epoc32\data\z\resource\esmrcasplugindata.r79"                  - "c:\resource\esmrcasplugindata.r79"
@@ -980,7 +929,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r83"                 - "c:\resource\apps\fsccallplugin.r83"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r83"        - "c:\resource\apps\fscsaveascontactplugin.r83"
     "\epoc32\data\z\resource\apps\fscsendplugin.r83"                 - "c:\resource\apps\fscsendplugin.r83"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r83"                 - "c:\resource\apps\pbkxrclengine.r83"
     "\epoc32\data\z\resource\esmrgui.r83"                            - "c:\resource\esmrgui.r83"
     "\epoc32\data\z\resource\esmrtasks.r83"                          - "c:\resource\esmrtasks.r83"
     "\epoc32\data\z\resource\esmrcasplugindata.r83"                  - "c:\resource\esmrcasplugindata.r83"
@@ -997,7 +945,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r93"                 - "c:\resource\apps\fsccallplugin.r93"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r93"        - "c:\resource\apps\fscsaveascontactplugin.r93"
     "\epoc32\data\z\resource\apps\fscsendplugin.r93"                 - "c:\resource\apps\fscsendplugin.r93"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r93"                 - "c:\resource\apps\pbkxrclengine.r93"
     "\epoc32\data\z\resource\esmrgui.r93"                            - "c:\resource\esmrgui.r93"
     "\epoc32\data\z\resource\esmrtasks.r93"                          - "c:\resource\esmrtasks.r93"
     "\epoc32\data\z\resource\esmrcasplugindata.r93"                  - "c:\resource\esmrcasplugindata.r93"
@@ -1014,7 +961,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r94"                 - "c:\resource\apps\fsccallplugin.r94"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r94"        - "c:\resource\apps\fscsaveascontactplugin.r94"
     "\epoc32\data\z\resource\apps\fscsendplugin.r94"                 - "c:\resource\apps\fscsendplugin.r94"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r94"                 - "c:\resource\apps\pbkxrclengine.r94"
     "\epoc32\data\z\resource\esmrgui.r94"                            - "c:\resource\esmrgui.r94"
     "\epoc32\data\z\resource\esmrtasks.r94"                          - "c:\resource\esmrtasks.r94"
     "\epoc32\data\z\resource\esmrcasplugindata.r94"                  - "c:\resource\esmrcasplugindata.r94"
@@ -1031,7 +977,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r96"                 - "c:\resource\apps\fsccallplugin.r96"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r96"        - "c:\resource\apps\fscsaveascontactplugin.r96"
     "\epoc32\data\z\resource\apps\fscsendplugin.r96"                 - "c:\resource\apps\fscsendplugin.r96"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r96"                 - "c:\resource\apps\pbkxrclengine.r96"
     "\epoc32\data\z\resource\esmrgui.r96"                            - "c:\resource\esmrgui.r96"
     "\epoc32\data\z\resource\esmrtasks.r96"                          - "c:\resource\esmrtasks.r96"
     "\epoc32\data\z\resource\esmrcasplugindata.r96"                  - "c:\resource\esmrcasplugindata.r96"
@@ -1048,7 +993,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r102"                 - "c:\resource\apps\fsccallplugin.r102"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r102"        - "c:\resource\apps\fscsaveascontactplugin.r102"
     "\epoc32\data\z\resource\apps\fscsendplugin.r102"                 - "c:\resource\apps\fscsendplugin.r102"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r102"                 - "c:\resource\apps\pbkxrclengine.r102"
     "\epoc32\data\z\resource\esmrgui.r102"                            - "c:\resource\esmrgui.r102"
     "\epoc32\data\z\resource\esmrtasks.r102"                          - "c:\resource\esmrtasks.r102"
     "\epoc32\data\z\resource\esmrcasplugindata.r102"                  - "c:\resource\esmrcasplugindata.r102"
@@ -1065,7 +1009,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r103"                 - "c:\resource\apps\fsccallplugin.r103"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r103"        - "c:\resource\apps\fscsaveascontactplugin.r103"
     "\epoc32\data\z\resource\apps\fscsendplugin.r103"                 - "c:\resource\apps\fscsendplugin.r103"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r103"                 - "c:\resource\apps\pbkxrclengine.r103"
     "\epoc32\data\z\resource\esmrgui.r103"                            - "c:\resource\esmrgui.r103"
     "\epoc32\data\z\resource\esmrtasks.r103"                          - "c:\resource\esmrtasks.r103"
     "\epoc32\data\z\resource\esmrcasplugindata.r103"                  - "c:\resource\esmrcasplugindata.r103"
@@ -1082,7 +1025,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r129"                 - "c:\resource\apps\fsccallplugin.r129"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r129"        - "c:\resource\apps\fscsaveascontactplugin.r129"
     "\epoc32\data\z\resource\apps\fscsendplugin.r129"                 - "c:\resource\apps\fscsendplugin.r129"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r129"                 - "c:\resource\apps\pbkxrclengine.r129"
     "\epoc32\data\z\resource\esmrgui.r129"                            - "c:\resource\esmrgui.r129"
     "\epoc32\data\z\resource\esmrtasks.r129"                          - "c:\resource\esmrtasks.r129"
     "\epoc32\data\z\resource\esmrcasplugindata.r129"                  - "c:\resource\esmrcasplugindata.r129"
@@ -1099,7 +1041,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r157"                 - "c:\resource\apps\fsccallplugin.r157"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r157"        - "c:\resource\apps\fscsaveascontactplugin.r157"
     "\epoc32\data\z\resource\apps\fscsendplugin.r157"                 - "c:\resource\apps\fscsendplugin.r157"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r157"                 - "c:\resource\apps\pbkxrclengine.r157"
     "\epoc32\data\z\resource\esmrgui.r157"                            - "c:\resource\esmrgui.r157"
     "\epoc32\data\z\resource\esmrtasks.r157"                          - "c:\resource\esmrtasks.r157"
     "\epoc32\data\z\resource\esmrcasplugindata.r157"                  - "c:\resource\esmrcasplugindata.r157"
@@ -1116,7 +1057,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r158"                 - "c:\resource\apps\fsccallplugin.r158"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r158"        - "c:\resource\apps\fscsaveascontactplugin.r158"
     "\epoc32\data\z\resource\apps\fscsendplugin.r158"                 - "c:\resource\apps\fscsendplugin.r158"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r158"                 - "c:\resource\apps\pbkxrclengine.r158"
     "\epoc32\data\z\resource\esmrgui.r158"                            - "c:\resource\esmrgui.r158"
     "\epoc32\data\z\resource\esmrtasks.r158"                          - "c:\resource\esmrtasks.r158"
     "\epoc32\data\z\resource\esmrcasplugindata.r158"                  - "c:\resource\esmrcasplugindata.r158"
@@ -1133,7 +1073,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r159"                 - "c:\resource\apps\fsccallplugin.r159"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r159"        - "c:\resource\apps\fscsaveascontactplugin.r159"
     "\epoc32\data\z\resource\apps\fscsendplugin.r159"                 - "c:\resource\apps\fscsendplugin.r159"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r159"                 - "c:\resource\apps\pbkxrclengine.r159"
     "\epoc32\data\z\resource\esmrgui.r159"                            - "c:\resource\esmrgui.r159"
     "\epoc32\data\z\resource\esmrtasks.r159"                          - "c:\resource\esmrtasks.r159"
     "\epoc32\data\z\resource\esmrcasplugindata.r159"                  - "c:\resource\esmrcasplugindata.r159"
@@ -1150,7 +1089,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r160"                 - "c:\resource\apps\fsccallplugin.r160"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r160"        - "c:\resource\apps\fscsaveascontactplugin.r160"
     "\epoc32\data\z\resource\apps\fscsendplugin.r160"                 - "c:\resource\apps\fscsendplugin.r160"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r160"                 - "c:\resource\apps\pbkxrclengine.r160"
     "\epoc32\data\z\resource\esmrgui.r160"                            - "c:\resource\esmrgui.r160"
     "\epoc32\data\z\resource\esmrtasks.r160"                          - "c:\resource\esmrtasks.r160"
     "\epoc32\data\z\resource\esmrcasplugindata.r160"                  - "c:\resource\esmrcasplugindata.r160"
@@ -1167,7 +1105,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r161"                 - "c:\resource\apps\fsccallplugin.r161"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r161"        - "c:\resource\apps\fscsaveascontactplugin.r161"
     "\epoc32\data\z\resource\apps\fscsendplugin.r161"                 - "c:\resource\apps\fscsendplugin.r161"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r161"                 - "c:\resource\apps\pbkxrclengine.r161"
     "\epoc32\data\z\resource\esmrgui.r161"                            - "c:\resource\esmrgui.r161"
     "\epoc32\data\z\resource\esmrtasks.r161"                          - "c:\resource\esmrtasks.r161"
     "\epoc32\data\z\resource\esmrcasplugindata.r161"                  - "c:\resource\esmrcasplugindata.r161"
@@ -1184,7 +1121,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r326"                 - "c:\resource\apps\fsccallplugin.r326"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r326"        - "c:\resource\apps\fscsaveascontactplugin.r326"
     "\epoc32\data\z\resource\apps\fscsendplugin.r326"                 - "c:\resource\apps\fscsendplugin.r326"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r326"                 - "c:\resource\apps\pbkxrclengine.r326"
     "\epoc32\data\z\resource\esmrgui.r326"                            - "c:\resource\esmrgui.r326"
     "\epoc32\data\z\resource\esmrtasks.r326"                          - "c:\resource\esmrtasks.r326"
     "\epoc32\data\z\resource\esmrcasplugindata.r326"                  - "c:\resource\esmrcasplugindata.r326"
@@ -1201,7 +1137,6 @@
     "\epoc32\data\z\resource\apps\fsccallplugin.r327"                 - "c:\resource\apps\fsccallplugin.r327"
     "\epoc32\data\z\resource\apps\fscsaveascontactplugin.r327"        - "c:\resource\apps\fscsaveascontactplugin.r327"
     "\epoc32\data\z\resource\apps\fscsendplugin.r327"                 - "c:\resource\apps\fscsendplugin.r327"
-    "\epoc32\data\z\resource\apps\pbkxrclengine.r327"                 - "c:\resource\apps\pbkxrclengine.r327"
     "\epoc32\data\z\resource\esmrgui.r327"                            - "c:\resource\esmrgui.r327"
     "\epoc32\data\z\resource\esmrtasks.r327"                          - "c:\resource\esmrtasks.r327"
     "\epoc32\data\z\resource\esmrcasplugindata.r327"                  - "c:\resource\esmrcasplugindata.r327"
--- a/emailuis/emailui/sis/makecommonemailsisx.bat	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/sis/makecommonemailsisx.bat	Fri Mar 12 15:41:14 2010 +0200
@@ -12,8 +12,7 @@
 REM * 
 REM * Contributors:
 REM * 
-REM * Description:
-REM * Script that creates and signs commonemail sisx packages
+REM * Description: Script that creates and signs commonemail sisx packages
 REM * 
 
 REM Check if the latest added certificate folder/file exists. If not, copy certs from network drive.
--- a/emailuis/emailui/sis/pkg-localizer.py	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/sis/pkg-localizer.py	Fri Mar 12 15:41:14 2010 +0200
@@ -13,9 +13,8 @@
 *
 * Contributors:
 *
-* Description:
-* Python script that can be used to make localized pkg-files based on
-* Engineering English pkg-files. Meant only for internal use in Email.
+* Description: Python script that can be used to make localized pkg-files 
+* based on Engineering English pkg-files. Meant only for internal use in Email.
 *
 */
 """
--- a/emailuis/emailui/src/FreestyleEmailCenRepHandler.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/src/FreestyleEmailCenRepHandler.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -343,7 +343,7 @@
         }	
     return buf;
     }
-/*
+
 // ----------------------------------------------------
 // CFSEmailCRHandler::SetDownloadHTMLImages
 // ----------------------------------------------------
@@ -357,7 +357,6 @@
 		}
     }
 
-
 // ----------------------------------------------------
 // CFSEmailCRHandler::DownloadHTMLImages
 // ----------------------------------------------------
@@ -379,7 +378,7 @@
         }
     return buf;
     }
-*/
+
 /*
 // ----------------------------------------------------
 // CFSEmailCRHandler::AttachmentFileTypes
--- a/emailuis/emailui/src/FreestyleEmailDownloadInformationMediator.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/src/FreestyleEmailDownloadInformationMediator.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -145,7 +145,10 @@
 		// removed from the array before we are finished
 		download = iDownloadArray[idx];
         
-    	// In case of error, show a note
+    	// In case of error, show a note.  Note that these notes should not
+        // be displayed synchronously, since otherwise other events can
+        // occur that delete objects that are still in use waiting for this
+        // method to complete (see PDOO-7X93JP).
 		if ( aEvent.iError && aEvent.iError != KErrCancel )
 		    {
 			// Download failed, show error note
@@ -154,13 +157,13 @@
 			    { // connection error
 			    TFsEmailUiUtility::ShowErrorNoteL(
 			    	R_FREESTYLE_EMAIL_ERROR_GENERAL_CONNECTION_ERROR,
-			    	ETrue );
+			    	EFalse );
 			    }
 			else // other error
 			    {
 			    TFsEmailUiUtility::ShowErrorNoteL(
 			    	R_FREESTYLE_EMAIL_ERROR_GENERAL_UNABLE_TO_COMPLETE,
-			    	ETrue );
+			    	EFalse );
 			    }
 		    }
 		    
--- a/emailuis/emailui/src/FreestyleEmailUiAknStatusIndicator.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/src/FreestyleEmailUiAknStatusIndicator.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -11,6 +11,8 @@
 *
 * Contributors:
 *
+* Description:  Implementation for status indicator
+*
 */ 
 
 #include "FreestyleEmailUiAknStatusIndicator.h"
--- a/emailuis/emailui/src/FreestyleEmailUiAppui.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/src/FreestyleEmailUiAppui.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -87,6 +87,7 @@
 #include <data_caging_path_literals.hrh> // hardcoded paths removal from cmail
 #include "cfsccontactactionmenu.h"
 //</cmail>
+#include <layoutmetadata.cdl.h>         // for Layout_Meta_Data
 
 // INTERNAL INCLUDE FILES
 #include "FreestyleEmailUiContactHandler.h"
@@ -106,7 +107,7 @@
 #include "FreestyleEmailUiAttachmentsListModel.h"
 #include "FreestyleEmailUiAttachmentsListVisualiser.h"
 #include "FreestyleEmailUiAttachmentsListControl.h"
-#include "FreestyleEmailCenRepHandler.h"
+#include "freestyleemailcenrephandler.h"
 #include "FreestyleEmailUiSettingsListView.h"
 #include "FreestyleEmailUiGlobalSettingsListView.h"
 #include "FreestyleEmailUiDownloadManagerModel.h"
@@ -155,6 +156,203 @@
 // Length of the drive letter descriptor (e.g. "c:")
 const TInt KDriveDescLength = 2;
 
+
+// TDisplayImagesCache
+
+// ---------------------------------------------------------------------------
+// TDisplayImagesCache::~TDisplayImagesCache
+// ---------------------------------------------------------------------------
+//
+TDisplayImagesCache::~TDisplayImagesCache()
+    {
+    iCache.Reset();
+    }
+
+// ---------------------------------------------------------------------------
+// TDisplayImagesCache::AddMessageL
+// ---------------------------------------------------------------------------
+//
+void TDisplayImagesCache::AddMessageL( const CFSMailMessageBase& aMsg )
+    {
+    AddMessageL(aMsg.GetMailBoxId(), aMsg.GetMessageId());
+    }
+
+// ---------------------------------------------------------------------------
+// TDisplayImagesCache::RemoveMessage
+// ---------------------------------------------------------------------------
+//
+void TDisplayImagesCache::RemoveMessage( const CFSMailMessageBase& aMsg )
+    {
+    RemoveMessage(aMsg.GetMailBoxId(), aMsg.GetMessageId());
+    }
+
+// ---------------------------------------------------------------------------
+// TDisplayImagesCache::Contains
+// ---------------------------------------------------------------------------
+//
+TBool TDisplayImagesCache::Contains( const CFSMailMessageBase& aMsg ) const
+    {
+    return Contains(aMsg.GetMailBoxId(), aMsg.GetMessageId());
+    }
+
+// ---------------------------------------------------------------------------
+// TDisplayImagesCache::AddMessageL
+// ---------------------------------------------------------------------------
+//
+void TDisplayImagesCache::AddMessageL( const TFSMailMsgId& aBoxId, const TFSMailMsgId& aMsgId )
+    {
+    TInt index(MailBoxIndex(aBoxId));
+    if (index == KErrNotFound)
+        {
+        AddMailBoxL(aBoxId, index);
+        }
+    iCache[index].AddMessageL(aMsgId);
+    }
+
+// ---------------------------------------------------------------------------
+// TDisplayImagesCache::RemoveMessage
+// ---------------------------------------------------------------------------
+//
+void TDisplayImagesCache::RemoveMessage( const TFSMailMsgId& aBoxId, const TFSMailMsgId& aMsgId )
+    {
+    const TInt index(MailBoxIndex(aBoxId));
+    if (index != KErrNotFound)
+        {
+        iCache[index].RemoveMessage(aMsgId);
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// TDisplayImagesCache::RemoveMailbox
+// ---------------------------------------------------------------------------
+//
+void TDisplayImagesCache::RemoveMailbox( const TFSMailMsgId& aBoxId )
+    {
+    const TInt index(MailBoxIndex(aBoxId));
+    if (index != KErrNotFound)
+        {
+        iCache.Remove(index);
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// TDisplayImagesCache::Contains
+// ---------------------------------------------------------------------------
+//
+TBool TDisplayImagesCache::Contains( const TFSMailMsgId& aBoxId, const TFSMailMsgId& aMsgId ) const
+    {
+    const TInt index(MailBoxIndex(aBoxId));
+    if (index != KErrNotFound)
+        {
+        return iCache[index].Contains(aMsgId);
+        }
+    return EFalse;
+    }
+
+// ---------------------------------------------------------------------------
+// TDisplayImagesCache::MailBoxIndex
+// ---------------------------------------------------------------------------
+//
+TInt TDisplayImagesCache::MailBoxIndex( const TFSMailMsgId& aBoxId ) const
+    {
+    return iCache.FindInOrder(TItem(aBoxId), TLinearOrder<TItem>(TItem::CompareItem));
+    }
+
+// ---------------------------------------------------------------------------
+// TDisplayImagesCache::AddMailBoxL
+// ---------------------------------------------------------------------------
+//
+void TDisplayImagesCache::AddMailBoxL( const TFSMailMsgId& aBoxId, TInt& aCacheIndex )
+    {
+    aCacheIndex = KErrNotFound;
+    iCache.InsertInOrderL(TItem(aBoxId), TLinearOrder<TItem>(TItem::CompareItem));
+    aCacheIndex = MailBoxIndex(aBoxId);
+    }
+
+// ---------------------------------------------------------------------------
+// TDisplayImagesCache::TItem::TItem
+// ---------------------------------------------------------------------------
+//
+TDisplayImagesCache::TItem::TItem( const TFSMailMsgId& aBoxId )
+    : iMailBoxId( aBoxId )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// TDisplayImagesCache::TItem::~TItem
+// ---------------------------------------------------------------------------
+//
+TDisplayImagesCache::TItem::~TItem()
+    {
+    iMessageIds.Reset();
+    }
+
+// ---------------------------------------------------------------------------
+// TDisplayImagesCache::TItem::Contains
+// ---------------------------------------------------------------------------
+//
+TBool TDisplayImagesCache::TItem::Contains( const TFSMailMsgId& aMsgId ) const
+    {
+    return MessageIndex(aMsgId) != KErrNotFound;
+    }
+
+// ---------------------------------------------------------------------------
+// TDisplayImagesCache::TItem::AddMessageL
+// ---------------------------------------------------------------------------
+//
+void TDisplayImagesCache::TItem::AddMessageL( const TFSMailMsgId& aMsgId )
+    {
+    if (!Contains(aMsgId))
+        {
+        iMessageIds.InsertInOrderL(aMsgId, TLinearOrder<TFSMailMsgId>(TItem::CompareMsgId));
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// TDisplayImagesCache::TItem::RemoveMessage
+// ---------------------------------------------------------------------------
+//
+void TDisplayImagesCache::TItem::RemoveMessage( const TFSMailMsgId& aMsgId )
+    {
+    const TInt index(MessageIndex(aMsgId));
+    if (index != KErrNotFound)
+        {
+        iMessageIds.Remove(index);
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// TDisplayImagesCache::TItem::MessageIndex
+// ---------------------------------------------------------------------------
+//
+TInt TDisplayImagesCache::TItem::MessageIndex( const TFSMailMsgId& aMsgId ) const
+    {
+    return iMessageIds.FindInOrder(aMsgId, TLinearOrder<TFSMailMsgId>(TItem::CompareMsgId));
+    }
+
+// ---------------------------------------------------------------------------
+// TDisplayImagesCache::TItem::CompareItem
+// ---------------------------------------------------------------------------
+//
+TInt TDisplayImagesCache::TItem::CompareItem( const TItem& aItem1, const TItem& aItem2 )
+    {
+    return CompareMsgId(aItem1.iMailBoxId, aItem2.iMailBoxId);
+    }
+
+// ---------------------------------------------------------------------------
+// TDisplayImagesCache::TItem::CompareMsgId
+// ---------------------------------------------------------------------------
+//
+TInt TDisplayImagesCache::TItem::CompareMsgId( const TFSMailMsgId& aId1, const TFSMailMsgId& aId2 )
+    {
+    TInt result(aId1.PluginId().iUid - aId2.PluginId().iUid);
+    if (!result)
+        {
+        result = TInt(aId1.Id() - aId2.Id());
+        }
+    return result;
+    }
+
 // ---------------------------------------------------------------------------
 // C++ constructor.
 // ---------------------------------------------------------------------------
@@ -165,7 +363,10 @@
     iIsCaptured( EFalse ), // init "end key captured" to false
     iAutomatedMailBoxOnline( EFalse ),
     iMsgReaderIsSupported( KErrGeneral ),
-    iSwitchingToBackground( EFalse )
+    iSwitchingToBackground( EFalse ),
+    iHasEmbeddedApp( EFalse ),
+    iPreviousAppEmbedded( EFalse ),
+    iEditorStartedFromEmbeddedApp( EFalse )
     {
     FUNC_LOG;
     iEnv = &aEnv;
@@ -246,6 +447,17 @@
 
     // Enable Avkon skins.
     BaseConstructL( EAknEnableSkin | EAknEnableMSK | EAknSingleClickCompatible );
+
+    // This MUST be after BaseConstructL
+    MTouchFeedback* touchFeedback(MTouchFeedback::Instance());
+    if (touchFeedback == NULL)
+        {
+        touchFeedback = MTouchFeedback::CreateInstanceL();
+        iTouchFeedbackCreated = ETrue;
+        }
+    touchFeedback->SetFeedbackEnabledForThisApp(touchFeedback->TouchFeedbackSupported());
+
+
     // Create instance for Central repository handler
     iCRHandler = CFSEmailCRHandler::InstanceL();
 
@@ -533,6 +745,19 @@
     delete iNaviDecorator2MailViewer;
 
     delete iConnectionStatusIconAnimTimer;
+
+
+    MTouchFeedback* touchFeedback( MTouchFeedback::Instance() );
+    if (touchFeedback && touchFeedback->TouchFeedbackSupported())
+        {
+        touchFeedback->SetFeedbackEnabledForThisApp(EFalse);
+        }
+
+    if (iTouchFeedbackCreated)
+        {
+        MTouchFeedback::DestroyInstance();
+        }
+
     TIMESTAMP( "Application exit" );
     }
 
@@ -639,7 +864,7 @@
         }
     // may be tricky; added here to handle activation of composer view from external app when email is plugin settings view
     // in this case also duplictaed view needs to be poped up, but iSettingsViewActive is already set to EFalse
-    // other solution would need to expand api of this class to handle directly this case 
+    // other solution would need to expand api of this class to handle directly this case
     else
     	if ( iPreviousActiveView->Id() == SettingsViewId  || iPreviousActiveView->Id() == MailListId )
     		{
@@ -1239,17 +1464,33 @@
     //    CAlfEnv::Static()->NotifySkinChangedL();
     //    }
 
-
-    if( aType == KEikDynamicLayoutVariantSwitch || aType == KAknsMessageSkinChange)
+    if( aType == KEikDynamicLayoutVariantSwitch || aType == KAknsMessageSkinChange )
         {
+        // Changing layout for status pane (just in case it is not switched
+        // correctly), fix for HMNN-82BAGR error
+        TBool landscape(Layout_Meta_Data::IsLandscapeOrientation());
+        CEikStatusPane* statusPane = StatusPane();
+        if(landscape)
+        	{
+			if( statusPane->CurrentLayoutResId() != R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT)
+				{
+				statusPane->SwitchLayoutL(R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT);
+				}
+        	}
+        else
+        	{
+			if( statusPane->CurrentLayoutResId() != R_AVKON_STATUS_PANE_LAYOUT_USUAL_EXT)
+				{
+				statusPane->SwitchLayoutL(R_AVKON_STATUS_PANE_LAYOUT_USUAL_EXT);
+				}
+        	}
+
 	  	TRect screenRect;
 	 	AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, screenRect );
         //<cmail> layout manager call removed </cmail>
         // Notify layouthandler of changed screen resolution.
         iLayoutHandler->ScreenResolutionChanged();
   		StatusPane()->DrawNow();
-        TRect rect;
-        AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, rect);
         if(iEnv)
             {
 			Display().SetVisibleArea( screenRect );
@@ -1407,6 +1648,15 @@
     return iEikonEnv->ScreenDevice()->DisplayMode();
     }
 
+// ---------------------------------------------------------------------------
+// Returns display images cache
+// ---------------------------------------------------------------------------
+//
+TDisplayImagesCache& CFreestyleEmailUiAppUi::DisplayImagesCache()
+    {
+    return iDisplayImagesCache;
+    }
+
 
 // ---------------------------------------------------------------------------
 // Returns the current flip status.
@@ -1587,6 +1837,7 @@
         // autosyncmonitor has been succesfully created
         if ( iAutoSyncMonitor )
             {
+            TIMESTAMP( "Starting auto sync" );
             iAutoSyncMonitor->StartMonitoring();
             }
         }
@@ -1858,6 +2109,7 @@
     	{
     	case TFSEventMailboxDeleted:
     		{
+    		iDisplayImagesCache.RemoveMailbox(aMailbox);
     		gridContentsChanged = ETrue;
     		if ( iActiveMailbox && iActiveMailbox->GetId().Id() == aMailbox.Id() &&
     			 iCurrentActiveView->Id() != SettingsViewId )
@@ -1989,11 +2241,22 @@
                 }
             }
             break;
-   		case TFSEventMailboxSettingsChanged:
+        case TFSEventMailboxCapabilityChanged:
+            // Refresh grid if mailbox capabilities have changed
+        case TFSEventMailboxSettingsChanged:
 			// Refresh grid if mailbox settings are changed,
 			// name/branding might have changed.
 	   	 	gridContentsChanged = ETrue;
 			break;
+        case TFSEventMailDeleted:
+            {
+            RArray<TFSMailMsgId>* entries = reinterpret_cast<RArray<TFSMailMsgId>*>(aParam1);
+            for (TInt i = entries->Count() - 1; i >= 0; i--)
+                {
+                iDisplayImagesCache.RemoveMessage(aMailbox, entries->operator[](i));
+                }
+            }
+   		    break;
         default:
             {
             }
@@ -2564,7 +2827,7 @@
 	}
 
 // -----------------------------------------------------------------------------
-// CFreestyleEmailUiAppUi::SendToBackgroundL
+// CFreestyleEmailUiAppUi::SendToBackground
 // Send self to background.
 // -----------------------------------------------------------------------------
 void CFreestyleEmailUiAppUi::SendToBackground()
@@ -2583,6 +2846,56 @@
     }
 
 // -----------------------------------------------------------------------------
+// CFreestyleEmailUiAppUi::SetEmbeddedApp
+// Set flag for judging if there is a embedded app in FSEmail.
+// -----------------------------------------------------------------------------
+void CFreestyleEmailUiAppUi::SetEmbeddedApp( TBool aEmbeddedApp )
+    {
+    iHasEmbeddedApp = aEmbeddedApp;
+    }
+
+// -----------------------------------------------------------------------------
+// CFreestyleEmailUiAppUi::EmbeddedApp
+// Get embedded app flag.
+// -----------------------------------------------------------------------------
+TBool CFreestyleEmailUiAppUi::EmbeddedApp() const
+    {
+    return iHasEmbeddedApp;
+    }
+
+// -----------------------------------------------------------------------------
+// CFreestyleEmailUiAppUi::SetEmbeddedAppToPreviousApp
+// -----------------------------------------------------------------------------
+void CFreestyleEmailUiAppUi::SetEmbeddedAppToPreviousApp( TBool aEmbeddedApp )
+    {
+    iPreviousAppEmbedded = aEmbeddedApp;
+    }
+
+// -----------------------------------------------------------------------------
+// CFreestyleEmailUiAppUi::EmbeddedAppIsPreviousApp
+// -----------------------------------------------------------------------------
+TBool CFreestyleEmailUiAppUi::EmbeddedAppIsPreviousApp() const
+    {
+    return iPreviousAppEmbedded;
+    }
+
+// -----------------------------------------------------------------------------
+// CFreestyleEmailUiAppUi::SetEditorStartedFromEmbeddedApp
+// -----------------------------------------------------------------------------
+void CFreestyleEmailUiAppUi::SetEditorStartedFromEmbeddedApp( TBool aEmbeddedApp )
+    {
+    iEditorStartedFromEmbeddedApp = aEmbeddedApp;
+    }
+
+// -----------------------------------------------------------------------------
+// CFreestyleEmailUiAppUi::EditorStartedFromEmbeddedApp
+// -----------------------------------------------------------------------------
+TBool CFreestyleEmailUiAppUi::EditorStartedFromEmbeddedApp() const
+    {
+    return iEditorStartedFromEmbeddedApp;
+    }
+
+// -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 void CFreestyleEmailUiAppUi::ConstructNaviPaneL()
--- a/emailuis/emailui/src/FreestyleEmailUiContactHandler.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/src/FreestyleEmailUiContactHandler.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -44,7 +44,7 @@
 // Phonebook 2
 #include <CPbk2SortOrderManager.h>
 #include <MPbk2ContactNameFormatter.h>
-#include <Pbk2ContactNameFormatterFactory.h>        
+#include <Pbk2ContactNameFormatterFactory.h>
 
 // Send UI
 #include <sendui.h>
@@ -54,17 +54,13 @@
 #include <aiwdialdataext.h>
 #include <MVPbkContactLink.h>
 
-//Remote Contact Lookup
-//<cmail>
-#include "cpbkxremotecontactlookupenv.h"
-#include "tpbkxremotecontactlookupprotocolaccountid.h"
-#include "cpbkxremotecontactlookupserviceuicontext.h"
-#include <cntitem.h>
+// Remote Contact Lookup
+#include <cpbk2remotecontactlookupaccounts.h>
+#include <pbk2remotecontactlookupfactory.h>
 
-// <cmail> SF path
+
 #include <MPbkGlobalSetting.h> // Global setting data 
 #include <PbkGlobalSettingFactory.h>
-// </cmail>
 
 // Aiw launcher
 #include <AiwDialDataTypes.h>
@@ -74,7 +70,6 @@
 
 // FS Email framework
 #include "cfsmailbox.h"
-//</cmail>
 
 #include <FreestyleEmailUi.rsg>
 
@@ -1494,7 +1489,7 @@
 void CFSEmailUiContactHandler::LaunchRemoteLookupL( CFSMailBox& aMailBox )
     {
     FUNC_LOG;
-
+    
     CPbkxRemoteContactLookupServiceUiContext::TResult result;
     DoRemoteLookupL( aMailBox, KNullDesC , result, 
                      CPbkxRemoteContactLookupServiceUiContext::EModeNormal );
@@ -1504,33 +1499,31 @@
 // -----------------------------------------------------------------------------
 // CFSEmailUiContactHandler::LaunchRemoteLookupL
 // -----------------------------------------------------------------------------
-HBufC* CFSEmailUiContactHandler::GetNameAndNumberFromRemoteLookupL( CFSMailBox& aMailBox, const TDesC& aQuery, 
-                                                      RBuf& aPhoneNumber )
+HBufC* CFSEmailUiContactHandler::GetNameAndNumberFromRemoteLookupL(
+    CFSMailBox& aMailBox, const TDesC& aQuery, RBuf& aPhoneNumber )
     {
     FUNC_LOG;
 
     CPbkxRemoteContactLookupServiceUiContext::TResult result;
     DoRemoteLookupL( aMailBox, aQuery , result, 
-                     CPbkxRemoteContactLookupServiceUiContext::EModeContactSelector );
+        CPbkxRemoteContactLookupServiceUiContext::EModeContactSelector );
 
     HBufC* displayName = NULL;
-    
     if ( result.iExitReason == 
-    CPbkxRemoteContactLookupServiceUiContext::TResult::EExitContactSelected )
+         CPbkxRemoteContactLookupServiceUiContext::TResult::EExitContactSelected )
         {
         displayName = GetPhoneNumberAndNameL( aPhoneNumber, *(result.iSelectedContactItem) );
         } 
     return displayName;
     }
 
-void CFSEmailUiContactHandler::LaunchRemoteLookupWithQueryL( CFSMailBox& aMailBox, const TDesC& aQuery )
+void CFSEmailUiContactHandler::LaunchRemoteLookupWithQueryL(
+    CFSMailBox& aMailBox, const TDesC& aQuery )
     {
     FUNC_LOG;
-
     CPbkxRemoteContactLookupServiceUiContext::TResult result;
     DoRemoteLookupL( aMailBox, aQuery , result, 
-                         CPbkxRemoteContactLookupServiceUiContext::EModeExistingCriteria );
-
+        CPbkxRemoteContactLookupServiceUiContext::EModeExistingCriteria );
     }
 
 HBufC* CFSEmailUiContactHandler::GetLastSearchNameL( const TDesC& aEmailAddress )
@@ -1704,34 +1697,24 @@
 void CFSEmailUiContactHandler::DoRemoteLookupL( CFSMailBox& aMailBox,
     const TDesC& aQueryString,
     CPbkxRemoteContactLookupServiceUiContext::TResult& aResult,
-    CPbkxRemoteContactLookupServiceUiContext::TMode aContext )
+    CPbkxRemoteContactLookupServiceUiContext::TMode aLookupMode )
     {
     FUNC_LOG;
     TUid protocolUid = TUid::Null();
-    TUint accountId = 0;
-    aMailBox.GetRCLInfo( protocolUid, accountId );
-    const TPbkxRemoteContactLookupProtocolAccountId KAccountId(
-        protocolUid, accountId );
-        
-
-    CPbkxRemoteContactLookupEnv* env = CPbkxRemoteContactLookupEnv::NewL();
-    CleanupStack::PushL( env );
-
-    MPbkxRemoteContactLookupServiceUi* serviceUi = env->ServiceUiL();
+    TUint accountUid = 0;
+    aMailBox.GetRCLInfo( protocolUid, accountUid );
+    const TPbkxRemoteContactLookupProtocolAccountId accountId =
+        TPbkxRemoteContactLookupProtocolAccountId( protocolUid, accountUid );
 
-    // If you want test with RCL dummyContactDatabase, KAccountId = serviceUi->DefaultAccountIdL();
-    MPbkxRemoteContactLookupServiceUi::TContextParams params = { KAccountId, aContext };
-
-    CPbkxRemoteContactLookupServiceUiContext* ctx( NULL );
-    ctx = serviceUi->NewContextL( params );
+    CPbkxRemoteContactLookupServiceUiContext::TContextParams params = 
+        { accountId, aLookupMode }; 
 
-    CleanupStack::PushL( ctx ); 
-
-    ctx->ExecuteL( aQueryString, aResult );
+    CPbkxRemoteContactLookupServiceUiContext* context =
+        Pbk2RemoteContactLookupFactory::NewContextL( params );
+    CleanupStack::PushL( context );
 
-    CleanupStack::PopAndDestroy( ctx );
-    CleanupStack::PopAndDestroy( env );
-
+    context->ExecuteL( aQueryString, aResult );
+    CleanupStack::PopAndDestroy( context );
     }
 
 
--- a/emailuis/emailui/src/FreestyleEmailUiFolderListVisualiser.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/src/FreestyleEmailUiFolderListVisualiser.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -2978,6 +2978,8 @@
 void CFSEmailUiFolderListVisualiser::UpdateToolbarButtons()
     {
     FUNC_LOG;
+    Toolbar()->SetItemDimmed(
+        EFsEmailUiTbCmdSelect, ( iModel == NULL ) || ( iModel->Count() == 0 ), ETrue );
     Toolbar()->SetItemDimmed( EFsEmailUiTbCmdExpandAll, AllNodesExpanded(), ETrue );
     Toolbar()->SetItemDimmed( EFsEmailUiTbCmdCollapseAll, AllNodesCollapsed(), ETrue );
     }
--- a/emailuis/emailui/src/FreestyleEmailUiGlobalSettingsData.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/src/FreestyleEmailUiGlobalSettingsData.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -62,7 +62,7 @@
 	SetDownloadNotifications( 0 );
 	SetActiveIdle( 0 );
 	SetWarnBeforeDelete( 1 );
-	//SetDownloadHTMLImages( 1 );
+	SetDownloadHTMLImages( 1 );
 	}
 	
 TBool& CFsEmailUiGlobalSettingsData::WarnBeforeDelete()
--- a/emailuis/emailui/src/FreestyleEmailUiGlobalSettingsList.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/src/FreestyleEmailUiGlobalSettingsList.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -38,7 +38,7 @@
 #include "FreestyleEmailUiGlobalSettingsListView.h"
 #include "FreestyleEmailUiGlobalSettingsList.h"
 #include "FreestyleEmailUiAppui.h"
-#include "FreestyleEmailCenRepHandler.h"
+#include "freestyleemailcenrephandler.h"
 #include "FreestyleEmailUiShortcutBinding.h"
 #include "FreestyleEmailUiConstants.h"
 
@@ -113,7 +113,7 @@
                     aId,
                     iSettings.WarnBeforeDelete() );
             return item;
-            }/*
+            }
 		case EGlobalSettingsDownloadHTMLImages:
             {         
             CAknBinaryPopupSettingItem* item = new ( ELeave ) 
@@ -121,7 +121,7 @@
                     aId,
                     iSettings.DownloadHTMLImages() );
             return item;
-            }*/
+            }
         case EGlobalSettingsActiveIdle:
             {           
             CAknBigSettingItemBase* item = new ( ELeave )
@@ -207,7 +207,7 @@
 	//iSettings.SetDownloadNotifications( crHandler->DownloadNotifications() );
 	iSettings.SetActiveIdle( crHandler->ActiveIdle() );
 	iSettings.SetWarnBeforeDelete( crHandler->WarnBeforeDelete() );
-	//iSettings.SetDownloadHTMLImages( crHandler->DownloadHTMLImages() );
+	iSettings.SetDownloadHTMLImages( crHandler->DownloadHTMLImages() );
 	}
 	
 /**
@@ -230,7 +230,7 @@
 	//crHandler->SetDownloadNotifications( iSettings.DownloadNotifications() );
 	crHandler->SetActiveIdle( iSettings.ActiveIdle() );
 	crHandler->SetWarnBeforeDelete( iSettings.WarnBeforeDelete() );
-	//crHandler->SetDownloadHTMLImages( iSettings.DownloadHTMLImages() );
+	crHandler->SetDownloadHTMLImages( iSettings.DownloadHTMLImages() );
 	}
 
 /**
--- a/emailuis/emailui/src/FreestyleEmailUiHtmlViewerContainer.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/src/FreestyleEmailUiHtmlViewerContainer.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -44,7 +44,6 @@
 
 #include "FreestyleMessageHeaderHTML.h"
 #include "FreestyleMessageHeaderURLEventHandler.h"
-#include "FreestyleEmailUiAknStatusIndicator.h"
 #include "FreestyleEmailUiAttachmentsListModel.h"
 
 _LIT( KContentIdPrefix, "cid:" );
@@ -85,6 +84,11 @@
 _LIT8( KHtmlLinkEndTag, "</a>" );
 _LIT( KURLTypeBody, "body");
 
+_LIT( KURLDisplayImages, "cmail://displayImages/" );
+_LIT( KURLLoadImages, "cmail://loadImages/" );
+_LIT( KURLCollapseHeader, "cmail://collapseHeader/" );
+_LIT( KURLExpandHeader, "cmail://expandHeader/" );
+
 const TText8 KGreaterThan = 0x3e;
 const TText8 KLessThan = 0x3c;
 const TText8 KAmpersand = 0x26;
@@ -103,6 +107,161 @@
 const TInt KStatusIndicatorHeight = 50;
 const TInt KStatusIndicatorXMargin = 50;
 
+// CEUiHtmlViewerSettingsKeyListener
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+CEUiHtmlViewerSettingsKeyListener::CEUiHtmlViewerSettingsKeyListener( MObserver& aObserver, TUint32 aKey )
+    : CActive( EPriorityStandard ), iObserver( aObserver ), iKey( aKey )
+    {
+    CActiveScheduler::Add(this);
+    StartListening();
+    }
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+CEUiHtmlViewerSettingsKeyListener::~CEUiHtmlViewerSettingsKeyListener()
+    {
+    Cancel();
+    }
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+void CEUiHtmlViewerSettingsKeyListener::StartListening()
+    {
+    SetActive();
+    iObserver.Repository().NotifyRequest(iKey, iStatus);
+    }
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+void CEUiHtmlViewerSettingsKeyListener::RunL()
+    {
+    iObserver.KeyValueChangedL(iKey);
+    StartListening();
+    }
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+void CEUiHtmlViewerSettingsKeyListener::DoCancel()
+    {
+    iObserver.Repository().NotifyCancel(iKey);
+    }
+
+// CEUiHtmlViewerSettings
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+CEUiHtmlViewerSettings* CEUiHtmlViewerSettings::NewL( MObserver& aObserver )
+    {
+    CEUiHtmlViewerSettings* self = new (ELeave) CEUiHtmlViewerSettings(aObserver);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(); // self
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+CEUiHtmlViewerSettings::~CEUiHtmlViewerSettings()
+    {
+    iKeyListeners.ResetAndDestroy();
+    delete iRepository;
+    }
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+CEUiHtmlViewerSettings::CEUiHtmlViewerSettings( MObserver& aObserver ) : iObserver( aObserver )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+void CEUiHtmlViewerSettings::ConstructL()
+    {
+    iRepository = CRepository::NewL(KFreestyleEmailCenRep);
+    AddKeyListenerL(KFreestyleEmailDownloadHTMLImages);
+    }
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+void CEUiHtmlViewerSettings::AddKeyListenerL( TUint32 aKey )
+    {
+    CEUiHtmlViewerSettingsKeyListener* listener = new (ELeave) CEUiHtmlViewerSettingsKeyListener(*this, aKey);
+    CleanupStack::PushL(listener);
+    iKeyListeners.AppendL(listener);
+    CleanupStack::Pop(); // listener
+    UpdateValue(aKey);
+    }
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+void CEUiHtmlViewerSettings::UpdateValue( TUint32 aKey )
+    {
+    TInt value;
+    iRepository->Get(aKey, value);
+    switch (aKey)
+        {
+        case KFreestyleEmailDownloadHTMLImages:
+            // 0 = automatic, 1 = ask always
+            iFlags.Assign(aKey, value == 0);
+            break;
+        default:
+            iFlags.Assign(aKey, value);
+            break;
+        }
+    }
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+void CEUiHtmlViewerSettings::KeyValueChangedL( TUint32 aKey )
+    {
+    UpdateValue(aKey);
+    iObserver.ViewerSettingsChangedL(aKey);
+    }
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+CRepository& CEUiHtmlViewerSettings::Repository()
+    {
+    return *iRepository;
+    }
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+TBool CEUiHtmlViewerSettings::AutoLoadImages() const
+    {
+    return iFlags.IsSet(EAutoLoadImages);
+    }
+
 // ---------------------------------------------------------------------------
 // Two-phased constructor.
 // ---------------------------------------------------------------------------
@@ -128,7 +287,7 @@
     :
     iAppUi( aAppUi ),
     iView( aView ),
-    iFs( CCoeEnv::Static()->FsSession() ),
+    iFs( iCoeEnv->FsSession() ),
     iFirstTime( ETrue )
     {
     FUNC_LOG;
@@ -141,6 +300,7 @@
 CFsEmailUiHtmlViewerContainer::~CFsEmailUiHtmlViewerContainer()
     {
     FUNC_LOG;
+    delete iViewerSettings;
     if ( iObservingDownload && iAppUi.DownloadInfoMediator() )
         {
         iAppUi.DownloadInfoMediator()->StopObserving( this );
@@ -157,10 +317,10 @@
     delete iOverlayControlPrev;
     }
 
-// <cmail> Because of browser changes, followings must be performed before iAppUi.exit()
 void CFsEmailUiHtmlViewerContainer::PrepareForExit()
     {
     FUNC_LOG;
+    HideDownloadStatus();
     if ( iObservingDownload && iAppUi.DownloadInfoMediator() )
         {
         iAppUi.DownloadInfoMediator()->StopObserving( this );
@@ -171,12 +331,18 @@
     iConnection.Close();
     iSocketServer.Close();
     }
-// </cmail>
+
+void CFsEmailUiHtmlViewerContainer::PrepareForMessageNavigation()
+    {
+    FUNC_LOG;
+    ResetContent();
+    }
 
 void CFsEmailUiHtmlViewerContainer::ConstructL()
     {
     FUNC_LOG;
-    
+    iViewerSettings = CEUiHtmlViewerSettings::NewL(*this);
+
     SetHtmlFolderPathL();
     BaflUtils::EnsurePathExistsL( iFs, iHtmlFolderPath );
     SetTempHtmlFolderPath();
@@ -195,16 +361,27 @@
 
     // Set browsercontrol to whole screen
     TRect rect( TPoint(), Size() );
-
-    iBrCtlInterface = CreateBrowserControlL( this, rect, brCtlCapabilities,
-        TBrCtlDefs::ECommandIdBase, NULL, this, this, NULL, NULL, this, NULL );
+   
+    iBrCtlInterface = CreateBrowserControlL( 
+            this, // aParent 
+            rect,  // aRect
+            brCtlCapabilities, // aBrCtlCapabilities
+            TBrCtlDefs::ECommandIdBase, // aCommandIdBase
+            NULL, // aBrCtlSoftkeysObserver
+            this, // aBrCtlLinkResolver
+            this, // aBrCtlSpecialLoadObserver
+            NULL, // aBrCtlLayoutObserver
+            NULL, // aBrCtlDialogsProvider
+            this, // aBrCtlWindowObserver
+            NULL // aBrCtlDownloadObserver 
+            );
 
     iBrCtlInterface->SetBrowserSettingL( TBrCtlDefs::ESettingsEmbedded, ETrue );
-    iBrCtlInterface->SetBrowserSettingL( TBrCtlDefs::ESettingsAutoLoadImages, ETrue );
+    iBrCtlInterface->SetBrowserSettingL( TBrCtlDefs::ESettingsAutoLoadImages, iViewerSettings->AutoLoadImages() );
     iBrCtlInterface->SetBrowserSettingL( TBrCtlDefs::ESettingsPageOverview, EFalse );
     iBrCtlInterface->SetBrowserSettingL( TBrCtlDefs::ESettingsTextWrapEnabled, ETrue );
     iBrCtlInterface->SetBrowserSettingL( TBrCtlDefs::ESettingsFontSize, TBrCtlDefs::EFontSizeLevelLarger );
-
+    
     iEventHandler = CFreestyleMessageHeaderURLEventHandler::NewL( iAppUi, iView );
     
     TRect nextButtonRect = OverlayButtonRect( EFalse );
@@ -218,6 +395,10 @@
             EMbmFreestyleemailuiQgn_indi_cmail_arrow_previous_mask );
     iScrollPosition = 0;
     iAttachmentDownloadImageHandle = 0;
+
+    iTouchFeedBack = MTouchFeedback::Instance();
+    iTouchFeedBack->EnableFeedbackForControl(this, ETrue);
+
     ActivateL();
     }
 
@@ -349,23 +530,14 @@
     // insert email header into email.html file
     // CFreestyleMessageHeaderHTML will replace contents of email.html
     // So, no need to clear the contents
-    TLanguage language = User::Language();
-    TBidiText::TDirectionality direction = TBidiText::ScriptDirectionality( language );    
     if(aResetScrollPos)
         {
         iScrollPosition = 0; 
         }
-    if ( AknLayoutUtils::LayoutMirrored() )
-        {
-        direction = TBidiText::ERightToLeft;
-        }
-    else
-        {
-        direction = TBidiText::ELeftToRight;
-        }
-    CFreestyleMessageHeaderHTML::ExportL( *iMessage, iFs, headerHtmlFile, iAppUi.ClientRect().Width(), 
-                                            iScrollPosition,
-                                            direction);
+    const TInt visibleWidth(iAppUi.ClientRect().Width());
+    CFreestyleMessageHeaderHTML::ExportL( *iMessage, iFs, headerHtmlFile, visibleWidth, iScrollPosition,
+                                            iViewerSettings->AutoLoadImages() || iAppUi.DisplayImagesCache().Contains(*iMessage),
+                                            iHeaderExpanded );
     
     // Remove all previously created files from temporary HTML folder
     EmptyTempHtmlFolderL();
@@ -396,18 +568,27 @@
 // Reset content
 // ---------------------------------------------------------------------------
 //
-void CFsEmailUiHtmlViewerContainer::ResetContent()
+void CFsEmailUiHtmlViewerContainer::ResetContent(const TBool aDisconnect)
     {
     FUNC_LOG;
     if ( iBrCtlInterface )
         {
-        TRAP_IGNORE( iBrCtlInterface->HandleCommandL( ( TInt )TBrCtlDefs::ECommandIdBase + 
-                                                      ( TInt )TBrCtlDefs::ECommandFreeMemory ) );
+        TRAP_IGNORE( 
+                iBrCtlInterface->HandleCommandL( ( TInt )TBrCtlDefs::ECommandIdBase +
+                        ( TInt )TBrCtlDefs::ECommandFreeMemory ) );
+        if (aDisconnect)
+            {
+            TRAP_IGNORE( 
+                    iBrCtlInterface->HandleCommandL( ( TInt )TBrCtlDefs::ECommandIdBase +
+                                                      ( TInt )TBrCtlDefs::ECommandDisconnect ) );
+            }
         }
     iFile.Close();
     iLinkContents.Reset();
     iMessageParts.Reset();
     iMessage = NULL;
+    iHeaderExpanded = EFalse;
+    iScrollPosition = 0;
     }
 
 // ---------------------------------------------------------------------------
@@ -493,39 +674,6 @@
         {
         iBrCtlInterface->SetRect( rect );
         }
-
-    if ( iMessage )
-        {
-        // update the width in header part and reload
-        TPath headerHtmlFile;
-        headerHtmlFile.Copy( iHtmlFolderPath );
-        headerHtmlFile.Append( KHeaderHtmlFile );
-
-        TLanguage language = User::Language();
-        TBidiText::TDirectionality direction = TBidiText::ScriptDirectionality( language );
-        
-        if ( AknLayoutUtils::LayoutMirrored() )
-            {
-            direction = TBidiText::ERightToLeft;
-            }
-        else
-            {
-            direction = TBidiText::ELeftToRight;
-            }
-        TRAP_IGNORE( CFreestyleMessageHeaderHTML::ExportL( *iMessage, iFs, headerHtmlFile, 
-            rect.Width(), iScrollPosition, direction ) ) 
-        
-        TPath emailHtmlFile;
-        emailHtmlFile.Copy( iHtmlFolderPath );
-        if ( AknLayoutUtils::LayoutMirrored() )
-            {
-            emailHtmlFile.Append( KMessageHtmlRTLFile );
-            }
-        else
-            {
-            emailHtmlFile.Append( KMessageHtmlFile );
-            }
-        }
     
     UpdateOverlayButtons( IsVisible() );
     
@@ -738,9 +886,12 @@
     const TDesC& /*aCurrentUrl*/, MBrCtlLinkContent& /*aBrCtlLinkContent*/ )
     {
     FUNC_LOG;
-    if (IsMessageBodyURL(aUrl))
+    if ( IsMessageBodyURLL(aUrl) )
         {
-        iView.StartFetchingMessageL();
+        if ( iMessage )
+            {
+            iView.StartFetchingMessageL();
+            }
         return ETrue;
         }
     else
@@ -1201,7 +1352,7 @@
 //
 // <cmail>
 void CFsEmailUiHtmlViewerContainer::ConvertToHTML( const TDesC8& aContent,
-    const TDesC& aFileName, CFSMailMessagePart& aTextBodyPart )
+    const TDesC& aFileName, CFSMailMessagePart& /*aTextBodyPart*/ )
     {
     FUNC_LOG;
     const TInt KBodyTextChunkSizeBytes = 1024;
@@ -1597,7 +1748,8 @@
     
     for ( TInt i = 0; i < contentTypeArray.Count(); i++ )
         {
-        if ( ( contentTypeArray.MdcaPoint( i ).Find( KCharsetTag ) != KErrNotFound ) &&
+        TPtrC contentEntry( contentTypeArray.MdcaPoint( i ) );
+        if ( ( contentEntry.FindF( KCharsetTag ) != KErrNotFound ) &&
                 contentTypeArray.Count() >= ( i+1) )  
             {
             TPtrC value( contentTypeArray.MdcaPoint( i+1 ) );
@@ -1653,6 +1805,10 @@
 void CFsEmailUiHtmlViewerContainer::HandleResourceChange( TInt aType )
     {
     CCoeControl::HandleResourceChange( aType );
+    if ( aType == CFsEmailUiViewBase::EScreenLayoutChanged )
+        {
+        RefreshCurrentMailHeader();
+        }
     }
 
 void CFsEmailUiHtmlViewerContainer::RefreshCurrentMailHeader()
@@ -1664,53 +1820,28 @@
         headerHtmlFile.Copy( iHtmlFolderPath );
         headerHtmlFile.Append( KHeaderHtmlFile );
         
-        TLanguage language = User::Language();
-        TBidiText::TDirectionality direction = TBidiText::ScriptDirectionality( language );    
-        TRAP_IGNORE( CFreestyleMessageHeaderHTML::ExportL( *iMessage, iFs, headerHtmlFile, iAppUi.ClientRect().Width(), direction ) )
+            TRAP_IGNORE( CFreestyleMessageHeaderHTML::ExportL( *iMessage, iFs,
+                headerHtmlFile, iAppUi.ClientRect().Width(), iScrollPosition,
+                iViewerSettings->AutoLoadImages() || iAppUi.DisplayImagesCache().Contains(*iMessage),
+                iHeaderExpanded ) )
         
-        TPath emailHtmlFile;
-        emailHtmlFile.Copy( iHtmlFolderPath );
-        emailHtmlFile.Append( KMessageHtmlFile );
         
-        if ( direction == TBidiText::ELeftToRight )
+        if(!iEventHandler->IsMenuVisible())
             {
-            emailHtmlFile.Append( KMessageHtmlFile );
+            TRAP_IGNORE( ReloadPageL() );
             }
         else
             {
-            emailHtmlFile.Append( KMessageHtmlRTLFile );
+            //Load page asynchronously after dismissing menu    
+            iEventHandler->DismissMenuAndReload();
             }
-        
-        //Load page synchronously if menu invisible
-        if(!iEventHandler->IsMenuVisible())
-            {
-            TRAP_IGNORE( LoadContentFromFileL( emailHtmlFile ) );
-            SetRect( iAppUi.ClientRect() );
-            }
-        //Load page asynchronously after dismissing menu    
-        else
-            {
-            iEventHandler->DismissMenuAndReload();
-            }       
         }
     }
 
 void CFsEmailUiHtmlViewerContainer::ReloadPageL()
     {
-    TLanguage language = User::Language();
-    TBidiText::TDirectionality direction = TBidiText::ScriptDirectionality( language );    
-    TPath emailHtmlFile;
-    emailHtmlFile.Copy( iHtmlFolderPath );
-    if( !AknLayoutUtils::LayoutMirrored() )
-        {
-        emailHtmlFile.Append( KMessageHtmlFile );
-        }
-    else
-        {
-        emailHtmlFile.Append( KMessageHtmlRTLFile );
-        }
-    TRAP_IGNORE( LoadContentFromFileL( emailHtmlFile ) );
-    SetRect( iAppUi.ClientRect() );
+    TRAP_IGNORE( iBrCtlInterface->HandleCommandL( ( TInt )TBrCtlDefs::ECommandIdBase +
+            ( TInt )TBrCtlDefs::ECommandReload ) );
     }
 
 void CFsEmailUiHtmlViewerContainer::ShowAttachmentDownloadStatusL( 
@@ -1829,6 +1960,23 @@
         return EFalse;
         }
     }
+void CFsEmailUiHtmlViewerContainer::ViewerSettingsChangedL( const TUint32 aKey )
+    {
+    FUNC_LOG;
+    if (aKey == KFreestyleEmailDownloadHTMLImages)
+        {
+        if (iBrCtlInterface)
+            {
+            iBrCtlInterface->SetBrowserSettingL(
+                TBrCtlDefs::ESettingsAutoLoadImages,
+                    iViewerSettings->AutoLoadImages() );
+            if (iViewerSettings->AutoLoadImages() && iMessage)
+                {
+                LoadContentFromMailMessageL(iMessage, EFalse);
+                }
+            }
+        }
+    }
 
 void CFsEmailUiHtmlViewerContainer::HideDownloadStatus()
     {
@@ -1849,13 +1997,18 @@
     return TRect( statusTopLeft, statusBottomRight );
     }
 
+void CFsEmailUiHtmlViewerContainer::TouchFeedback()
+    {
+    iTouchFeedBack->InstantFeedback(this, ETouchFeedbackBasic);  
+    }
+
 /**
  * The body fetch link is cmail://body/fetch. Look for the URL separator
  * and the presence of cmail and body on the url.
  * @param aUrl 
  * return ETrue for  a valid body URL
  */
-TBool CFsEmailUiHtmlViewerContainer::IsMessageBodyURL(const TDesC& aUrl)
+TBool CFsEmailUiHtmlViewerContainer::IsMessageBodyURLL(const TDesC& aUrl)
     {
     TInt index = aUrl.Find(KURLSchemeSeparator);
     if (index == KErrNotFound)
@@ -1864,7 +2017,31 @@
         }
     else
         {
-        if (aUrl.Left(index).CompareF(KURLSchemeCmail) == 0)
+        if (aUrl.Compare(KURLLoadImages()) == 0)
+            {
+            iBrCtlInterface->HandleCommandL(TBrCtlDefs::ECommandLoadImages + TBrCtlDefs::ECommandIdBase);
+            return ETrue;
+            }
+        else if (aUrl.Compare(KURLDisplayImages()) == 0)
+            {
+            DisplayStatusIndicatorL(KStatusIndicatorAutomaticHidingDuration);
+            iAppUi.DisplayImagesCache().AddMessageL(*iMessage);
+            iBrCtlInterface->HandleCommandL(TBrCtlDefs::ECommandLoadImages + TBrCtlDefs::ECommandIdBase);
+            return ETrue;
+            }
+        else if (aUrl.Compare(KURLCollapseHeader()) == 0)
+            {
+            TouchFeedback();
+            iHeaderExpanded = EFalse;
+            return ETrue;
+            }
+        else if (aUrl.Compare(KURLExpandHeader()) == 0)
+            {
+            TouchFeedback();
+            iHeaderExpanded = ETrue;
+            return ETrue;        
+            }
+        else if (aUrl.Left(index).CompareF(KURLSchemeCmail) == 0)
             {
             TInt bodyIndex = aUrl.Find(KURLTypeBody);                      
             if (bodyIndex == KErrNotFound)
@@ -1895,6 +2072,7 @@
             }
         }
     } 
+
 // ---------------------------------------------------------------------------
 // From MBrCtlWindowObserver
 // ---------------------------------------------------------------------------
@@ -1933,6 +2111,7 @@
     TBool launchBrowser( ETrue );
     // look for file:///
     _LIT( KFileLink, "file:///");
+    _LIT( KUrlLink, "http");
     
     // This might be linking to header.html or body.html frames
     // Ignore them.
@@ -1959,6 +2138,12 @@
         {
         launchBrowser = EFalse;
         }
+    //    THAA-82BEAZ - show popup first 
+    else if ( aUrl.Left(KUrlLink().Length() ).CompareF( KUrlLink ) == 0 )
+        {
+        launchBrowser = EFalse;
+        }
+    // end THAA-82BEAZ
 
     return launchBrowser;
     }
@@ -2018,18 +2203,19 @@
     CleanupStack::PopAndDestroy( &targetFile );    
     }
 
-void CFsEmailUiHtmlViewerContainer::DisplayStatusIndicatorL()
+void CFsEmailUiHtmlViewerContainer::DisplayStatusIndicatorL(TInt aDuration)
     {
-    TRect rect = CalcAttachmentStatusRect();  
+    FUNC_LOG;
+    TRect rect = CalcAttachmentStatusRect();
     if(!iStatusIndicator)
         {
         iStatusIndicator  = CFreestyleEmailUiAknStatusIndicator::NewL( rect, this );
         }  
     CFbsBitmap* image = NULL;
     CFbsBitmap* imageMask = NULL;
-    TInt duration = KStatusIndicatorDefaultDuration;
     HBufC* statusText = NULL;
     statusText = StringLoader::LoadL(R_FREESTYLE_EMAIL_UI_VIEWER_FETCHING_CONTENT_TEXT);
     iAppUi.FsTextureManager()->ProvideBitmapL(EStatusTextureSynchronising, image, imageMask );
-    iStatusIndicator->ShowIndicatorL( image, imageMask, statusText, duration );
+    iStatusIndicator->ShowIndicatorL( image, imageMask, statusText, aDuration );
     }
+
--- a/emailuis/emailui/src/FreestyleEmailUiHtmlViewerView.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/src/FreestyleEmailUiHtmlViewerView.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -134,6 +134,7 @@
     iOpenMessages = new (ELeave) CStack<CFSMailMessage, ETrue>();
     iEmbeddedMessages = new (ELeave) CStack<CFSMailMessage, EFalse>();
     iNextOrPrevMessageSelected = EFalse; 
+    iForwardingMessage = EFalse;
     }
 
 // -----------------------------------------------------------------------------
@@ -298,6 +299,7 @@
                         iContainer->ResetContent();
                         }
 
+                    iForwardingMessage = ETrue;
                     iAppUi.LaunchEditorL( KEditorCmdForward, params );
                     }
                 }
@@ -479,7 +481,7 @@
 // Activate an Compose view
 // -----------------------------------------------------------------------------
 //
-void CFsEmailUiHtmlViewerView::ChildDoActivateL( const TVwsViewId& /*aPrevViewId*/,
+void CFsEmailUiHtmlViewerView::ChildDoActivateL( const TVwsViewId& aPrevViewId,
         TUid aCustomMessageId, const TDesC8& aCustomMessage )
     {
     FUNC_LOG;
@@ -487,6 +489,11 @@
     TBool msgBodyStructurePresent ( EFalse );
     TBool msgBodyContentPresent ( EFalse );
     
+    if( aCustomMessageId != KHtmlViewerReturnToPrevious)
+     {
+     ViewEntered( aPrevViewId );
+     }
+
     if ( iMrObserverToInform && 
          aCustomMessageId == KStartViewerReturnToPreviousMsg )
         {
@@ -734,13 +741,8 @@
             }
        }
     iNextOrPrevMessageSelected = EFalse;
+    iForwardingMessage = EFalse;
     
-    //update rect only if it has changed from previous time.
-    if ( iContainer->Rect() != ContainerRect()  )
-        {
-        iContainer->SetRect( ContainerRect() );
-        }
-
     TIMESTAMP( "Html viewer opened" );    
     }
 
@@ -808,6 +810,9 @@
             {
             aDimmedItems.AppendL(EFsEmailUiTbCmdActions);
             aDimmedItems.AppendL(EFsEmailUiTbCmdDelete);
+            aDimmedItems.AppendL(EFsEmailUiTbCmdReply);
+            aDimmedItems.AppendL(EFsEmailUiTbCmdForward);
+            aDimmedItems.AppendL(EFsEmailUiTbCmdReplyAll);
             }
         }
     }
@@ -820,12 +825,18 @@
 void CFsEmailUiHtmlViewerView::ChildDoDeactivate()
     {
     FUNC_LOG;
-    CancelFetchings();
-   
+    // Don't cancel fetching the message parts when forwarding the message:
+    // it would also cancel the fetchings initiated by the forwarding,
+    // causing the forwarding to abort.
+    if ( !iForwardingMessage )
+        {
+        CancelFetchings();
+        }
+
     if ( iContainer )
         {
         HideContainer();
-        iContainer->ResetContent();
+        iContainer->ResetContent(ETrue);
         iAppUi.RemoveFromStack(iContainer);
         iContainer->CancelFetch();
         iContainer->ClearCacheAndLoadEmptyContent();
@@ -1124,11 +1135,6 @@
 void CFsEmailUiHtmlViewerView::HandleStatusPaneSizeChange()
     {
     CFsEmailUiViewBase::HandleStatusPaneSizeChange();
-    
-    if ( iContainer )
-        {
-        iContainer->SetRect( ContainerRect() );
-        }
     }
 
 void CFsEmailUiHtmlViewerView::HandleViewRectChange()
@@ -1277,9 +1283,11 @@
                 ChangeMskCommandL( R_FSE_QTN_MSK_EMPTY );
                 NavigateBackL();
                 }
-            //inform user that mail is deleted  
-            TFsEmailUiUtility::ShowGlobalInfoNoteL( R_FREESTYLE_EMAIL_MAIL_DELETED );
-            }        
+
+			
+			}
+        //inform user that mail is deleted  
+        TFsEmailUiUtility::ShowDiscreetInfoNoteL( R_FREESTYLE_EMAIL_MAIL_DELETED );
         }
     }
 
@@ -1640,12 +1648,7 @@
 
 void CFsEmailUiHtmlViewerView::CancelAttachmentL( const TAttachmentData& aAttachment )
     {
-    TInt reallyCancel = 
-        TFsEmailUiUtility::ShowConfirmationQueryL( R_FSE_VIEWER_CANCEL_DOWNLOAD_QUERY );
-    if ( reallyCancel )
-        {
-        iAttachmentsListModel->CancelDownloadL(aAttachment);
-        }
+    iAttachmentsListModel->CancelDownloadL(aAttachment);
     }
 
 void CFsEmailUiHtmlViewerView::OpenAttachmentL( const TAttachmentData& aAttachment )
@@ -1950,6 +1953,11 @@
         TFSMailMsgId nextMsgFolderId;
         if ( iAppUi.IsNextMsgAvailable( currentMsgId, nextMsgId, nextMsgFolderId ) )
             {
+            if (iContainer)
+                {
+                iContainer->PrepareForMessageNavigation();
+                }
+
             // Stop timer and cancel fetchings before showing next message
             //iFetchingAnimationTimer->Stop();
             CancelFetchings();
@@ -1993,6 +2001,11 @@
         TFSMailMsgId prevMsgFolderId;
         if ( iAppUi.IsPreviousMsgAvailable( currentMsgId, prevMsgId, prevMsgFolderId ) )
             {
+            if (iContainer)
+                {
+                iContainer->PrepareForMessageNavigation();
+                }
+        
             // Stop timer and cancel fetchings before showing prev message
             CancelFetchings();
            
@@ -3174,7 +3187,7 @@
        }
     }
 
-void CFsEmailUiHtmlViewerView::CheckMessageBodyL( CFSMailMessage& aMessage, TBool& aMessageBodyStructurePresent, TBool& aMessageBodyContentPresent)
+void CFsEmailUiHtmlViewerView::CheckMessageBodyL( CFSMailMessage& /*aMessage*/, TBool& aMessageBodyStructurePresent, TBool& aMessageBodyContentPresent)
     {
     CFSMailMessagePart* bodyPart = iMessage->HtmlBodyPartL();
     if ( !bodyPart )
--- a/emailuis/emailui/src/FreestyleEmailUiLauncherGridVisualiser.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/src/FreestyleEmailUiLauncherGridVisualiser.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -144,6 +144,10 @@
     iUiOperationLaunched = EFalse;
 
     iMailboxDeleter = CFSEmailUiMailboxDeleter::NewL( *iAppUi.GetMailClient(), *this );
+
+    // Create startup timer
+    iStartupCallbackTimer = CFSEmailUiGenericTimer::NewL( this );
+
     }
 
 // ----------------------------------------------------------------------------
@@ -294,6 +298,13 @@
 CFSEmailUiLauncherGridVisualiser::~CFSEmailUiLauncherGridVisualiser()
     {
     FUNC_LOG;
+    
+    if ( iStartupCallbackTimer )
+    	{
+    	iStartupCallbackTimer->Cancel();
+    	delete iStartupCallbackTimer;
+    	}
+    
     iPluginIdIconIdPairs.Reset();
     iIconArray.Close();
     iMailboxRequestIds.Close();
@@ -2677,5 +2688,28 @@
 	iStylusPopUpMenuLaunched = ETrue;
 	}
 
+void CFSEmailUiLauncherGridVisualiser::HandleAppForegroundEventL( TBool aForeground )
+	{
+	CFsEmailUiViewBase::HandleAppForegroundEventL( aForeground );
+	// If the view is not visible try to visualise it after a while
+	if ( aForeground && ( !iWasActiveControlGroup ) )
+		{
+		//
+		iStartupCallbackTimer->Cancel(); // just in case
+		iStartupCallbackTimer->SetPriority( CActive::EPriorityIdle );
+		// EPriorityIdle, EPriorityLow, EPriorityStandard 
+		iStartupCallbackTimer->Start( 200 );
+		}
+	}
 
-// End of file.
+// Fire timer callback
+void CFSEmailUiLauncherGridVisualiser::TimerEventL( CFSEmailUiGenericTimer* /* aTriggeredTimer */ )
+{
+  // if view is still active then 
+  if ( ( NULL != iAppUi.CurrentActiveView() ) && ( iAppUi.CurrentActiveView()->Id() == Id() ) )	  
+		  {
+		  iWasActiveControlGroup = ETrue;
+		  HandleAppForegroundEventL( ETrue );
+		  }
+};
+
--- a/emailuis/emailui/src/FreestyleEmailUiMailListModel.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/src/FreestyleEmailUiMailListModel.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -571,3 +571,22 @@
     iSortCriteria.iOrder = EFSMailDescending;
     }
 
+void CFSEmailUiMailListModel::GetItemIdsUnderNodeL( const TFsTreeItemId aNodeId, 
+        RFsTreeItemIdList& aMessageIds ) const
+    {
+    FUNC_LOG;
+    aMessageIds.Reset();
+    const TInt count(iItems.Count());
+    for (TInt index = 0; index < count; index++)
+        {
+        if (iItems[index]->CorrespondingListId() == aNodeId)
+            {            
+            // Found the node Id, now get all the items under it
+            while (++index < count && iItems[index]->ModelItemType() == ETypeMailItem)
+                {
+                aMessageIds.AppendL(iItems[index]->CorrespondingListId());
+                }
+            break;
+            }
+        }        
+    }
--- a/emailuis/emailui/src/FreestyleEmailUiMailListVisualiser.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/src/FreestyleEmailUiMailListVisualiser.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -88,6 +88,7 @@
 #include "FreestyleEmailUiHtmlViewerView.h"
 #include "FSDelayedLoader.h"
 #include "FSEmail.pan"
+#include "fsemailstatuspaneindicatorhandler.h"
 
 // CONST VALUES
 const TInt KControlBarTransitionTime = 250;
@@ -110,6 +111,79 @@
     ptr = NULL;
     }
 
+// TDeleteTask
+// Task class for deleting mail
+// ---------------------------------------------------------------------------
+// Class definition
+// ---------------------------------------------------------------------------
+template <class T> struct TDeleteTask
+    {
+    
+public:
+    
+    typedef void ( T::*TDeleteMethod )( const RFsTreeItemIdList& aEntries );
+    
+public:    
+    
+    TDeleteTask(T& aObject, TDeleteMethod aMethod);    
+    ~TDeleteTask();
+    void ExecuteL();
+    RFsTreeItemIdList& Entries();
+    void Reset();
+    
+private:
+
+    T& iObject;
+    TDeleteMethod iMethod;    
+    RFsTreeItemIdList iEntries;
+    
+    };
+
+// ---------------------------------------------------------------------------
+// TDeleteTask<T>::TDeleteTask
+// ---------------------------------------------------------------------------
+//
+template <class T> TDeleteTask<T>::TDeleteTask( T& aObject, TDeleteMethod aMethod )
+    : iObject(aObject), iMethod(aMethod)
+    {    
+    }
+
+// ---------------------------------------------------------------------------
+// TDeleteTask<T>::~TDeleteTask
+// ---------------------------------------------------------------------------
+//
+template <class T> TDeleteTask<T>::~TDeleteTask()
+    {
+    iEntries.Close();
+    }
+
+// ---------------------------------------------------------------------------
+// TDeleteTask<T>::ExecuteL
+// ---------------------------------------------------------------------------
+//
+template <class T> void TDeleteTask<T>::ExecuteL()
+    {
+    (iObject.*iMethod)(iEntries);
+    Reset();
+    }
+
+// ---------------------------------------------------------------------------
+// TDeleteTask<T>::Entries
+// ---------------------------------------------------------------------------
+//
+template <class T> RFsTreeItemIdList& TDeleteTask<T>::Entries()
+    {
+    return iEntries;
+    }
+
+// ---------------------------------------------------------------------------
+// TDeleteTask<T>::Reset
+// ---------------------------------------------------------------------------
+//
+template <class T> void TDeleteTask<T>::Reset()
+    {
+    iEntries.Reset();
+    }
 // CMailListModelUpdater
 
 // ---------------------------------------------------------------------------
@@ -340,6 +414,9 @@
 	iAsyncCallback = new (ELeave) CAsyncCallBack( CActive::EPriorityStandard );
 	iAsyncRedrawer = new (ELeave) CAsyncCallBack( CActive::EPriorityLow );
 	iLastFocus = EFalse;
+    iDeleteTask = new (ELeave) TDeleteTask<CFSEmailUiMailListVisualiser> (*this, HandleDeleteTaskL);
+
+	iTouchFeedBack = MTouchFeedback::Instance();
  	}
 
 // CFSEmailUiMailListVisualiser::DoFirstStartL()
@@ -483,6 +560,10 @@
 CFSEmailUiMailListVisualiser::~CFSEmailUiMailListVisualiser()
     {
     FUNC_LOG;
+    if (iExtension)
+        {
+        iAppUi.GetMailClient()->ReleaseExtension(iExtension);
+        }
     SafeDelete(iMailListModelUpdater);
     SafeDelete(iMailFolder);
     delete iTouchManager;
@@ -493,6 +574,8 @@
 	// Don't construct this anywhere else than in constructor.
 	// Don't delete anywhere else thatn here to avoid NULL checks.
     delete iModel;
+    
+    delete iDeleteTask;
     }
 
 void CFSEmailUiMailListVisualiser::PrepareForExit()
@@ -536,6 +619,8 @@
     iTreeItemArray.Reset();
 	// Reset, not delete to avoid NULL checks.
     iModel->Reset();
+    // Resources freed, new start required
+    iFirstStartCompleted = EFalse;
     }
 
 // ---------------------------------------------------------------------------
@@ -602,7 +687,7 @@
         }
     SetListAndCtrlBarFocusL();
     iAppUi.StartMonitoringL();
-    TIMESTAMP( "Locally stored messages fetched for message list" );    
+    TIMESTAMP( "Locally stored messages fetched for message list" );
     }
 
 // ---------------------------------------------------------------------------
@@ -1082,7 +1167,7 @@
                 TInt nodeIdxUnderRoot = iMailList->ChildIndex( KFsTreeRootID, nextNodeId );
                 InsertNodeItemL( idx-1, nodeIdxUnderRoot, aAllowRefresh );
                 }
-            moveViewPortPosition += iAppUi.LayoutHandler()->OneLineListItemHeight(); 
+            moveViewPortPosition += iAppUi.LayoutHandler()->OneLineListItemHeight();
             }
         else
             {
@@ -1101,7 +1186,7 @@
     TPoint viewPortTopPos = iMailTreeListVisualizer->ViewPortTopPosition();
     TInt itemPos = iMailTreeListVisualizer->GetItemWorldPosition( idx );
     TBool refresh = viewPortTopPos.iY != 0 && itemPos < viewPortCenterPos.iY;
-     
+
     if( refresh )
     	{
 		InsertListItemL( idx, parentId, childIdx, EFalse );
@@ -1251,6 +1336,8 @@
 	    {
 	    DoFirstStartL();
 	    }
+    // set when editor was called so reset is needed i.e. here (Called by DoActivate)
+   	iMailOpened = EFalse; 
 
     // Make sure that pending popup is not displayd
 	if ( iAppUi.FolderList().IsPopupShown() )
@@ -1277,8 +1364,6 @@
     TRect clientRect = iAppUi.ClientRect();
     iScreenAnchorLayout->SetSize( clientRect.Size() );
     SetMailListLayoutAnchors();
-    TInt listHeight = clientRect.Height() - iAppUi.LayoutHandler()->ControlBarHeight();
-    iListLayout->SetSize( TSize( clientRect.Width(), listHeight ) ); // needs to be set separately to avoid layout problems in some special cases
     ScaleControlBarL();
     SetListAndCtrlBarFocusL();
 
@@ -1297,7 +1382,8 @@
 
 	// Check for changed settings, in that case a complete list refresh is needed
 	TBool refreshNeeded(EFalse);
-	if ( iSkinChanged
+	if ( aCustomMessageId == KStartListWithFolderIdFromHomeScreen
+	     || iSkinChanged
 	     || iDateChanged
 	     || iListMode != prevListMode
 		 || iNodesInUse != prevNodesmode
@@ -1305,8 +1391,8 @@
 		 || prevDateFormats.iDateFormat != iDateFormats.iDateFormat
 		 || prevDateFormats.iTimeFormat != iDateFormats.iTimeFormat
 		 || prevDateFormats.iAmPmPosition != iDateFormats.iAmPmPosition
-		 || prevDateFormats.iDateSeparator != iDateFormats.iDateSeparator
-		 || prevDateFormats.iTimeSeparator != iDateFormats.iTimeSeparator )
+		 || prevDateFormats.iDateSeparator.GetNumericValue() != iDateFormats.iDateSeparator.GetNumericValue()
+		 || prevDateFormats.iTimeSeparator.GetNumericValue() != iDateFormats.iTimeSeparator.GetNumericValue() )
 		{
 		refreshNeeded = ETrue;
 		iSkinChanged = EFalse;
@@ -1419,6 +1505,8 @@
         }
 
     // NOW WE HAVE A VALID MAILBOX AND FOLDER ID.
+    // Tries to create an extension for the Ozone plugin
+    CreateExtensionL();
 
     // CHECK IF MODEL NEEDS TO BE UPDATED
     if ( activationData.iMailBoxId != prevMailBoxId ||
@@ -1510,9 +1598,11 @@
 
     iCurrentClientRect = clientRect;
 	iThisViewActive = ETrue;
-
-	// Set email indicator off.. user has checked the new emails
-	TFsEmailUiUtility::ToggleEmailIconL(EFalse, activationData.iMailBoxId );
+	//emailindicator handling, we dont care if something goes wrong in the mailindicator update. User can still open the mailbox
+	TRAP_IGNORE(TFsEmailStatusPaneIndicatorHandler::StatusPaneMailIndicatorHandlingL( activationData.iMailBoxId.Id()));
+	    
+    //Update mailbox widget index status in homescreen
+    TFsEmailUiUtility::ToggleEmailIconL(EFalse, activationData.iMailBoxId );
 
 	iShiftDepressed = EFalse; // clear state just in case
 
@@ -1636,26 +1726,36 @@
             // Sync/cancel sync
 	    CFSMailBox* activeMailbox = iAppUi.GetActiveMailbox();
 	    TBool supportsSync = activeMailbox->HasCapability( EFSMBoxCapaSupportsSync );
-                
+
             // flag to hide or show SyncButton
             TBool hideSync = GetLatestSyncState();
             if(activeMailbox->CurrentSyncState()==StartingSync) hideSync=EFalse;
-        
+
             // hide or show options: Sync/cancel sync
-            if ( !supportsSync )
-                {
-                aMenuPane->SetItemDimmed( EFsEmailUiCmdCancelSync, ETrue );
-                aMenuPane->SetItemDimmed( EFsEmailUiCmdSync, ETrue );
-                }
-             else if ( hideSync || iMailListModelUpdater->IsUpdating() )
-                {
-                aMenuPane->SetItemDimmed( EFsEmailUiCmdSync, ETrue );
-                }
-             else
-                {
-                aMenuPane->SetItemDimmed( EFsEmailUiCmdCancelSync, ETrue );
-                }
- 	
+        if ( !supportsSync )
+        {
+				// POP3 behaviour
+				TFSMailBoxStatus onlineStatus = activeMailbox->GetMailBoxStatus();
+				if( onlineStatus == EFSMailBoxOnline || iMailListModelUpdater->IsUpdating() )
+				  {
+					aMenuPane->SetItemDimmed( EFsEmailUiCmdCancelSync, EFalse );
+					aMenuPane->SetItemDimmed( EFsEmailUiCmdSync, ETrue );
+				  }
+				else
+					{
+					aMenuPane->SetItemDimmed( EFsEmailUiCmdCancelSync, ETrue );
+					aMenuPane->SetItemDimmed( EFsEmailUiCmdSync, EFalse );
+					}
+        }
+      else if ( hideSync || iMailListModelUpdater->IsUpdating() )
+        {
+        aMenuPane->SetItemDimmed( EFsEmailUiCmdSync, ETrue );
+        }
+      else
+        {
+        aMenuPane->SetItemDimmed( EFsEmailUiCmdCancelSync, ETrue );
+        }
+
 		// Saves a focus visibility.
 		iLastFocus = EFalse;
 		if( iFocusedControl == EMailListComponent && IsFocusShown() )
@@ -1947,9 +2047,9 @@
 	iMailList->RemoveAllL();
 	iTreeItemArray.Reset();
 
-    // when we get refresh mail list updates should be fully enabled	
+    // when we get refresh mail list updates should be fully enabled
     iMailOpened = EFalse;
-	
+
 	RefreshListItemsL();
 
 	if ( !iModel->Count() )
@@ -3023,9 +3123,9 @@
 //
 // ---------------------------------------------------------------------------
 //
-void CFSEmailUiMailListVisualiser::UpdateTheme()
+void CFSEmailUiMailListVisualiser::UpdateTheme(const TBool aSystemUpdate)
     {
-    iSkinChanged = ETrue;
+    iSkinChanged = aSystemUpdate;
 
     TRgb focusedTextColor = iAppUi.LayoutHandler()->ListFocusedStateTextSkinColor();
     TRgb normalTextColor = iAppUi.LayoutHandler()->ListNormalStateTextSkinColor();
@@ -3049,11 +3149,15 @@
 void CFSEmailUiMailListVisualiser::HandleForegroundEventL( TBool aForeground )
 	{
     FUNC_LOG;
-    if( iMailFolder ) 
-        {
+    if( iMailFolder )
+        {
+        //emailindicator handling, we dont care if something goes wrong in the mailindicator update. User can still open the mailbox
+        TRAP_IGNORE(TFsEmailStatusPaneIndicatorHandler::StatusPaneMailIndicatorHandlingL( iMailFolder->GetMailBoxId().Id()));
+        //Update mailbox widget index status in homescreen
         TFsEmailUiUtility::ToggleEmailIconL(EFalse, iMailFolder->GetMailBoxId() );
         }
-    if ( aForeground && iFirstStartCompleted ) // Safety
+    
+	if ( iFirstStartCompleted ) // Safety
 	    {
 	    // Update mail list settings and date formats, is done every time
 	    // the user might have changed these in settings, so the list needs to refresh
@@ -3195,7 +3299,7 @@
             }
        	case EAknSoftkeySelect:
        	    {
-       	    TIMESTAMP( "Open email selected from message list" );    
+       	    TIMESTAMP( "Open email selected from message list" );
        	    if ( iFocusedControl == EMailListComponent )
        	        {
        	        CFSEmailUiMailListModelItem* item = dynamic_cast<CFSEmailUiMailListModelItem*>(iModel->Item(HighlightedIndex()));
@@ -3405,7 +3509,7 @@
        	case EFsEmailUiCmdActionsDeleteCalEvent:
 		case EFsEmailUiCmdActionsDelete:
 			{
-			TIMESTAMP( "Delete to selected from message list" );    
+			TIMESTAMP( "Delete to selected from message list" );
 			TInt index = HighlightedIndex();
 			CFSEmailUiMailListModelItem* item =
 				dynamic_cast<CFSEmailUiMailListModelItem*>(
@@ -3413,24 +3517,21 @@
 
 			// If selected item is separator (divider) mark/unmark all messages
 			// under it.
-			if ( item && item->ModelItemType() == ETypeSeparator )
-				{
-				MarkItemsUnderSeparatorL( ETrue, index );
-				}
 
 			// Delete message only if mail list component is focused
 			// or if there are some marked items
 			TInt markedItems( CountMarkedItemsL() );
-
-			if ( iFocusedControl == EMailListComponent || markedItems )
-				{
-				DeleteMessagesL();
-				}
-			}
+            const TBool isNode(iMailList->IsNode(iMailList->FocusedItem()));
+            if (iFocusedControl == EMailListComponent || markedItems
+                    || isNode)
+                {
+                DeleteMessagesL();
+                }
+            }
             break;
 		case EFsEmailUiCmdCompose:
 			{
-			TIMESTAMP( "Create new message selected from message list" );    
+			TIMESTAMP( "Create new message selected from message list" );
 			CreateNewMsgL();
 			}
 			break;
@@ -3482,7 +3583,7 @@
        	case EFsEmailUiCmdOpen:
         case EFsEmailUiCmdActionsOpen:
         	{
-        	TIMESTAMP( "Open email selected from message list" );        
+        	TIMESTAMP( "Open email selected from message list" );
 	        if ( iFocusedControl == EMailListComponent )
 	            {
 	            // Opening can happen only when there's exactly one message marked or in focus
@@ -3598,21 +3699,31 @@
 			        iAppUi.SyncActiveMailBoxL();
 			        // Sync was started by the user
 			        ManualMailBoxSync(ETrue);
-                                iAppUi.ManualMailBoxSync( ETrue );
+                    iAppUi.ManualMailBoxSync( ETrue );
 			        }
 			    }
+			  else
+			    {
+			    //POP3 synchronise
+				iAppUi.DoAutoConnectL();
+				}
 			}
 			break;
        	case EFsEmailUiCmdCancelSync:
        		{
-		TBool supportsSync = iAppUi.GetActiveMailbox()->HasCapability( EFSMBoxCapaSupportsSync );
-		if ( supportsSync )
-		    {
+            TBool supportsSync = iAppUi.GetActiveMailbox()->HasCapability( EFSMBoxCapaSupportsSync );
+            if ( supportsSync )
+		       {
 	            iAppUi.StopActiveMailBoxSyncL();
 	            // Sync was started by the user
 	            ManualMailBoxSync(ETrue);
 	            iAppUi.ManualMailBoxSync( ETrue );
-		    }
+                }
+		     else
+		        {
+		         //POP3
+                 iAppUi.GetActiveMailbox()->GoOfflineL();
+                }
        		}
        		break;
         case EFsEmailUiCmdGoOffline:
@@ -3846,7 +3957,7 @@
         	break;
         } // switch ( aCommand )
     CleanupStack::PopAndDestroy( &actionTargetItems );
-    TIMESTAMP( "Message list selected operation done" );    
+    TIMESTAMP( "Message list selected operation done" );
     }
 
 // ---------------------------------------------------------------------------
@@ -4405,7 +4516,7 @@
                                 CFSMailMessage* messagePtr = &item->MessagePtr();
                                 if ( messagePtr )
                                     {
-                                    TIMESTAMP( "Open email selected from message list" );    
+                                    TIMESTAMP( "Open email selected from message list" );
                                     OpenHighlightedMailL();
                                     return EKeyWasConsumed;
                                     }
@@ -4621,6 +4732,9 @@
                 TIMESTAMP( "Open email selected from message list" );
                 OpenHighlightedMailL();
                 }
+
+            // Give feedback to user (vibration)
+            iTouchFeedBack->InstantFeedback(ETouchFeedbackBasic);
             }
         // SEPARATOR ITEM; COLLAPSE / EXPAND NODE
         else if ( item && item->ModelItemType() == ETypeSeparator )
@@ -5126,7 +5240,7 @@
  	iFolderListButton->SetTextFontL( textLayout.Font()->FontSpecInTwips() );
  	iSortButton->SetTextFontL( textLayout.Font()->FontSpecInTwips() );
 
- 	UpdateTheme();
+ 	UpdateTheme(EFalse);
 
 	iNewEmailButton->ShowButtonL();
   	iFolderListButton->ShowButtonL();
@@ -5422,17 +5536,22 @@
 void CFSEmailUiMailListVisualiser::DeleteMessagesL()
 	{
     FUNC_LOG;
-	TInt markedCount = CountMarkedItemsL();
-
-	// Delete either marked items or the focused one
-	if ( markedCount )
-		{
-		DeleteMarkedMessagesL();
-		}
-	else
-		{
-		DeleteFocusedMessageL();
-		}
+    const TInt markedCount(CountMarkedItemsL());
+    const TFsTreeItemId focusedId(iMailList->FocusedItem());
+
+    // Delete either marked items or the focused one
+    if (markedCount)
+        {
+        DeleteMarkedMessagesL();
+        }
+    else if (iMailList->IsNode(focusedId))
+        {
+        DeleteMessagesUnderNodeL(focusedId);
+        }
+    else
+        {
+        DeleteFocusedMessageL();
+        }
 
 	// Set highlight to control bar if no items after delete
     // <cmail>
@@ -5774,115 +5893,169 @@
 	}
 
 // ---------------------------------------------------------------------------
+// DeleteMessagesUnderNodeL
+//
+// ---------------------------------------------------------------------------
+//
+void CFSEmailUiMailListVisualiser::DeleteMessagesUnderNodeL(
+        const TFsTreeItemId aNodeId)
+    {
+    FUNC_LOG;
+    iModel->GetItemIdsUnderNodeL(aNodeId, iDeleteTask->Entries());
+    ConfirmAndStartDeleteTaskL(iDeleteTask);
+    }
+
+// ---------------------------------------------------------------------------
 // DeleteMarkedMessagesL
 //
 // ---------------------------------------------------------------------------
 //
 void CFSEmailUiMailListVisualiser::DeleteMarkedMessagesL()
-	{
-    FUNC_LOG;
-	RFsTreeItemIdList markedEntries;
-	CleanupClosePushL( markedEntries );
-	iMailList->GetMarkedItemsL( markedEntries );
-	TInt okToDelete( ETrue );
-
-    if ( iAppUi.GetCRHandler()->WarnBeforeDelete() )
-        {
-        HBufC* noteText( NULL );
+    {
+    FUNC_LOG;
+    iMailList->GetMarkedItemsL(iDeleteTask->Entries());
+    ConfirmAndStartDeleteTaskL(iDeleteTask);
+    }
+
+// ---------------------------------------------------------------------------
+// ConfirmAndStartDeleteTaskL
+//
+// ---------------------------------------------------------------------------
+//
+void CFSEmailUiMailListVisualiser::ConfirmAndStartDeleteTaskL(
+        TDeleteTask<CFSEmailUiMailListVisualiser>* aTask )
+    {
+    FUNC_LOG;
+    const RFsTreeItemIdList& entries(aTask->Entries());
+    if (entries.Count())
+        {
+        if (ConfirmDeleteL(entries.Count(), entries[0]))
+            {
+            if (entries.Count() > KMsgDeletionWaitNoteAmount)
+                {
+                TFsEmailUiUtility::ShowWaitNoteL(iDeletingWaitNote,
+                        R_FSE_WAIT_DELETING_TEXT, EFalse, ETrue);
+                }
+            if (iAsyncCallback)
+                {
+                // Call actual deletion asynchronously because we must give wait
+                // note time to show up before deletion begins.
+                iAsyncCallback->Cancel();
+                iAsyncCallback->Set(TCallBack(DoExecuteDeleteTask, aTask));
+                iAsyncCallback->CallBack();
+                }
+            }
+        else
+            {
+            aTask->Reset();
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// DoExecuteDeleteTask
+//
+// ---------------------------------------------------------------------------
+//
+TInt CFSEmailUiMailListVisualiser::DoExecuteDeleteTask( TAny* aSelfPtr )
+    {
+    FUNC_LOG;
+    TRAPD( error, 
+            reinterpret_cast<TDeleteTask<CFSEmailUiMailListVisualiser>*>(aSelfPtr)->ExecuteL() );
+    return error;
+    }
+
+// ---------------------------------------------------------------------------
+// HandleDeleteTaskL
+// This is called asynchronously by ConfirmAndStartDeleteTaskL
+// ---------------------------------------------------------------------------
+//
+void CFSEmailUiMailListVisualiser::HandleDeleteTaskL( const RFsTreeItemIdList& aEntries )
+    {
+    FUNC_LOG;
+    // Close wait note if it was used
+    if ( iDeletingWaitNote )
+        {
+        TRAPD( result, HandleDeleteTaskLeavingCodeL(aEntries) );
+        // closing the "Deleting" dialog message should not be skipped by leaving
+        TRAP_IGNORE( iDeletingWaitNote->ProcessFinishedL() ); 
+        if ( KErrNone != result )
+            {
+            // Handle error.
+            User::Leave( result );
+            }
+        }
+    else
+        {
+        HandleDeleteTaskLeavingCodeL( aEntries );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// original code HandleDeleteTaskL which may leave - help function to enable 
+// calling iDeletingWaitNote->ProcessFinishedL() 
+// ---------------------------------------------------------------------------
+//
+void CFSEmailUiMailListVisualiser::HandleDeleteTaskLeavingCodeL( const RFsTreeItemIdList& aEntries )
+    {
+    FUNC_LOG;
+    TFSMailMsgId folderId = FolderId();
+    TFSMailMsgId mailBox = iAppUi.GetActiveMailboxId();
+    RArray<TFSMailMsgId> msgIds;
+    CleanupClosePushL( msgIds );
+    for ( TInt i = 0; i < aEntries.Count(); i++ )
+        {
+        msgIds.AppendL( MsgIdFromListId( aEntries[i] ) );
+        }
+    iAppUi.GetMailClient()->DeleteMessagesByUidL( mailBox, folderId, msgIds );
+    // Remove from mail list if not already removed by mailbox events
+    RemoveMsgItemsFromListIfFoundL( msgIds );
+    CleanupStack::PopAndDestroy(); // msgIds.Close()
+    }
+
+// ---------------------------------------------------------------------------
+// ConfirmDeleteL
+//
+// ---------------------------------------------------------------------------
+//
+TBool CFSEmailUiMailListVisualiser::ConfirmDeleteL(const TInt aItemCount,
+        const TFsTreeItemId aItemId) const
+    {
+    FUNC_LOG;
+    TBool result(ETrue);
+    if (iAppUi.GetCRHandler()->WarnBeforeDelete())
+        {
+        HBufC* noteText(NULL);
         // The note depends on the amount and type of message(s)
-        if ( markedEntries.Count() == 1 )
-            {
-            CFSMailMessage& msgPtr = MsgPtrFromListIdL( markedEntries[0] );
-
-            HBufC* msgSubject = TFsEmailUiUtility::CreateSubjectTextLC( &msgPtr );
-            if ( msgPtr.IsFlagSet( EFSMsgFlag_CalendarMsg ))
+        if (aItemCount == 1)
+            {
+            const CFSMailMessage& msgPtr(MsgPtrFromListIdL(aItemId));
+            HBufC* msgSubject = TFsEmailUiUtility::CreateSubjectTextLC(
+                    &msgPtr);
+            if (msgPtr.IsFlagSet(EFSMsgFlag_CalendarMsg))
                 {
-                noteText = StringLoader::LoadL( R_FREESTYLE_EMAIL_DELETE_CALEVENT_NOTE, *msgSubject );
+                noteText = StringLoader::LoadL(
+                        R_FREESTYLE_EMAIL_DELETE_CALEVENT_NOTE, *msgSubject);
                 }
             else
                 {
-                noteText = StringLoader::LoadL( R_FREESTYLE_EMAIL_DELETE_MAIL_NOTE, *msgSubject );
+                noteText = StringLoader::LoadL(
+                        R_FREESTYLE_EMAIL_DELETE_MAIL_NOTE, *msgSubject);
                 }
-            CleanupStack::PopAndDestroy( msgSubject );
-            CleanupStack::PushL( noteText );
+            CleanupStack::PopAndDestroy(msgSubject);
+            CleanupStack::PushL(noteText);
             }
         else // markedEntries.Count() > 1
             {
-            noteText = StringLoader::LoadLC( R_FREESTYLE_EMAIL_DELETE_N_MAILS_NOTE, markedEntries.Count() );
+            noteText = StringLoader::LoadLC(
+                    R_FREESTYLE_EMAIL_DELETE_N_MAILS_NOTE, aItemCount);
             }
 
         // Show the note
-        okToDelete = TFsEmailUiUtility::ShowConfirmationQueryL( *noteText );
-        CleanupStack::PopAndDestroy( noteText );
-        }
-
-    if ( okToDelete )
-        {
-        if ( markedEntries.Count() > KMsgDeletionWaitNoteAmount )
-            {
-            TFsEmailUiUtility::ShowWaitNoteL( iDeletingWaitNote, R_FSE_WAIT_DELETING_TEXT, EFalse, ETrue );
-            }
-
-        // <cmail>
-        if ( iAsyncCallback )
-            {
-            // Call actual deletion asynchronously because we must give wait
-            // note time to show up before deletion begins.
-            iAsyncCallback->Cancel();
-            iAsyncCallback->Set( TCallBack(DoDeleteMarkedMessages, this) );
-            iAsyncCallback->CallBack();
-            }
-        // </cmail>
-        }
-    else
-    	{
-		UnmarkAllItemsL();
-    	}
-
-    CleanupStack::PopAndDestroy( &markedEntries );
-	}
-
-// ---------------------------------------------------------------------------
-// DoDeleteMarkedMessages
-//
-// ---------------------------------------------------------------------------
-//
-TInt CFSEmailUiMailListVisualiser::DoDeleteMarkedMessages( TAny* aSelfPtr )
-    {
-    FUNC_LOG;
-    CFSEmailUiMailListVisualiser* self =
-        static_cast<CFSEmailUiMailListVisualiser*>( aSelfPtr );
-
-    TRAPD( err,
-        RFsTreeItemIdList markedEntries;
-        CleanupClosePushL( markedEntries );
-        self->iMailList->GetMarkedItemsL( markedEntries );
-
-        // Delete from FW first
-        RArray<TFSMailMsgId> msgIds;
-        CleanupClosePushL( msgIds );
-        for ( TInt i=0 ; i<markedEntries.Count() ; i++ )
-            {
-            msgIds.Append( self->MsgIdFromListId( markedEntries[i] ) );
-            }
-        TFSMailMsgId folderId = self->FolderId();
-        TFSMailMsgId mailBox = self->iAppUi.GetActiveMailboxId();
-        self->iAppUi.GetMailClient()->DeleteMessagesByUidL( mailBox, folderId, msgIds );
-
-        // Remove from mail list if not already removed by mailbox events
-        self->RemoveMsgItemsFromListIfFoundL( msgIds );
-
-        CleanupStack::PopAndDestroy( &msgIds );
-        CleanupStack::PopAndDestroy( &markedEntries );
-        );
-
-    // Close wait note if it was used
-    if ( self->iDeletingWaitNote )
-        {
-        TRAP_IGNORE( self->iDeletingWaitNote->ProcessFinishedL() );
-        }
-
-    return err;
+        result = TFsEmailUiUtility::ShowConfirmationQueryL(*noteText);
+        CleanupStack::PopAndDestroy(noteText);
+        }
+    return result;
     }
 
 // ---------------------------------------------------------------------------
@@ -6085,8 +6258,8 @@
     		{
     		CFSEmailUiMailListModelItem* item =
                 static_cast<CFSEmailUiMailListModelItem*>( iModel->Item( i ) );
-			// when the item is a separator check whether its MessagePtr is valid (actually it's a reference)    		    		
-			if( &(item->MessagePtr()) != NULL) 
+			// when the item is a separator check whether its MessagePtr is valid (actually it's a reference)
+			if( &(item->MessagePtr()) != NULL)
 				{
     		if ( aMessageId == item->MessagePtr().GetMessageId() )
     			{
@@ -6483,7 +6656,7 @@
 	        if ( confirmedMsgPtr )
 	            {
 	            iMailOpened = ETrue;
-	            
+
 	            ChangeMskCommandL( R_FSE_QTN_MSK_EMPTY );
 	            // Pointer confirmed, store Id and delete not needed anymore
 	            TFSMailMsgId confirmedId = confirmedMsgPtr->GetMessageId();
@@ -6657,21 +6830,21 @@
 			// Add mark as read / unread options
 			iStylusPopUpMenu->SetItemDimmed( EFsEmailUiCmdMarkAsUnread, !IsMarkAsUnreadAvailableL() );
 			iStylusPopUpMenu->SetItemDimmed( EFsEmailUiCmdMarkAsRead, !IsMarkAsReadAvailableL() );
-	
+
 			// Check support for object mail iten moving
 			TBool supportsMoving = iAppUi.GetActiveMailbox()->HasCapability( EFSMBoxCapaMoveToFolder );
 			iStylusPopUpMenu->SetItemDimmed( EFsEmailUiCmdActionsMoveMessage, !supportsMoving );
-	
+
 			// Hide / show follow up
 			TBool supportsFlag = TFsEmailUiUtility::IsFollowUpSupported( *iAppUi.GetActiveMailbox() );
 			iStylusPopUpMenu->SetItemDimmed( EFsEmailUiCmdActionsFlag, !supportsFlag );
-	
+
 			// Hide mark if applicable
 			if ( iMailList->IsMarked( iMailList->FocusedItem() ) )
 				{
 				iStylusPopUpMenu->SetItemDimmed( EFsEmailUiCmdMark, ETrue );
 				}
-	
+
 			// Hide collapse / expand all
 			iStylusPopUpMenu->SetItemDimmed( EFsEmailUiCmdActionsCollapseAll, ETrue );
 			iStylusPopUpMenu->SetItemDimmed( EFsEmailUiCmdActionsExpandAll, ETrue );
@@ -6681,11 +6854,11 @@
 			// Hide mark as read / unread options
 			iStylusPopUpMenu->SetItemDimmed( EFsEmailUiCmdMarkAsUnread, ETrue );
 			iStylusPopUpMenu->SetItemDimmed( EFsEmailUiCmdMarkAsRead, ETrue );
-	
+
 			// Hide move & follow up
 			iStylusPopUpMenu->SetItemDimmed( EFsEmailUiCmdActionsMoveMessage, ETrue );
 			iStylusPopUpMenu->SetItemDimmed( EFsEmailUiCmdActionsFlag, ETrue );
-	
+
 			// Hide collapse / expand all when applicable
 			if ( iNodesInUse == EListControlSeparatorDisabled || !iModel->Count() )
 				{
@@ -6980,7 +7153,7 @@
 	   				}
 		   		    }
 				    break;
-						
+
 	    			case SyncCancelled:
 	    			    {
 	    			    //If sync was started by user, show the synchronisation indicator
@@ -6990,7 +7163,7 @@
 	    			        }
 	    			    }
 	    			    break;
-						
+
 	    			}
     			}
 			}
@@ -7441,6 +7614,35 @@
     aLayoutArray.AppendL( iControlBarControl->Visual() );
     }
 
+// Sets aActiveMailboxId and aActiveFolderId from iMailFolder if available
+TInt CFSEmailUiMailListVisualiser::GetActiveFolderId(TFSMailMsgId& aActiveMailboxId, TFSMailMsgId& aActiveFolderId) const
+    {
+    if (iMailFolder != NULL)
+        {
+        aActiveMailboxId = iMailFolder->GetMailBoxId();
+        aActiveFolderId = iMailFolder->GetFolderId();
+        return KErrNone;
+        }
+    else
+        {
+         return KErrNotFound;
+        }
+    }
+
+void CFSEmailUiMailListVisualiser::CreateExtensionL()
+    {
+    CFSMailBox* box = iAppUi.GetActiveMailbox();
+    CEmailExtension* ext;
+    if (box)
+        {
+        ext = box->ExtensionL( KEmailMailboxStateExtensionUid );
+        }
+    if (ext)
+        {
+        iExtension = reinterpret_cast<CMailboxStateExtension*>( ext );
+        iExtension->SetStateDataProvider( this );
+        }
+    }
 
 //////////////////////////////////////////////////////////////////
 // Class implementation CMailListUpdater
@@ -7765,27 +7967,27 @@
 void CDateChangeTimer::RunL()
     {
     FUNC_LOG;
-    
+
     if (iStatus.Int() != KErrNone)
         {
         	INFO_1("### CDateChangeTimer::RunL (err=%d) ###", iStatus.Int());
         }
 
-    
+
     TBool dayChanged = EFalse;
     TInt dayCount = DayCount();
     if (dayCount != iDayCount)
         {
-  
+
         iDayCount = dayCount;
         dayChanged = ETrue;
         }
 
-    
+
     if ( KErrCancel == iStatus.Int() )
         {
         ;
-        }   
+        }
     else if ( KErrAbort == iStatus.Int() ) // System time changed
         {
         if (dayChanged)
@@ -7800,7 +8002,7 @@
         TRAP_IGNORE( iMailListVisualiser.NotifyDateChangedL() );
         Start();
         }
-    
+
     }
 
 
--- a/emailuis/emailui/src/FreestyleEmailUiSendAttachmentsListModel.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/src/FreestyleEmailUiSendAttachmentsListModel.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -433,6 +433,8 @@
 
 	// header and dividers
 	CreateListSkeletonL();
+	//moved from CreateListSkeletonL();
+	SetupTitlePaneTextL();
 	// list model items
 	CreateListItemsL();
 
@@ -518,7 +520,6 @@
     
     iAttachmentsList->SetItemsAlwaysExtendedL(ETrue);
     
-    SetupTitlePaneTextL();
 	}
 
 // ---------------------------------------------------------------------------
@@ -716,6 +717,10 @@
 			// compose view is open, so remove attachment there
 			composeView->NewMessage()->RemoveChildPartL(
 				item->MailMsgPartId() );
+			if ( iItems.Count() == 1 )
+				{
+					composeView->NewMessage()->ResetFlag( EFSMsgFlag_Attachments );
+				}
 			}
 		else
 			{
@@ -732,6 +737,7 @@
                 EFSMsgDataStructure );
 			CleanupStack::PushL( msg );
 			msg->RemoveChildPartL( item->MailMsgPartId() );
+			msg->ResetFlag( EFSMsgFlag_Attachments );
 			msg->SaveMessageL();
 			CleanupStack::PopAndDestroy( msg );
 			}
@@ -799,6 +805,7 @@
             RemoveAndDestroy( i );
             }
         }
+    msg->ResetFlag( EFSMsgFlag_Attachments );
     msg->SaveMessageL();
 
     // Delete msg if we own it
--- a/emailuis/emailui/src/FreestyleEmailUiSettingsList.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/src/FreestyleEmailUiSettingsList.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -60,7 +60,7 @@
 #include "FreestyleEmailUiShortcutBinding.h"
 #include "FreestyleEmailUiUtilities.h"
 #include "FSEmail.pan"
-
+#include "fsemailstatuspaneindicatorhandler.h"
 // CONSTANTS
 
 
@@ -499,6 +499,11 @@
         	 aEventType == EEventEnterKeyPressed )
             {
             HandleUserSelectionsL();
+            //  Fix for EJSA-82HB3F, improves fix for EELN-7Y78DM
+            //  Update title pane, needed for touch support
+            HBufC* text = CreateTitlePaneTextLC();
+            iAppUi.SetTitlePaneTextL( *text );
+            CleanupStack::PopAndDestroy( text );
             }
         }
 
@@ -561,10 +566,6 @@
             iPIMListActivation = ETrue;
             SetSelectedMainListIndex( index );
             CreatePluginPIMListL( iSelectedPluginSettings );
-            // Update the title pane, needed for touch support
-            HBufC* text = CreateTitlePaneTextLC();
-            iAppUi.SetTitlePaneTextL( *text );
-            CleanupStack::PopAndDestroy( text );
             }
         else // index < 0; this should never happen
             {
@@ -1587,8 +1588,10 @@
             iWaitDialog->PrepareLC( R_FS_WAIT_NOTE_REMOVING_MAILBOX );
             iWaitDialog->SetCallback( this );
             iWaitDialog->RunLD();
-            // Set email indicator off.
-            TFsEmailUiUtility::ToggleEmailIconL(EFalse);
+
+            //emailindicator handling, we dont care if something goes wrong in the mailindicator update. 
+            TRAP_IGNORE(TFsEmailStatusPaneIndicatorHandler::StatusPaneMailIndicatorHandlingL( mailBox->GetId().Id()));
+            
             // delete mailbox and wait event (RequestResponseL)
             iDeleteMailboxId = iMailClient.DeleteMailBoxByUidL( mailBox->GetId(), *this );
             wasDeleted = ETrue;
--- a/emailuis/emailui/src/FreestyleEmailUiUtilities.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/src/FreestyleEmailUiUtilities.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -27,6 +27,7 @@
 #include <AknIconUtils.h>
 #include <aknlists.h>
 #include <aknPopup.h>
+#include <akndiscreetpopup.h>
 #include <AknGlobalConfirmationQuery.h>
 #include <aknnotewrappers.h>
 #include <AknWaitDialog.h>
@@ -70,7 +71,7 @@
 #include <CSendingServiceInfo.h>
 #include <CoreApplicationUIsSDKCRKeys.h> // offline mode keys
 #include <data_caging_path_literals.hrh>
-#include <cmailwidgetcenrepkeys.h>
+#include "cmailwidgetcenrepkeys.h"
 
 // <cmail> Removed DISABLE_DEFAULT_EMAIL
 //#ifndef DISABLE_DEFAULT_EMAIL
@@ -233,6 +234,26 @@
         iHandleOpen = EFalse;
         }
     MAknServerAppExitObserver::HandleServerAppExit( aReason );
+    
+    // Get current AppUi.
+    CFreestyleEmailUiAppUi* appUi = (CFreestyleEmailUiAppUi*)CCoeEnv::Static()->AppUi();
+    if( appUi->EmbeddedApp() )
+        {
+        // Set embedded application flag to false when embedded application exit.
+        appUi->SetEmbeddedApp( EFalse );
+        }
+    
+    // if email editor is not started from embedded app.
+    if( !appUi->EditorStartedFromEmbeddedApp() )
+        {
+        // Do not set embedded app to previous app.
+        appUi->SetEmbeddedAppToPreviousApp( EFalse );
+        }
+    else
+        {
+        // Set flag for judging if email editor started from embedded app to false.
+        appUi->SetEditorStartedFromEmbeddedApp( EFalse );
+        }
 
     // Clear the temp directory since the closed file might have been copied there
     TFsEmailUiUtility::EraseTempDir();
@@ -494,6 +515,36 @@
     }
 
 // -----------------------------------------------------------------------------
+// TFsEmailUiUtility::ShowDiscreetInfoNoteL
+// -----------------------------------------------------------------------------
+void TFsEmailUiUtility::ShowDiscreetInfoNoteL( TInt aResourceStringId )
+    {
+    FUNC_LOG;   
+    //create a host of dummy parameters in order to change the popup duration flag...
+    const TDesC& dummyText = KNullDesC;
+    CGulIcon* dummyIcon = NULL;
+    const TAknsItemID& dummySkinId = KAknsIIDNone;
+    const TDesC& dummyBitmapFile = KNullDesC;
+    const TInt dummyBitmapId = 0;
+    const TInt dummyMaskId = 0;
+    
+    //Set timeout flag
+    TInt flags = 0;
+    flags |= KAknDiscreetPopupDurationLong;
+    
+    HBufC* noteText = StringLoader::LoadLC( aResourceStringId );
+    CAknDiscreetPopup::ShowLocalPopupL(*noteText, 
+                                        dummyText, 
+                                        dummyIcon, 
+                                        dummySkinId,
+                                        dummyBitmapFile, 
+                                        dummyBitmapId, 
+                                        dummyMaskId, 
+                                        flags);
+    CleanupStack::PopAndDestroy( noteText );
+    }
+
+// -----------------------------------------------------------------------------
 // TFsEmailUiUtility::ShowWaitNoteL
 // -----------------------------------------------------------------------------
 void TFsEmailUiUtility::ShowWaitNoteL( CAknWaitDialog*& aDialog, TInt aTextResourceId,
@@ -670,7 +721,7 @@
 // -----------------------------------------------------------------------------
 // TFsEmailUiUtility::OpenFileL
 // -----------------------------------------------------------------------------
-void TFsEmailUiUtility::OpenFileL( RFile& aFileToOpen, TDataType& aDataType, TBool aAllowSave )
+void TFsEmailUiUtility::OpenFileL( RFile& aFileToOpen, TDataType& aDataType, TBool /* aAllowSave */)
     {
     FUNC_LOG;
     CFreestyleEmailUiAppUi* appUi = (CFreestyleEmailUiAppUi*)CCoeEnv::Static()->AppUi();
@@ -680,19 +731,9 @@
     appUi->FileHandleShutter().SetFile( aFileToOpen );
 
     CDocumentHandler& docHandler = appUi->DocumentHandler();
-   	CAiwGenericParamList& paramList = docHandler.InParamListL();
-
-   	// Set allow save to parameter.
-   	if ( aAllowSave )
-   	    {
-        TAiwVariant allowSaveVariant( ETrue );
-        TAiwGenericParam genericParamAllowSave( EGenericParamAllowSave,
-                allowSaveVariant );
-        paramList.AppendL( genericParamAllowSave );
-   	    }
 
     TInt res = KErrNone;
-    TRAPD( err, res = docHandler.OpenFileEmbeddedL( aFileToOpen, aDataType, paramList ) );
+    TRAPD( err, res = docHandler.OpenFileEmbeddedL( aFileToOpen, aDataType ) );
 
     // Try again with an empty data type if opening using the given data type fails
     if ( err != KErrNone || res != KErrNone )
@@ -700,7 +741,7 @@
         TDataType emptyType;
 
         // Open file embedded
- 	    TRAP( err, res = docHandler.OpenFileEmbeddedL( aFileToOpen, emptyType, paramList ) );
+        TRAP( err, res = docHandler.OpenFileEmbeddedL( aFileToOpen, emptyType ) );
 
         // Show an error note if opening the file still didn't succeed
         // Ensure also that the file handle got closed.
@@ -709,8 +750,22 @@
             ShowErrorNoteL( R_FREESTYLE_EMAIL_INFO_NOTE_UNABLE_TO_OPEN, EFalse );
             appUi->FileHandleShutter().HandleServerAppExit( KErrCancel );
             }
+        else
+            {
+            // Set embedded app flag to true when embedded app start up.
+            appUi->SetEmbeddedApp( ETrue );
+            // Set flag for judging if previous app is embedded app.
+            appUi->SetEmbeddedAppToPreviousApp( ETrue );
+            }
         }
-	}
+    else
+        {
+        // Set embedded app flag to true when embedded app start up.
+        appUi->SetEmbeddedApp( ETrue );
+        // Set flag for judging if previous app is embedded app.
+        appUi->SetEmbeddedAppToPreviousApp( ETrue );
+        }
+    }
 
 // -----------------------------------------------------------------------------
 // TFsEmailUiUtility::OpenAttachmentL
@@ -2707,14 +2762,15 @@
 	{
     FUNC_LOG;
     //Toggle email status indicator
-	if(aIconOn)
+	//This is only used for mailwidget status updating
+	/*if(aIconOn)
 		{
 		RProperty::Set( KPSUidCoreApplicationUIs, KCoreAppUIsNewEmailStatus, ECoreAppUIsNewEmail );
 		}
 	else
 		{
 		RProperty::Set( KPSUidCoreApplicationUIs, KCoreAppUIsNewEmailStatus, ECoreAppUIsNoNewEmail );
-		}
+		}*/
 
     //Toggle new mail icon in widget
     if (aMailBox.Id())
--- a/emailuis/emailui/src/FreestyleEmailUiViewBase.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/src/FreestyleEmailUiViewBase.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -453,6 +453,7 @@
             {
             const TInt KActivationDelay = 200; // ms
             ActivateControlGroup( KActivationDelay );
+            iWasActiveControlGroup = EFalse;
             }
         }
     else
@@ -589,8 +590,17 @@
             // Email app should be hidden once the view gets deactivated. Note that hiding
             // should not happen before control group switching is over because that
             // may cause views of other Alfred apps to get distorted.
-            iSendToBackgroundOnDeactivation = ETrue;
-            iAppUi.SetSwitchingToBackground( ETrue );
+            if( !iAppUi.EmbeddedAppIsPreviousApp() ) // if previous app is embedded app, 
+                //do not need hide FSEmail app when previous app view gets deactivated.
+                {
+                iSendToBackgroundOnDeactivation = ETrue;
+                iAppUi.SetSwitchingToBackground( ETrue );
+                }
+            else
+                {
+                // Set flag to false for judging if previous app is embedded when editor exit.
+                iAppUi.SetEmbeddedAppToPreviousApp( EFalse );
+                }
 
             // Re-activate previously active mailbox if it got changed in the external activation.
             // As an exception, if previous view is the laucher grid, the previously active
--- a/emailuis/emailui/src/FreestyleMessageHeaderHTML.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/src/FreestyleMessageHeaderHTML.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -21,6 +21,9 @@
 #include <e32cmn.h>
 #include <utf.h>
 #include <StringLoader.h>
+#include <AknsUtils.h>
+#include <AknsSkinInstance.h>
+#include <AknsConstants.h>
 
 #include <FreestyleEmailUi.rsg>
 #include <finditemengine.h>
@@ -69,18 +72,29 @@
 _LIT8( KHTMLImgTagSrcAfter, "\">" );
 
 _LIT8( KMetaHeader, "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n" );
+
+_LIT8( KDisplayImagesLeftToRight,
+        "<script language=\"javascript\">var g_autoLoadImages = %d;</script><table style=\"display: none;\" id=\"displayImagesTable\" width=\"%dpx\"><tr><td align=\"left\">%S</td><td align=\"right\"><input type=\"submit\" class=\"button\" value=\"%S\" onClick=\"displayImagesButtonPressed()\"/></td></tr></table>" );
+
+_LIT8( KDisplayImagesRightToLeft,
+        "<script language=\"javascript\">var g_autoLoadImages = %d;</script><table style=\"display: none;\" id=\"displayImagesTable\" width=\"%dpx\"><tr><td align=\"left\"><input type=\"submit\" class=\"button\" value=\"%S\" onClick=\"displayImagesButtonPressed()\"/></td><td align=\"right\">%S</td></tr></table>" );
+
 const TInt KMaxEventLength( 256 );
 const TInt KFreestyleMessageHeaderHTMLRightMarginInPx( 10 );
 const TInt KFreestyleMessageHeaderHTMLMaxBufferSizeForWidth( 5 );
 
+// Define this to allow theme colorin for the header
+#undef __USE_THEME_COLOR_FOR_HEADER    
+
 EXPORT_C CFreestyleMessageHeaderHTML* CFreestyleMessageHeaderHTML::NewL( CFSMailMessage& aMailMessage, 
                                                                          RWriteStream& aWriteStream,
                                                                          TInt aVisibleWidth,
                                                                          TInt aScrollPosition,
-                                                                         TBidiText::TDirectionality aDirectionality
+                                                                         const TBool aAutoLoadImages,
+                                                                         const TBool aExpanded 
                                                                          )
     {
-    CFreestyleMessageHeaderHTML* self = new (ELeave) CFreestyleMessageHeaderHTML( aMailMessage, aWriteStream, aVisibleWidth, aScrollPosition, aDirectionality);
+    CFreestyleMessageHeaderHTML* self = new (ELeave) CFreestyleMessageHeaderHTML( aMailMessage, aWriteStream, aVisibleWidth, aScrollPosition, aAutoLoadImages, aExpanded);
     self->ConstructL();
     return self;
     }
@@ -89,9 +103,10 @@
                                                     RWriteStream& aWriteStream, 
                                                     TInt aVisibleWidth,
                                                     TInt aScrollPosition,
-                                                    TBidiText::TDirectionality aDirectionality)
+                                                    const TBool aAutoLoadImages,
+                                                    const TBool aExpanded )
     {
-    CFreestyleMessageHeaderHTML* headerHtml = CFreestyleMessageHeaderHTML::NewL( aMailMessage, aWriteStream, aVisibleWidth, aScrollPosition, aDirectionality);
+    CFreestyleMessageHeaderHTML* headerHtml = CFreestyleMessageHeaderHTML::NewL( aMailMessage, aWriteStream, aVisibleWidth, aScrollPosition, aAutoLoadImages, aExpanded);
     CleanupStack::PushL( headerHtml );
     headerHtml->ExportL();
     CleanupStack::PopAndDestroy( headerHtml );
@@ -101,13 +116,14 @@
                                                     RFile& aFile, 
                                                     TInt aVisibleWidth,
                                                     TInt aScrollPosition,
-                                                    TBidiText::TDirectionality aDirectionality)
+                                                    const TBool aAutoLoadImages,
+                                                    const TBool aExpanded )
     {
     RFileWriteStream fwstream;
     fwstream.Attach( aFile, 0 );
     CleanupClosePushL( fwstream );
     
-    CFreestyleMessageHeaderHTML* headerHtml = CFreestyleMessageHeaderHTML::NewL( aMailMessage, fwstream, aVisibleWidth, aScrollPosition, aDirectionality );
+    CFreestyleMessageHeaderHTML* headerHtml = CFreestyleMessageHeaderHTML::NewL( aMailMessage, fwstream, aVisibleWidth, aScrollPosition, aAutoLoadImages, aExpanded );
     CleanupStack::PushL( headerHtml );
     headerHtml->ExportL();
     CleanupStack::PopAndDestroy( headerHtml );
@@ -120,13 +136,14 @@
                                                     const TPath& aFilePath, 
                                                     TInt aVisibleWidth,
                                                     TInt aScrollPosition,
-                                                    TBidiText::TDirectionality aDirectionality)
+                                                    const TBool aAutoLoadImages,
+                                                    const TBool aExpanded )
     {
     RFileWriteStream fwstream;
     User::LeaveIfError( fwstream.Replace( aFs, aFilePath, EFileStreamText | EFileWrite) );
     CleanupClosePushL( fwstream );
     
-    CFreestyleMessageHeaderHTML* headerHtml = CFreestyleMessageHeaderHTML::NewL( aMailMessage, fwstream, aVisibleWidth, aScrollPosition, aDirectionality);
+    CFreestyleMessageHeaderHTML* headerHtml = CFreestyleMessageHeaderHTML::NewL( aMailMessage, fwstream, aVisibleWidth, aScrollPosition, aAutoLoadImages, aExpanded);
     CleanupStack::PushL( headerHtml );
     headerHtml->ExportL();
     CleanupStack::PopAndDestroy( headerHtml );
@@ -151,23 +168,21 @@
                                                           RWriteStream& aWriteStream,
                                                           TInt aVisibleWidth,
                                                           TInt aScrollPosition,
-                                                          TBidiText::TDirectionality aDirectionality )
+                                                          const TBool aAutoLoadImages,
+                                                          const TBool aExpanded )
     : iMailMessage( aMailMessage ),
     iWriteStream( aWriteStream ),
     iVisibleWidth( aVisibleWidth - KFreestyleMessageHeaderHTMLRightMarginInPx ),
-    iScrollPosition(aScrollPosition),
-    iDirectionality( aDirectionality ),
-    iMirrorLayout( EFalse )
+    iScrollPosition( aScrollPosition ),
+    iAutoLoadImages( aAutoLoadImages ),
+    iMirrorLayout( AknLayoutUtils::LayoutMirrored() ),
+    iExpanded( aExpanded  )
     {
     }
 
 void CFreestyleMessageHeaderHTML::ConstructL()
     {
     iMailMessage.AttachmentListL( iAttachments );
-    if ( AknLayoutUtils::LayoutMirrored() )
-        {
-        iMirrorLayout = ETrue;
-        }
     }
 
 void CFreestyleMessageHeaderHTML::HTMLStartL() const
@@ -235,16 +250,52 @@
     ExportSubjectL();
     EndHeaderTableL();
     ExportAttachmentsL();
+    ExportDisplayImagesTableL();
     HTMLBodyEndL();
     }
 
+void CFreestyleMessageHeaderHTML::ExportDisplayImagesTableL() const
+    {
+    if (!iAutoLoadImages)
+        {
+        _LIT8(KDescription, "");
+        _LIT8(KButton, "Display images");
+        HBufC8* description = KDescription().AllocLC(); //HeadingTextLC(R_FREESTYLE_EMAIL_UI_IMAGES_ARE_NOT_DISPLAYED);
+        HBufC8* button = KButton().AllocLC(); //HeadingTextLC(R_FREESTYLE_EMAIL_UI_DISPLAY_IMAGES);
+        HBufC8* formatBuffer = NULL;
+        if (iMirrorLayout)
+            {
+            formatBuffer = HBufC8::NewLC(KDisplayImagesRightToLeft().Length() + description->Length() + button->Length() + 8);
+            formatBuffer->Des().Format(
+                    KDisplayImagesRightToLeft(),
+                    iAutoLoadImages,
+                    iVisibleWidth,
+                    button,
+                    description);
+            }
+        else
+            {
+            formatBuffer = HBufC8::NewLC(KDisplayImagesLeftToRight().Length() + description->Length() + button->Length() + 8);
+            formatBuffer->Des().Format(
+                    KDisplayImagesLeftToRight(),
+                    iAutoLoadImages,
+                    iVisibleWidth,
+                    description,
+                    button);
+            }
+        iWriteStream.WriteL(*formatBuffer);
+        CleanupStack::PopAndDestroy(3); // description, button, formatBuffer
+        iWriteStream.CommitL();
+        }
+    }
+
 void CFreestyleMessageHeaderHTML::HTMLBodyStartL() const
     {
     TBuf8<KFreestyleMessageHeaderHTMLRightMarginInPx> scrollPos;
     scrollPos.AppendNum(iScrollPosition);
-    iWriteStream.WriteL(_L8("<body onLoad = init("));
+    iWriteStream.WriteL(_L8("<body onLoad = \"init("));
     iWriteStream.WriteL(scrollPos);
-    iWriteStream.WriteL(_L8(")>\n"));
+    iWriteStream.WriteL(_L8(")\">\n"));
     iWriteStream.CommitL();
     }
 
@@ -253,9 +304,19 @@
     // set the width, using the visible screen width
     TBuf8<KFreestyleMessageHeaderHTMLMaxBufferSizeForWidth> tableWidth;
     tableWidth.AppendNum( iVisibleWidth );
-    iWriteStream.WriteL(_L8("<table id=\"table_initial\" border=\"0\" width=\""));
-    iWriteStream.WriteL( tableWidth );
-    iWriteStream.WriteL( _L8("px\">\n"));
+    
+    if (iExpanded)
+        {
+        iWriteStream.WriteL(_L8("<table id=\"table_initial\" border=\"0\" width=\""));
+        iWriteStream.WriteL( tableWidth );
+        iWriteStream.WriteL( _L8("px\" style=\"display: none\">\n"));    
+        }
+    else
+        {
+        iWriteStream.WriteL(_L8("<table id=\"table_initial\" border=\"0\" width=\""));
+        iWriteStream.WriteL( tableWidth );
+        iWriteStream.WriteL( _L8("px\">\n"));    
+        }
     
 
     // start first row: table with the sent info and the '+' icon
@@ -307,7 +368,7 @@
         {
         iWriteStream.WriteL(_L8(" align=\"left\""));
         }
-    iWriteStream.WriteL(_L8(" style=\"padding: 0px 10px 0px 0px;\"><image id=\"detail_img\" border=\"0\" src=\"plus.gif\" onClick=\"expandHeader()\" ></td>\n"));
+    iWriteStream.WriteL(_L8(" style=\"padding: 0px 10px 0px 0px;\"><image width=\"55\" height=\"36\" id=\"detail_img\" border=\"0\" src=\"plus.gif\" onClick=\"expandHeader(true)\" ></td>\n"));
 
     
     // finish first row
@@ -789,27 +850,20 @@
         iWriteStream.WriteL( KAttachmentTableName );
         iWriteStream.WriteL( _L8("\" border=\"0\" width=\"100%\">\n") );  // width is set at 100% intentionally
         
+        // add attachment icon
         // start row
         iWriteStream.WriteL( _L8("<tr>\n") );
-          
-        // add attachment icon
         iWriteStream.WriteL( _L8("<td width=\"1\" valign=\"top\"") );
-        if ( !iMirrorLayout )
-            {
-            iWriteStream.WriteL(_L8(" align=\"left\""));
-            }
-        else
-            {
-            iWriteStream.WriteL(_L8(" align=\"right\""));
-            }
+        iWriteStream.WriteL(_L8(" align=\"left\""));
+
         iWriteStream.WriteL( _L8("><image src=\"") );
         
         iWriteStream.WriteL( KAttachementIconGeneral );
         iWriteStream.WriteL( _L8("\" ></td>\n") );
-        
         // start table of attachments as a table within a cell
         iWriteStream.WriteL( _L8("<td>\n") );
         iWriteStream.WriteL(_L8("<table id=\"table_attachments_list\" border=\"0\" width=\"100%\">\n"));
+
         for (TInt i=0; i < attachmentsCount; i++)
             {
             AddAttachmentL( *iAttachments[i] );
@@ -926,12 +980,28 @@
       }
     
     TBuf8<32> sizeText;
+    
+    // Add right to left marker as "(" and ")" are messing up the html language markers
+    // and &rlm is only added in mirror layout 
+    if( iMirrorLayout )  
+        {
+    sizeText.Append( KSpace8 );
+    sizeText.Append( _L8( "&rlm;" ) );
+        }
+    
     sizeText.Append( KSpace8 );
     sizeText.Append( _L8("(") );
     sizeText.AppendNum( sizeInKB );
     sizeText.Append( KSpace8 );
     sizeText.Append( KAttachmentSizeUnit );
     sizeText.Append( _L8(")") );
+    
+    if( iMirrorLayout )
+        {
+    sizeText.Append( KSpace8 );
+    sizeText.Append( _L8( "&rlm;" ) );
+        }
+    
     iWriteStream.WriteL( sizeText );
 
     EndHyperlinkL();
@@ -987,11 +1057,15 @@
 void CFreestyleMessageHeaderHTML::StartHeaderTableL( const TDesC8& aTableId ) const
     {
     iWriteStream.WriteL( _L8("<table id=\"") );
-    iWriteStream.WriteL( aTableId );
-    
-    // use style="display:none" so that full header table is hidden initially
-    iWriteStream.WriteL( _L8("\" border=\"0\" width=\"100%\" style=\"display: none\">\n") );
-    
+    iWriteStream.WriteL( aTableId );    
+    if (iExpanded)
+        {
+        iWriteStream.WriteL( _L8("\" border=\"0\" width=\"100%\">\n") );    
+        }
+    else
+        {
+        iWriteStream.WriteL( _L8("\" border=\"0\" width=\"100%\" style=\"display: none\">\n") );    
+        }   
     
     TBuf8<KFreestyleMessageHeaderHTMLMaxBufferSizeForWidth> tableWidth;
     tableWidth.AppendNum( iVisibleWidth );
@@ -1012,7 +1086,7 @@
         {
         iWriteStream.WriteL(_L8(" align=\"left\""));
         }
-    iWriteStream.WriteL( _L8(" style=\"padding: 0px 10px 0px 0px;\"><image id=\"hideDetails_img\" border=\"0\" src=\"minus.gif\" onClick=\"collapseHeader()\"></td>\n"));
+    iWriteStream.WriteL( _L8(" style=\"padding: 0px 10px 0px 0px;\"><image width=\"55\" height=\"36\" id=\"hideDetails_img\" border=\"0\" src=\"minus.gif\" onClick=\"collapseHeader(true)\"></td>\n"));
 
     iWriteStream.WriteL( _L8("</tr>\n"));
     iWriteStream.WriteL( _L8("</table></td></tr>\n"));
@@ -1125,8 +1199,30 @@
     // define a div class "header", specifying the background color
     // for the email header part
     
-    // In future, query for which background color to use
-    iWriteStream.WriteL( _L8("body { background-color: lightblue; }\n") );
+#ifdef __USE_THEME_COLOR_FOR_HEADER    
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+    TRgb textColor;
+    TRgb bgColor;
+    // Should use EAknsCIFsTextColorsCG3 if background is white
+     if ( AknsUtils::GetCachedColor( skin, textColor,
+                 KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG81 ) != KErrNone ||
+          AknsUtils::GetCachedColor( skin, bgColor,
+                 KAknsIIDQsnOtherColors, EAknsCIQsnOtherColorsCG22 ) != KErrNone )
+         {
+         iWriteStream.WriteL( _L8("body { color: black; background-color: lightblue; }\n") );
+         }
+     else 
+         {
+         // In future, query for which background color to use
+         _LIT8( KBodyWithColor, "body { color: #%06x; background-color: #%06x; }\n" );
+         HBufC8* formatBuffer = HBufC8::NewLC(KBodyWithColor().Length() + 16);
+         formatBuffer->Des().Format(KBodyWithColor(), textColor.Internal() & 0xFFFFFF, bgColor.Internal() & 0xFFFFFF);
+         iWriteStream.WriteL( *formatBuffer );
+         CleanupStack::PopAndDestroy(); // formatBuffer
+         }
+#else
+     iWriteStream.WriteL( _L8("body { color: black; background-color: lightblue; }\n") );
+#endif // __USE_THEME_COLOR_FOR_HEADER    
     
     // set font size to 75% of the default size
     // because, at the default size, the header text is too big relative to the text in the email body
@@ -1134,7 +1230,7 @@
     // we have the text size level in the browser set to "Larger" which is 20% larger than the specified size
     // the "larger" size affects all text which includes the header.
     iWriteStream.WriteL( _L8("td { font-family:arial,sans-serif ; font-size:75% }\n"));
-    
+    iWriteStream.WriteL( _L8(".button { background: url('btn_middle.png') repeat-x top left; border: 1px solid #546284; height: 32px; font-size:19px; font-weight: bold; color: #344a6c; font-family:arial,sans-serif; }\n") );
     iWriteStream.WriteL( _L8("</style>\n") );
     iWriteStream.CommitL();
     }
--- a/emailuis/emailui/src/OverlayControl.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/src/OverlayControl.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -17,10 +17,6 @@
 
 #include "OverlayControl.h"
 
-// CONSTS
-const TReal KSolidTransparencyFactor = 2;
-
-
 COverlayControl::COverlayControl( MOverlayControlObserver* aObserver )
 : iObserver( aObserver )
 	{
@@ -44,9 +40,7 @@
 
 void COverlayControl::ConstructL( CCoeControl* aParent, const TRect& aRect, TInt aBitmapId, TInt aMaskId )
 	{
-
     SetContainerWindowL( *aParent );
-	
 	TFileName iconFileName;
 	TFsEmailUiUtility::GetFullIconFileNameL( iconFileName );
 	AknIconUtils::CreateIconL( iBitmap,
@@ -54,10 +48,10 @@
 							   iconFileName,
 							   aBitmapId,
 							   aMaskId );
-
 	SetRect( aRect );
+    iTouchFeedBack = MTouchFeedback::Instance();
+    iTouchFeedBack->EnableFeedbackForControl(this, ETrue);
     EnableDragEvents();
-	
 	ActivateL();
 	}
 
@@ -76,6 +70,12 @@
 
 void COverlayControl::HandlePointerEventL( const TPointerEvent& aPointerEvent )
     {
+    if (aPointerEvent.iType == TPointerEvent::EButton1Down)
+        {      
+        // Give feedback to user (vibration)     
+        iTouchFeedBack->InstantFeedback(this, ETouchFeedbackBasic);  
+        }
+    
     CCoeControl::HandlePointerEventL( aPointerEvent );
     
     if( iObserver )
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailuis/emailui/src/fsemailstatuspaneindicatorhandler.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -0,0 +1,105 @@
+/*
+* Copyright (c) 2010 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+*  Description : Handles mailiindicator updating
+*
+*/
+
+
+#include <centralrepository.h>
+#include <coemain.h> // CCoeEnv
+#include <coeaui.h> // CCoeAppUi
+#include "emailtrace.h"
+
+#include "cfsmailclient.h"
+#include "freestyleemailuiappui.h"
+#include "freestyleemailuiutilities.h"
+#include "freestyleemailuiconstants.h"
+#include "fsemailstatuspaneindicatorhandler.h"
+#include "commonemailcrkeys.h"
+#include "freestyleemailcenrepkeys.h"
+
+
+
+
+// FUNCTION DEFINITIONS
+void TFsEmailStatusPaneIndicatorHandler::StatusPaneMailIndicatorHandlingL( TInt aMailBoxId  )
+    {
+    FUNC_LOG;
+    //emailindicator control    
+    CRepository* emailRepository = CRepository::NewL( KFreestyleEmailCenRep );    
+    CleanupStack::PushL(emailRepository);
+    CRepository* commonEmailRepository = CRepository::NewL( KCmailDataRepository );
+    CleanupStack::PushL(commonEmailRepository);
+    TInt numberOfMailboxes(0);
+
+    emailRepository->Get(KNumberOfMailboxesWithNewEmails,numberOfMailboxes);
+    if(numberOfMailboxes > 0)
+        {
+        RArray<TInt> repositoryIds;
+        CleanupClosePushL(repositoryIds);
+        TInt tmp (0); //used to store the mailbox and plugin ids
+        for(TInt i = 1 ; i <= numberOfMailboxes * 2; i++ )
+            {
+            emailRepository->Get(KNumberOfMailboxesWithNewEmails+i, tmp);
+            repositoryIds.Append(tmp);
+            }
+        // Here we check if the current mailbox id is already in the repository:
+        TInt index = repositoryIds.Find(aMailBoxId);
+
+        if(index != KErrNotFound)
+            {
+            repositoryIds.Remove(index);
+            repositoryIds.Remove(index-1);
+            // Rearrange the mailbox/mailplugin ids
+            // in the repository
+            for(TInt j = 0; j < repositoryIds.Count(); j++)
+                {
+                emailRepository->Set(KNumberOfMailboxesWithNewEmails + 1 + j, repositoryIds.operator [](j));
+                }
+            // And delete last two remaining keys, that contains old information:
+            emailRepository->Delete(KNumberOfMailboxesWithNewEmails + ( numberOfMailboxes * 2 - 1 ));
+            emailRepository->Delete(KNumberOfMailboxesWithNewEmails + ( numberOfMailboxes * 2 ));
+
+            // Decrease the number of mailboxes and update the repository:
+            numberOfMailboxes -= 1;
+            emailRepository->Set(KNumberOfMailboxesWithNewEmails,numberOfMailboxes);
+
+            // Finally update the mailbox name to indicator pop-up note if there is still unchecked mailboxes
+            if(numberOfMailboxes > 0)
+                {
+                TInt lastMBoxIdInRepository (0);
+                TInt lastMPluginIdInRepository (0);
+                emailRepository->Get(KNumberOfMailboxesWithNewEmails+(numberOfMailboxes*2), lastMBoxIdInRepository);
+                // Get matching email account.
+                TFSMailMsgId prevMboxId;
+                prevMboxId.SetId(lastMBoxIdInRepository);
+                emailRepository->Get(KNumberOfMailboxesWithNewEmails+(numberOfMailboxes*2-1), lastMPluginIdInRepository);
+                TUid lastMPluginUidInRepository = { lastMPluginIdInRepository };
+                prevMboxId.SetPluginId(lastMPluginUidInRepository);                
+                CFreestyleEmailUiAppUi* appUi = 
+                static_cast<CFreestyleEmailUiAppUi*>( CCoeEnv::Static()->AppUi() );
+                //Write the name commonEmailRepository
+                commonEmailRepository->Set(KCmailNewEmailDisplayText,appUi->GetMailClient()->GetMailBoxByUidL(prevMboxId)->GetName());
+                }
+            }
+        if(numberOfMailboxes == 0)
+            {       
+            // Set email indicator off.. user has checked the new emails in all the mailboxes
+            TFsEmailUiUtility::ToggleEmailIconL(EFalse);
+            }
+        repositoryIds.Reset();
+        CleanupStack::PopAndDestroy();//repositoryIds
+        }
+    CleanupStack::PopAndDestroy(2); //emailRepository, CommonEmailRepository
+    }
--- a/emailuis/emailui/src/ncsaifeditor.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/src/ncsaifeditor.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -980,10 +980,11 @@
 		pos++; // for whitespace
 		}
 
-	// Reset the text
-	SetCursorPosL( 0, EFalse ); //In case the cursor pos is invalid
+  // Reset the text
 	HBufC* text = NULL;
 	text = GetFormattedAddressListLC( iArray );
+	// fix for dissapearing text PWAN-82DNEJ	
+	SetCursorPosL( 0, EFalse ); //In case the cursor pos is invalid
 	
     if ( iAddLeftover )
         {
@@ -1317,6 +1318,12 @@
         
         // add line feed after new entry
         TInt cursorPos( CursorPos() );
+        // related to PWAN-82DNEJ cursorPos shouldn't be 0 here
+        if (cursorPos == 0)
+          {
+          cursorPos = TextLength();
+          }
+          
         if ( !iPartialRemove )
             {
             Text()->InsertL( cursorPos, TChar(CEditableText::ELineBreak) );
--- a/emailuis/emailui/src/ncscomposeview.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/src/ncscomposeview.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -408,6 +408,28 @@
         Toolbar()->SetDimmed( EFalse );
         RefreshToolbar();
         }
+        
+    // if there is a embedded app in FSEmail.
+    if( iAppUi.EmbeddedApp() )
+        {
+        // Set email editor started from embedded app flag to true 
+        // so that we can switch view correct when sent email.
+        iAppUi.SetEditorStartedFromEmbeddedApp( ETrue );
+        
+        RWsSession rwsSession;
+        User::LeaveIfError( rwsSession.Connect() );
+        CleanupClosePushL( rwsSession );
+        
+        // Simulate a back key to exit embedded app 
+        // so that email editor could show on the top level.
+        TKeyEvent KeyEvent = TKeyEvent();
+        KeyEvent.iCode = EKeyCBA2;
+        rwsSession.SimulateKeyEvent( KeyEvent );
+
+        rwsSession.Close();
+        CleanupStack::PopAndDestroy( &rwsSession );
+        }
+        
     TIMESTAMP( "Editor launched" );
     }
 
--- a/emailuis/emailui/src/ncscomposeviewcontainer.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/src/ncscomposeviewcontainer.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -285,10 +285,13 @@
                 {
                 if ( iFocused == iMessageField )
                     {
+					if( iMessageField->SelectionLength() )
+						{
+						iMessageField->ClearSelectionL();
+						}
+                    iMessageField->SetFocus( EFalse, EDrawNow );
                     iFocused = iHeader;
                     iHeader->SetFocus( ETrue,EDrawNow );
-                    iMessageField->ClearSelectionL();
-                    iMessageField->SetFocus( EFalse, EDrawNow );
                     iHeader->MakeVisible( ETrue );
                     CommitL( EBodyField );
                     iView.HandleContainerChangeRequiringToolbarRefresh();
@@ -325,24 +328,12 @@
                 {
                 if ( iFocused == iHeader )
                     {
-                    // fix for ESLX-7Y4C2V, dissapearing subject 
-                    HBufC* heapBuffer = HBufC::NewL(iHeader->GetSubjectFieldLength());
-                    TPtr ptr(heapBuffer->Des());
-                    ptr.Copy(*GetSubjectLC());
+                    //TRAP_IGNORE( DoUpdateSubjectL() );
 
-                    iFocused = iMessageField;
-                    iHeader->SetFocus( EFalse, EDrawNow );
+					iHeader->SetFocus( EFalse, EDrawNow );
+					iFocused = iMessageField;
                     iMessageField->SetFocus( ETrue, EDrawNow );
-                    
-                    if ( iHeader->GetSubjectFieldLength() != heapBuffer->Length() )
-                    	{
-                    		iHeader->SetSubjectL( const_cast<HBufC&>(*heapBuffer));
-                    	}
-
-                    iHeader->SetFocus( ETrue, EDrawNow );
-                    iHeader->SetFocus( EFalse, EDrawNow );
                     iView.HandleContainerChangeRequiringToolbarRefresh();
-                    CleanupStack::PopAndDestroy(); //from GetSubjectLC()
                     }
                 else if ( iFocused == iReadOnlyQuoteField )
                     {
@@ -931,6 +922,8 @@
         iPhysics->StopPhysics();
         iPhysics->ResetFriction();
         }
+        
+    ClosePopupContactListL();
 
     ScrollL( aScrollBar->ThumbPosition() );
     }
@@ -1997,3 +1990,27 @@
     FUNC_LOG;
     return iHeader->IsRemoteSearchInprogress();
     }
+
+// -----------------------------------------------------------------------------
+// CNcsComposeViewContainer::DoUpdateSubjectL
+// -----------------------------------------------------------------------------
+//
+void CNcsComposeViewContainer::DoUpdateSubjectL()
+    {
+    FUNC_LOG;
+    // fix for ESLX-7Y4C2V, dissapearing subject
+    // get copy of subject
+    HBufC* subjectCopy = GetSubjectLC();
+    iHeader->SetFocus( EFalse, EDrawNow );
+    // get subject after focus lost
+    HBufC* subject = GetSubjectLC();
+    // restore subject from copy if necessary
+    if ( subject->Length() != subjectCopy->Length() )
+        {
+        iHeader->SetSubjectL( *subjectCopy );
+        }
+
+    // restore focus
+    iHeader->SetFocus( ETrue, EDrawNow );
+    CleanupStack::PopAndDestroy( 2, subjectCopy );
+    }
--- a/emailuis/emailui/src/ncsheadercontainer.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/src/ncsheadercontainer.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -26,8 +26,6 @@
 #include "cfsmailbox.h"
 #include <FreestyleEmailUi.rsg>
 
-#include "cpbkxremotecontactlookupserviceuicontext.h"
-
 #include "FSEmailBuildFlags.h"
 #include "ncsheadercontainer.h"
 #include "ncscomposeviewcontainer.h"
@@ -215,6 +213,7 @@
             // Commit changes and make sure no controls are focused.
             TRAP_IGNORE( CommitFieldL( focused ) );
             focused->SetFocus( EFalse, aDrawNow );
+            iFocused = NULL;
             }
 
         // Remove MSK label when header loses focus
@@ -242,7 +241,10 @@
         {
         iFocused = focused;
         }
-    iFocused->SetFocus( aShow, EDrawNow );
+    if ( iFocused ) 
+        {
+        iFocused->SetFocus( aShow, EDrawNow );
+        }
     }
 
 // -----------------------------------------------------------------------------
@@ -369,7 +371,7 @@
                     pOldCtrl->SetFocus( EFalse, ENoDrawNow );
                     }
                 pNewCtrl->SetFocus( ETrue, ENoDrawNow );
-
+                iFocused = pNewCtrl;
                 // Commit changes to previously focused field.
                 if ( pOldCtrl )
                     {
@@ -793,6 +795,27 @@
 	}
 
 // ---------------------------------------------------------------------------
+// CNcsHeaderContainer::GetToLineHeight
+// ---------------------------------------------------------------------------
+//
+TInt CNcsHeaderContainer::GetToLineHeight() const
+	{
+	FUNC_LOG;
+	TInt lineHeight = 0;
+	
+	if(iToField)
+		{
+	    TRect lineRect;
+	    TRAPD(err, iToField->GetLineRectL(lineRect) );
+	   	if(err == KErrNone)
+	        {
+	        lineHeight = lineRect.iBr.iY - lineRect.iTl.iY;
+	        }
+		}
+	return lineHeight;
+	}
+      
+// ---------------------------------------------------------------------------
 // CNcsHeaderContainer::GetTotalHeight
 // ---------------------------------------------------------------------------
 //
@@ -820,8 +843,11 @@
     {
     FUNC_LOG;   
     iAttachmentField->SetTextsLD( aAttachmentNames, aAttachmentSizes );
-    ShowAttachmentLabelL();
-    DrawAttachmentFocusNow();
+    if( aAttachmentNames )
+        {
+        ShowAttachmentLabelL();
+        DrawAttachmentFocusNow();
+        }
     }
 
 // -----------------------------------------------------------------------------
@@ -1740,6 +1766,7 @@
     	aifFocused = static_cast<CNcsAddressInputField*>( focused );
     	aifFocused->AddAddressL( aEml );
 	    }
+	DoScrollL();
     }
 
 // ---------------------------------------------------------------------------
--- a/emailuis/emailui/src/ncspopuplistbox.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/src/ncspopuplistbox.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -419,22 +419,67 @@
 	}
 
 // -----------------------------------------------------------------------------
+// CNcsPopupListBox::RoundToItemHeight
+// -----------------------------------------------------------------------------
+TInt CNcsPopupListBox::RoundToItemHeight(const TInt aPopupHeight) const
+    {
+	TReal fullItems; // number of full visible items in window
+	TInt err = Math::Round(fullItems, (aPopupHeight / ItemHeight()), 0);
+	if(err == KErrNone)
+	    {
+	    return (TInt)(fullItems * ItemHeight()); 
+	    }
+	return aPopupHeight; // in case of error
+    }
+
+// -----------------------------------------------------------------------------
 // CNcsPopupListBox::SetPopupHeight
 // -----------------------------------------------------------------------------
 void CNcsPopupListBox::SetPopupHeight()
 	{
     FUNC_LOG;
-	TRect newRect = iPopupMaxRect;
+    // This is the total height in pixels needed to show all items
+    TInt minimumHeight = CalcHeightBasedOnNumOfItems( Model()->NumberOfItems());
+    TRect newRect = iPopupMaxRect;
+    TInt areaHeight = Parent()->Parent()->Rect().Height();
+    TInt halfAreaHeight = areaHeight/2;
 
-	// This is the total height in pixels needed to show all items
-    TInt itemCount = Model()->NumberOfItems();
- 	TInt minimumHeight = CalcHeightBasedOnNumOfItems( itemCount );
- 	
- 	// Shrink list size if maximum size is not needed
-	if( iPopupMaxRect.Height() > minimumHeight )
-	    {
-		newRect.SetHeight( minimumHeight );
-	    }
+ 	// Get height of one line in Address field
+    CNcsHeaderContainer* headerObj = static_cast<CNcsHeaderContainer* >(Parent());
+    TInt toLineHeight = headerObj->GetToLineHeight(); // height of one line height
+    if(toLineHeight == 0)
+    	{
+        toLineHeight = ItemHeight();
+    	}
+    
+    TInt newHeight = minimumHeight; // default window height
+    
+    //latch listbox on the bottom of the editor field
+    if ( newRect.iTl.iY <= halfAreaHeight ) 
+        {
+        newHeight = RoundToItemHeight( areaHeight - newRect.iTl.iY );
+        if(newHeight > minimumHeight)
+        	{
+            newHeight = minimumHeight; // shrink window (if needed)
+          	}
+        }
+    //latch listbox on the top of the editor field
+    else
+     	{
+        TInt yOffset = -minimumHeight - toLineHeight; // how much up
+        TInt newTlY = newRect.iTl.iY + yOffset;       // new Top Left Y coordinate
+        if(newTlY>=0)
+          	{
+            newRect.Move( 0, yOffset );
+            }
+        else
+        	{
+            // shrink height to visible area and move
+            newHeight = RoundToItemHeight( minimumHeight + newTlY);
+            newRect.Move( 0, -newHeight - toLineHeight);
+            }
+     	}
+    newRect.SetHeight(newHeight); // set new height
 	SetRect( newRect );
 	}
 
--- a/emailuis/emailui/src/ncssubjectfield.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/src/ncssubjectfield.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -250,73 +250,49 @@
 void CNcsSubjectField::FocusChanged( TDrawNow aDrawNow )
 	{
     FUNC_LOG;
-	iDrawAfterFocusChange = aDrawNow;
-	DoHandleFocusChanged( this );
-	}
-
-// -----------------------------------------------------------------------------
-// CNcsSubjectField::HandleFocusChangedL()
-// -----------------------------------------------------------------------------
-//
-void CNcsSubjectField::HandleFocusChangedL()
-    {
-    FUNC_LOG;
-    if ( IsFocused() )
-        {
-        iTextEditor->SetFocus( ETrue );
-        iTextEditor->SetCursorPosL( iTextEditor->TextLength(), EFalse );
+	if ( IsFocused() )
+		{
+		iTextEditor->SetFocus( ETrue );
+		TRAP_IGNORE( iTextEditor->SetCursorPosL( iTextEditor->TextLength(), EFalse ) ); 
 
-        // make sure that control is visible on screen
-        if ( Rect().iTl.iY < 0 )
-            {
-            TPoint pt = TPoint( 0, 0 );
-            Reposition( pt, Rect().Width() );
-            iSizeObserver->UpdateFieldPosition( this );
-            }
-        else
-            {
-            TPoint pos = PositionRelativeToScreen();
-            pos.iY += Size().iHeight;
-            CWsScreenDevice* screenDev = ControlEnv()->ScreenDevice();
-            TPixelsAndRotation pix;
-            screenDev->GetDefaultScreenSizeAndRotation( pix );
-            const TInt h = pix.iPixelSize.iHeight;
-            if ( pos.iY >= h - h / 3 )
-                {
-                TPoint pt = TPoint( 0, h / 3 );
-                Reposition( pt, Rect().Width() );
-                iSizeObserver->UpdateFieldPosition( this );
-                }
-            }
+		// make sure that control is visible on screen
+		if ( Rect().iTl.iY < 0 )
+			{
+			TPoint pt = TPoint( 0, 0 );
+			Reposition( pt, Rect().Width() );
+			iSizeObserver->UpdateFieldPosition( this );
+			}
+		else
+			{
+			TPoint pos = PositionRelativeToScreen();
+			pos.iY += Size().iHeight;
+			CWsScreenDevice* screenDev = ControlEnv()->ScreenDevice();
+			TPixelsAndRotation pix;
+			screenDev->GetDefaultScreenSizeAndRotation( pix );
+			const TInt h = pix.iPixelSize.iHeight;
+			if ( pos.iY >= h - h / 3 )
+				{
+				TPoint pt = TPoint( 0, h / 3 );
+				Reposition( pt, Rect().Width() );
+				iSizeObserver->UpdateFieldPosition( this );
+				}
+			}
 
-        if ( iParentControl )
-            {
-            iParentControl->SetMskL();
-            }
-        }
-    else
-        {
-        iTextEditor->HandleTextChangedL();
-        iTextEditor->SetFocus( EFalse );
-        }
+		if ( iParentControl )
+			{
+			TRAP_IGNORE( iParentControl->SetMskL() );
+			}
+		}
+	else
+		{
+		iTextEditor->SetFocus( EFalse );
+		}
 
-    if ( iDrawAfterFocusChange )
-        {
-        DrawNow();
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CNcsSubjectField::DoHandleFocusChanged()
-// -----------------------------------------------------------------------------
-//
-TInt CNcsSubjectField::DoHandleFocusChanged( TAny* aSelfPtr )
-    {
-    FUNC_LOG;
-    CNcsSubjectField* self = static_cast<CNcsSubjectField*>( aSelfPtr );
-    TRAPD( err, self->HandleFocusChangedL() );
-    return err;
-    }
+	if ( aDrawNow )
+		{
+		DrawNow();
+		}
+	}
 
 // -----------------------------------------------------------------------------
 // CNcsSubjectField::MinimumHeight()
@@ -352,7 +328,15 @@
     FUNC_LOG;
     if ( &aSubject && aSubject.Length() > 0 )
     	{
-	    RMemReadStream inputStream( aSubject.Ptr(), aSubject.Size() );
+        // clear subject if necessary
+        TInt documentLength = iTextEditor->RichText()->DocumentLength();
+        if ( documentLength > 0 )
+            {
+            iTextEditor->RichText()->DeleteL( 0, documentLength );
+            iTextEditor->HandleTextChangedL();
+            }
+
+        RMemReadStream inputStream( aSubject.Ptr(), aSubject.Size() );
 	    CleanupClosePushL( inputStream );
 
 	  	iTextEditor->RichText()->ImportTextL( 0, inputStream, CPlainText::EOrganiseByParagraph );
--- a/emailuis/emailui/src/ncsutility.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/src/ncsutility.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -36,9 +36,9 @@
 #include <flogger.h>
 #include <aknenv.h>	// CAknEnv
 
-#include "cfsmailbox.h"
-#include "cfsmailclient.h"
-#include "cfsmailaddress.h"
+#include "CFSMailBox.h"
+#include "CFSMailClient.h"
+#include "CFSMailAddress.h"
 
 #include <aknlayoutscalable_apps.cdl.h>
 #include <layoutmetadata.cdl.h>
@@ -300,51 +300,59 @@
 HBufC* NcsUtility::FormatSubjectLineL( 
         const TDesC& aNewSubjectLine, const TDesC& aPrefix )
 	{
-    FUNC_LOG;
-
-	HBufC* formattedSubjectLine = aNewSubjectLine.AllocLC();
-	HBufC* prefix = aPrefix.AllocLC();
-
-	TPtr formattedSubjectLinePtr = formattedSubjectLine->Des();
-	TPtr prefixPtr = prefix->Des();
-	prefixPtr.Trim();
-
-	TInt subjectLineLength = formattedSubjectLinePtr.Length();
-	TInt index = 0;
-	TInt length = subjectLineLength;
-	TInt prefixLength = prefixPtr.Length();
-
-	do
-		{
-		formattedSubjectLinePtr = formattedSubjectLinePtr.RightTPtr( length );
-		index = formattedSubjectLinePtr.FindC( prefixPtr );
-		length = formattedSubjectLinePtr.Length() - index - prefixLength;
-		}
-	while( index != KErrNotFound );
+	FUNC_LOG;
+	   
+	    HBufC* formattedSubjectLine = aNewSubjectLine.AllocLC();
+	    HBufC* prefix = aPrefix.AllocLC();
+	    TPtr formattedSubjectLinePtr = formattedSubjectLine->Des();
+	    TPtr prefixPtr = prefix->Des();
+	    prefixPtr.Trim();
+	    
+	    TInt subjectLineLength = formattedSubjectLinePtr.Length();
+	    TInt length = subjectLineLength;
+	    TInt prefixLength = prefixPtr.Length();
+	    HBufC* fwdPrefix = StringLoader::LoadLC( R_NCS_ENGINE_EMAIL_FORWARD_PREFIX );
+	    TPtr fwdPrt = fwdPrefix->Des();
+	    TInt fwdLength = fwdPrt.Length();
+	    fwdPrt.Trim();
+	    
+	      for(TInt index = formattedSubjectLinePtr.FindC( prefixPtr ); index != KErrNotFound ; index = formattedSubjectLinePtr.FindC( prefixPtr ))
+	        {
+	            formattedSubjectLinePtr = formattedSubjectLinePtr.RightTPtr( length );
+	            length = formattedSubjectLinePtr.Length() - index - prefixLength;
+	        }
+	       formattedSubjectLinePtr.Trim();
+	       
+	       for(TInt index = formattedSubjectLinePtr.FindC( fwdPrt) ; index != KErrNotFound  ; index = formattedSubjectLinePtr.FindC( fwdPrt ))
+	          {
+	               formattedSubjectLinePtr = formattedSubjectLinePtr.RightTPtr( length );
+	               length = formattedSubjectLinePtr.Length() - index - fwdLength;
+	          }
 
-	formattedSubjectLinePtr.Trim();
+	       formattedSubjectLinePtr.Trim();
+	    
+	    
+	    HBufC* finalSubject = HBufC::NewL( formattedSubjectLinePtr.Length() + prefixPtr.Length() + KSpace().Length()  );
+	    TPtr ptr = finalSubject->Des();
+	    if ( AknLayoutUtils::LayoutMirrored() )
+	        {
+	        ptr.Append( formattedSubjectLinePtr );
+	        ptr.Append( KSpace );
+	        ptr.Append( prefixPtr );        
+	        
+	        }
+	    else
+	        {
+	        ptr.Append( prefixPtr );
+	        ptr.Append( KSpace );
+	        ptr.Append( formattedSubjectLinePtr );
+	    
+	        }
+	    CleanupStack::PopAndDestroy( fwdPrefix );
+	    CleanupStack::PopAndDestroy( prefix );
+	    CleanupStack::PopAndDestroy( formattedSubjectLine );
 
-	HBufC* finalSubject = HBufC::NewL( 
-	        formattedSubjectLinePtr.Length() + prefixPtr.Length() + 
-	        KSpace().Length() );
-	TPtr ptr = finalSubject->Des();
-	if ( AknLayoutUtils::LayoutMirrored() )
-		{
-		ptr.Append( formattedSubjectLinePtr );
-		ptr.Append( KSpace );
-		ptr.Append( prefixPtr );		
-		}
-	else
-		{
-		ptr.Append( prefixPtr );
-		ptr.Append( KSpace );
-		ptr.Append( formattedSubjectLinePtr );
-		}
-
-	CleanupStack::PopAndDestroy( prefix );
-	CleanupStack::PopAndDestroy( formattedSubjectLine );
-
-	return finalSubject;
+	    return finalSubject;
 	}
 
 // -----------------------------------------------------------------------------
--- a/emailuis/uicomponents/inc/fstreevisualizerbase.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/uicomponents/inc/fstreevisualizerbase.h	Fri Mar 12 15:41:14 2010 +0200
@@ -145,7 +145,8 @@
      * Get items in range aY to aY + aHeight. Also returns offset by which the listlayout
      * needs to be scrolled (e.g. the first item in list might be only partly visible)
      */
-    void GetItemsL( RArray<TFsTreeItemId>& aItems, TInt aY, TInt aHeight, TInt& aOffset );
+    void GetItemsL( RArray<TFsTreeItemId>& aItems, TInt aY, TInt aHeight, TInt& aOffset,
+            TInt& aBeginIndex );
 
     /**
      * Returns full height of the world (in pixels).
@@ -169,6 +170,11 @@
     TInt GetItemRect( const TFsTreeItemId, TRect& aRect ) const;
 
     /**
+     * Returns item's rect, scan starts from aStartIndex.
+     */
+    TInt GetItemRect( const TFsTreeItemId, TRect& aRect, const TInt aStartIndex ) const;
+
+    /**
      * Returns item's rect by index in world.
      */
     TInt GetItemRectByIndex(const TInt aIndex, TRect& aRect) const;
@@ -555,6 +561,9 @@
 
     // Viewport cache
     TCache iCache;
+    
+    // Wold index of the first item in Cache
+    TInt iWorldIndex;
 
     };
 
@@ -2345,7 +2354,12 @@
         /**
          * Do physics update when simulation has finished.
          */
-        EUpdatePhysicsAfterSimulationFinished
+        EUpdatePhysicsAfterSimulationFinished,
+        
+		/**
+		 * Ignore next pointer up event.
+		 */
+        EIgnorePointerUpAction
     };
 
     // Flags
--- a/emailuis/uicomponents/src/fscontrolbuttonvisualiser.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/uicomponents/src/fscontrolbuttonvisualiser.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -1266,8 +1266,11 @@
         }
     if ( iButtonModel->ContainsElement( ECBElemLabelFirstLine ) )
         {
-        iLabelFirstLine->SetSize( text1.Size() );
-        iLabelFirstLine->SetPos( text1.iTl );
+		if ( iLabelFirstLine )
+			{
+			iLabelFirstLine->SetSize( text1.Size() );
+			iLabelFirstLine->SetPos( text1.iTl );
+			}
         }
     if ( iButtonModel->ContainsElement( ECBElemLabelSndLine ) )
         {
--- a/emailuis/uicomponents/src/fstreeplainonelineitemvisualizer.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/uicomponents/src/fstreeplainonelineitemvisualizer.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -540,7 +540,7 @@
                 iTextVisual->SetColor( textColor );
                 iTextVisual->SetTextStyle( styleId );
 
-                iTextVisual->SetWrapping(CAlfTextVisual::ELineWrapManual);
+//                iTextVisual->SetWrapping(CAlfTextVisual::ELineWrapManual);
 
                 TAlfAlignHorizontal currTextAlign( EAlfAlignHLocale );
                 currTextAlign = CurrentTextAlignmentL( iTextAlign, &data->Data(), iTextVisual );
--- a/emailuis/uicomponents/src/fstreeplainonelinenodevisualizer.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/uicomponents/src/fstreeplainonelinenodevisualizer.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -745,7 +745,7 @@
                 iTextVisual->SetColor( textColor );
                 iTextVisual->SetTextStyle( styleId );
 
-                iTextVisual->SetWrapping(CAlfTextVisual::ELineWrapManual);
+//                iTextVisual->SetWrapping(CAlfTextVisual::ELineWrapManual);
 
                 TAlfAlignHorizontal currTextAlign( EAlfAlignHLocale );
                 currTextAlign = CurrentTextAlignmentL( iTextAlign, &data->Data(), iTextVisual );
@@ -850,13 +850,14 @@
         return;
         }
 
-    iTextVisual->SetWrapping(CAlfTextVisual::ELineWrapManual);
 
     textWidth = iTextVisual->SubstringExtents(0, iTextVisual->Text().Length()).Width();
     marqueeSize = textWidth - iViewportLayout->Size().iX.Target();
 
     if (iTextVisual && (marqueeSize>0))
         {
+        iTextVisual->SetWrapping(CAlfTextVisual::ELineWrapManual);
+    
         TSize size(textWidth,iViewportLayout->Size().iY.Target());
         if ( aMarqueeType == EFsTextMarqueeForth )
             {
--- a/emailuis/uicomponents/src/fstreeplaintwolineitemvisualizer.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/uicomponents/src/fstreeplaintwolineitemvisualizer.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -12,7 +12,7 @@
 * Contributors:
 *
 *  Description : A visualizer for data items with plain text.
-*  Version     : %version: tr1sido#14 %
+*  Version     : %version: tr1sido#15 %
 *
 */
 
@@ -1684,7 +1684,7 @@
                 iTextVisual->SetColor( textColor );
                 iTextVisual->SetTextStyle( styleId );
 
-                iTextVisual->SetWrapping(CAlfTextVisual::ELineWrapManual);
+//                iTextVisual->SetWrapping(CAlfTextVisual::ELineWrapManual);
 
                 TAlfAlignHorizontal currTextAlign( EAlfAlignHLocale );
                 currTextAlign = CurrentTextAlignmentL( iTextAlign, &data->Data(), iTextVisual );
@@ -1713,7 +1713,7 @@
                 iSecondaryTextVisual->SetColor( textColor );
                 iSecondaryTextVisual->SetTextStyle( styleId );
 
-                iSecondaryTextVisual->SetWrapping(CAlfTextVisual::ELineWrapManual);
+//                iSecondaryTextVisual->SetWrapping(CAlfTextVisual::ELineWrapManual);
 
                 TAlfAlignHorizontal currSecTextAlign( EAlfAlignHLocale );
                 currSecTextAlign = CurrentTextAlignmentL( iSecondaryTextAlign, &data->SecondaryData(), iSecondaryTextVisual );
@@ -1744,7 +1744,7 @@
                 iPreviewPaneTextVisual->SetColor( textColor );
                 iPreviewPaneTextVisual->SetTextStyle( styleId );
 
-                iPreviewPaneTextVisual->SetWrapping(CAlfTextVisual::ELineWrapManual);
+//                iPreviewPaneTextVisual->SetWrapping(CAlfTextVisual::ELineWrapManual);
 
                 TAlfAlignHorizontal currSecTextAlign( EAlfAlignHLocale );
                 currSecTextAlign = CurrentTextAlignmentL( EAlfAlignHLocale, &data->PreviewPaneData(), iPreviewPaneTextVisual );
--- a/emailuis/uicomponents/src/fstreevisualizerbase.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/uicomponents/src/fstreevisualizerbase.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -83,6 +83,7 @@
 
 // check from aknphysicsconstants.h
 const TInt KFlickMaxDuration( 500000 );
+const TInt KDefaultFriction( 35 ); // avkon default is 10
 
 // ======== LOCAL FUNCTIONS ========
 
@@ -350,7 +351,7 @@
 // Uses binary search.
 // ---------------------------------------------------------------------------
 void TWorld::GetItemsL(RArray<TFsTreeItemId>& aItems, TInt aY, TInt aHeight,
-        TInt& aOffset)
+        TInt& aOffset, TInt& aBeginIndex)
     {
     // First find first visible item using binary search algorithm
     aItems.Reset();
@@ -379,7 +380,7 @@
                 {
                 aOffset = aY - iItems[middle].Top();
                 aHeight += aOffset;
-                i = middle;
+                aBeginIndex = i = middle;
                 break;
                 }
             }
@@ -449,8 +450,18 @@
 // ---------------------------------------------------------------------------
 TInt TWorld::GetItemRect(const TFsTreeItemId aItemId, TRect& aRect) const
     {
+    return GetItemRect(aItemId, aRect, 0);
+    }
+
+// ---------------------------------------------------------------------------
+// TWorld::GetItemRect
+// ---------------------------------------------------------------------------
+TInt TWorld::GetItemRect(const TFsTreeItemId aItemId, TRect& aRect, 
+        const TInt aStartIndex ) const
+    {
     TInt result(KErrNotFound);
-    for (TInt i = iItems.Count() - 1; i >= 0; i--)
+    const TInt itemCount(iItems.Count());
+    for (TInt i = aStartIndex; i < itemCount; i++)
         {
         if (iItems[i].iId == aItemId)
             {
@@ -505,7 +516,7 @@
 // TViewPort::TViewPort
 // ---------------------------------------------------------------------------
 TViewPort::TViewPort(MObserver& aObserver, TWorld& aWorld) :
-    iObserver(aObserver), iWorld(aWorld)
+    iObserver(aObserver), iWorld(aWorld), iWorldIndex(KErrNotFound)
     {
     }
 
@@ -585,7 +596,7 @@
     {
     RArray<TFsTreeItemId> tempItems;
     CleanupClosePushL(tempItems);
-    iWorld.GetItemsL(tempItems, iPosition.iY, iSize.iHeight, aOffset);
+    iWorld.GetItemsL(tempItems, iPosition.iY, iSize.iHeight, aOffset, iWorldIndex);
     iCache.UpdateL(tempItems, aItemsToBeRemoved, aItemsToBeAdded, aFullUpdate);
     CleanupStack::PopAndDestroy(); // tempItems
     }
@@ -595,7 +606,7 @@
 // ---------------------------------------------------------------------------
 void TViewPort::GetVisibleItemsL(RArray<TFsTreeItemId>& aVisible, TInt& aOffset)
 	{
-	iWorld.GetItemsL(aVisible, iPosition.iY, iSize.iHeight, aOffset);
+	iWorld.GetItemsL(aVisible, iPosition.iY, iSize.iHeight, aOffset, iWorldIndex);
 	}
 
 // ---------------------------------------------------------------------------
@@ -739,6 +750,7 @@
 // ---------------------------------------------------------------------------
 void TViewPort::ClearCache()
     {
+    iWorldIndex = KErrNotFound;
     iCache.Clear();
     }
 
@@ -750,7 +762,8 @@
     TRect itemRect;
     if (!iCache.IsClear() && iCache.ContainsItem(aItemId))
         {
-        if (iWorld.GetItemRect(aItemId, itemRect) != KErrNotFound)
+        const TInt beginIndex(iWorldIndex == KErrNotFound ? 0 : iWorldIndex);
+        if (iWorld.GetItemRect(aItemId, itemRect, beginIndex) != KErrNotFound)
             {
             itemRect.Move(0, -iPosition.iY);
             }
@@ -1542,11 +1555,18 @@
                     iTouchPressed = ETrue;
                     const TPoint& pos(aEvent.PointerEvent().iParentPosition);
                     INFO_2("EButton1Down (%d, %d)", pos.iX, pos.iY);
-                    if (!iFlags.IsSet(EPhysicsOn))
+                    //if (!iFlags.IsSet(EPhysicsOn))
+                    // Keep this last!
+                    if (iFlags.IsSet(EPhysicsOn))
                         {
                         iPhysics->StopPhysics();
-                        iPhysics->ResetFriction();
+                        //iPhysics->ResetFriction();
                         UpdatePhysicsL();
+                        iFlags.Set(EIgnorePointerUpAction);
+                        }
+                    else
+                        {
+                        iFlags.Clear(EIgnorePointerUpAction);
                         }
                     iDragHandler->PointerDown(aEvent.PointerEvent(), id);
                     break;
@@ -1562,11 +1582,12 @@
                             MFsTreeVisualizerObserver::EFsChangeFocusVisibility );
                         INFO_2( "EButton1Up (%d, %d)", pos.iX, pos.iY );
                         }
-                    if( !iDragHandler->IsFlicking() )
+                    /*if( !iDragHandler->IsFlicking() )
                         {
                         iPhysics->StopPhysics();
-                        }
+                        }*/
                     iDragHandler->PointerUp( aEvent.PointerEvent(), id );
+                    iFlags.Clear(EIgnorePointerUpAction);
                     break;
                     }
                 case TPointerEvent::EDrag:
@@ -1578,6 +1599,7 @@
                             || iDragHandler->DragDelta(aEvent.PointerEvent())
                                     >= iPhysics->DragThreshold())
                         {
+                        iFlags.Set(EIgnorePointerUpAction);
                         iDragHandler->PointerDrag(aEvent.PointerEvent(), id);
                         iDragHandler->EnableFlicking();
                         }
@@ -1590,6 +1612,7 @@
                     const TPoint& pos(aEvent.PointerEvent().iParentPosition);
                     INFO_2("EButtonRepeat (%d, %d)", pos.iX, pos.iY);
                     iDragHandler->PointerRepeat(aEvent.PointerEvent());
+                    iFlags.Clear(EIgnorePointerUpAction);
                     break;
                     }
 
@@ -3644,7 +3667,7 @@
         {
         iScrollbarModel.SetFocusPosition(iViewPort.Position().iY);
         iScrollBar->SetModelL(&iScrollbarModel);
-        iScrollBar->DrawNow();
+        iScrollBar->DrawDeferred();
         }
     }
 
@@ -3671,7 +3694,7 @@
     iScrollbarModel.SetWindowSize(pageSize);
     iScrollbarModel.SetFocusPosition(iViewPort.Position().iY);
     iScrollBar->SetModelL(&iScrollbarModel);
-    iScrollBar->DrawNow();
+    iScrollBar->DrawDeferred();
 
     RArray<TInt> columns;
     CleanupClosePushL(columns);
@@ -4637,6 +4660,7 @@
         iPhysics = CAknPhysics::NewL(*this, NULL );
         iDragHandler = CDragHandler::NewL(*this,
                 iPhysics->HighlightTimeout(), iFlags);
+        iPhysics->SetFriction(KDefaultFriction);                        
         }
 
     iRootData = CFsTreePlainOneLineItemData::NewL();
@@ -4943,13 +4967,13 @@
             visualizerLayout.SetSize(tpItemSize);
             visualizerLayout.PropertySetIntegerL(KPropertyItemId(), itemId);
             
-            if(aUpdateByPhysic != EUpdatedByPhisic)
-            	{
+//            if(aUpdateByPhysic != EUpdatedByPhisic)
+//            	{
             	visualizer->UpdateL(iTreeData->ItemData(itemId),
                     IsItemFocused(itemId) && IsFocusShown(),
                     iTreeData->Level(itemId), iMarkIcon, iMenuIcon,
                     0);
-            	}
+//            	}
             
             visualizerLayout.Brushes()->AppendL(iBorderBrush,
                     EAlfDoesNotHaveOwnership);
@@ -5009,8 +5033,10 @@
         startTime = now - TTimeIntervalMicroSeconds( KFlickMaxDuration - 1 );
         aDrag.iY = aDrag.iY * KFlickMaxDuration / moveTime;
         }
-    iPhysics->StartPhysics(aDrag, startTime);
-    iFlags.Set(EPhysicsOn);
+    if (iPhysics->StartPhysics(aDrag, startTime))
+        {
+        iFlags.Set(EPhysicsOn);
+        }
     }
 
 // ---------------------------------------------------------------------------
@@ -5028,6 +5054,7 @@
         const TSize worldSize(viewSize.iWidth, Max(iWorld.Height(),
                 viewSize.iHeight));
         iPhysics->InitPhysicsL(worldSize, viewSize, EFalse);
+        iPhysics->SetFriction(KDefaultFriction);                        
         }
     }
 
@@ -5140,8 +5167,12 @@
         }
     else if( aEventType == EPointerUp )
         {
-        iVisualizerObserver->TreeVisualizerEventL(
-            MFsTreeVisualizerObserver::EFsTreeItemTouchAction, aItemId, aPoint );
+        // Ignore pointer up action IF physic emulation was stopped on pointer down
+        if ( !iFlags.IsSet(EIgnorePointerUpAction) )
+            {
+            iVisualizerObserver->TreeVisualizerEventL(
+                MFsTreeVisualizerObserver::EFsTreeItemTouchAction, aItemId, aPoint );
+            }
         }
     }
 
@@ -5215,7 +5246,7 @@
 // ---------------------------------------------------------------------------
 //
 void CFsTreeVisualizerBase::CDragHandler::PointerDown(
-        const TPointerEvent& aEvent, const TFsTreeItemId aItemId)
+        const TPointerEvent& aEvent, const TFsTreeItemId aItemId )
     {
     FUNC_LOG;
     Reset();
@@ -5224,7 +5255,6 @@
     iLastPointerPosition = aEvent.iParentPosition;
     iStartTime.HomeTime();
     iFlags.Set( EPointerDownReceived );
-
     iTree.SetFocusedItemAndSendEvent( iItemId, EPointerDown, iPosition );
     }
 
--- a/emailuis/widget/emailwidgetsettings/inc/emailwidgetsettingslistview.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/widget/emailwidgetsettings/inc/emailwidgetsettingslistview.h	Fri Mar 12 15:41:14 2010 +0200
@@ -113,7 +113,6 @@
 private:
 	TVwsViewId                             iPrevViewId;
 	CEmailWidgetSettingsListViewContainer* iView;
-	HBufC*                                 iCid;
 	};
 
 #endif
--- a/emailuis/widget/emailwidgetsettings/src/emailwidgetsettingsappui.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/widget/emailwidgetsettings/src/emailwidgetsettingsappui.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -47,7 +47,7 @@
 void CEmailWidgetSettingsAppUi::ConstructL()
     {
     FUNC_LOG;	
-    BaseConstructL( EAknEnableSkin /*| EAknEnableMSK | EAknSingleClickCompatible*/ );
+    BaseConstructL( EAknEnableSkin | EAknEnableMSK | EAknSingleClickCompatible );
     CreateListViewL();
     }
 
--- a/emailuis/widget/emailwidgetsettings/src/emailwidgetsettingslistview.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/widget/emailwidgetsettings/src/emailwidgetsettingslistview.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -43,7 +43,6 @@
 //	
 CEmailWidgetSettingsListView::~CEmailWidgetSettingsListView()
     {
-    delete iCid;
     }
 
 // ---------------------------------------------------------------------------
@@ -88,7 +87,7 @@
 //	
 void CEmailWidgetSettingsListView::HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent aEventType)
     {
-    if (aEventType == EEventEnterKeyPressed || aEventType == EEventItemDoubleClicked /*EEventItemSingleClicked*/ )
+    if (aEventType == EEventEnterKeyPressed || aEventType == EEventItemSingleClicked )
         {    
         iView->SaveSelectedL();
         AppUi()->HandleCommandL(EAknSoftkeyCancel); // Exit app
--- a/emailuis/widget/emailwidgetsettings/src/emailwidgetsettingsmailboxes.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/widget/emailwidgetsettings/src/emailwidgetsettingsmailboxes.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -20,7 +20,7 @@
 #include <aknsettingitemlist.h>
 
 #include "emailtrace.h"
-#include "CFSMailClient.h"
+#include "cfsmailclient.h"
 #include "emailwidgetsettingsmailboxes.h"
 
 // ======== MEMBER FUNCTIONS ========
--- a/emailuis/widget/group/bld.inf	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/widget/group/bld.inf	Fri Mar 12 15:41:14 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008 - 2010 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"
@@ -29,13 +29,15 @@
 ../hsps/00/manifest.dat                 /epoc32/data/Z/resource/homescreen/emailwidget/hsps/manifest.dat
 ../hsps/00/widgetconfiguration.xml      /epoc32/data/Z/resource/homescreen/emailwidget/hsps/widgetconfiguration.xml
 ../hsps/00/emailwidgetconfiguration.dtd /epoc32/data/Z/resource/homescreen/emailwidget/hsps/emailwidgetconfiguration.dtd
-../xuikon/00/EW.o0000                   /epoc32/data/Z/resource/homescreen/emailwidget/xuikon/EW.o0000
 ../xuikon/00/emailwidget.dat            /epoc32/data/Z/resource/homescreen/emailwidget/xuikon/emailwidget.dat
 ../xuikon/00/emailwidget.css            /epoc32/data/Z/resource/homescreen/emailwidget/xuikon/emailwidget.css
+../xuikon/37/emailwidget.css            /epoc32/data/Z/resource/homescreen/emailwidget/xuikon/37/emailwidget.css
+../xuikon/50/emailwidget.css            /epoc32/data/Z/resource/homescreen/emailwidget/xuikon/50/emailwidget.css
+../xuikon/57/emailwidget.css            /epoc32/data/Z/resource/homescreen/emailwidget/xuikon/57/emailwidget.css
+../xuikon/94/emailwidget.css            /epoc32/data/Z/resource/homescreen/emailwidget/xuikon/94/emailwidget.css
 ../xuikon/00/emailwidget.xml            /epoc32/data/Z/resource/homescreen/emailwidget/xuikon/emailwidget.xml
 // Variant creation still disabled (see also emailwidget.dat file)
 //../xuikon/00/emailwidget.dtd            /epoc32/data/Z/resource/homescreen/emailwidget/xuikon/emailwidget.dtd
-/epoc32/s60/icons/qgn_menu_cmail.svg    /epoc32/data/Z/resource/homescreen/emailwidget/hsps/qgn_menu_cmail.svg
 
 // Support for S60 localization
 //*****************************
@@ -60,7 +62,12 @@
 OPTION DTD_TYPE widget
 OPTION LOC_FOLDERS yes
 END
-
+// Email widget Home Screen content list icon
+START EXTENSION s60/mifconv
+OPTION TARGETFILE ${EPOCROOT}/epoc32/data/Z/resource/homescreen/emailwidget/hsps/emailwidgeticon.mif
+OPTION HEADERFILE emailwidgeticon.mbg
+OPTION SOURCES -c16,8 qgn_menu_cmail.svg
+END
 
 PRJ_MMPFILES
 
--- a/emailuis/widget/hsps/00/manifest.dat	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/widget/hsps/00/manifest.dat	Fri Mar 12 15:41:14 2010 +0200
@@ -16,7 +16,7 @@
     <configurationuid>0x2001E272</configurationuid>
 
     <!-- description -->
-    <filelogo>qgn_menu_cmail.svg</filelogo>
+    <filelogo>mif(emailwidgeticon.mif 16384 16385)</filelogo>
     <fullname>&amp;qtn_hscr_email;</fullname>
     <description>&amp;qtn_hs_widget_mail_description;</description>
     <shortname>EW</shortname>
@@ -34,6 +34,6 @@
     </localization>
 
     <!-- Instances of widget per one homescreen -->	
-    <multiinstance>3</multiinstance>
+    <multiinstance>5</multiinstance>
 	
 </package>
\ No newline at end of file
--- a/emailuis/widget/rom/emailwidget_resources.iby	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/widget/rom/emailwidget_resources.iby	Fri Mar 12 15:41:14 2010 +0200
@@ -32,7 +32,7 @@
 // ...
 
 data=ZPRIVATE\200159c0\install\emailwidget\hsps\00\emailwidgetconfiguration.dtd \private\200159c0\install\emailwidget\hsps\00\emailwidgetconfiguration.dtd
-data=ZPRIVATE\200159c0\install\emailwidget\hsps\00\qgn_menu_cmail.svg \private\200159c0\install\emailwidget\hsps\00\qgn_menu_cmail.svg
+data=ZPRIVATE\200159c0\install\emailwidget\hsps\00\emailwidgeticon.mif \private\200159c0\install\emailwidget\hsps\00\emailwidgeticon.mif
 
 #endif //FF_EMAIL_FRAMEWORK
 #endif //FF_CMAIL_INTEGRATION
--- a/emailuis/widget/xuikon/00/emailwidget.css	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/widget/xuikon/00/emailwidget.css	Fri Mar 12 15:41:14 2010 +0200
@@ -1,110 +1,133 @@
 widget#EmailWidget
 {
-    display: block;
-    width: 100%;
-    height: 12.5u;  /* From layout data: Based on 3-row widget height */
-    direction: ltr;
+    display:          block;
+    width:            100%;
+    height:           12.5u;  /* From layout data: Based on 3-row widget height */
+    direction:        ltr;
 }
 
 box#SetupContainer
 {
-    display: block;
-    padding-top:    0.5u; /* From layout data */
-    padding-bottom: 0.5u; /* From layout data */
-    padding-left:   0.5u; /* From layout data */
-    padding-right:  0.5u; /* From layout data */
-    width: 100%;
-    height: 100%;
-    direction: ltr;
-    block-progression: tb;
-    nav-index: appearance;	
+    display:          block;
+    padding-top:      0.5u; /* From layout data */
+    padding-bottom:   0.5u; /* From layout data */
+    padding-left:     0.5u; /* From layout data */
+    padding-right:    0.5u; /* From layout data */
+    width:            100%;
+    height:           100%;
+    direction:        ltr;
+    block-progression:tb;
+    nav-index:        appearance;	
 }
 
 box#MailsContainer
 {
     display: block;
-    padding-top:    0.5u; /* From layout data */
-    padding-bottom: 0.5u; /* From layout data */
-    padding-left:   0.5u; /* From layout data */
-    padding-right:  0.5u; /* From layout data */
-    width: 100%;
-    height: 100%;
-    direction: ltr;
-    block-progression: tb;
-    nav-index: appearance;	
+    padding-top:      0.5u; /* From layout data */
+    padding-bottom:   0.5u; /* From layout data */
+    padding-left:     0.5u; /* From layout data */
+    padding-right:    0.5u; /* From layout data */
+    width:            100%;
+    height:           100%;
+    direction:        ltr;
+    block-progression:tb;
+    nav-index:        appearance;	
 }
 
 box.row_container
 {
-    display: block;
-    padding-top:    0.25u;  /* From layout data */
-    padding-bottom: 0u;     /* From layout data: Padding between rows is included in top padding */
-    width:          auto;   /* From layout data: Fit to screen */
-    height:         3.5u;   /* From layout data: Height inside padding */
-    block-progression: lr;
-    direction: ltr;
-    nav-index:auto;
+    display:          block;
+    padding-top:      0.25u;  /* From layout data */
+    padding-bottom:   0u;     /* From layout data: Padding between rows is included in top padding */
+    width:            auto;   /* From layout data: Fit to screen */
+    height:           3.5u;   /* From layout data: Height inside padding */
+    block-progression:lr;
+    direction:        ltr;
+    nav-index:        auto;
+}
+
+box.setup_row_2_container
+{
+    display:          block;
+    padding-top:      1u;
+    padding-bottom:   1u;
+    padding-left:     18u;
+    width:            auto;
+    height:           auto;
+    block-progression:lr;
+    direction:        ltr;
+}
+
+box.setup_brand_container
+{
+    display:          block;
+    width:            6u;
+    height:           6u;
+    block-progression:lr;
+    direction:        ltr;
 }
 
 box.image_container
 {
     display: block;
-    padding-left:   0.5u;   /* From layout data */
-    padding-right:  0.5u;   /* From layout data */
-    width:          3.5u;   /* From layout data */
-    height:         auto;   /* From layout data: Fills whole row_container height (3.5u) */
-    block-progression: lr;
-    direction: ltr;
-}
-
-box.text_field_container
-{
-    display: block;
-    padding-left:   0.5u;   /* From layout data */
-    padding-right:  0.5u;   /* From layout data */
-    width:          auto;   /* From layout data: This box is in the middle and width depends on available space */
-    height:         auto;   /* From layout data: Fills whole row_container height (3.5u) */
-    block-progression: lr;
-    direction: ltr;
-}
-
-box.mail_time_container
-{
-    display: block;
-    padding-left:   0.5u;   /* From layout data */
-    padding-right:  0.5u;   /* From layout data */
-    width:        13.23u;   /* From layout data: 12h clock = 3.78 * font-size  (24h clock = 2.20 * font-size) */
-    height: auto;
-    block-progression: lr;
-    direction: ltr;
+    padding-left:     0.5u;   /* From layout data */
+    padding-right:    0.5u;   /* From layout data */
+    width:            3.5u;   /* From layout data */
+    height:           auto;   /* From layout data: Fills whole row_container height (3.5u) */
+    block-progression:lr;
+    direction:        ltr;
 }
 
 box.indicator_image_container
 {
     display: block;
-    padding-left:   0.5u;
-    padding-right:  0.5u;
-    width:          3.5u;
-    height:         3.5u;
-    block-progression: lr;
+    padding-left:     0.5u;
+    padding-right:    0.5u;
+    width:            3.5u;
+    height:           3.5u;
+    block-progression:lr;
     direction: ltr;
 }
 
 text
 {
-    display: block;
-    position: static;
-    text-align: left;
-    font-family: EAknLogicalFontSecondaryFont;  /* LAF font */
-    font-size: 3.5u;                            /* LAF font-size */
+    display:          block;
+    position:         static;
+    text-align:       left;
+    font-family:      EAknLogicalFontSecondaryFont;  /* LAF font */
+    font-size:        3.5u;                            /* LAF font-size */
     _s60-text-valign: top;                      /* Set vertical text position correctly */
-    color:"SKIN(268458534 13056 74)";           /* LAF color */     
-    direction: ltr;
+    color:            "SKIN(268458534 13056 74)";           /* LAF color */     
+    direction:        ltr;
+    width:            auto;   /* From layout data: This box is in the middle and width depends on available space */
+    height:           auto;   /* From layout data: Fills whole row_container height (3.5u) */    
+}
+
+text.text_mailbox
+{
+    padding-left:     0.5u;
+    width:            auto;
+}
+
+text.sender_text
+{
+    padding-left:     0.5u;   /* From layout data */
+    width:            30%;    
+}
+
+text.subject_text
+{
+    padding-left:     0.5u;   /* From layout data */    
+    width:            auto;
 }
 
 text.time_text
 {
-    text-align: right;
+    text-align:       right;
+    width:            adaptive;
+    height:           auto;
+    padding-right:    0.5u;
+    padding-left:     0.2u;
 }
 
 image
--- a/emailuis/widget/xuikon/00/emailwidget.xml	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/widget/xuikon/00/emailwidget.xml	Fri Mar 12 15:41:14 2010 +0200
@@ -32,6 +32,32 @@
                     </text>
                 </box>                             
             </box>
+            <box id="setup_row_2" class="setup_row_2_container">
+                <box id="setup_brand_1" class="setup_brand_container">
+                    <image id="setup_brand_1_id" sizeaware="true">
+                        <configuration name="content_type" value="ct_setup_brand_icon_1"/>
+                        <property class="0x2001F413:CMailWidget/key_setup_brand_icon_1"/>
+                    </image>
+                </box>
+                <box id="setup_brand_2" class="setup_brand_container">
+                    <image id="setup_brand_2_id" sizeaware="true">
+                        <configuration name="content_type" value="ct_setup_brand_icon_2"/>
+                        <property class="0x2001F413:CMailWidget/key_setup_brand_icon_2"/>
+                    </image>
+                </box>
+                <box id="setup_brand_3" class="setup_brand_container">
+                    <image id="setup_brand_3_id" sizeaware="true">
+                        <configuration name="content_type" value="ct_setup_brand_icon_3"/>
+                        <property class="0x2001F413:CMailWidget/key_setup_brand_icon_3"/>
+                    </image>
+                </box>
+                <box id="setup_brand_4" class="setup_brand_container">
+                    <image id="setup_brand_4_id" sizeaware="true">
+                        <configuration name="content_type" value="ct_setup_brand_icon_4"/>
+                        <property class="0x2001F413:CMailWidget/key_setup_brand_icon_4"/>
+                    </image>
+                </box>
+            </box>
         </box>
 
         <!-- MAILS VIEW -->
@@ -53,7 +79,7 @@
                     </image>
                 </box>            
                 <box id="TextField1" class="text_field_container">
-                    <text id="Text" class="text">
+                    <text id="Text" class="text_mailbox">
                         <configuration name="content_type" value="ct_body_text_1"/>
                         <property class="0x2001F413:CMailWidget/key_body_text_1"/>                                               
                         <!-- Display SETUP or MAILS container -->
@@ -80,18 +106,18 @@
                         <property class="0x2001F413:CMailWidget/key_mailbox_icons_2"/>                        
                     </image>
                 </box>            
-                <box id="TextField2" class="text_field_container">
-                    <text id="Text2" class="text">
-                        <configuration name="content_type" value="ct_body_text_2"/>
-                        <property class="0x2001F413:CMailWidget/key_body_text_2"/>                        
-                    </text>
-                </box>
-                <box id="MailboxTime2" class="mail_time_container">
-                    <text id="time_id_2" class="time_text">
-                        <configuration name="content_type" value="ct_time_2"/>
-                        <property class="0x2001F413:CMailWidget/key_time_2"/>                        
-                    </text>
-                </box>                
+                <text id="sender_id_2" class="sender_text">
+                    <configuration name="content_type" value="ct_body_text_2"/>
+                    <property class="0x2001F413:CMailWidget/key_body_text_2"/>                        
+                </text>
+                <text id="subject_id_2" class="subject_text">
+                    <configuration name="content_type" value="ct_subject_text_2"/>
+                    <property class="0x2001F413:CMailWidget/key_subject_text_2"/>                        
+                </text>
+                <text id="time_id_2" class="time_text">
+                    <configuration name="content_type" value="ct_time_2"/>
+                    <property class="0x2001F413:CMailWidget/key_time_2"/>                        
+                </text>
             </box>
             
             <!-- Widget row 3 -->
@@ -102,18 +128,18 @@
                         <property class="0x2001F413:CMailWidget/key_mailbox_icons_3"/>                        
                     </image>
                 </box>            
-                <box id="TextField3" class="text_field_container">
-                    <text id="Text3" class="text">
-                        <configuration name="content_type" value="ct_body_text_3"/>
-                        <property class="0x2001F413:CMailWidget/key_body_text_3"/>                        
-                    </text>
-                </box>
-                <box id="MailboxTime3" class="mail_time_container">
-                    <text id="time_id_3" class="time_text">
-                        <configuration name="content_type" value="ct_time_3"/>
-                        <property class="0x2001F413:CMailWidget/key_time_3"/>                        
-                    </text>
-                </box>                
+                <text id="sender_id_3" class="sender_text">
+                    <configuration name="content_type" value="ct_body_text_3"/>
+                    <property class="0x2001F413:CMailWidget/key_body_text_3"/>                        
+                </text>
+                <text id="subject_id_3" class="subject_text">
+                    <configuration name="content_type" value="ct_subject_text_3"/>
+                    <property class="0x2001F413:CMailWidget/key_subject_text_3"/>                        
+                </text>                
+                <text id="time_id_3" class="time_text">
+                    <configuration name="content_type" value="ct_time_3"/>
+                    <property class="0x2001F413:CMailWidget/key_time_3"/>                        
+                </text>
             </box>            
         </box>
         
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailuis/widget/xuikon/37/emailwidget.css	Fri Mar 12 15:41:14 2010 +0200
@@ -0,0 +1,136 @@
+widget#EmailWidget
+{
+    display:          block;
+    width:            100%;
+    height:           12.5u;  /* From layout data: Based on 3-row widget height */
+    direction:        ltr;
+}
+
+box#SetupContainer
+{
+    display:          block;
+    padding-top:      0.5u; /* From layout data */
+    padding-bottom:   0.5u; /* From layout data */
+    padding-left:     0.5u; /* From layout data */
+    padding-right:    0.5u; /* From layout data */
+    width:            100%;
+    height:           100%;
+    direction:        ltr;
+    block-progression:tb;
+    nav-index:        appearance;	
+}
+
+box#MailsContainer
+{
+    display: block;
+    padding-top:      0.5u; /* From layout data */
+    padding-bottom:   0.5u; /* From layout data */
+    padding-left:     0.5u; /* From layout data */
+    padding-right:    0.5u; /* From layout data */
+    width:            100%;
+    height:           100%;
+    direction:        ltr;
+    block-progression:tb;
+    nav-index:        appearance;	
+}
+
+box.row_container
+{
+    display:          block;
+    padding-top:      0.25u;  /* From layout data */
+    padding-bottom:   0u;     /* From layout data: Padding between rows is included in top padding */
+    width:            auto;   /* From layout data: Fit to screen */
+    height:           3.5u;   /* From layout data: Height inside padding */
+    block-progression:lr;
+    direction:        rtl;
+    nav-index:        auto;
+}
+
+box.setup_row_2_container
+{
+    display:          block;
+    padding-top:      1u;
+    padding-bottom:   1u;
+    padding-right:    18u;
+    width:            auto;
+    height:           auto;
+    block-progression:lr;
+    direction:        rtl;
+}
+
+box.setup_brand_container
+{
+    display:          block;
+    width:            6u;
+    height:           6u;
+    block-progression:lr;
+    direction:        ltr;
+}
+
+box.image_container
+{
+    display: block;
+    padding-left:     0.5u;   /* From layout data */
+    padding-right:    0.5u;   /* From layout data */
+    width:            3.5u;   /* From layout data */
+    height:           auto;   /* From layout data: Fills whole row_container height (3.5u) */
+    block-progression:lr;
+    direction:        ltr;
+}
+
+box.indicator_image_container
+{
+    display: block;
+    padding-left:     0.5u;
+    padding-right:    0.5u;
+    width:            3.5u;
+    height:           3.5u;
+    block-progression:lr;
+    direction: ltr;
+}
+
+text
+{
+    display:          block;
+    position:         static;
+    text-align:       right;
+    font-family:      EAknLogicalFontSecondaryFont;  /* LAF font */
+    font-size:        3.5u;                            /* LAF font-size */
+    _s60-text-valign: top;                      /* Set vertical text position correctly */
+    color:            "SKIN(268458534 13056 74)";           /* LAF color */     
+    direction:        ltr;
+    width:            auto;   /* From layout data: This box is in the middle and width depends on available space */
+    height:           auto;   /* From layout data: Fills whole row_container height (3.5u) */    
+}
+
+text.text_mailbox
+{
+    padding-left:     0.5u;
+    width:            auto;
+}
+
+text.sender_text
+{
+    padding-left:     0.5u;   /* From layout data */
+    width:            30%;    
+}
+
+text.subject_text
+{
+    padding-left:     0.5u;   /* From layout data */    
+    width:            auto;
+}
+
+text.time_text
+{
+    text-align:       left;
+    width:            adaptive;
+    height:           auto;
+    padding-right:    0.5u;
+    padding-left:     0.2u;
+}
+
+image
+{
+    _s60-aspect-ratio:preserve;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailuis/widget/xuikon/50/emailwidget.css	Fri Mar 12 15:41:14 2010 +0200
@@ -0,0 +1,136 @@
+widget#EmailWidget
+{
+    display:          block;
+    width:            100%;
+    height:           12.5u;  /* From layout data: Based on 3-row widget height */
+    direction:        ltr;
+}
+
+box#SetupContainer
+{
+    display:          block;
+    padding-top:      0.5u; /* From layout data */
+    padding-bottom:   0.5u; /* From layout data */
+    padding-left:     0.5u; /* From layout data */
+    padding-right:    0.5u; /* From layout data */
+    width:            100%;
+    height:           100%;
+    direction:        ltr;
+    block-progression:tb;
+    nav-index:        appearance;	
+}
+
+box#MailsContainer
+{
+    display: block;
+    padding-top:      0.5u; /* From layout data */
+    padding-bottom:   0.5u; /* From layout data */
+    padding-left:     0.5u; /* From layout data */
+    padding-right:    0.5u; /* From layout data */
+    width:            100%;
+    height:           100%;
+    direction:        ltr;
+    block-progression:tb;
+    nav-index:        appearance;	
+}
+
+box.row_container
+{
+    display:          block;
+    padding-top:      0.25u;  /* From layout data */
+    padding-bottom:   0u;     /* From layout data: Padding between rows is included in top padding */
+    width:            auto;   /* From layout data: Fit to screen */
+    height:           3.5u;   /* From layout data: Height inside padding */
+    block-progression:lr;
+    direction:        rtl;
+    nav-index:        auto;
+}
+
+box.setup_row_2_container
+{
+    display:          block;
+    padding-top:      1u;
+    padding-bottom:   1u;
+    padding-right:    18u;
+    width:            auto;
+    height:           auto;
+    block-progression:lr;
+    direction:        rtl;
+}
+
+box.setup_brand_container
+{
+    display:          block;
+    width:            6u;
+    height:           6u;
+    block-progression:lr;
+    direction:        ltr;
+}
+
+box.image_container
+{
+    display: block;
+    padding-left:     0.5u;   /* From layout data */
+    padding-right:    0.5u;   /* From layout data */
+    width:            3.5u;   /* From layout data */
+    height:           auto;   /* From layout data: Fills whole row_container height (3.5u) */
+    block-progression:lr;
+    direction:        ltr;
+}
+
+box.indicator_image_container
+{
+    display: block;
+    padding-left:     0.5u;
+    padding-right:    0.5u;
+    width:            3.5u;
+    height:           3.5u;
+    block-progression:lr;
+    direction: ltr;
+}
+
+text
+{
+    display:          block;
+    position:         static;
+    text-align:       right;
+    font-family:      EAknLogicalFontSecondaryFont;  /* LAF font */
+    font-size:        3.5u;                            /* LAF font-size */
+    _s60-text-valign: top;                      /* Set vertical text position correctly */
+    color:            "SKIN(268458534 13056 74)";           /* LAF color */     
+    direction:        ltr;
+    width:            auto;   /* From layout data: This box is in the middle and width depends on available space */
+    height:           auto;   /* From layout data: Fills whole row_container height (3.5u) */    
+}
+
+text.text_mailbox
+{
+    padding-left:     0.5u;
+    width:            auto;
+}
+
+text.sender_text
+{
+    padding-left:     0.5u;   /* From layout data */
+    width:            30%;    
+}
+
+text.subject_text
+{
+    padding-left:     0.5u;   /* From layout data */    
+    width:            auto;
+}
+
+text.time_text
+{
+    text-align:       left;
+    width:            adaptive;
+    height:           auto;
+    padding-right:    0.5u;
+    padding-left:     0.2u;
+}
+
+image
+{
+    _s60-aspect-ratio:preserve;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailuis/widget/xuikon/57/emailwidget.css	Fri Mar 12 15:41:14 2010 +0200
@@ -0,0 +1,136 @@
+widget#EmailWidget
+{
+    display:          block;
+    width:            100%;
+    height:           12.5u;  /* From layout data: Based on 3-row widget height */
+    direction:        ltr;
+}
+
+box#SetupContainer
+{
+    display:          block;
+    padding-top:      0.5u; /* From layout data */
+    padding-bottom:   0.5u; /* From layout data */
+    padding-left:     0.5u; /* From layout data */
+    padding-right:    0.5u; /* From layout data */
+    width:            100%;
+    height:           100%;
+    direction:        ltr;
+    block-progression:tb;
+    nav-index:        appearance;	
+}
+
+box#MailsContainer
+{
+    display: block;
+    padding-top:      0.5u; /* From layout data */
+    padding-bottom:   0.5u; /* From layout data */
+    padding-left:     0.5u; /* From layout data */
+    padding-right:    0.5u; /* From layout data */
+    width:            100%;
+    height:           100%;
+    direction:        ltr;
+    block-progression:tb;
+    nav-index:        appearance;	
+}
+
+box.row_container
+{
+    display:          block;
+    padding-top:      0.25u;  /* From layout data */
+    padding-bottom:   0u;     /* From layout data: Padding between rows is included in top padding */
+    width:            auto;   /* From layout data: Fit to screen */
+    height:           3.5u;   /* From layout data: Height inside padding */
+    block-progression:lr;
+    direction:        rtl;
+    nav-index:        auto;
+}
+
+box.setup_row_2_container
+{
+    display:          block;
+    padding-top:      1u;
+    padding-bottom:   1u;
+    padding-right:    18u;
+    width:            auto;
+    height:           auto;
+    block-progression:lr;
+    direction:        rtl;
+}
+
+box.setup_brand_container
+{
+    display:          block;
+    width:            6u;
+    height:           6u;
+    block-progression:lr;
+    direction:        ltr;
+}
+
+box.image_container
+{
+    display: block;
+    padding-left:     0.5u;   /* From layout data */
+    padding-right:    0.5u;   /* From layout data */
+    width:            3.5u;   /* From layout data */
+    height:           auto;   /* From layout data: Fills whole row_container height (3.5u) */
+    block-progression:lr;
+    direction:        ltr;
+}
+
+box.indicator_image_container
+{
+    display: block;
+    padding-left:     0.5u;
+    padding-right:    0.5u;
+    width:            3.5u;
+    height:           3.5u;
+    block-progression:lr;
+    direction: ltr;
+}
+
+text
+{
+    display:          block;
+    position:         static;
+    text-align:       right;
+    font-family:      EAknLogicalFontSecondaryFont;  /* LAF font */
+    font-size:        3.5u;                            /* LAF font-size */
+    _s60-text-valign: top;                      /* Set vertical text position correctly */
+    color:            "SKIN(268458534 13056 74)";           /* LAF color */     
+    direction:        ltr;
+    width:            auto;   /* From layout data: This box is in the middle and width depends on available space */
+    height:           auto;   /* From layout data: Fills whole row_container height (3.5u) */    
+}
+
+text.text_mailbox
+{
+    padding-left:     0.5u;
+    width:            auto;
+}
+
+text.sender_text
+{
+    padding-left:     0.5u;   /* From layout data */
+    width:            30%;    
+}
+
+text.subject_text
+{
+    padding-left:     0.5u;   /* From layout data */    
+    width:            auto;
+}
+
+text.time_text
+{
+    text-align:       left;
+    width:            adaptive;
+    height:           auto;
+    padding-right:    0.5u;
+    padding-left:     0.2u;
+}
+
+image
+{
+    _s60-aspect-ratio:preserve;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailuis/widget/xuikon/94/emailwidget.css	Fri Mar 12 15:41:14 2010 +0200
@@ -0,0 +1,136 @@
+widget#EmailWidget
+{
+    display:          block;
+    width:            100%;
+    height:           12.5u;  /* From layout data: Based on 3-row widget height */
+    direction:        ltr;
+}
+
+box#SetupContainer
+{
+    display:          block;
+    padding-top:      0.5u; /* From layout data */
+    padding-bottom:   0.5u; /* From layout data */
+    padding-left:     0.5u; /* From layout data */
+    padding-right:    0.5u; /* From layout data */
+    width:            100%;
+    height:           100%;
+    direction:        ltr;
+    block-progression:tb;
+    nav-index:        appearance;	
+}
+
+box#MailsContainer
+{
+    display: block;
+    padding-top:      0.5u; /* From layout data */
+    padding-bottom:   0.5u; /* From layout data */
+    padding-left:     0.5u; /* From layout data */
+    padding-right:    0.5u; /* From layout data */
+    width:            100%;
+    height:           100%;
+    direction:        ltr;
+    block-progression:tb;
+    nav-index:        appearance;	
+}
+
+box.row_container
+{
+    display:          block;
+    padding-top:      0.25u;  /* From layout data */
+    padding-bottom:   0u;     /* From layout data: Padding between rows is included in top padding */
+    width:            auto;   /* From layout data: Fit to screen */
+    height:           3.5u;   /* From layout data: Height inside padding */
+    block-progression:lr;
+    direction:        rtl;
+    nav-index:        auto;
+}
+
+box.setup_row_2_container
+{
+    display:          block;
+    padding-top:      1u;
+    padding-bottom:   1u;
+    padding-right:    18u;
+    width:            auto;
+    height:           auto;
+    block-progression:lr;
+    direction:        rtl;
+}
+
+box.setup_brand_container
+{
+    display:          block;
+    width:            6u;
+    height:           6u;
+    block-progression:lr;
+    direction:        ltr;
+}
+
+box.image_container
+{
+    display: block;
+    padding-left:     0.5u;   /* From layout data */
+    padding-right:    0.5u;   /* From layout data */
+    width:            3.5u;   /* From layout data */
+    height:           auto;   /* From layout data: Fills whole row_container height (3.5u) */
+    block-progression:lr;
+    direction:        ltr;
+}
+
+box.indicator_image_container
+{
+    display: block;
+    padding-left:     0.5u;
+    padding-right:    0.5u;
+    width:            3.5u;
+    height:           3.5u;
+    block-progression:lr;
+    direction: ltr;
+}
+
+text
+{
+    display:          block;
+    position:         static;
+    text-align:       right;
+    font-family:      EAknLogicalFontSecondaryFont;  /* LAF font */
+    font-size:        3.5u;                            /* LAF font-size */
+    _s60-text-valign: top;                      /* Set vertical text position correctly */
+    color:            "SKIN(268458534 13056 74)";           /* LAF color */     
+    direction:        ltr;
+    width:            auto;   /* From layout data: This box is in the middle and width depends on available space */
+    height:           auto;   /* From layout data: Fills whole row_container height (3.5u) */    
+}
+
+text.text_mailbox
+{
+    padding-left:     0.5u;
+    width:            auto;
+}
+
+text.sender_text
+{
+    padding-left:     0.5u;   /* From layout data */
+    width:            30%;    
+}
+
+text.subject_text
+{
+    padding-left:     0.5u;   /* From layout data */    
+    width:            auto;
+}
+
+text.time_text
+{
+    text-align:       left;
+    width:            adaptive;
+    height:           auto;
+    padding-right:    0.5u;
+    padding-left:     0.2u;
+}
+
+image
+{
+    _s60-aspect-ratio:preserve;
+}
--- a/help/inc/cmail.hlp.hrh	Fri Feb 19 22:37:30 2010 +0200
+++ b/help/inc/cmail.hlp.hrh	Fri Mar 12 15:41:14 2010 +0200
@@ -9,7 +9,7 @@
 * Initial Contributors:
 * Nokia Corporation - initial contribution.
 *
-* Contributors:
+* Contributors: .
 * 
 * Description:
 *
--- a/ipsservices/ipssosaoplugin/src/IpsSosAOMboxLogic.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/ipsservices/ipssosaoplugin/src/IpsSosAOMboxLogic.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -762,7 +762,7 @@
     
     //ask roaming settings from occ
     cmManager.ReadGenConnSettingsL(OccSettings);
-    if(OccSettings.iSeamlessnessVisitor == ECmCellularDataUsageDisabled && iIsRoaming)
+    if(OccSettings.iCellularDataUsageVisitor == ECmCellularDataUsageDisabled && iIsRoaming)
         {
         ret = EFalse;
         }
--- a/ipsservices/ipssossettings/group/ipssossettings.mmp	Fri Feb 19 22:37:30 2010 +0200
+++ b/ipsservices/ipssossettings/group/ipssossettings.mmp	Fri Mar 12 15:41:14 2010 +0200
@@ -46,7 +46,7 @@
 END
 
 // Def file
-DEFFILE         IPSSOSSETTINGS.DEF
+DEFFILE         ipssossettings.def
 
 // Path definition
 SOURCEPATH      ../src
--- a/ipsservices/ipssossettings/src/ipssetgwizardadapter.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/ipsservices/ipssossettings/src/ipssetgwizardadapter.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -43,6 +43,7 @@
 
 //CONSTANTS
 const TInt KMaxMailboxes = 10;
+const TInt KImapDefFoldersRetrieve = 50; // Default value for retrieve From other folders
 
 // security enums in fs wizard cenrep cenrep
 // Security protocol (0 = OFF, 1 = StartTLS, 2 = SSL/TLS)
@@ -382,6 +383,14 @@
     else 
     	{
     	aSetData.SetDownloadSizeL( CIpsSetData::EHeadersPlus, KIpsSetDataDefaultDownloadSizeKb );
+
+    	TInt retImFolders = aSetData.RetrieveLimit(CIpsSetData::EImap4Folders); //TRetrieveLimit
+        if(retImFolders==-1)
+        	{
+            TInt retPopInbox = aSetData.RetrieveLimit(CIpsSetData::EPop3Limit); 
+           	TInt retImInbox  = aSetData.RetrieveLimit(CIpsSetData::EImap4Inbox); 
+            aSetData.SetRetrieveLimit(retPopInbox,retImInbox,KImapDefFoldersRetrieve);
+        	}
         }
     //</cmail>
     aSetData.SetEmailAddressL( iEmailAddress );
--- a/meetingrequest/mrgui/mrfieldbuilderpluginextension/group/esmrfieldbuilderpluginextension.mmp	Fri Feb 19 22:37:30 2010 +0200
+++ b/meetingrequest/mrgui/mrfieldbuilderpluginextension/group/esmrfieldbuilderpluginextension.mmp	Fri Mar 12 15:41:14 2010 +0200
@@ -117,6 +117,7 @@
 LIBRARY servicehandler.lib          // for aiw
 LIBRARY aiwdialdata.lib
 LIBRARY pbk2commonui.lib
+LIBRARY pbk2rclengine.lib
 LIBRARY ws32.lib //RWindowGroup
 LIBRARY cntmodel.lib //contactitem
 LIBRARY caleninterimutils2.lib
--- a/meetingrequest/mrgui/mrfieldbuilderpluginextension/inc/cesmrcontacthandler.h	Fri Feb 19 22:37:30 2010 +0200
+++ b/meetingrequest/mrgui/mrfieldbuilderpluginextension/inc/cesmrcontacthandler.h	Fri Mar 12 15:41:14 2010 +0200
@@ -22,9 +22,8 @@
 #include <e32base.h>
 #include <MVPbkSingleContactOperationObserver.h>
 #include <AiwCommon.h>
-//<cmail>
-#include "cpbkxremotecontactlookupserviceuicontext.h"
-//</cmail>
+#include <cpbkxremotecontactlookupserviceuicontext.h>
+
 #include "resmrstatic.h"
 #include "mesmrclslistsobserver.h"
 #include "cesmrcontactmanagerhandler.h"
@@ -162,7 +161,7 @@
                             MVPbkStoreContact* aContact );
     void DoRemoteLookupL( const TDesC& aQueryString,
                           CPbkxRemoteContactLookupServiceUiContext::TResult& aResult,
-                          CPbkxRemoteContactLookupServiceUiContext::TMode aContext = 
+                          CPbkxRemoteContactLookupServiceUiContext::TMode aLookupMode = 
                           CPbkxRemoteContactLookupServiceUiContext::EModeContactSelector );
     CFSMailBox& DelayedMailBoxL();
     
--- a/meetingrequest/mrgui/mrfieldbuilderpluginextension/src/cesmrcontacthandler.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/meetingrequest/mrgui/mrfieldbuilderpluginextension/src/cesmrcontacthandler.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -34,9 +34,8 @@
 #include <MVPbkContactLink.h>
 
 //Remote Contact Lookup
-//<cmail>
-#include "cpbkxremotecontactlookupenv.h"
-#include <cntitem.h>
+#include <cpbk2remotecontactlookupaccounts.h>
+#include <pbk2remotecontactlookupfactory.h>
 #include <CPbk2SortOrderManager.h>
 
 // Aiw launcher
@@ -47,7 +46,6 @@
 
 //FS Email framework
 #include "cfsmailbox.h"
-//</cmail>
 
 //MRUI
 #include <esmrgui.rsg>
@@ -614,34 +612,24 @@
 //
 void CESMRContactHandler::DoRemoteLookupL( const TDesC& aQueryString,
     CPbkxRemoteContactLookupServiceUiContext::TResult& aResult,
-    CPbkxRemoteContactLookupServiceUiContext::TMode aContext )
+    CPbkxRemoteContactLookupServiceUiContext::TMode aLookupMode )
     {
     FUNC_LOG;
     TUid protocolUid = TUid::Null();
-    TUint accountId = 0;
-    
-    DelayedMailBoxL().GetRCLInfo( protocolUid, accountId );
-    const TPbkxRemoteContactLookupProtocolAccountId KAccountId( protocolUid, accountId );
-
-    CPbkxRemoteContactLookupEnv* env = CPbkxRemoteContactLookupEnv::NewL();
-    CleanupStack::PushL( env );
-
-    MPbkxRemoteContactLookupServiceUi* serviceUi = env->ServiceUiL();
+    TUint accountUid = 0;
+    DelayedMailBoxL().GetRCLInfo( protocolUid, accountUid );
+    const TPbkxRemoteContactLookupProtocolAccountId accountId =
+        TPbkxRemoteContactLookupProtocolAccountId( protocolUid, accountUid );
 
-    // If you want test with RCL dummyContactDatabase, KAccountId = serviceUi->DefaultAccountIdL();
-    MPbkxRemoteContactLookupServiceUi::TContextParams params = { KAccountId, aContext };
-
-    CPbkxRemoteContactLookupServiceUiContext* ctx( NULL );
-    TRAPD( error, ctx = serviceUi->NewContextL( params ) );
+    CPbkxRemoteContactLookupServiceUiContext::TContextParams params = 
+        { accountId, aLookupMode }; 
 
-    User::LeaveIfError( error );
-
-    CleanupStack::PushL( ctx );
+    CPbkxRemoteContactLookupServiceUiContext* context =
+        Pbk2RemoteContactLookupFactory::NewContextL( params );
+    CleanupStack::PushL( context );
 
-    ctx->ExecuteL( aQueryString, aResult );
-
-    CleanupStack::PopAndDestroy( ctx );
-    CleanupStack::PopAndDestroy( env );
+    context->ExecuteL( aQueryString, aResult );
+    CleanupStack::PopAndDestroy( context );
     }
 
 // -----------------------------------------------------------------------------