Revision: 201003 default PDK_3.0.g
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 02 Feb 2010 00:02:40 +0200
changeset 4 e7aa27f58ae1
parent 3 a4d6f1ea0416
child 8 e1b6206813b4
Revision: 201003 Kit: 201005
email_plat/email_client_api/inc/emailinterfacefactory.h
emailcontacts/contactactionmenu/group/fsccontactactionmenu.mmp
emailcontacts/contactactionservice/callplugin/group/fsccallplugin.mmp
emailcontacts/contactactionservice/group/fsccontactactionservice.mmp
emailcontacts/contactactionservice/pocplugin/group/fscpocplugin.mmp
emailcontacts/contactactionservice/saveascontactplugin/group/fscsaveascontactplugin.mmp
emailcontacts/contactactionservice/sendplugin/group/fscsendplugin.mmp
emailcontacts/contactactionservice/src/cfscactionutils.cpp
emailcontacts/remotecontactlookup/engine/group/pbkxrclengine.mmp
emailcontacts/remotecontactlookup/engine/src/cpbkxrclsettingsengine.cpp
emailcontacts/remotecontactlookup/group/pbkxrclservice.mmp
emailcontacts/remotecontactlookup/inc/cpbkxremotecontactlookupenv.inl
emailcontacts/remotecontactlookup/settingplugin/group/fscrclsetting.mmp
emailservices/emailclientapi/group/emailclientapi.mmp
emailservices/emailclientapi/inc/emailclientapiimpl.h
emailservices/emailclientapi/inc/emailfolder.h
emailservices/emailclientapi/inc/emailinterfacefactoryimpl.h
emailservices/emailclientapi/inc/emailmailbox.h
emailservices/emailclientapi/inc/messageiterator.h
emailservices/emailclientapi/src/emailfolder.cpp
emailservices/emailclientapi/src/emailinterfacefactoryimpl.cpp
emailservices/emailclientapi/src/emailmailbox.cpp
emailservices/emailframework/commonlib/group/FSFWCommonLib.mmp
emailservices/emailframework/commonlib/inc/CFSMailAddress.h
emailservices/emailframework/commonlib/inc/CFSMailBox.h
emailservices/emailframework/commonlib/inc/CFSMailBoxBase.h
emailservices/emailframework/commonlib/inc/CFSMailFolder.h
emailservices/emailframework/commonlib/inc/CFSMailFolderBase.h
emailservices/emailframework/commonlib/inc/CFSMailMessage.h
emailservices/emailframework/commonlib/inc/CFSMailMessagePart.h
emailservices/emailframework/commonlib/inc/mmrinfoprocessor.h
emailservices/emailframework/commonlib/src/CFSMailRequestHandler.cpp
emailservices/emailframework/group/FSMailFramework.mmp
emailservices/emailframework/inc/CFSMailClient.h
emailservices/emailframework/inc/CFSMailPlugin.h
emailservices/emailframework/inc/MFSMailEventObserver.h
emailservices/emailserver/cmailhandlerplugin/group/cmailhandlerplugin.mmp
emailservices/emailserver/cmailhandlerplugin/src/cmailcpshandler.cpp
emailservices/emailserver/cmailhandlerplugin/src/cmailcpsif.cpp
emailservices/emailserver/group/fsmailserver.mmp
emailservices/emailservermonitor/group/emailservermonitor.mmp
emailservices/emailservermonitor/inc/emailshutdownconst.h
emailservices/emailservermonitor/inc/emailshutter.h
emailservices/emailservermonitor/src/emailshutter.cpp
emailservices/emailstore/base_plugin/group/BasePlugin.mmp
emailservices/emailstore/message_store/MsgStoreRfsPlugin/data/RfsMsgStorePlugin.rss
emailservices/emailstore/message_store/MsgStoreRfsPlugin/src/RfsMsgStoreProxy.cpp
emailuis/emailui/data/FreestyleEmailUi.rss
emailuis/emailui/group/FreestyleEmailUi.mmp
emailuis/emailui/inc/FSEmailLauncherItem.h
emailuis/emailui/inc/FreestyleEmailUiAknStatusIndicator.h
emailuis/emailui/inc/FreestyleEmailUiHtmlViewerContainer.h
emailuis/emailui/inc/FreestyleEmailUiLauncherGridVisualiser.h
emailuis/emailui/inc/FreestyleEmailUiMailListVisualiser.h
emailuis/emailui/inc/FreestyleMessageHeaderURLEventHandler.h
emailuis/emailui/inc/ncscomposeviewcontainer.h
emailuis/emailui/inc/ncsfieldsizeobserver.h
emailuis/emailui/inc/ncsheadercontainer.h
emailuis/emailui/loc/freestyleemailui.loc
emailuis/emailui/sendasmtm/fsmtms/client/group/fsclientmtm.mmp
emailuis/emailui/sendasmtm/fsmtms/install/group/fsinstallmtm.mmp
emailuis/emailui/sendasmtm/fsmtms/server/group/fsservermtm.mmp
emailuis/emailui/sendasmtm/fsmtms/ui/group/fsuimtm.mmp
emailuis/emailui/sendasmtm/fsmtms/uidata/group/fsuidatamtm.mmp
emailuis/emailui/sendasmtm/sendashelper/group/fssendashelper.mmp
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/commonemailstub.pkg
emailuis/emailui/sis/commonemailstub.sis
emailuis/emailui/sis/makecommonemailsisx.bat
emailuis/emailui/src/FreestyleEmailUiAknStatusIndicator.cpp
emailuis/emailui/src/FreestyleEmailUiAppui.cpp
emailuis/emailui/src/FreestyleEmailUiHtmlViewerContainer.cpp
emailuis/emailui/src/FreestyleEmailUiHtmlViewerView.cpp
emailuis/emailui/src/FreestyleEmailUiLauncherGridVisualiser.cpp
emailuis/emailui/src/FreestyleEmailUiMailViewerVisualiser.cpp
emailuis/emailui/src/FreestyleEmailUiSearchListVisualiser.cpp
emailuis/emailui/src/FreestyleEmailUiSettingsListView.cpp
emailuis/emailui/src/FreestyleMessageHeaderURLEventHandler.cpp
emailuis/emailui/src/ncsaifeditor.cpp
emailuis/emailui/src/ncscomposeview.cpp
emailuis/emailui/src/ncscomposeviewcontainer.cpp
emailuis/emailui/src/ncsheadercontainer.cpp
emailuis/gsemailsettings/group/GSEmailSettings.mmp
emailuis/uicomponents/fsscrollbarplugin/data/2001E281.rss
emailuis/uicomponents/fsscrollbarplugin/group/fsscrollbarplugin.mmp
emailuis/uicomponents/fsscrollbarplugin/src/fsscrollbarfactory.cpp
emailuis/uicomponents/src/fstreevisualizerbase.cpp
emailuis/widget/emailwidgetsettings/group/bld.inf
emailuis/widget/emailwidgetsettings/group/emailwidgetsettings.mmp
emailuis/widget/emailwidgetsettings/rom/emailwidgetsettings.iby
emailuis/widget/emailwidgetsettings/rom/emailwidgetsettings_resources.iby
group/bld.inf
ipsservices/ipssosaoplugin/group/IPSSosAOPlugin.mmp
ipsservices/ipssosaoplugin/src/IpsSosAOMboxLogic.cpp
ipsservices/ipssosplugin/group/IPSSosPlugin.mmp
ipsservices/ipssosplugin/inc/ipsplgsmtpoperation.h
ipsservices/ipssosplugin/inc/ipsplgsmtpservice.h
ipsservices/ipssosplugin/src/ipsplgimap4connectop.cpp
ipsservices/ipssosplugin/src/ipsplgpop3connectop.cpp
ipsservices/ipssosplugin/src/ipsplgsmtpoperation.cpp
ipsservices/ipssosplugin/src/ipsplgsmtpservice.cpp
ipsservices/ipssossettings/bwins/ipssossettingsu.def
ipsservices/ipssossettings/data/ipssetuimailsettings.ra
ipsservices/ipssossettings/eabi/IPSSOSSETTINGSU.DEF
ipsservices/ipssossettings/group/ipssossettings.mmp
ipsservices/ipssossettings/inc/ipssetdata.h
ipsservices/ipssossettings/inc/ipssetdataextension.h
ipsservices/ipssossettings/inc/ipssetutilsconsts.h
ipsservices/ipssossettings/inc/ipssetutilspageids.hrh
ipsservices/ipssossettings/src/ipssetdata.cpp
ipsservices/ipssossettings/src/ipssetdataextension.cpp
ipsservices/ipssossettings/src/ipssetuidialog.cpp
meetingrequest/mragnversit2/group/esmragnversit2.mmp
meetingrequest/mrcasplugin/group/esmrcasplugin.mmp
meetingrequest/mrcasplugin/src/cesmrcaspluginimpl.cpp
meetingrequest/mrcommon/group/esmrcommon.mmp
meetingrequest/mrdb/group/esmrdb.mmp
meetingrequest/mrentry/group/esmrentry.mmp
meetingrequest/mrgui/group/esmrgui.mmp
meetingrequest/mrgui/inc/cesmrfieldbuilderinterface.h
meetingrequest/mrgui/mrfieldbuildercommon/group/esmrfieldbuildercommon.mmp
meetingrequest/mrgui/mrfieldbuildercommon/src/cesmrrichtextviewer.cpp
meetingrequest/mrgui/mrfieldbuilderplugin/group/esmrfieldbuilderplugin.mmp
meetingrequest/mrgui/mrfieldbuilderplugin/src/cesmrviewerdescriptionfield.cpp
meetingrequest/mrgui/mrfieldbuilderpluginextension/group/esmrfieldbuilderpluginextension.mmp
meetingrequest/mrgui/mrfieldevent/group/esmrfieldevent.mmp
meetingrequest/mrgui/mrlocationplugin/group/esmrlocationplugin.mmp
meetingrequest/mricalviewer/group/esmricalviewer.mmp
meetingrequest/mrpolicy/group/esmrpolicy.mmp
meetingrequest/mrservices/group/esmrservices.mmp
meetingrequest/mrtasks/group/esmrtasks.mmp
meetingrequest/mrtasks/src/cesmrfsemailmanager.cpp
meetingrequest/mrurlparserplugin/group/esmrurlparserplugin.mmp
meetingrequest/mrutils/group/esmrutils.mmp
meetingrequest/mrutilscalplugin/group/esmrutilscalplugin.mmp
meetingrequest/mrversit2/group/esmrversit2.mmp
meetingrequest/mrviewer/group/esmrviewer.mmp
meetingrequest/mrviewercalplugin/group/esmrviewercalplugin.mmp
--- a/email_plat/email_client_api/inc/emailinterfacefactory.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/email_plat/email_client_api/inc/emailinterfacefactory.h	Tue Feb 02 00:02:40 2010 +0200
@@ -54,7 +54,7 @@
     *
     * @code
     
-     #include <emailclientapi.h>
+     #include <emailinterfacefactory.h>
     
      using namespace EmailInterface;
      
@@ -62,7 +62,7 @@
      CleanupStack::PushL( factory );
      MEmailInterface* ifPtr = factory->InterfaceL( KEmailClientApiInterface );
      MEmailClientApi* clientApi = static_cast<MEmailClientApi*>( ifPtr );
-     CleanupReleasePushL( clientApi );
+     CleanupReleasePushL( *clientApi );
      // <do something with clientApi...>
      CleanupStack::PopAndDestroy( 2 ); // clientApi and factory
      @endcode
--- a/emailcontacts/contactactionmenu/group/fsccontactactionmenu.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailcontacts/contactactionmenu/group/fsccontactactionmenu.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -20,6 +20,7 @@
 #include <data_caging_paths.hrh>
 
 #include "../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../inc/emailtraceconfig.hrh"
 #include "../inc/fsccontactactionmenuuids.hrh"
 #include "../inc/pbkxcontactactionmenudebug.hrh"
 
@@ -79,9 +80,15 @@
 LIBRARY                 pbkxdebug.lib
 #endif
 
+#ifdef TRACE_INTO_FILE
+LIBRARY                 flogger.lib
+#endif // TRACE_INTO_FILE
+
 SOURCEPATH              ../data
 START RESOURCE fsccontactactionmenu.rss
     TARGET fsccontactactionmenu.rsc
 END
 
+
+
 //EXPORTUNFROZEN
--- a/emailcontacts/contactactionservice/callplugin/group/fsccallplugin.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailcontacts/contactactionservice/callplugin/group/fsccallplugin.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -20,6 +20,7 @@
 #include <data_caging_paths.hrh>
 
 #include "../../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../../inc/emailtraceconfig.hrh"
 #include "../../inc/fsccontactactionserviceuids.hrh"
 #include "../../inc/pbkxcontactactionservicedebug.hrh"
 
@@ -77,3 +78,7 @@
 //EXPORTUNFROZEN
 SOURCEPATH ../src
 SOURCE                  cfsccallpluginimpl.cpp
+
+#ifdef TRACE_INTO_FILE
+LIBRARY                 flogger.lib
+#endif // TRACE_INTO_FILE
--- a/emailcontacts/contactactionservice/group/fsccontactactionservice.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailcontacts/contactactionservice/group/fsccontactactionservice.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -20,6 +20,7 @@
 #include <data_caging_paths.hrh>
 
 #include "../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../inc/emailtraceconfig.hrh"
 #include "../inc/fsccontactactionserviceuids.hrh"
 #include "../inc/pbkxcontactactionservicedebug.hrh"
 
@@ -99,6 +100,10 @@
 
 #endif
 
+#ifdef TRACE_INTO_FILE
+LIBRARY flogger.lib
+#endif // TRACE_INTO_FILE
+
 SOURCEPATH              ../data
 START RESOURCE fsccontactactionservice.rss
 TARGET fsccontactactionservice.rsc
--- a/emailcontacts/contactactionservice/pocplugin/group/fscpocplugin.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailcontacts/contactactionservice/pocplugin/group/fscpocplugin.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -20,6 +20,7 @@
 #include <data_caging_paths.hrh>
 
 #include "../../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../../inc/emailtraceconfig.hrh"
 #include "../../inc/fsccontactactionserviceuids.hrh"
 #include "../../inc/pbkxcontactactionservicedebug.hrh"
 
@@ -64,6 +65,10 @@
 LIBRARY                 pbkxdebug.lib
 #endif
 
+#ifdef TRACE_INTO_FILE
+LIBRARY                 flogger.lib
+#endif // TRACE_INTO_FILE
+
 SOURCEPATH              ../data
 START RESOURCE	        200025AE.rss
 TARGET                  fscpocplugin.rsc
--- a/emailcontacts/contactactionservice/saveascontactplugin/group/fscsaveascontactplugin.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailcontacts/contactactionservice/saveascontactplugin/group/fscsaveascontactplugin.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -20,6 +20,7 @@
 #include <data_caging_paths.hrh>
 
 #include "../../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../../inc/emailtraceconfig.hrh"
 #include "../../inc/fsccontactactionserviceuids.hrh"
 #include "../../inc/pbkxcontactactionservicedebug.hrh"
 
@@ -66,6 +67,10 @@
 LIBRARY                 pbkxdebug.lib
 #endif
 
+#ifdef TRACE_INTO_FILE
+LIBRARY                 flogger.lib
+#endif // TRACE_INTO_FILE
+
 SOURCEPATH              ../data
 START RESOURCE	        200025B2.rss
 TARGET                  fscsaveascontactplugin.rsc
--- a/emailcontacts/contactactionservice/sendplugin/group/fscsendplugin.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailcontacts/contactactionservice/sendplugin/group/fscsendplugin.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -20,6 +20,7 @@
 #include <data_caging_paths.hrh>
 
 #include "../../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../../inc/emailtraceconfig.hrh"
 #include "../../inc/fsccontactactionserviceuids.hrh"
 
 
@@ -59,6 +60,10 @@
 LIBRARY                 vpbkeng.lib
 LIBRARY cmaillogger.lib
 
+#ifdef TRACE_INTO_FILE
+LIBRARY                 flogger.lib
+#endif // TRACE_INTO_FILE
+
 SOURCEPATH              ../data
 START RESOURCE	        200025AC.rss
 TARGET                  fscsendplugin.rsc
--- a/emailcontacts/contactactionservice/src/cfscactionutils.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailcontacts/contactactionservice/src/cfscactionutils.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -73,9 +73,9 @@
 
 // CONSTANTS DECLARATIONS
 const TUid KPoCOmaServerUid = 
-	{ 
-	0x102071C4 
-	};
+    { 
+    0x102071C4 
+    };
 
 // Unnamed namespace
 namespace {
@@ -1131,10 +1131,10 @@
         {
         TInt settingsId;
         TInt err = cenRep->Get( KPoCDefaultSettings, settingsId );
-		if ( err == KErrNone )
-			{
-			result = (settingsId != KErrNotFound );
-			}
+        if ( err == KErrNone )
+            {
+            result = (settingsId != KErrNotFound );
+            }
         delete cenRep;
         }
 
@@ -1197,7 +1197,7 @@
     TInt aDefaultPriority )
     {
     FUNC_LOG;
-    TInt result;
+    TInt result( 0 ); // some value to escape warning
     TInt error = KErrNotFound;
     
     if ( iRep != NULL )
--- a/emailcontacts/remotecontactlookup/engine/group/pbkxrclengine.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailcontacts/remotecontactlookup/engine/group/pbkxrclengine.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -20,6 +20,7 @@
 #include <data_caging_paths.hrh>
 
 #include "../../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../../inc/emailtraceconfig.hrh"
 #include "../inc/pbkxrclengineuids.hrh"
 
 OPTION CW -frame on
@@ -62,9 +63,7 @@
 
 APP_LAYER_SYSTEMINCLUDE
 
-SYSTEMINCLUDE   /epoc32/include/ecom
 USERINCLUDE    ../../../../inc
-SYSTEMINCLUDE	/epoc32/include/cshelp
 
 LIBRARY         euser.lib 
 LIBRARY         ecom.lib
@@ -102,8 +101,12 @@
 LIBRARY         pbkxdebug.lib
 #endif
 
+#ifdef TRACE_INTO_FILE
+LIBRARY         flogger.lib
+#endif // TRACE_INTO_FILE
+
 SOURCEPATH      ../data
-START RESOURCE	engine.rss
+START RESOURCE  engine.rss
 HEADER
 TARGET          pbkxrclengine.rsc
 TARGETPATH      resource/apps
--- a/emailcontacts/remotecontactlookup/engine/src/cpbkxrclsettingsengine.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailcontacts/remotecontactlookup/engine/src/cpbkxrclsettingsengine.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -18,7 +18,7 @@
 
 #include "emailtrace.h"
 #include <centralrepository.h>
-#include <ecom.h>
+#include <ecom/ecom.h>
 #include "cpbkxrclsettingsengine.h"
 #include "pbkxrclsettings.hrh"
 #include "cpbkxremotecontactlookupprotocoladapter.h"
--- a/emailcontacts/remotecontactlookup/group/pbkxrclservice.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailcontacts/remotecontactlookup/group/pbkxrclservice.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -20,6 +20,7 @@
 #include <data_caging_paths.hrh>
 
 #include "../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../inc/emailtraceconfig.hrh"
 
 OPTION CW -frame on
 
@@ -53,6 +54,10 @@
 LIBRARY                 pbkxdebug.lib
 #endif
 
+#ifdef TRACE_INTO_FILE
+LIBRARY                 flogger.lib
+#endif // TRACE_INTO_FILE
+
 SOURCEPATH              ../data
 START RESOURCE	        service.rss
 TARGET                  pbkxrclservice.rsc
--- a/emailcontacts/remotecontactlookup/inc/cpbkxremotecontactlookupenv.inl	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailcontacts/remotecontactlookup/inc/cpbkxremotecontactlookupenv.inl	Tue Feb 02 00:02:40 2010 +0200
@@ -17,7 +17,7 @@
 
 
 #include <e32std.h>
-#include <ecom.h>
+#include <ecom/ecom.h>
 
 // -----------------------------------------------------------------------------
 // CPbkxRemoteContactLookupEnv::NewL
@@ -27,12 +27,12 @@
     {
     CPbkxRemoteContactLookupEnv* self = NULL;
         
-	TUid implUid = {KPbkxRemoteContactLookupServiceImplImpUid};
+    TUid implUid = {KPbkxRemoteContactLookupServiceImplImpUid};
 
-	TAny* interface = REComSession::CreateImplementationL (
-		implUid, _FOFF( CPbkxRemoteContactLookupEnv, iDtor_ID_Key ) );
+    TAny* interface = REComSession::CreateImplementationL (
+        implUid, _FOFF( CPbkxRemoteContactLookupEnv, iDtor_ID_Key ) );
 
-	return reinterpret_cast< CPbkxRemoteContactLookupEnv* >( interface );
+    return reinterpret_cast< CPbkxRemoteContactLookupEnv* >( interface );
     }
     
 // -----------------------------------------------------------------------------
--- a/emailcontacts/remotecontactlookup/settingplugin/group/fscrclsetting.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailcontacts/remotecontactlookup/settingplugin/group/fscrclsetting.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -21,6 +21,7 @@
 #include <data_caging_paths.hrh>
 
 #include "../../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../../inc/emailtraceconfig.hrh"
 #include "../inc/fscrclsettingextensionuid.h"
 
 macro FSC_CHANGES
@@ -57,7 +58,6 @@
 
 USERINCLUDE             ../inc
 USERINCLUDE             ../../../../inc
-SYSTEMINCLUDE   	/epoc32/include/ecom
 
 APP_LAYER_SYSTEMINCLUDE
 
@@ -70,3 +70,7 @@
 LIBRARY                 avkon.lib
 LIBRARY                 cmaillogger.lib
 
+
+#ifdef TRACE_INTO_FILE
+LIBRARY                 flogger.lib
+#endif // TRACE_INTO_FILE
--- a/emailservices/emailclientapi/group/emailclientapi.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailclientapi/group/emailclientapi.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -18,6 +18,8 @@
 
 #include <platform_paths.hrh>
 #include "../inc/emailclientapiimpl.hrh"
+#include "../../../inc/emailtraceconfig.hrh"
+
 
 TARGET          emailclientapi.dll
 TARGETTYPE      PLUGIN
@@ -26,7 +28,7 @@
 
 VENDORID        VID_DEFAULT
 
-SOURCEPATH 		../src
+SOURCEPATH      ../src
 SOURCE          emailclientapiimpl.cpp
 SOURCE          emailinterfacefactoryimpl.cpp
 SOURCE          implproxy.cpp
@@ -37,15 +39,15 @@
 SOURCE          emailmessage.cpp
 SOURCE          emailmailboxcache.cpp
 SOURCE          messageiterator.cpp
-SOURCE 			emailcontent.cpp
-SOURCE 			emailmessagesearch.cpp 
-SOURCE 			emailattachment.cpp 
-SOURCE			emailtextcontent.cpp
-SOURCE 			emailmultipart.cpp
+SOURCE          emailcontent.cpp
+SOURCE          emailmessagesearch.cpp 
+SOURCE          emailattachment.cpp 
+SOURCE          emailtextcontent.cpp
+SOURCE          emailmultipart.cpp
 
 //user include
-USERINCLUDE	  ../inc
-USERINCLUDE   ../../../inc
+USERINCLUDE     ../inc
+USERINCLUDE     ../../../inc
 
 //system include
 
@@ -62,5 +64,10 @@
 LIBRARY ECom.lib
 LIBRARY FSFWCommonLib.lib
 LIBRARY FSMailFramework.lib
-LIBRARY efsrv.lib viewcli.lib
+LIBRARY efsrv.lib
+LIBRARY viewcli.lib
+LIBRARY estor.lib
 
+#ifdef TRACE_INTO_FILE
+LIBRARY flogger.lib
+#endif // TRACE_INTO_FILE
--- a/emailservices/emailclientapi/inc/emailclientapiimpl.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailclientapi/inc/emailclientapiimpl.h	Tue Feb 02 00:02:40 2010 +0200
@@ -19,7 +19,7 @@
 #define EMAILCLIENTAPIIMPL_H
 
 
-#include <ecom/ImplementationInformation.h> 
+#include <ecom/implementationinformation.h> 
 #include "emailapiutils.h"
 #include "cfsmailcommon.h"
 //#include "emailinternalclientapi.h"
--- a/emailservices/emailclientapi/inc/emailfolder.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailclientapi/inc/emailfolder.h	Tue Feb 02 00:02:40 2010 +0200
@@ -19,7 +19,7 @@
 #define CEMAILFOLDER_H
 
 #include <emailapidefs.h>
-#include "cfsmailcommon.h"
+#include "CFSMailCommon.h"
 #include <memailfolder.h>
 #include "mfsmaileventobserver.h"
 
--- a/emailservices/emailclientapi/inc/emailinterfacefactoryimpl.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailclientapi/inc/emailinterfacefactoryimpl.h	Tue Feb 02 00:02:40 2010 +0200
@@ -42,9 +42,26 @@
     /** @see CEmailInterfaceFactory::InterfaceL */
     virtual MEmailInterface* InterfaceL(  const TInt aInterfaceId );
     
+private:
+    enum TEmailUidAppendRemoveMode
+        {
+        EEmailUidModeAppend,
+        EEmailUidModeRemove,
+        };
+    
+    /**
+    * Registers/removes application UID to/from P&S so that the application
+    * can be shutdown during Email IAD update. Update may fail if any
+    * application is using some Email services during the update.
+    * Application UID is removed from the list in destructor.
+    * @param aMode Is the current process UID added or removed from the list
+    */
+    void AppendOrRemoveUidL( const TEmailUidAppendRemoveMode aMode );
+
 private:    
-    // c++ constructor
+    // c++ constructor and 2nd phase constructor
     CEmailInterfaceFactoryImpl();
+    void ConstructL();
 };
 
 #endif // EMAILINTERFACEFACTORY_H
--- a/emailservices/emailclientapi/inc/emailmailbox.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailclientapi/inc/emailmailbox.h	Tue Feb 02 00:02:40 2010 +0200
@@ -18,7 +18,7 @@
 #ifndef EMAILMAILBOX_H
 #define EMAILMAILBOX_H
 
-#include "cfsmailcommon.h"
+#include "CFSMailCommon.h"
 #include <memailmailbox.h>
 #include "mfsmaileventobserver.h"
 #include "mfsmailrequestobserver.h"
--- a/emailservices/emailclientapi/inc/messageiterator.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailclientapi/inc/messageiterator.h	Tue Feb 02 00:02:40 2010 +0200
@@ -18,7 +18,7 @@
 #ifndef CMESSAGEITERATOR_H
 #define CMESSAGEITERATOR_H
                                                                              
-#include <MMessageIterator.h>                                                                             
+#include <mmessageiterator.h>                                                                             
 #include "emailapidefs.h"
 #include "CFSMailCommon.h"
 
--- a/emailservices/emailclientapi/src/emailfolder.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailclientapi/src/emailfolder.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -182,6 +182,7 @@
         aSubfolders.AppendL( folder );
         }
     CleanupStack::Pop();    // folders
+    folders.Close();
     return res;
     }
 
--- a/emailservices/emailclientapi/src/emailinterfacefactoryimpl.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailclientapi/src/emailinterfacefactoryimpl.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -15,6 +15,9 @@
 *
 */
 
+#include <e32property.h>                // RProperty
+#include <s32mem.h>                     // RDesRead/WriteStream
+
 #include "emailinterfacefactoryimpl.h"
 #include "emailcontent.h"
 #include "CFSMailClient.h"
@@ -22,8 +25,10 @@
 #include "emailclientapiimpl.h"
 #include "emailaddress.h"
 #include "emailmessagesearch.h"
+#include "emailshutdownconst.h"
 
 _LIT( KEmailImplPanic, "Email client API" );
+const TInt KEmailUidExtraBuffer = 2 * KEmailPlatformApiUidItemSize;
 
 // ---------------------------------------------------------------------------
 // Email client API panic wrapper
@@ -43,6 +48,9 @@
 CEmailInterfaceFactoryImpl* CEmailInterfaceFactoryImpl::NewL()
     {
     CEmailInterfaceFactoryImpl* self = new (ELeave) CEmailInterfaceFactoryImpl();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
     return self;
     }
     
@@ -52,6 +60,7 @@
 //
 CEmailInterfaceFactoryImpl::~CEmailInterfaceFactoryImpl()
     {
+    TRAP_IGNORE( AppendOrRemoveUidL( EEmailUidModeRemove ) );
     }
 
 // ---------------------------------------------------------------------------
@@ -62,7 +71,20 @@
     CEmailInterfaceFactory()
     {
     }
-    
+
+// ---------------------------------------------------------------------------
+// CEmailInterfaceFactoryImpl::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CEmailInterfaceFactoryImpl::ConstructL()
+    {
+	// This leaves if related P&S keys are not defined by EmailServerMonitor,
+	// so EmailServerMonitor need to be started before using client API.
+	// TRAP_IGNORE should be removed after EmailServerMonitor is added to
+	// starter list.
+    TRAP_IGNORE( AppendOrRemoveUidL( EEmailUidModeAppend ) );
+    }
+
 // ---------------------------------------------------------------------------
 // CEmailInterfaceFactoryImpl::InterfaceL
 // ---------------------------------------------------------------------------
@@ -90,4 +112,113 @@
     return interface;
     }
 
+// ---------------------------------------------------------------------------
+// CEmailInterfaceFactoryImpl::AppendOrRemoveUidL
+// ---------------------------------------------------------------------------
+//
+void CEmailInterfaceFactoryImpl::AppendOrRemoveUidL(
+        const TEmailUidAppendRemoveMode aMode )
+    {
+    // Read buffer length
+    TInt bufLength( 0 );
+    User::LeaveIfError( RProperty::Get( KEmailShutdownPsCategory,
+                                        EEmailPsKeyPlatformApiAppsToCloseLength,
+                                        bufLength ) );
+
+    // Allocate buffer for reading and then read the list of UIDs from P&S.
+    // Adding some extra buffer just in case the size key and actual list
+    // are out of sync. This shouldn't happen, but you never know.
+    HBufC8* readBuf = HBufC8::NewLC( bufLength + KEmailUidExtraBuffer );
+    TPtr8 readPtr = readBuf->Des();
+    
+    User::LeaveIfError( RProperty::Get( KEmailShutdownPsCategory,
+                                        EEmailPsKeyPlatformApiAppsToClose,
+                                        readPtr ) );
+    
+    // For writing get the size of the original buffer + room for our own UID
+    // if needed
+    TInt writeBufSize = readPtr.Length();
+    if( aMode == EEmailUidModeAppend )
+        {
+        writeBufSize += KEmailPlatformApiUidItemSize;
+        }
+    
+    HBufC8* writeBuf = HBufC8::NewLC( writeBufSize );
+    TPtr8 writePtr = writeBuf->Des();
+
+    // Read and write streams used to read/write the UIDs from/to descriptors
+    RDesReadStream readStream( readPtr );
+    CleanupClosePushL( readStream );
+
+    RDesWriteStream writeStream( writePtr );
+    CleanupClosePushL( writeStream );
+
+    // Get our own process UID
+    RProcess ownProcess;
+    TUid ownUid = ownProcess.SecureId();
+    ownProcess.Close();
+
+    TInt itemsCount = readPtr.Length() / KEmailPlatformApiUidItemSize;
+
+    TBool ownUidFound = EFalse;
+    TInt writeLength = 0;
+    for ( TInt ii = 0;ii < itemsCount; ++ii )
+        {
+        // Read next UID from the stream
+        TUid item = TUid::Uid( readStream.ReadInt32L() );
+        
+        // We can skip our own UID. If we are removing, then we don't want
+        // our UID to be written. If we are adding, we don't need to set
+        // the new values as our UID already exists in the list.
+        if( item == ownUid )
+            {
+            ownUidFound = ETrue;
+            if( aMode == EEmailUidModeAppend )
+                {
+                // Our own UID is already in the list, so no need to update
+                // the list. Hence we can quit here.
+                break;
+                }
+            }
+        else
+            {
+            writeStream.WriteInt32L( item.iUid );
+            writeLength += KEmailPlatformApiUidItemSize;
+            }
+        }
+    
+    // If we are appending our UID and it wasn't found from the list,
+    // write it to the stream
+    if( aMode == EEmailUidModeAppend && !ownUidFound )
+        {
+        writeStream.WriteInt32L( ownUid.iUid );
+        writeLength += KEmailPlatformApiUidItemSize;
+        }
+
+    // Set correct length for the write ptr buffer as it might not be
+    // updated correctly by the write stream
+    writePtr.SetLength( writeLength );
+
+    // Set new values to P&S only if something has changed, so either:
+    // 1) We are appending our UID and it didn't exist before
+    // 2) We are removing our UID and it did exist before
+    if( ( aMode == EEmailUidModeAppend && !ownUidFound ) ||
+        ( aMode == EEmailUidModeRemove && ownUidFound ) )
+        {
+        // Write first the UID list as it is more probable to fail, writing
+        // plain integer value shouldn't fail in any case. This way these
+        // values stay in sync also in case of error, as the list length
+        // gets updated only if the list itself is updated succesfully.
+        User::LeaveIfError( RProperty::Set( KEmailShutdownPsCategory,
+                        EEmailPsKeyPlatformApiAppsToClose,
+                        writePtr ) );
+
+        User::LeaveIfError( RProperty::Set( KEmailShutdownPsCategory,
+                        EEmailPsKeyPlatformApiAppsToCloseLength,
+                        writeLength ) );
+        }
+    
+    CleanupStack::PopAndDestroy( 4, readBuf );
+    }
+
 // End of file.
--- a/emailservices/emailclientapi/src/emailmailbox.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailclientapi/src/emailmailbox.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -163,6 +163,8 @@
         CleanupStack::Pop();    // folder
         }
     CleanupStack::Pop();    // folders
+    folders.Close(); // close but don't delete folders because they are
+                     // owned by CEmailFolder
     return res;
     }
 
--- a/emailservices/emailframework/commonlib/group/FSFWCommonLib.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailframework/commonlib/group/FSFWCommonLib.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -16,10 +16,9 @@
 */
 
 #include "../../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../../inc/emailtraceconfig.hrh"
 #include <data_caging_paths.hrh>
-//<cmail>
 #include <platform_paths.hrh>
-//</cmail>
 
 TARGET        FSFWCommonLib.dll
 TARGETTYPE    dll
@@ -52,14 +51,18 @@
 SOURCE        emailcalendarinfoimpl.cpp
 SOURCE        cemailextensionbase.cpp
 
-LIBRARY  	  euser.lib
-LIBRARY	 	  estor.lib 
-LIBRARY  	  efsrv.lib
-LIBRARY  	  bafl.lib
-LIBRARY  	  apgrfx.lib
-LIBRARY    	  apmime.lib
-LIBRARY  	  ecom.lib
-LIBRARY 	  cntmodel.lib
-LIBRARY           cmaillogger.lib
-LIBRARY     eikcore.lib
-LIBRARY     avkon.lib
\ No newline at end of file
+LIBRARY       euser.lib
+LIBRARY       estor.lib 
+LIBRARY       efsrv.lib
+LIBRARY       bafl.lib
+LIBRARY       apgrfx.lib
+LIBRARY       apmime.lib
+LIBRARY       ecom.lib
+LIBRARY       cntmodel.lib
+LIBRARY       cmaillogger.lib
+LIBRARY       eikcore.lib
+LIBRARY       avkon.lib
+
+#ifdef TRACE_INTO_FILE
+LIBRARY       flogger.lib
+#endif // TRACE_INTO_FILE
--- a/emailservices/emailframework/commonlib/inc/CFSMailAddress.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailframework/commonlib/inc/CFSMailAddress.h	Tue Feb 02 00:02:40 2010 +0200
@@ -23,9 +23,7 @@
 #include <e32std.h>
 #include <e32base.h>
 
-//<cmail>
-#include "cfsmailcommon.h"
-//</cmail>
+#include "CFSMailCommon.h"
 
 /**
  *  email address handling
--- a/emailservices/emailframework/commonlib/inc/CFSMailBox.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailframework/commonlib/inc/CFSMailBox.h	Tue Feb 02 00:02:40 2010 +0200
@@ -19,7 +19,7 @@
 #ifndef CFSMAILBOX_H
 #define CFSMAILBOX_H
 
-#include "cfsmailboxbase.h"
+#include "CFSMailBoxBase.h"
 
 // forward declarations
 class CFSMailPlugin;
--- a/emailservices/emailframework/commonlib/inc/CFSMailBoxBase.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailframework/commonlib/inc/CFSMailBoxBase.h	Tue Feb 02 00:02:40 2010 +0200
@@ -19,7 +19,7 @@
 #ifndef __CFSMAILBOXBASE_H
 #define __CFSMAILBOXBASE_H
 
-#include "cfsmailfolder.h"
+#include "CFSMailFolder.h"
 #include "mmrinfoprocessor.h"
 #include "cemailextensionbase.h"
 
--- a/emailservices/emailframework/commonlib/inc/CFSMailFolder.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailframework/commonlib/inc/CFSMailFolder.h	Tue Feb 02 00:02:40 2010 +0200
@@ -19,7 +19,7 @@
 #ifndef __FSMAILFOLDER_H
 #define __FSMAILFOLDER_H
 
-#include "cfsmailfolderbase.h"
+#include "CFsMailFolderBase.h"
 #include "mfsmailiterator.h"
 
 // forward declarations
@@ -34,14 +34,14 @@
 class CFSMailFolder : public CFSMailFolderBase
 {
  public:
-  	  
+      
     /**
      * Two-phased constructor.
      *
      * @param aFolderId folder id in plugin containing folder
      */
      IMPORT_C static CFSMailFolder* NewL( TFSMailMsgId aFolderId );
-  	
+    
     /**
      * Two-phased constructor.
      *
@@ -65,8 +65,8 @@
      * @return email list iterator, ownership is transferred to user
      */
      IMPORT_C MFSMailIterator* ListMessagesL(
-        						const TFSMailDetails aDetails,
-        						const RArray<TFSMailSortCriteria>& aSorting);
+                                const TFSMailDetails aDetails,
+                                const RArray<TFSMailSortCriteria>& aSorting);
     /**
      * removes given message from folder
      *
@@ -79,7 +79,7 @@
      *
      * @param aSubFolderList list of subfolders
      */
-  	 IMPORT_C void GetSubFoldersL(RPointerArray<CFSMailFolder>& aSubFolders);
+     IMPORT_C void GetSubFoldersL(RPointerArray<CFSMailFolder>& aSubFolders);
 
     /**
      * method launches fetching of messages given by user from server
@@ -89,9 +89,9 @@
      * @param aObserver request observer for conveying fetching progress
      *  events to user
      */
-	 IMPORT_C TInt FetchMessagesL( 	const RArray<TFSMailMsgId>& aMessageIds,
-     				 				TFSMailDetails aDetails,
-     				 				MFSMailRequestObserver& aObserver );
+     IMPORT_C TInt FetchMessagesL(  const RArray<TFSMailMsgId>& aMessageIds,
+                                    TFSMailDetails aDetails,
+                                    MFSMailRequestObserver& aObserver );
     /**
      * method to check if this folder allows copying from given folder type
      *
@@ -128,21 +128,21 @@
     /**
      * C++ default constructor.
      */
-  	 CFSMailFolder();
+     CFSMailFolder();
 
 private:
 
-  	/**
+    /**
      * Two-phased constructor
      */
-	void ConstructL( TFSMailMsgId aFolderId );
+    void ConstructL( TFSMailMsgId aFolderId );
 
 private: // data
 
     /**
      * request handler for plugin requests
      */
-	 CFSMailRequestHandler* 	iRequestHandler;	
+     CFSMailRequestHandler*     iRequestHandler;    
 
 };
 
--- a/emailservices/emailframework/commonlib/inc/CFSMailFolderBase.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailframework/commonlib/inc/CFSMailFolderBase.h	Tue Feb 02 00:02:40 2010 +0200
@@ -19,7 +19,7 @@
 #ifndef __FSMAILFOLDERBASE_H
 #define __FSMAILFOLDERBASE_H
 
-#include "cfsmailmessage.h"
+#include "CFsMailMessage.h"
 #include "cemailextensionbase.h"
 
 /**
@@ -31,14 +31,14 @@
 class CFSMailFolderBase : public CExtendableEmail
 {
  public:
-  	
+    
     /**
      * Two-phased constructor.
      *
      * @param aFolderId folder id in plugin containing folder
      */
      IMPORT_C static CFSMailFolderBase* NewL(const TFSMailMsgId aFolderId);
-  	
+    
     /**
      * Two-phased constructor.
      *
@@ -111,7 +111,7 @@
      */
      IMPORT_C TFSMailMsgId GetMailBoxId() const;
 
- 	/**
+    /**
      * folder mailbox id mutator
      *
      * @param aMailBoxId mailbox id to be set
@@ -182,7 +182,7 @@
      * blocking is done
      */
      IMPORT_C void BlockCopyFromL( RArray<TFSFolderType> aFolderTypes, 
-									TFSMailBoxStatus aMailBoxStatus );
+                                    TFSMailBoxStatus aMailBoxStatus );
     /**
      * blocks moving to this folder from given folder types
      *
@@ -191,81 +191,81 @@
      * blocking is done
      */
      IMPORT_C void BlockMoveFromL( RArray<TFSFolderType> aFolderTypes, 
-									TFSMailBoxStatus aMailBoxStatus );
+                                    TFSMailBoxStatus aMailBoxStatus );
 
 protected:
 
     /**
      * C++ default constructor.
      */
-  	 CFSMailFolderBase();
+     CFSMailFolderBase();
 
- 	/**
+    /**
      * folder id
      */
-	 TFSMailMsgId             iFolderId;
+     TFSMailMsgId             iFolderId;
 
-	/**
+    /**
      * blocked folders in copying
      */
-	 RArray<TFSFolderType>    iCopyOfflineBlocked;
-	 RArray<TFSFolderType>    iCopyOnlineBlocked;
+     RArray<TFSFolderType>    iCopyOfflineBlocked;
+     RArray<TFSFolderType>    iCopyOnlineBlocked;
 
-	/**
+    /**
      * blocked folders in moving
      */
-	 RArray<TFSFolderType>    iMoveOfflineBlocked;
-	 RArray<TFSFolderType>    iMoveOnlineBlocked;
+     RArray<TFSFolderType>    iMoveOfflineBlocked;
+     RArray<TFSFolderType>    iMoveOnlineBlocked;
 
 private:
 
-  	/**
+    /**
      * Two-phased constructor
      */
-	void ConstructL( const TFSMailMsgId aFolderId );
+    void ConstructL( const TFSMailMsgId aFolderId );
 
 private: // data
 
-	/**
+    /**
      * folder name
      */
-	 HBufC*                   iFolderName;
+     HBufC*                   iFolderName;
 
- 	/**
+    /**
      * folder type
      */
-	 TFSFolderType            iFolderType;
+     TFSFolderType            iFolderType;
 
- 	/**
+    /**
      * folder total message count 
      */
-	 TUint                 	  iMessageCount;
+     TUint                    iMessageCount;
 
- 	/**
+    /**
      * folder unread message count 
      */
-	 TUint                 	  iUnreadMessageCount;
+     TUint                    iUnreadMessageCount;
 
- 	/**
+    /**
      * folder unseen message count 
      */
-	 TUint                 	  iUnseenCount;
+     TUint                    iUnseenCount;
 
- 	/**
+    /**
      * mailbox id
      */
-	 TFSMailMsgId             iMailBoxId;
+     TFSMailMsgId             iMailBoxId;
 
 
- 	/**
+    /**
      * parent folder id
      */
-	 TFSMailMsgId             iParentFolderId;
+     TFSMailMsgId             iParentFolderId;
 
- 	/**
+    /**
      * subfolder count 
      */
-	 TUint                 	  iSubFolderCount;
+     TUint                    iSubFolderCount;
 };
 
 #endif // __FSMAILFOLDERBASE_H
--- a/emailservices/emailframework/commonlib/inc/CFSMailMessage.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailframework/commonlib/inc/CFSMailMessage.h	Tue Feb 02 00:02:40 2010 +0200
@@ -19,7 +19,7 @@
 #define __CFSMAILMESSAGE_H
 
 //<cmail>
-#include "cfsmailmessagepart.h"
+#include "CFSMailMessagePart.h"
 //</cmail>
 
 /**
@@ -37,7 +37,7 @@
      *
      * @param aMessageId message id in plugin containing email
      */
-   	 IMPORT_C static CFSMailMessage* NewL( TFSMailMsgId aMessageId );
+     IMPORT_C static CFSMailMessage* NewL( TFSMailMsgId aMessageId );
     
     /**
      * Two-phased constructor.
@@ -46,7 +46,7 @@
      */
      IMPORT_C static CFSMailMessage* NewLC( TFSMailMsgId aMessageId );
 
-   	/**
+    /**
      * saves this message
      */
      IMPORT_C void SaveMessageL();
@@ -54,7 +54,7 @@
     /**
      * destructor
      */  
-  	 IMPORT_C ~CFSMailMessage();
+     IMPORT_C ~CFSMailMessage();
 
     /**
      * Adds new attachment to this email.
@@ -81,27 +81,27 @@
                                                      const TDesC8& aMimeType );
 
      /**
-	 * Returns a flat list of message parts that can be handled as attachments.
-	 * Excludes message parts that are multipart and parts that are considered
-	 * plain text or html body.
-	 * 
-	 * @param aParts contains flat list of attachments
-	 */        
-	 IMPORT_C void AttachmentListL(RPointerArray<CFSMailMessagePart>& aParts);
+     * Returns a flat list of message parts that can be handled as attachments.
+     * Excludes message parts that are multipart and parts that are considered
+     * plain text or html body.
+     * 
+     * @param aParts contains flat list of attachments
+     */        
+     IMPORT_C void AttachmentListL(RPointerArray<CFSMailMessagePart>& aParts);
 
-	/**
-	 * Returns plain text body part for this email or NULL if not found.
-	 * 
-	 * @return plain text email body part, ownership is transferred to user
-	 */        
-	 IMPORT_C CFSMailMessagePart* PlainTextBodyPartL();
+    /**
+     * Returns plain text body part for this email or NULL if not found.
+     * 
+     * @return plain text email body part, ownership is transferred to user
+     */        
+     IMPORT_C CFSMailMessagePart* PlainTextBodyPartL();
 
-	/**
-	 * Returns html body part for this message or NULL if not found.
-	 * 
-	 * @return html email body part, ownership is transferred to user
-	 */        
-	 IMPORT_C CFSMailMessagePart* HtmlBodyPartL();
+    /**
+     * Returns html body part for this message or NULL if not found.
+     * 
+     * @return html email body part, ownership is transferred to user
+     */        
+     IMPORT_C CFSMailMessagePart* HtmlBodyPartL();
 
     /**
      * Returns ETrue if this part is actually a message.
@@ -109,9 +109,9 @@
      * 
      * @return true if this message part is a message
      */        
-	 IMPORT_C TBool IsMessageL() const;
+     IMPORT_C TBool IsMessageL() const;
 
-	 /**
+     /**
      * Returns a flat list of message parts that can be handled as attachments.
      * Excludes message parts that are multipart and parts that are considered
      * plain text or html body.
@@ -127,12 +127,12 @@
     /**
      * C++ default constructor.
      */
-  	CFSMailMessage();
+    CFSMailMessage();
 
- 	/**
+    /**
      * Two-phased constructor
      */
-  	 void ConstructL( TFSMailMsgId aMessageId );
+     void ConstructL( TFSMailMsgId aMessageId );
 
     /**
      * Returns content-type parameters and their associated values.
@@ -140,10 +140,10 @@
      * 
      * @return content type parameters
      */
-	CDesCArray& ContentTypeParameters();
+    CDesCArray& ContentTypeParameters();
 
  private: // data
-	 
+     
 };
 
 
--- a/emailservices/emailframework/commonlib/inc/CFSMailMessagePart.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailframework/commonlib/inc/CFSMailMessagePart.h	Tue Feb 02 00:02:40 2010 +0200
@@ -24,7 +24,7 @@
 #include <badesca.h>
 
 //<cmail>
-#include "cfsmailmessagebase.h"
+#include "CFSMailMessageBase.h"
 #include "mmrinfoobject.h"
 //</cmail>
 
@@ -334,7 +334,7 @@
      */
      IMPORT_C TBool IsMRInfoSet();
 
-	/**
+    /**
      * Sets attachment name for email part. Full path can be
      * given as input even though only filename is saved. 
      * 
@@ -484,7 +484,7 @@
 
 protected: // data
 
-  	/**
+    /**
      * email fetch from email server status
      */
      TFSPartFetchState                  iMessagePartsStatus;
--- a/emailservices/emailframework/commonlib/inc/mmrinfoprocessor.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailframework/commonlib/inc/mmrinfoprocessor.h	Tue Feb 02 00:02:40 2010 +0200
@@ -21,7 +21,7 @@
 
 #include <e32base.h>
 //<cmail>
-#include "cfsmailcommon.h"
+#include "CFSMailCommon.h"
 //</cmail>
 
 // Forward declaration
--- a/emailservices/emailframework/commonlib/src/CFSMailRequestHandler.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailframework/commonlib/src/CFSMailRequestHandler.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -2,9 +2,9 @@
 * Copyright (c) 2007-2008 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 "Symbian Foundation License v1.0"
+* under the terms of "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
-* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
 * Initial Contributors:
 * Nokia Corporation - initial contribution.
--- a/emailservices/emailframework/group/FSMailFramework.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailframework/group/FSMailFramework.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -17,7 +17,7 @@
 
 #include <platform_paths.hrh>
 #include <data_caging_paths.hrh>
-
+#include "../../../inc/emailtraceconfig.hrh"
 #include "../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
 
 TARGET        FSMailFramework.dll
@@ -33,31 +33,31 @@
 
 USERINCLUDE ../../../inc
 APP_LAYER_SYSTEMINCLUDE
-SYSTEMINCLUDE 	/epoc32/include/variant
+SYSTEMINCLUDE   /epoc32/include/variant
 
 
-USERINCLUDE   	../inc
-USERINCLUDE   	../commonlib/inc
-SOURCEPATH    	../src
-SOURCE        	CFSFWImplementation.cpp
-SOURCE        	CFSMailClient.cpp
-SOURCE        	CFSMailPluginManager.cpp
-SOURCE        	CFSMailBrand.cpp
+USERINCLUDE     ../inc
+USERINCLUDE     ../commonlib/inc
+SOURCEPATH      ../src
+SOURCE          CFSFWImplementation.cpp
+SOURCE          CFSMailClient.cpp
+SOURCE          CFSMailPluginManager.cpp
+SOURCE          CFSMailBrand.cpp
 SOURCE          CFSMailBrandManagerImpl.cpp
 SOURCE          CFSClientAPIRequestHandler.cpp 
 SOURCE          CFSClientAPI.cpp
 
-LIBRARY 		bafl.lib
-LIBRARY  		euser.lib
-LIBRARY	 		estor.lib 
-LIBRARY  		efsrv.lib
-LIBRARY  		ecom.lib
-LIBRARY     	gdi.lib
-LIBRARY     	egul.lib
-LIBRARY     	aknicon.lib
+LIBRARY         bafl.lib
+LIBRARY         euser.lib
+LIBRARY         estor.lib 
+LIBRARY         efsrv.lib
+LIBRARY         ecom.lib
+LIBRARY         gdi.lib
+LIBRARY         egul.lib
+LIBRARY         aknicon.lib
 
-LIBRARY        	FSFWCommonLib.lib
-LIBRARY			centralrepository.lib  
+LIBRARY         FSFWCommonLib.lib
+LIBRARY         centralrepository.lib  
 
 // <gmail_brand_issue>
 LIBRARY         ETel.lib   // RTelServer
@@ -67,6 +67,9 @@
 // </gmail_brand_issue>
 LIBRARY         cmaillogger.lib
 
+#ifdef TRACE_INTO_FILE
+LIBRARY         flogger.lib
+#endif // TRACE_INTO_FILE
 
 
 SOURCEPATH      ../data
@@ -81,3 +84,5 @@
 MACRO DEBUGLOGGER_LOG_DEBUG
 MACRO DEBUGLOGGER_DEBUG_ASSERTS
 #endif
+
+LIBRARY       flogger.lib
--- a/emailservices/emailframework/inc/CFSMailClient.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailframework/inc/CFSMailClient.h	Tue Feb 02 00:02:40 2010 +0200
@@ -25,49 +25,49 @@
 #include "CFSMailClient.hrh"
 #include "cemailextensionbase.h"
 
-#include "mfsmailbrandmanager.h"
+#include "MFSMailBrandManager.h"
 #include "cfsmailplugin.h"
 
 
 class CFSFWImplementation;
 class CFSMailPluginManager;
 
-	/**
-	* @mainpage Freestyle Email API
-	*
-	* @section sec1 Introduction
-	*
-	*    This is the mail API and framework used by the Freestyle email
-	*    client. It provides access to the message store for reading email
-	*    and to the sync engine for starting and stopping synchronizations.
-	*
-	* @section sec2 Typical Usage From UI
-	*
-	*  	// Initialize the access to the mail framework
-	*  	CFSMailClient* mail = CFSMailClient::NewL();
-	*  	CleanupClosePushL(*mail);
+    /**
+    * @mainpage Freestyle Email API
+    *
+    * @section sec1 Introduction
+    *
+    *    This is the mail API and framework used by the Freestyle email
+    *    client. It provides access to the message store for reading email
+    *    and to the sync engine for starting and stopping synchronizations.
+    *
+    * @section sec2 Typical Usage From UI
+    *
+    *   // Initialize the access to the mail framework
+    *   CFSMailClient* mail = CFSMailClient::NewL();
+    *   CleanupClosePushL(*mail);
     * 
-	*  	// List mailboxes for user to select which one to open
-	*	RPointerArray<CFSMailBox> mailBoxes;
-	*	mailBoxes.Reset();
-	*	TFSMailMsgId plugin; // null id if all mailboxes required
-	*	mail->ListMailBoxes(plugin,mailBoxes);
+    *   // List mailboxes for user to select which one to open
+    *   RPointerArray<CFSMailBox> mailBoxes;
+    *   mailBoxes.Reset();
+    *   TFSMailMsgId plugin; // null id if all mailboxes required
+    *   mail->ListMailBoxes(plugin,mailBoxes);
     *   // Lets select the first one this time
-	*  	CFSMailBox * currentMailbox = mailboxes[0]; 
+    *   CFSMailBox * currentMailbox = mailboxes[0]; 
     * 
-	*   // list all mailbox folders for user
-	*   RPointerArray<CFSMailFolder> folders = currentMailBox->ListFolders( );
-	*
-	*   // or get default folder, for example inbox
-	*	TFSMailMsgId folderId;
-	*	folderId = mailBox->GetStandardFolderId( EFSInbox );
-	*  	CFSMailFolder* inbox = mail->GetFolderByUid(currentMailBox->GetId(),folderId);
-	*
-	*   // List messages in inbox
-	*   // select message details to be listed
-	*   TFSMailDetails details(EFSMsgDataStructure);
-    *	
-	*   // set sorting criteria
+    *   // list all mailbox folders for user
+    *   RPointerArray<CFSMailFolder> folders = currentMailBox->ListFolders( );
+    *
+    *   // or get default folder, for example inbox
+    *   TFSMailMsgId folderId;
+    *   folderId = mailBox->GetStandardFolderId( EFSInbox );
+    *   CFSMailFolder* inbox = mail->GetFolderByUid(currentMailBox->GetId(),folderId);
+    *
+    *   // List messages in inbox
+    *   // select message details to be listed
+    *   TFSMailDetails details(EFSMsgDataStructure);
+    *   
+    *   // set sorting criteria
     *   TFSMailSortCriteria criteria;
     *   criteria.iField = EFSMailSortByDate;
     *   criteria.iOrder = EFSMailAscending;
@@ -75,30 +75,30 @@
     *   sorting.Append(criteria);
     *
     *   // get email list iterator from plugin
-	*   MFSMailIterator* iterator = folder->ListMessagesL(details,sorting);
+    *   MFSMailIterator* iterator = folder->ListMessagesL(details,sorting);
     *
     *   //  list all messages from folder
     *   TFSMailMsgId currentMessageId; // first call contains NULL id as begin id
     *   RPointerArray<CFSMailMessage> messages;
     *   messages.Reset();
     *   iterator->NextL(currentMessageId, folder->GetMessageCount(), messages);
-    *		
-	*   // Show the first 5 messages to in the UI
-	*   for(TInt i=0;i<messages.Count() && i<5;i++)
-	*   {
+    *       
+    *   // Show the first 5 messages to in the UI
+    *   for(TInt i=0;i<messages.Count() && i<5;i++)
+    *   {
     *       MyHeaderShowMethod(messages[i]->GetSender().GetEmailAddress(),
     *                          messages[i]->GetSubject()
     *                          messages[i]->GetDate());
     *
     *       // get email body
-	*       CFSMailMessagePart* body = messages[i]->PlainTextBodyPartL();
+    *       CFSMailMessagePart* body = messages[i]->PlainTextBodyPartL();
     *       if(body)
     *       {
     *           TBuf<n> text;
     *           TInt startOffset = 0;
     *           body->GetContentToBufferL(text,startOffset);
     *           MyPlainTextBodyShowMethod(text);
-    *           delete body;		
+    *           delete body;        
     *       }
     *
     *       //list email attachments
@@ -111,54 +111,54 @@
     *       }
     *       attachments.ResetAndDestroy();
     *   }
-	*
+    *
     *   // clean iterator and tables
     *   messages.ResetAndDestroy();
     *   delete iterator;
     *   sorting.Reset();
     *   delete folder;
     *
-	*   // User should call close when terminating mail framework usage
-	*   // when shutting down application close mail client singleton
-	*   CleanupStack::PopAndDestroy(mail);
-	*
-	* @section sec3 Observing Email Events.
-	*
-	*   // To be able to observe events an user has to
-	*   // implement MFSMailEventObserver interface.
-	*   // Here the COwnMailObserver class implements the interface.
-	*   COwnMailObserver* ownObserver = COwnMailObserver::NewL();
-	*
-	*   // Register to observe mail store events
-	*   mail->AddObserverL(*ownObserver);
-	*
-	*   // Now callbacks are done via the EventL function defined
-	*   // in the MFSMailEventObserver and implemented in this case
-	*   // by the COwnMailObserver
-	*
-	*   // When user does not wish to observe events anymore
-	*   // he has to unregister
-	*   mail->RemoveObserver( *ownObserver );
-	*
-	*   // Remember that it must be done for each observer
-	*   // in the end of the observation because the AddObserverL
-	*   // does not replace the observer
-	*
-	* @section sec_groups Classes
-	*
-	* The following classes form the public API of the frame work.
-	*
-	* @section sec_info More Information
-	*
-	* Copyright &copy; 2006 Nokia.  All rights reserved.
-	*
-	* This material, including documentation and any related computer programs, 
-	* is protected by copyright controlled by Nokia.  All rights are reserved.  
-	* Copying, including reproducing, storing, adapting or translating, any or 
-	* all of this material requires the prior written consent of Nokia.  This 
-	* material also contains confidential information which may not be disclosed 
-	* to others without the prior written consent of Nokia.
-	*/
+    *   // User should call close when terminating mail framework usage
+    *   // when shutting down application close mail client singleton
+    *   CleanupStack::PopAndDestroy(mail);
+    *
+    * @section sec3 Observing Email Events.
+    *
+    *   // To be able to observe events an user has to
+    *   // implement MFSMailEventObserver interface.
+    *   // Here the COwnMailObserver class implements the interface.
+    *   COwnMailObserver* ownObserver = COwnMailObserver::NewL();
+    *
+    *   // Register to observe mail store events
+    *   mail->AddObserverL(*ownObserver);
+    *
+    *   // Now callbacks are done via the EventL function defined
+    *   // in the MFSMailEventObserver and implemented in this case
+    *   // by the COwnMailObserver
+    *
+    *   // When user does not wish to observe events anymore
+    *   // he has to unregister
+    *   mail->RemoveObserver( *ownObserver );
+    *
+    *   // Remember that it must be done for each observer
+    *   // in the end of the observation because the AddObserverL
+    *   // does not replace the observer
+    *
+    * @section sec_groups Classes
+    *
+    * The following classes form the public API of the frame work.
+    *
+    * @section sec_info More Information
+    *
+    * Copyright &copy; 2006 Nokia.  All rights reserved.
+    *
+    * This material, including documentation and any related computer programs, 
+    * is protected by copyright controlled by Nokia.  All rights are reserved.  
+    * Copying, including reproducing, storing, adapting or translating, any or 
+    * all of this material requires the prior written consent of Nokia.  This 
+    * material also contains confidential information which may not be disclosed 
+    * to others without the prior written consent of Nokia.
+    */
 
 NONSHARABLE_CLASS(CFSMailClient) : public CExtendableEmail
 {
@@ -179,7 +179,7 @@
      * @return CFSMailClient pointer
      */
      IMPORT_C static CFSMailClient* NewL( TInt aConfiguration );
-  	
+    
     /**
      * Creates a new CFSMailClient singleton instance or increments
      * reference count if singleton already exists
@@ -215,7 +215,7 @@
      * @return mailbox object ( CFSMailBox ), ownership is transferred to user
      */
      IMPORT_C CFSMailBox* GetMailBoxByUidL( const TFSMailMsgId aMailBoxId);
-      	  		
+                
     /**
      * returns email folder object related to given folder id
      *
@@ -236,8 +236,8 @@
      *
      * @return email object (CFSMailMessage), ownership is transferred to user
      */
-	 IMPORT_C CFSMailMessage* GetMessageByUidL(const TFSMailMsgId aMailBoxId, const TFSMailMsgId aFolderId,
-	 										  const TFSMailMsgId aMessageId, const TFSMailDetails aDetails );	 										  
+     IMPORT_C CFSMailMessage* GetMessageByUidL(const TFSMailMsgId aMailBoxId, const TFSMailMsgId aFolderId,
+                                              const TFSMailMsgId aMessageId, const TFSMailDetails aDetails );                                             
     /**
      * deletes emails defined in message id list
      *
@@ -246,7 +246,7 @@
      * @param aMessageIds defines ids of email to be deleted
      */
      IMPORT_C void DeleteMessagesByUidL( const TFSMailMsgId aMailBoxId, const TFSMailMsgId aFolderId, 
-	 									 const RArray<TFSMailMsgId>& aMessageIds );
+                                         const RArray<TFSMailMsgId>& aMessageIds );
 
     /**
      * Deletes mail account. This asynchronous operation returns id that can
@@ -272,10 +272,10 @@
      * @return email list iterator, ownership is transferred to user
      */
      IMPORT_C MFSMailIterator* ListMessages(
-        						const TFSMailMsgId aMailBoxId,
-        						const TFSMailMsgId  aFolderId,
-        						const TFSMailDetails  aDetails,
-        						const RArray<TFSMailSortCriteria>& aSorting);
+                                const TFSMailMsgId aMailBoxId,
+                                const TFSMailMsgId  aFolderId,
+                                const TFSMailDetails  aDetails,
+                                const RArray<TFSMailSortCriteria>& aSorting);
 
     /**
      * returns branding manager to handle branding elements
@@ -345,24 +345,24 @@
 
     /**
      * get framework temp directory
-	 */
+     */
      IMPORT_C TDesC& GetTempDirL( );
 
     /**
      * clean framework temp directory
-	 */
+     */
      IMPORT_C void CleanTempDirL( );
 
     /**
      * cancels single pending asynchronous request
      *
      * @param aRequestId identifies request
-	 */
+     */
      IMPORT_C void CancelL( const TInt aRequestId );
 
     /**
      * cancels all pending asynchronous requests
-	 */
+     */
      IMPORT_C void CancelAllL( );
 
      /**
@@ -376,8 +376,8 @@
 public: // from  CExtendableEmail
 
     /**
-	 * @see CExtendableEmail::ReleaseExtension
-	 */
+     * @see CExtendableEmail::ReleaseExtension
+     */
     IMPORT_C virtual void ReleaseExtension( CEmailExtension* aExtension );
 
     /**
@@ -406,12 +406,12 @@
     /**
      * ConstructL
      */
-	 void ConstructL( TInt aConfiguration );
+     void ConstructL( TInt aConfiguration );
 
     /**
      * returns framework singleton instance if exists
      */
-	 static CFSMailClient* Instance();
+     static CFSMailClient* Instance();
 
     /**
      * increments reference count to framework singleton
@@ -425,13 +425,13 @@
 
  private: // data
 
-	/** framework singleton reference count */
+    /** framework singleton reference count */
     TInt                     iReferenceCount;
 
-	/** */
+    /** */
     CFSFWImplementation*     iFWImplementation;
-	 
-	/** branding manager pointer  */
+     
+    /** branding manager pointer  */
     MFSMailBrandManager*     iBrandManager;
 };
 
--- a/emailservices/emailframework/inc/CFSMailPlugin.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailframework/inc/CFSMailPlugin.h	Tue Feb 02 00:02:40 2010 +0200
@@ -20,7 +20,7 @@
 
 #include <ecom/ecom.h>
 
-#include "mfsmailrequestobserver.h"
+#include "MFSMailRequestObserver.h"
 #include "mfsmaileventobserver.h"
 #include "cfsmailbox.h"
 #include "cfsmailplugin.hrh"
@@ -69,7 +69,7 @@
      */
      static void ListImplementationsL( RPointerArray<CImplementationInformation>& aInfo );
 
-	/** MAILBOX HANDLING API */
+    /** MAILBOX HANDLING API */
 
     /**
      * Enables synchronization of identified mailbox. This means
@@ -90,7 +90,7 @@
      * in offline state like network error or scheduling.
      *
      * @param aMailBoxId mailbox id request is accessed to
-	 */
+     */
      virtual void GoOnlineL( const TFSMailMsgId& aMailBoxId ) = 0;
 
     /**
@@ -102,7 +102,7 @@
      * mailboxes also.
      *
      * @param aMailBoxId mailbox id request is accessed to
-	 */
+     */
      virtual void GoOfflineL( const TFSMailMsgId& aMailBoxId ) = 0;
 
     /**
@@ -128,7 +128,7 @@
      *        will receive progress notifications during the operation.
      * @param aRequestId identifies asynchronous request if parallel
      * requests exist
-	 */
+     */
      virtual void RefreshNowL( const TFSMailMsgId& aMailBoxId,
                                MFSMailRequestObserver& aOperationObserver,
                                TInt aRequestId ) = 0;
@@ -177,8 +177,8 @@
      *
      * @return true/false
      */
-     virtual TBool MailboxHasCapabilityL( 	TFSMailBoxCapabilities aCapability,
-	 										TFSMailMsgId aMailBoxId ) = 0;
+     virtual TBool MailboxHasCapabilityL(   TFSMailBoxCapabilities aCapability,
+                                            TFSMailMsgId aMailBoxId ) = 0;
 
     /**
      * lists existing mailboxes contained by plugin
@@ -187,12 +187,12 @@
      *        table owned by user
      * to this table owned by framework
      */
-  	 virtual void ListMailBoxesL( RArray<TFSMailMsgId>& aMailboxes) = 0;
+     virtual void ListMailBoxesL( RArray<TFSMailMsgId>& aMailboxes) = 0;
 
     /**
      * returns email mailbox object related to given mailbox id
      * mailbox data set by plugin :
-     *				 - mailbox id
+     *               - mailbox id
      *               - mailbox name
      *               - branding id
      *               - mailbox capabilities
@@ -211,9 +211,9 @@
      * used to report progress notifications during the operation.
      * @param aRequestId asynchronous request id
      */
-     virtual void DeleteMailBoxByUidL(	const TFSMailMsgId& aMailBoxId,
-	                                    MFSMailRequestObserver& aOperationObserver,
-	                                    const TInt aRequestId ) = 0;
+     virtual void DeleteMailBoxByUidL(  const TFSMailMsgId& aMailBoxId,
+                                        MFSMailRequestObserver& aOperationObserver,
+                                        const TInt aRequestId ) = 0;
 
     /**
      * Returns branding id of this mailbox.
@@ -364,18 +364,18 @@
      virtual void SetMrusL( const TFSMailMsgId& aMailBoxId,
                             MDesCArray* aNewMruList ) = 0;
 
-	/** FOLDER HANDLING API */
+    /** FOLDER HANDLING API */
     /**
      * returns email folder object related to given folder id
      * folder data set by plugin :
-     *				 - folder id
+     *               - folder id
      *               - folder name
-     *				 - folder type ; Inbox, Outbox, Sent, Drafts, Deleted, Other
+     *               - folder type ; Inbox, Outbox, Sent, Drafts, Deleted, Other
      *               - message count
      *               - unread message count
      *               - mailbox id
-	 *				 - parent folder
-	 *
+     *               - parent folder
+     *
      * @param aMailBoxId id of mailbox containing folder
      * @param aFolderId folder id
      *
@@ -395,7 +395,7 @@
      *
      * @return new folder object CFSMailFolder to be owned by user
      */
-     virtual CFSMailFolder* CreateFolderL( 	const TFSMailMsgId& aMailBoxId,
+     virtual CFSMailFolder* CreateFolderL(  const TFSMailMsgId& aMailBoxId,
                                             const TFSMailMsgId& aParentFolderId,
                                             const TDesC& aFolderName,
                                             const TBool aSync ) = 0;
@@ -409,26 +409,26 @@
      virtual void DeleteFolderByUidL( const TFSMailMsgId& aMailBoxId,
                                       const TFSMailMsgId& aFolderId) = 0;
 
-	/**
-	 * Lists subfolders of given folder.
-	 * Only direct subfolders of given folder are returned.
-	 * Folder data :
-	 * - folder id
-	 * - folder name
-	 * - folder type ; Inbox, Outbox, Sent, Drafts, Deleted, Other
-	 * - message count
-	 * - unread message count
-	 * - mailbox id
-	 * - parent folder
-	 * - subfolder count
-	 *
-	 * @param aMailBoxId id of the mailbox where parent folder is located
-	 * @param aFolderId parent folder id. TFSMailId::NullId() for root level list.
-	 * @param aFolderList plugin writes results in this array owned by user
-	 */
-	 virtual void ListFoldersL(	const TFSMailMsgId& aMailBoxId,
-	                            const TFSMailMsgId& aParentFolderId,
-	                            RPointerArray<CFSMailFolder>& aFolderList) = 0;
+    /**
+     * Lists subfolders of given folder.
+     * Only direct subfolders of given folder are returned.
+     * Folder data :
+     * - folder id
+     * - folder name
+     * - folder type ; Inbox, Outbox, Sent, Drafts, Deleted, Other
+     * - message count
+     * - unread message count
+     * - mailbox id
+     * - parent folder
+     * - subfolder count
+     *
+     * @param aMailBoxId id of the mailbox where parent folder is located
+     * @param aFolderId parent folder id. TFSMailId::NullId() for root level list.
+     * @param aFolderList plugin writes results in this array owned by user
+     */
+     virtual void ListFoldersL( const TFSMailMsgId& aMailBoxId,
+                                const TFSMailMsgId& aParentFolderId,
+                                RPointerArray<CFSMailFolder>& aFolderList) = 0;
 
    /**
      * List all subfolders of given mailbox.
@@ -444,10 +444,10 @@
      *
      * @param aMailBoxId mailbox id
      * @param aFolderList plugin writes results in this array owned by user.
-	 * Caller must determine tree structure by examining parent id of each
+     * Caller must determine tree structure by examining parent id of each
      * returned folder.
      */
-     virtual void ListFoldersL(	const TFSMailMsgId& aMailBoxId,
+     virtual void ListFoldersL( const TFSMailMsgId& aMailBoxId,
                                 RPointerArray<CFSMailFolder>& aFolderList) = 0;
 
     /**
@@ -459,9 +459,9 @@
      * return folder id
      */
      virtual TFSMailMsgId GetStandardFolderIdL( const TFSMailMsgId& aMailBoxId,
-	 											const TFSFolderType aFolderType ) = 0;
+                                                const TFSFolderType aFolderType ) = 0;
 
-	/** MESSAGE FETCH AND STORE */
+    /** MESSAGE FETCH AND STORE */
     /**
      * List messages contained by given folder.
      * Returns email list iterator to user.
@@ -469,47 +469,47 @@
      * @param aMailBoxId id of the mailbox where parent folder is located
      * @param aFolderId folder id of given folder
      * @param aDetails defines which message details are included in messages
-	 * EFSMsgDataIdOnly  -> Doesn't get any data. The object just contains the ID.
-	 * EFSMsgDataDate    -> Get received date only. To be used when showing messages sorted by date.
+     * EFSMsgDataIdOnly  -> Doesn't get any data. The object just contains the ID.
+     * EFSMsgDataDate    -> Get received date only. To be used when showing messages sorted by date.
      *                      The rest would be retreived when needed but date is needed to build the list.
-	 * EFSMsgDataSubject -> Like above but when sorting by subject
-	 * EFSMsgDataSender  -> Likewise for sender address.
-	 * EFSMsgDataEnvelope, EFSMsgDataStructure -> email content type is returned by plugin
+     * EFSMsgDataSubject -> Like above but when sorting by subject
+     * EFSMsgDataSender  -> Likewise for sender address.
+     * EFSMsgDataEnvelope, EFSMsgDataStructure -> email content type is returned by plugin
      * @param aSorting describes requested sort criteria (owned by user).
      *        First item in array is primary sort criteria.
      *
      * @return Email list iterator, ownership is transferred to user.
-	 */
-	 virtual MFSMailIterator* ListMessagesL( const TFSMailMsgId& aMailBoxId,
-	                                         const TFSMailMsgId& aFolderId,
-	                                         const TFSMailDetails aDetails,
-	                                         const RArray<TFSMailSortCriteria>& aSorting ) = 0;
+     */
+     virtual MFSMailIterator* ListMessagesL( const TFSMailMsgId& aMailBoxId,
+                                             const TFSMailMsgId& aFolderId,
+                                             const TFSMailDetails aDetails,
+                                             const RArray<TFSMailSortCriteria>& aSorting ) = 0;
 
     /**
      * returns email object related to given message id
      *
      * message info set by plugin :
-     *				  - message id
+     *                - message id
      *                - mailbox
-     *				  - parent folder
+     *                - parent folder
      *                - message size
-	 *                - the rest is defined by message attributes ;
+     *                - the rest is defined by message attributes ;
      * @param aMailBoxId id of the mailbox containing email
      * @param aFolderId parent folder id containing email
      * @param aMessageId email message id
      *
      * @param aDetails defines which message parts are included in message
-	 * EFSMsgDataIdOnly  -> Doesn't get any data. The object just contains the ID.
-	 * EFSMsgDataDate    -> Get received date only. To be used when showing messages sorted by date.
+     * EFSMsgDataIdOnly  -> Doesn't get any data. The object just contains the ID.
+     * EFSMsgDataDate    -> Get received date only. To be used when showing messages sorted by date.
      *                      The rest would be retreived when needed but date is needed to build the list.
-	 * EFSMsgDataSubject -> Like above but when sorting by subject
-	 * EFSMsgDataSender  -> Likewise for sender address.
-	 * EFSMsgDataEnvelope, EFSMsgDataStructure ->
-	 * email content type is evaluated and returned by plugin
+     * EFSMsgDataSubject -> Like above but when sorting by subject
+     * EFSMsgDataSender  -> Likewise for sender address.
+     * EFSMsgDataEnvelope, EFSMsgDataStructure ->
+     * email content type is evaluated and returned by plugin
      *
      * @return email object (CFSMailMessage), ownership is transferred to user
      */
-     virtual CFSMailMessage* GetMessageByUidL( 	const TFSMailMsgId& aMailBoxId,
+     virtual CFSMailMessage* GetMessageByUidL(  const TFSMailMsgId& aMailBoxId,
                                                 const TFSMailMsgId& aParentFolderId,
                                                 const TFSMailMsgId& aMessageId,
                                                 const TFSMailDetails aDetails) = 0;
@@ -571,19 +571,19 @@
 
     /**
      * starts email fetching from email server
-	 *
+     *
      * @param aMailBoxId id of the mailbox where email is located
      * @param aFolderId id of the parent folder containing email
      * @param aMessageIds ids of email to be fetched
      * @param aDetails defines which details are included in email
-	 * EFSMsgDataIdOnly  -> Doesn't get any data. The object just contains the ID.
-	 * EFSMsgDataDate    -> Get received date only. To be used when showing messages sorted by date.
+     * EFSMsgDataIdOnly  -> Doesn't get any data. The object just contains the ID.
+     * EFSMsgDataDate    -> Get received date only. To be used when showing messages sorted by date.
      *                      The rest would be retreived when needed but date is needed to build the list.
-	 * EFSMsgDataSubject -> Like above but when sorting by subject
-	 * EFSMsgDataSender  -> Likewise for sender address.
-	 * EFSMsgDataEnvelope -> Date, subject, Sender, To, Cc at least.
-	 * EFSMsgDataStructure -> the part structure including mime type, size and name headers.
-	 *
+     * EFSMsgDataSubject -> Like above but when sorting by subject
+     * EFSMsgDataSender  -> Likewise for sender address.
+     * EFSMsgDataEnvelope -> Date, subject, Sender, To, Cc at least.
+     * EFSMsgDataStructure -> the part structure including mime type, size and name headers.
+     *
      * @param aObserver observer (callback medhod), which plugin calls to pass progress
      *        events to user (like fetching has completed)
      * @param aRequestId asynchronous request id
@@ -597,7 +597,7 @@
 
     /**
      * starts email parts fetching from email server
-	 *
+     *
      * @param aMailBoxId id of the mailbox where email is located
      * @param aFolderId id of the parent folder containing email
      * @param aMessagePartIds part ids of email parts, which are to be fetched
@@ -619,27 +619,27 @@
 
 
     /* reads email objects from plugin store
-	 *
+     *
      * @param aMailBoxId id of the mailbox where email are located
      * @param aParentFolderId parent folder id containing emails
      * @param aMessageIds ids of emails to be read from plugin store
- 	 * @param aMessageList plugin writes results into this table owned by user
+     * @param aMessageList plugin writes results into this table owned by user
      * @param aDetails defines which email details are included in each email object
-	 *        EFSMsgDataIdOnly  -> Doesn't get any data. The object just contains the ID.
-	 *        EFSMsgDataDate    -> Get received date only. To be used when showing
-	 *        messages sorted by date. The rest would be retreived when needed but
-	 *        date is needed to build the list.
-	 *        EFSMsgDataSubject -> Like above but when sorting by subject
-	 *        EFSMsgDataSender  -> Likewise for sender address.
-	 *        EFSMsgDataEnvelope -> Date, subject, Sender, To, Cc at least.
-	 *        EFSMsgDataStructure -> the part structure including mime type,
-	 *        size and name headers.
-	 */
-	 virtual void GetMessagesL(	const TFSMailMsgId& aMailBoxId,
-	                            const TFSMailMsgId& aParentFolderId,
-	                            const RArray<TFSMailMsgId>& aMessageIds,
-	                            RPointerArray<CFSMailMessage>& aMessageList,
-	                            const TFSMailDetails aDetails ) = 0;
+     *        EFSMsgDataIdOnly  -> Doesn't get any data. The object just contains the ID.
+     *        EFSMsgDataDate    -> Get received date only. To be used when showing
+     *        messages sorted by date. The rest would be retreived when needed but
+     *        date is needed to build the list.
+     *        EFSMsgDataSubject -> Like above but when sorting by subject
+     *        EFSMsgDataSender  -> Likewise for sender address.
+     *        EFSMsgDataEnvelope -> Date, subject, Sender, To, Cc at least.
+     *        EFSMsgDataStructure -> the part structure including mime type,
+     *        size and name headers.
+     */
+     virtual void GetMessagesL( const TFSMailMsgId& aMailBoxId,
+                                const TFSMailMsgId& aParentFolderId,
+                                const RArray<TFSMailMsgId>& aMessageIds,
+                                RPointerArray<CFSMailMessage>& aMessageList,
+                                const TFSMailDetails aDetails ) = 0;
 
     /**
      * Returns child part objects for given email part. Ownership of objects
@@ -691,35 +691,35 @@
      *
      * return new child part object, ownership is transferred to user
      */
-	 virtual CFSMailMessagePart* NewChildPartFromFileL( const TFSMailMsgId& aMailBoxId,
-	                                                    const TFSMailMsgId& aParentFolderId,
-	                                                    const TFSMailMsgId& aMessageId,
-	                                                    const TFSMailMsgId& aParentPartId,
-	                                                    const TDesC& aContentType,
-	                                                    const TDesC& aFilePath) = 0;
+     virtual CFSMailMessagePart* NewChildPartFromFileL( const TFSMailMsgId& aMailBoxId,
+                                                        const TFSMailMsgId& aParentFolderId,
+                                                        const TFSMailMsgId& aMessageId,
+                                                        const TFSMailMsgId& aParentPartId,
+                                                        const TDesC& aContentType,
+                                                        const TDesC& aFilePath) = 0;
 
 
-	 /**
-	  * Creates and adds a new child part from file to given email part.
-	  *
-	  * @param aMailBoxId id of the mailbox where parent part is located
-	  * @param aParentFolderId id of the parent folder where email is located
-	  * @param aMessageId id of the email parent part belongs to
-	  * @param aParentPartId id of the parent part of the new part
-	  * @param aInsertBefore id of existing part that new part should precede.
-	  * If aInsertBefore is NULL id then new part is added as last.
-	  * @param aContentType content type of the new message part
-	  * @param aFile access to file containing new child part contents,
-	  *  ownership is transferred
-	  *
-	  * return new child part object, ownership is transferred to user
-	  */
-	  virtual CFSMailMessagePart* NewChildPartFromFileL( const TFSMailMsgId& aMailBoxId,
-	                                                     const TFSMailMsgId& aParentFolderId,
-	                                                     const TFSMailMsgId& aMessageId,
-	                                                     const TFSMailMsgId& aParentPartId,
-	                                                     const TDesC& aContentType,
-	                                                     RFile& aFile ) = 0;
+     /**
+      * Creates and adds a new child part from file to given email part.
+      *
+      * @param aMailBoxId id of the mailbox where parent part is located
+      * @param aParentFolderId id of the parent folder where email is located
+      * @param aMessageId id of the email parent part belongs to
+      * @param aParentPartId id of the parent part of the new part
+      * @param aInsertBefore id of existing part that new part should precede.
+      * If aInsertBefore is NULL id then new part is added as last.
+      * @param aContentType content type of the new message part
+      * @param aFile access to file containing new child part contents,
+      *  ownership is transferred
+      *
+      * return new child part object, ownership is transferred to user
+      */
+      virtual CFSMailMessagePart* NewChildPartFromFileL( const TFSMailMsgId& aMailBoxId,
+                                                         const TFSMailMsgId& aParentFolderId,
+                                                         const TFSMailMsgId& aMessageId,
+                                                         const TFSMailMsgId& aParentPartId,
+                                                         const TDesC& aContentType,
+                                                         RFile& aFile ) = 0;
 
 
     /**
@@ -751,7 +751,7 @@
      * @param aParentPartId id of the parent of the part
      * @param aPartId id of the part to removed
      */
-     virtual void RemoveChildPartL(	const TFSMailMsgId& aMailBoxId,
+     virtual void RemoveChildPartL( const TFSMailMsgId& aMailBoxId,
                                     const TFSMailMsgId& aParentFolderId,
                                     const TFSMailMsgId& aMessageId,
                                     const TFSMailMsgId& aParentPartId,
@@ -837,11 +837,11 @@
      * @param aMessageId id of the email part belongs to
      * @param aMessagePartId id of the message part
      */
-	 virtual void SetContentL(	const TDesC& aBuffer,
-	 						  	const TFSMailMsgId& aMailBoxId,
-     							const TFSMailMsgId& aParentFolderId,
-								const TFSMailMsgId& aMessageId,
-	 							const TFSMailMsgId& aMessagePartId) = 0;
+     virtual void SetContentL(  const TDesC& aBuffer,
+                                const TFSMailMsgId& aMailBoxId,
+                                const TFSMailMsgId& aParentFolderId,
+                                const TFSMailMsgId& aMessageId,
+                                const TFSMailMsgId& aMessagePartId) = 0;
 
     /**
      * Removes fetched contents of these parts.
@@ -851,10 +851,10 @@
      * @param aMessageId gives the id of the message that message part belongs to
      * @param aPartIds message part ids to be removed
      */
-     virtual void RemovePartContentL( 	const TFSMailMsgId& aMailBoxId,
-     	     							const TFSMailMsgId& aParentFolderId,
-									  	const TFSMailMsgId& aMessageId,
-     								  	const RArray<TFSMailMsgId>& aPartIds) = 0;
+     virtual void RemovePartContentL(   const TFSMailMsgId& aMailBoxId,
+                                        const TFSMailMsgId& aParentFolderId,
+                                        const TFSMailMsgId& aMessageId,
+                                        const RArray<TFSMailMsgId>& aPartIds) = 0;
 
     /**
      * Sets email part contents from given file.
@@ -881,9 +881,9 @@
      * @param aMessagePart email part data to be stored
      */
      virtual void StoreMessagePartL( const TFSMailMsgId& aMailBoxId,
-   	     							 const TFSMailMsgId& aParentFolderId,
-									 const TFSMailMsgId& aMessageId,
-         							 CFSMailMessagePart& aMessagePart) = 0;
+                                     const TFSMailMsgId& aParentFolderId,
+                                     const TFSMailMsgId& aMessageId,
+                                     CFSMailMessagePart& aMessagePart) = 0;
 
     /**
      * unregisters request observer to cancel pending events
@@ -902,8 +902,8 @@
 
     /**
      * Returns pending asynchronous request status, request is identified
-	 * by request id if parallel requests exists
-	 *
+     * by request id if parallel requests exists
+     *
      * @param aRequestId request id
      *
      * @return pending request status
@@ -914,10 +914,10 @@
      * cancels pending request
      *
      * @param aRequestId identifies request if parallel requests exists
-	 */
+     */
      virtual void CancelL( const TInt aRequestId ) = 0;
 
-	/** Search API */
+    /** Search API */
 
     /**
      * Asyncronous call for starting search for given string. Only one search can be
@@ -934,15 +934,15 @@
      * results generated by the same search string.
      *
      * The function will leave with KErrInUse if a search is already in progress.
-	 *
+     *
      * /note Only works if the store is in an authenticated state,
      *  otherwise this function leaves with KErrNotReady
      *
      * @paran aMailBoxId id of the mailbox where messages are to be searched
      * @param aFolderIds list of folders where messages are to be searched
-	 * 	      global or folder specific search depends on the size of array is 0 or not.
+     *        global or folder specific search depends on the size of array is 0 or not.
      * @param aSearchStrings text strings that will be searched from different message fields.
-	 * @param aSortCriteria sort criteria for the results
+     * @param aSortCriteria sort criteria for the results
      * @param aSearchObserver client observer that will be notified about search status.
      *
      */
@@ -956,12 +956,12 @@
     /**
      * Cancels current search. Does nothing if there is not any search.
      * The search client will not be called back after this function is called.
-	 *
+     *
      * \note CancelSearch() method does NOT clear the search result cached in the store.
      *       A different sort order can be used for the same search string, and the
      *       cache will be utilized.  Only by using a different search string can the
      *       cache be cleaned.
-	 *
+     *
      * @paran aMailBoxId id of the mailbox where the search should be cancelled
      */
      virtual void CancelSearch( const TFSMailMsgId& aMailBoxId ) = 0;
@@ -972,9 +972,9 @@
      * This method cancels the the ongoing search (if exists), and then clean ups store's cache.
      *
      * This function should be called when search results are no longer in display.
-	 *
+     *
      * @paran aMailBoxId id of the mailbox where the search cache should be cleared
-	 */
+     */
      virtual void ClearSearchResultCache( const TFSMailMsgId& aMailBoxId ) = 0;
 
     /**
@@ -1003,7 +1003,7 @@
      virtual void AuthenticateL(MFSMailRequestObserver& aOperationObserver, TInt aRequestId) = 0;
 
     /**
-	 * sets authentication popup data
+     * sets authentication popup data
      * @param aMailBoxId id of the mailbox
      * @param aUsername email account user name
      * @param aPassword email account password
@@ -1029,7 +1029,7 @@
 
 private:
 
-  	/**
+    /**
      * Two-phased constructor
      */
      void ConstructL();
@@ -1039,7 +1039,7 @@
     /**
      * instance identifier key for destructor
      */
-    TUid		iDtor_ID_Key;
+    TUid        iDtor_ID_Key;
 
     };
 
--- a/emailservices/emailframework/inc/MFSMailEventObserver.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailframework/inc/MFSMailEventObserver.h	Tue Feb 02 00:02:40 2010 +0200
@@ -23,7 +23,7 @@
 #include <e32std.h>
 #include <e32base.h>
 //<cmail>
-#include "cfsmailcommon.h"
+#include "CFSMailCommon.h"
 //</cmail>
 
 /**
@@ -33,7 +33,7 @@
  *  @since S60 v3.1
  */
  class MFSMailEventObserver
- 	{
+    {
     public:
 
     /**
--- a/emailservices/emailserver/cmailhandlerplugin/group/cmailhandlerplugin.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailserver/cmailhandlerplugin/group/cmailhandlerplugin.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -17,7 +17,7 @@
 
 #include <platform_paths.hrh>
 #include <data_caging_paths.hrh> // Needed for APP_RESOURCE_DIR
-
+#include "../../../../inc/emailtraceconfig.hrh"
 #include "../../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
 
 TARGET                          cmailhandlerplugin.dll
@@ -99,3 +99,7 @@
 LIBRARY                         egul.lib
 LIBRARY                         apparc.lib
 LIBRARY                         cmaillogger.lib
+
+#ifdef TRACE_INTO_FILE
+LIBRARY                         flogger.lib
+#endif // TRACE_INTO_FILE
--- a/emailservices/emailserver/cmailhandlerplugin/src/cmailcpshandler.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailserver/cmailhandlerplugin/src/cmailcpshandler.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 - 2009 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"
@@ -23,6 +23,7 @@
 #include <apgcli.h>
 #include <centralrepository.h>
 #include <starterdomaincrkeys.h>
+#include <startupdomainpskeys.h>
 
 #include "emailtrace.h"
 #include "CFSMailClient.h"
@@ -326,7 +327,6 @@
     {
     FUNC_LOG;    
 
-    TBool mailBoxFound(EFalse);
     if ( aMailBoxNumber < iAccountsArray.Count() )
         {
         TFSMailMsgId mailBoxId;
@@ -336,7 +336,6 @@
         mailbox = MailClient().GetMailBoxByUidL( mailBoxId );
         if(mailbox)
             {
-            mailBoxFound = ETrue;
             TFSMailMsgId parentFolder( mailbox->GetStandardFolderId( EFSInbox ) );
             // Check that folder is correct
             CFSMailFolder* folder = MailClient().GetFolderByUidL( mailBoxId, parentFolder );
@@ -348,7 +347,8 @@
             CleanupStack::PushL( folder );
 
             TInt msgCount = folder->GetMessageCount();
-            if(msgCount<1)
+            
+            if(msgCount<1 || (msgCount == 1 && aRow == 3))
                 {
                 UpdateEmptyMessagesL( aWidgetInstance, aRow );
                 CleanupStack::PopAndDestroy( folder );
@@ -376,7 +376,7 @@
             TFSMailMsgId dummy;
             iterator->NextL( dummy, aMessageNumber, folderMessages);
             TInt count (folderMessages.Count());
-            if(!count)
+            if(!count || (count == 1 && aRow == 3))
                 {
                 UpdateEmptyMessagesL( aWidgetInstance, aRow );
             
@@ -429,10 +429,6 @@
             CleanupStack::PopAndDestroy( folder );
             }
         }
-    else if(!mailBoxFound)
-        {
-        UpdateEmptyMessagesL( aWidgetInstance, aRow );
-        }
     }
 
 
@@ -793,7 +789,7 @@
     }
 
 // ---------------------------------------------------------
-// CMailCpsHandler::HandleMailborRenamedEventL
+// CMailCpsHandler::HandleMailboxRenamedEventL
 // ---------------------------------------------------------
 //
 void CMailCpsHandler::HandleMailboxRenamedEventL( const TFSMailMsgId aMailbox )
@@ -1646,7 +1642,13 @@
 void CMailCpsHandler::DissociateWidgetFromSettingL( const TDesC& aContentId )
     {
     FUNC_LOG;
-    iSettings->DissociateWidgetFromSettingL( aContentId );
+    //Do not dissociate if device is shutting down
+    TInt status( 0 );
+    RProperty::Get( KPSUidStartup, KPSGlobalSystemState, status );
+    if (status != ESwStateShuttingDown)
+        {
+        iSettings->DissociateWidgetFromSettingL( aContentId );
+        }
     }
 
 // ---------------------------------------------------------------------------
--- a/emailservices/emailserver/cmailhandlerplugin/src/cmailcpsif.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailserver/cmailhandlerplugin/src/cmailcpsif.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -776,13 +776,16 @@
                              {                            
                              // Widget removed from homescreen.
                              HBufC* cid = contentid.AllocLC();
-                             TInt widgetInstance = FindWidgetInstanceId(cid->Des());                            
-                             if (!iInactive[widgetInstance])
-                                 {
-                                 iMailCpsHandler->DissociateWidgetFromSettingL( cid->Des() );                                 
-                                 iInstIdList.Remove(widgetInstance);                                 
-                                 }
-                             iAllowedToPublish[widgetInstance] = EFalse;
+                             TInt widgetInstance = FindWidgetInstanceId(cid->Des());
+                             if (widgetInstance != KErrNotFound )
+                            	 {
+								 if (!iInactive[widgetInstance])
+									 {
+									 iMailCpsHandler->DissociateWidgetFromSettingL( cid->Des() );                                 
+									 iInstIdList.Remove(widgetInstance);                                 
+									 }
+								 iAllowedToPublish[widgetInstance] = EFalse;
+                            	 }
                              CleanupStack::PopAndDestroy( cid );
                              }
                          else if (trigger.Compare(KTriggerEmailUi) == 0)
--- a/emailservices/emailserver/group/fsmailserver.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailserver/group/fsmailserver.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -20,6 +20,7 @@
 #include <data_caging_paths.hrh> // Needed for APP_RESOURCE_DIR
 
 #include "../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../inc/emailtraceconfig.hrh"
 #include "../inc/fsmailserverdefinitions.h"
 
 
@@ -53,8 +54,8 @@
 
 APP_LAYER_SYSTEMINCLUDE
 
-USERINCLUDE 			../../../emailuis/emailui/sendasmtm/fsmtms/inc
-USERINCLUDE 			../../../emailuis/emailui/sendasmtm/fsmtms/client/inc
+USERINCLUDE             ../../../emailuis/emailui/sendasmtm/fsmtms/inc
+USERINCLUDE             ../../../emailuis/emailui/sendasmtm/fsmtms/client/inc
 
 
 START RESOURCE  ../data/fsmailserver.rss
@@ -93,9 +94,14 @@
 LIBRARY eiksrv.lib
 LIBRARY eikdlg.lib
 LIBRARY eikcoctl.lib
-LIBRARY eiksrvui.lib	// CEikServAppUi
+LIBRARY eiksrvui.lib    // CEikServAppUi
 LIBRARY apparc.lib      // CApaApplication, TApaApplicationFactory
 LIBRARY sysutil.lib
 LIBRARY liwservicehandler.lib
 LIBRARY cmaillogger.lib
 DEBUGLIBRARY flogger.lib
+
+
+#ifdef TRACE_INTO_FILE
+LIBRARY         flogger.lib
+#endif // TRACE_INTO_FILE
--- a/emailservices/emailservermonitor/group/emailservermonitor.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailservermonitor/group/emailservermonitor.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -57,5 +57,6 @@
 LIBRARY       bafl.lib                      // CCommandLineArguments
 LIBRARY       AlwaysOnlineManagerClient.lib // RAlwaysOnlineClientSession
 LIBRARY       PsServerClientAPI.lib         // PCS engine client-side API
+LIBRARY       estor.lib                     // RDesRead/WriteStream
 LIBRARY       cmaillogger.lib
 DEBUGLIBRARY  flogger.lib
--- a/emailservices/emailservermonitor/inc/emailshutdownconst.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailservermonitor/inc/emailshutdownconst.h	Tue Feb 02 00:02:40 2010 +0200
@@ -26,7 +26,11 @@
 // Publish & Subscribe category for Email shutdown events
 const TUid KEmailShutdownPsCategory = { KEmailShutdownUidAsTInt };
 
-// Publish & Subscribe keys
+// Size of one item in platform API UID list (in Publish & Subscribe
+// key EEmailPsKeyPlatformApiAppsToClose)
+const TInt KEmailPlatformApiUidItemSize = sizeof( TInt32 );
+
+// Publish & Subscribe keys used in shutdown process
 enum TEmailShutdownPsKeys
     {
     // Publish & Subscribe key used in communication between Shutter
@@ -36,7 +40,11 @@
     // Publish & Subscribe keys for Email shutdown events
     EEmailPsKeyShutdownClients,
     EEmailPsKeyShutdownPlugins,
-    EEmailPsKeyShutdownMsgStore
+    EEmailPsKeyShutdownMsgStore,
+    
+    // Publish & Subscribe keys to register 3rd party applications to be closed
+    EEmailPsKeyPlatformApiAppsToCloseLength,
+    EEmailPsKeyPlatformApiAppsToClose
     };
 
 // Publish & Subscribe values to be used with key EEmailPsKeyInstallationStatus
--- a/emailservices/emailservermonitor/inc/emailshutter.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailservermonitor/inc/emailshutter.h	Tue Feb 02 00:02:40 2010 +0200
@@ -34,6 +34,7 @@
 // Security policies used when defining P&S keys
 static _LIT_SECURITY_POLICY_PASS(KAllowAllPolicy);
 static _LIT_SECURITY_POLICY_C1(KPowerMgmtPolicy,ECapabilityPowerMgmt);
+static _LIT_SECURITY_POLICY_C1(KWriteDeviceDataPolicy,ECapabilityWriteDeviceData);
 
 // Value to be set in shutdown P&S key.
 const TInt KEmailShutterPsValue = 1;
@@ -234,6 +235,12 @@
     void WaitInCycles( const TInt aMaxWaitTime,
                        const TEmailShutterKillingMode aMode );
     
+    /**
+     * Reads platform API process UIDs from Publish and Subscribe key to
+     * internal array
+     */
+    void ReadPlatformApiUidsL();
+    
 private: // Member variables
 
     /**
@@ -242,6 +249,11 @@
     RProperty iInstStatusProperty;
 
     /**
+     * List of UIDs of the processes that are using platform API
+     */
+    RArray<TUid> iPlatformApiAppsToClose;
+    
+    /**
      * Pointer to Email Server Monitor
      * Not owned
      */
--- a/emailservices/emailservermonitor/src/emailshutter.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailservermonitor/src/emailshutter.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -24,10 +24,12 @@
 #include <e32property.h>                // RProperty
 #include <apgtask.h>                    // TApaTaskList
 #include <w32std.h>                     // RWsSession
+#include <s32mem.h>                     // RDesRead/WriteStream
 
 #include <AlwaysOnlineManagerClient.h>  // RAlwaysOnlineClientSession
 #include <CPsRequestHandler.h>          // CPSRequestHandler
 #include <centralrepository.h>          // CRepository
+#include <platform/mw/aisystemuids.hrh> // HomeScreen UIDs
 
 #include "FreestyleEmailUiConstants.h"  // FS Email UI UID
 #include "fsmtmsconstants.h"            // MCE, Phonebook & Calendar UIDs
@@ -51,6 +53,14 @@
     { KCalendarAppUid1 }        // Calendar
     };
 
+// 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
+    };
+
 // Non-UI clients that need to be closed
 const TUid KOtherClientsToClose[] =
     {
@@ -78,6 +88,7 @@
     { KUidEmailStorePreInstallExe } // MessageStorePreInstallExe
     };
 
+const TInt KEmailUidExtraBuffer = 2 * KEmailPlatformApiUidItemSize;
 
 // ======== MEMBER FUNCTION DEFINITIONS ========
 
@@ -123,6 +134,8 @@
 CEmailShutter::~CEmailShutter()
     {
     FUNC_LOG;
+    iInstStatusProperty.Close();
+    iPlatformApiAppsToClose.Close();
     }
 
 // ---------------------------------------------------------------------------
@@ -140,7 +153,8 @@
                                              KPowerMgmtPolicy );
     if( error != KErrNone && error != KErrAlreadyExists )
         {
-        ERROR_1( error, "RProperty::Define failed, error code: ", error );
+        ERROR( error, "RProperty::Define (EEmailPsKeyInstallationStatus) failed!" );
+        ERROR_1( error, "    error code: ", error );
         User::Leave( error );
         }
 
@@ -148,9 +162,34 @@
                                         EEmailPsKeyInstallationStatus );
     if( error != KErrNone )
         {
-        ERROR_1( error, "RProperty::Attach failed, error code: ", error );
+        ERROR( error, "RProperty::Attach (EEmailPsKeyInstallationStatus) failed!" );
+        ERROR_1( error, "    error code: ", error );
         User::Leave( error );
         }
+
+    // Define P&S key used to register platform API applications
+    error = RProperty::Define( EEmailPsKeyPlatformApiAppsToCloseLength,
+                               RProperty::EInt,
+                               KAllowAllPolicy,
+                               KWriteDeviceDataPolicy );
+    
+    if( error != KErrNone && error != KErrAlreadyExists )
+        {
+        ERROR( error, "RProperty::Define (EEmailPsKeyPlatformApiAppsToCloseLength) failed!" );
+        ERROR_1( error, "    error code: ", error );
+        }
+    
+    // Define P&S key used to register platform API applications
+    error = RProperty::Define( EEmailPsKeyPlatformApiAppsToClose,
+                               RProperty::EByteArray,
+                               KAllowAllPolicy,
+                               KWriteDeviceDataPolicy );
+    
+    if( error != KErrNone && error != KErrAlreadyExists )
+        {
+        ERROR( error, "RProperty::Define (EEmailPsKeyPlatformApiAppsToClose) failed!" );
+        ERROR_1( error, "    error code: ", error );
+        }
     
     CActiveScheduler::Add(this);
     }
@@ -273,6 +312,7 @@
 
     TApaTaskList taskList( session );
 
+    // First end our own applications that are defined in hard coded list
     TInt count = sizeof(KApplicationsToClose) / sizeof(TUid);
     for( TInt i = 0; i<count; i++ )
         {
@@ -284,7 +324,19 @@
             task.EndTask();
             }
         }
+    
+    // Then end applications that are registered in P&S as platform API users
+    for( TInt i = 0; i<iPlatformApiAppsToClose.Count(); i++ )
+        {
+        TApaTask task = taskList.FindApp( iPlatformApiAppsToClose[i] );
+        if ( task.Exists() )
+            {
+            INFO_1( "Closing API UI app with UID: %d", iPlatformApiAppsToClose[i].iUid );
 
+            task.EndTask();
+            }
+        }
+    
     CleanupStack::PopAndDestroy( &session );
     }
 
@@ -440,6 +492,12 @@
             {
             return ETrue;
             }
+
+        // Check also clients registered as platform API users
+        if( iPlatformApiAppsToClose.Find( aSid ) != KErrNotFound )
+            {
+            return ETrue;
+            }
         }
 
     if( aMode == EKillingModePlugins ||
@@ -531,7 +589,10 @@
         {
         iMonitor->Cancel();
         }
-    
+
+    // First read the platform API UIDs from P&S, those are needed later
+    TRAP_IGNORE( ReadPlatformApiUidsL() );
+
     // End all clients
     EndClients();
     // Wait some time to give the clients some time to shut down themselves
@@ -587,3 +648,51 @@
         // there are some process(es) to wait for
         } while ( ( totalWaitTime < aMaxWaitTime ) && KillEmAll( aMode, ETrue ) );
     }
+
+// ---------------------------------------------------------------------------
+// Reads platform API process UIDs from Publish and Subscribe key
+// ---------------------------------------------------------------------------
+//
+void CEmailShutter::ReadPlatformApiUidsL()
+    {
+    FUNC_LOG;
+
+    iPlatformApiAppsToClose.Reset();
+
+    // Read buffer length
+    TInt bufLength( 0 );
+    User::LeaveIfError( RProperty::Get( KEmailShutdownPsCategory,
+                                        EEmailPsKeyPlatformApiAppsToCloseLength,
+                                        bufLength ) );
+
+    // Allocate buffer for reading and then read the list of UIDs from P&S.
+    // Adding some extra buffer just in case the size key and actual list
+    // are out of sync. This shouldn't happen, but you never know.
+    HBufC8* readBuf = HBufC8::NewLC( bufLength + KEmailUidExtraBuffer );
+    TPtr8 readPtr = readBuf->Des();
+    
+    User::LeaveIfError( RProperty::Get( KEmailShutdownPsCategory,
+                                        EEmailPsKeyPlatformApiAppsToClose,
+                                        readPtr ) );
+    
+    RDesReadStream readStream( readPtr );
+    CleanupClosePushL( readStream );
+    
+    // Get items count from the actual buffer
+    TInt itemsCount = readPtr.Length() / KEmailPlatformApiUidItemSize;
+    
+    for ( TInt ii = 0;ii < itemsCount; ++ii )
+        {
+        // Read next UID from the stream
+        TUid item = TUid::Uid( readStream.ReadInt32L() );
+
+        // Append only UIDs of such applications that should be closed
+        TInt count = sizeof(KApplicationsNotToBeClosed) / sizeof(TUid);
+        if( !FindFromArray( item, KApplicationsNotToBeClosed, count ) )
+            {
+            iPlatformApiAppsToClose.AppendL( item );
+            }
+        }
+    
+    CleanupStack::PopAndDestroy( 2, readBuf );
+    }
--- a/emailservices/emailstore/base_plugin/group/BasePlugin.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailstore/base_plugin/group/BasePlugin.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -20,6 +20,7 @@
 #include <platform_paths.hrh>
 
 #include "../../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../../inc/emailtraceconfig.hrh"
 #include "../../inc/EmailStoreUids.hrh"
 
 TARGET            baseplugin.dll
@@ -77,3 +78,6 @@
 LIBRARY     fsfwcommonlib.lib
 
 LIBRARY     debuglog.lib
+#ifdef TRACE_INTO_FILE
+LIBRARY     flogger.lib
+#endif // TRACE_INTO_FILE
--- a/emailservices/emailstore/message_store/MsgStoreRfsPlugin/data/RfsMsgStorePlugin.rss	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailstore/message_store/MsgStoreRfsPlugin/data/RfsMsgStorePlugin.rss	Tue Feb 02 00:02:40 2010 +0200
@@ -17,7 +17,7 @@
 
 NAME EAXP
 
-#include <registryinfo.rh>
+#include <ecom/registryinfo.rh>
 #include "EmailStoreUids.hrh"
 
 RESOURCE REGISTRY_INFO theInfo
--- a/emailservices/emailstore/message_store/MsgStoreRfsPlugin/src/RfsMsgStoreProxy.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailstore/message_store/MsgStoreRfsPlugin/src/RfsMsgStoreProxy.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -17,7 +17,7 @@
 
 //  Include Files
 #include <e32std.h>
-#include <implementationproxy.h>
+#include <ecom/implementationproxy.h>
 
 #include "EmailStoreUids.hrh"
 #include "RfsMsgStorePlugin.h"
--- a/emailuis/emailui/data/FreestyleEmailUi.rss	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/data/FreestyleEmailUi.rss	Tue Feb 02 00:02:40 2010 +0200
@@ -2026,9 +2026,9 @@
 			},
         MENU_ITEM
             {
-            cascade = r_ncs_more_menu;
+            cascade = r_ncs_extra_recepient_fields_menu;
 			command = ENcsCmdMore;
-            txt = qtn_fse_editor_options_more;
+            txt = qtn_fse_editor_options_extra_recepient_fields;
             },
         MENU_ITEM
 	        {
@@ -2128,13 +2128,13 @@
 
 // -----------------------------------------------------------------------------
 //
-//   r_ncs_more_menu
-//   Menu for "More"
+//   r_ncs_extra_recepient_fields_menu
+//   Menu for "Extra Recepient Fields"
 //
 // -----------------------------------------------------------------------------
 //
-RESOURCE MENU_PANE r_ncs_more_menu
-	{
+RESOURCE MENU_PANE r_ncs_extra_recepient_fields_menu
+    {
 	items =
 		{
         MENU_ITEM
@@ -2851,7 +2851,7 @@
             },
         STYLUS_POPUP_MENU_ITEM
             {
-                txt = qtn_fse_viewer_options_add_to_contacts;  // Save to contacts
+                txt = qtn_mail_stylus_popup_add_to_contacts;  // Save to contacts
                 command = EFsEmailUiCmdActionsAddContact; 
             },
         STYLUS_POPUP_MENU_ITEM
--- a/emailuis/emailui/group/FreestyleEmailUi.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/group/FreestyleEmailUi.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -123,7 +123,6 @@
 APP_LAYER_SYSTEMINCLUDE
 USERINCLUDE     ../../inc
 USERINCLUDE     ../../../inc
-SYSTEMINCLUDE   /epoc32/include/ecom
 
 // 9.11.2009: Temporary flagging SYMBIAN_ENABLE_SPLIT_HEADERS
 // Can be removed when header structure change is complete
--- a/emailuis/emailui/inc/FSEmailLauncherItem.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/inc/FSEmailLauncherItem.h	Tue Feb 02 00:02:40 2010 +0200
@@ -20,7 +20,7 @@
 #define __FSEMAILLAUNCHERITEM_H__
 
 #include <e32base.h>
-#include <ecom.h>
+#include <ecom/ecom.h>
 #include <badesca.h>
 #include <AknIconUtils.h>
 
@@ -63,20 +63,20 @@
     virtual ~CFSEmailLauncherItem();
 
     /**
-	 * Request a list of all available implementations which satisfy this
-	 * given interface.
-	 *
+     * Request a list of all available implementations which satisfy this
+     * given interface.
+     *
      * @param aImplInfoArray Info array of implementations.
-	 */
-	static void ListAllImplementationsL( RImplInfoPtrArray& aImplInfoArray );
+     */
+    static void ListAllImplementationsL( RImplInfoPtrArray& aImplInfoArray );
 
 public:
 
     /**
-	 * Set observer for refreshing launcher view.
-	 *
+     * Set observer for refreshing launcher view.
+     *
      * @param aObserver Observer for refreshing launcher view.
-	 */
+     */
     virtual void SetObserver( MFSEmailLauncherItemObserver* aObserver ) = 0;
 
     /**
@@ -154,8 +154,8 @@
     }
 
 inline void CFSEmailLauncherItem::ListAllImplementationsL( RImplInfoPtrArray& aImplInfoArray )
-	{
-	REComSession::ListImplementationsL( KFSEmailLauncherItemUid, aImplInfoArray );
-	}
+    {
+    REComSession::ListImplementationsL( KFSEmailLauncherItemUid, aImplInfoArray );
+    }
 
 #endif // __FSEMAILLAUNCHERITEM_H__
--- a/emailuis/emailui/inc/FreestyleEmailUiAknStatusIndicator.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/inc/FreestyleEmailUiAknStatusIndicator.h	Tue Feb 02 00:02:40 2010 +0200
@@ -2,9 +2,9 @@
 * 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 "Symbian Foundation License v1.0"
+* under the terms of "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
-* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
 */ 
 
 
--- a/emailuis/emailui/inc/FreestyleEmailUiHtmlViewerContainer.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/inc/FreestyleEmailUiHtmlViewerContainer.h	Tue Feb 02 00:02:40 2010 +0200
@@ -113,9 +113,10 @@
      */
     void ReloadPageL();
     
-    void ShowAttacthmentDownloadStatusL( TFSProgress::TFSProgressStatus aProgressStatus, const TAttachmentData& aAttachmentData );
-    TBool AttacthmentDownloadStatusVisible();
-    void HideAttacthmentDownloadStatus();
+    void ShowAttachmentDownloadStatusL( TFSProgress::TFSProgressStatus aProgressStatus, const TAttachmentData& aAttachmentData );
+    TBool AttachmentDownloadStatusVisible();
+    void HideDownloadStatus();
+    void DisplayStatusIndicatorL();
     
 private:
 
@@ -139,6 +140,9 @@
     HBufC8* ReadContentFromFileLC( RFile& aFile );
     // Writes buffer to given file
     void WriteContentToFileL( const TDesC8& aContent, const TDesC& aFileName, CFSMailMessagePart& aHtmlBodyPart );
+
+    void WriteEmptyBodyHtmlL( const TDesC& aFileName );
+    
 // </cmail>
     // Finds the attachment from the list that matches the given content ID 
     CFSMailMessagePart* MatchingAttacmentL( const TDesC& aContentId,
@@ -215,8 +219,9 @@
     TInt iScrollPosition;
     COverlayControl* iOverlayControlNext;
     COverlayControl* iOverlayControlPrev;
-
-    CFreestyleEmailUiAknStatusIndicator* iAttachmentStatus;
+    //way to keep track of the current image being displayed by the indicator
+    TInt iAttachmentDownloadImageHandle;
+    CFreestyleEmailUiAknStatusIndicator* iStatusIndicator;
     };
 
 
--- a/emailuis/emailui/inc/FreestyleEmailUiLauncherGridVisualiser.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/inc/FreestyleEmailUiLauncherGridVisualiser.h	Tue Feb 02 00:02:40 2010 +0200
@@ -45,6 +45,7 @@
 class CBrushAnimation;
 class CFsAlfScrollbarLayout;
 class CAknStylusPopUpMenu;
+class CCoeControl;
 
 
 class TFSLauncherGridMailboxStatus
@@ -401,6 +402,8 @@
     // Contains the ID of a selected mailbox. Used for deleting mailboxes
     // with long tap pop-up menu.
     TFSMailMsgId iMailboxToDelete;
+    
+    CCoeControl* iCoeControl;
     };
 
 #endif // __FREESTYLEEMAILUI_MAINGRIDUIVISUALISER_H__
--- a/emailuis/emailui/inc/FreestyleEmailUiMailListVisualiser.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/inc/FreestyleEmailUiMailListVisualiser.h	Tue Feb 02 00:02:40 2010 +0200
@@ -21,7 +21,7 @@
 #define __FREESTYLEEMAILUI_MAILLISTVISUALISER_H__
 
 // SYSTEM INCLUDES
-#include <EIKMOBS.H>
+#include <eikmobs.h>
 //<cmail>
 #include "fscontrolbarobserver.h"
 #include "fstreelistobserver.h"
--- a/emailuis/emailui/inc/FreestyleMessageHeaderURLEventHandler.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/inc/FreestyleMessageHeaderURLEventHandler.h	Tue Feb 02 00:02:40 2010 +0200
@@ -73,7 +73,7 @@
     void HandAttachmentActionMenuCommandL( TActionMenuCustomItemId aSelectedActionMenuItem,
                                            const TAttachmentData& aAttachment );    
     void LaunchEmailAddressMenuL( );
-    void LaunchWebAddressMenu( );
+    void LaunchWebAddressMenuL( );
     
 private:
     CFreestyleMessageHeaderURL*     iMessageHeaderURL;
--- a/emailuis/emailui/inc/ncscomposeviewcontainer.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/inc/ncscomposeviewcontainer.h	Tue Feb 02 00:02:40 2010 +0200
@@ -578,7 +578,7 @@
     
 public:  // from MNcsFieldSizeObserver
 
-    TBool UpdateFieldSizeL();
+    TBool UpdateFieldSizeL( TBool aDoScroll );
     void UpdateFieldPosition( CCoeControl* aAnchor );
 
 private:  //From MAknLongTapDetectorCallBack
--- a/emailuis/emailui/inc/ncsfieldsizeobserver.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/inc/ncsfieldsizeobserver.h	Tue Feb 02 00:02:40 2010 +0200
@@ -39,9 +39,10 @@
     * Informs the observer that the field is updated.
     *
     * @since S60 v3.0
+    * @param aDoScroll If set to ETrue, the rscreen is scrolled so that cursor is visible.
     * @return Return ETrue if you wish to redraw the edwin. EFalse otherwise.
     */
-    virtual TBool UpdateFieldSizeL() = 0;
+    virtual TBool UpdateFieldSizeL( TBool aDoScroll = EFalse ) = 0;
     
     /**
     * Informs the observer that the given control position has changed.
--- a/emailuis/emailui/inc/ncsheadercontainer.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/inc/ncsheadercontainer.h	Tue Feb 02 00:02:40 2010 +0200
@@ -349,6 +349,8 @@
      * @param aShow ETrue - shows, EFalse - hides cursor.
      */
     void ShowCursor( TBool aShow );
+
+    void DoScrollL();
 private: // Function members
 
 	void FocusChanged(TDrawNow aDrawNow);
--- a/emailuis/emailui/loc/freestyleemailui.loc	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/loc/freestyleemailui.loc	Tue Feb 02 00:02:40 2010 +0200
@@ -763,6 +763,12 @@
 //	
 #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
@@ -2762,3 +2768,9 @@
 //
 #define qtn_mail_stylus_popup_remove	"Remove"
 
+// 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"
+
--- a/emailuis/emailui/sendasmtm/fsmtms/client/group/fsclientmtm.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/sendasmtm/fsmtms/client/group/fsclientmtm.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -20,6 +20,7 @@
 
 #include "../../../inc/fsmtmsuids.h"      // KUidFsClientMtmVal
 #include "../../../../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../../../../inc/emailtraceconfig.hrh"
 
 TARGET               fsclientmtm.dll
 TARGETTYPE           dll
@@ -50,4 +51,8 @@
 LIBRARY              CentralRepository.lib  // CRepository
 LIBRARY              fssendashelper.lib
 LIBRARY              featmgr.lib
-LIBRARY cmaillogger.lib
+LIBRARY              cmaillogger.lib
+
+#ifdef TRACE_INTO_FILE
+LIBRARY             flogger.lib
+#endif // TRACE_INTO_FILE
--- a/emailuis/emailui/sendasmtm/fsmtms/install/group/fsinstallmtm.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/sendasmtm/fsmtms/install/group/fsinstallmtm.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -20,6 +20,7 @@
 
 #include "../../../inc/fsmtmsuids.h"
 #include "../../../../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../../../../inc/emailtraceconfig.hrh"
 
 TARGET               fsinstallmtm.exe
 TARGETTYPE           exe
@@ -53,5 +54,9 @@
 LIBRARY              msgs.lib             // CMsvSession   
 LIBRARY              efsrv.lib            // RFs
 LIBRARY              featmgr.lib          // RFeatureControl
-LIBRARY			  	 centralrepository.lib
-LIBRARY cmaillogger.lib
+LIBRARY              centralrepository.lib
+LIBRARY              cmaillogger.lib
+
+#ifdef TRACE_INTO_FILE
+LIBRARY        flogger.lib
+#endif // TRACE_INTO_FILE
--- a/emailuis/emailui/sendasmtm/fsmtms/server/group/fsservermtm.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/sendasmtm/fsmtms/server/group/fsservermtm.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -21,7 +21,8 @@
 
 #include "../../../inc/fsmtmsuids.h"           // KUidFsServerMtmVal
 #include "../../../../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
-
+#include "../../../../../../inc/emailtraceconfig.hrh"
+    
 TARGET               fsservermtm.dll
 TARGETTYPE           dll
 
@@ -54,3 +55,6 @@
 LIBRARY			centralrepository.lib
 LIBRARY                 cmaillogger.lib
 
+#ifdef TRACE_INTO_FILE
+LIBRARY                 flogger.lib
+#endif // TRACE_INTO_FILE
--- a/emailuis/emailui/sendasmtm/fsmtms/ui/group/fsuimtm.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/sendasmtm/fsmtms/ui/group/fsuimtm.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -23,6 +23,7 @@
 
 #include "../../../inc/fsmtmsuids.h"
 #include "../../../../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../../../../inc/emailtraceconfig.hrh"
 
 TARGET               fsuimtm.dll
 TARGETTYPE           DLL
@@ -72,5 +73,8 @@
 LIBRARY              fssendashelper.lib
 LIBRARY              cone.lib
 LIBRARY              cmaillogger.lib
+#ifdef TRACE_INTO_FILE
+LIBRARY             flogger.lib
+#endif // TRACE_INTO_FILE
 
 nostrictdef
\ No newline at end of file
--- a/emailuis/emailui/sendasmtm/fsmtms/uidata/group/fsuidatamtm.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/sendasmtm/fsmtms/uidata/group/fsuidatamtm.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -21,6 +21,7 @@
 
 #include "../../../inc/fsmtmsuids.h"
 #include "../../../../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../../../../inc/emailtraceconfig.hrh"
 
 TARGET               fsuidatamtm.dll
 TARGETTYPE           dll
@@ -50,8 +51,6 @@
 
 USERINCLUDE ../../../../../../inc
 
-SYSTEMINCLUDE        /epoc32/include/ecom
-
 LIBRARY              euser.lib
 LIBRARY              mtur.lib            // CBaseMtmUiData
 LIBRARY              ws32.lib            //for CWsBitmap
@@ -60,9 +59,13 @@
 LIBRARY              FSMailFramework.lib
 LIBRARY              FSFWCommonLib.lib
 LIBRARY              ecom.lib
-LIBRARY     	     egul.lib
+LIBRARY              egul.lib
 LIBRARY              cmaillogger.lib
 
+#ifdef TRACE_INTO_FILE
+LIBRARY             flogger.lib
+#endif // TRACE_INTO_FILE
+
 LANGUAGE_IDS
 
 NOSTRICTDEF
--- a/emailuis/emailui/sendasmtm/sendashelper/group/fssendashelper.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/sendasmtm/sendashelper/group/fssendashelper.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -19,6 +19,7 @@
 
 #include "../../inc/fsmtmsuids.h"
 #include "../../../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../../../inc/emailtraceconfig.hrh"
 
 TARGET               fssendashelper.dll
 TARGETTYPE           dll
@@ -40,8 +41,6 @@
 APP_LAYER_SYSTEMINCLUDE
 
 USERINCLUDE ../../../../../inc
-SYSTEMINCLUDE        /epoc32/include/ecom
-
 
 LIBRARY              euser.lib
 LIBRARY              estor.lib 
@@ -61,3 +60,7 @@
 LIBRARY              FSMailFramework.lib
 LIBRARY              FSFWCommonLib.lib
 #endif
+
+#ifdef TRACE_INTO_FILE
+LIBRARY              flogger.lib
+#endif // TRACE_INTO_FILE
--- a/emailuis/emailui/sis/commonemail.pkg	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/sis/commonemail.pkg	Tue Feb 02 00:02:40 2010 +0200
@@ -69,7 +69,7 @@
 
 "\epoc32\data\z\private\2001E277\HtmlFile\attachment.gif"        - "c:\private\2001E277\HtmlFile\attachment.gif"
 "\epoc32\data\z\private\2001E277\HtmlFile\email.html"            - "c:\private\2001E277\HtmlFile\email.html"
-"\epoc32\data\z\private\2001E277\HtmlFile\email_rtl.html"            - "c:\private\2001E277\HtmlFile\email_rtl.html"
+"\epoc32\data\z\private\2001E277\HtmlFile\email_rtl.html"        - "c:\private\2001E277\HtmlFile\email_rtl.html"
 "\epoc32\data\z\private\2001E277\HtmlFile\header.js"             - "c:\private\2001E277\HtmlFile\header.js"
 "\epoc32\data\z\private\2001E277\HtmlFile\plus.gif"              - "c:\private\2001E277\HtmlFile\plus.gif"
 "\epoc32\data\z\private\2001E277\HtmlFile\minus.gif"             - "c:\private\2001E277\HtmlFile\minus.gif"
@@ -100,14 +100,6 @@
 "\epoc32\data\Z\resource\messaging\fsuidatamtm.rsc"              - "c:\resource\messaging\fsuidatamtm.rsc"
 "\epoc32\data\z\resource\apps\fsuidatamtm.mif"                   - "c:\resource\apps\fsuidatamtm.mif"
 
-; Emailuis / widget
-; Only for TB 9.2, add after 5250+ branched:
-;"\epoc32\data\Z\private\200159c0\install\emailwidget\xuikon\00\EW.o0000"                   - "c:\private\200159c0\install\emailwidget\xuikon\00\EW.o0000"
-;"\epoc32\data\Z\private\200159c0\install\emailwidget\hsps\00\emailwidgetconfiguration.dtd" - "c:\private\200159c0\install\emailwidget\hsps\00\emailwidgetconfiguration.dtd"
-;"\epoc32\data\Z\private\200159c0\install\emailwidget\hsps\00\widgetconfiguration.xml"      - "c:\private\200159c0\install\emailwidget\hsps\00\widgetconfiguration.xml"
-;"\epoc32\data\Z\private\200159c0\install\emailwidget\hsps\00\manifest.dat"                 - "c:\private\200159c0\install\emailwidget\hsps\00\manifest.dat"
-; + CenRep
-
 ; emailservices / emailframework
 "\epoc32\release\armv5\urel\FSMailFramework.dll"                 - "c:\sys\bin\FSMailFramework.dll"
 "\epoc32\release\armv5\urel\FSFWCommonLib.dll"                   - "c:\sys\bin\FSFWCommonLib.dll"
@@ -122,7 +114,7 @@
 "\epoc32\release\armv5\urel\PsMruAdapter.dll"                    - "c:\sys\bin\PsMruAdapter.dll"
 "\epoc32\data\z\resource\plugins\PsMruAdapter.rsc"               - "c:\resource\plugins\PsMruAdapter.rsc"
 
-; emailstore
+; emailservices / emailstore
 "\epoc32\release\armv5\urel\baseplugin.dll"                      - "c:\sys\bin\baseplugin.dll"
 "\epoc32\release\armv5\urel\MessageStoreClient.dll"              - "c:\sys\bin\MessageStoreClient.dll"
 "\epoc32\release\armv5\urel\MessageStoreServer.dll"              - "c:\sys\bin\MessageStoreServer.dll"
@@ -130,7 +122,7 @@
 "\epoc32\release\armv5\urel\ImsPointSecMonitor.dll"              - "c:\sys\bin\ImsPointSecMonitor.dll"
 "\epoc32\release\armv5\urel\DebugLog.dll"                        - "c:\sys\bin\DebugLog.dll"
 
-; emailserver
+; emailservices / emailserver
 "\epoc32\data\z\resource\apps\fsmailserver.rsc"                  - "c:\resource\apps\fsmailserver.rsc"
 "\epoc32\release\armv5\urel\fsmailserver.exe"                    - "c:\sys\bin\fsmailserver.exe"
 "\epoc32\data\z\private\10003a3f\apps\fsmailserver_reg.rsc"      - "c:\private\10003a3f\import\apps\fsmailserver_reg.rsc"
@@ -139,6 +131,10 @@
 "\epoc32\data\z\resource\apps\cmailhandlerplugin.mif"            - "c:\resource\apps\cmailhandlerplugin.mif"
 "\epoc32\data\Z\resource\apps\emailwidget.rsc"                   - "c:\resource\apps\emailwidget.rsc"
 
+; emailservices / emailclientapi
+"\epoc32\release\armv5\urel\emailclientapi.dll"                  - "c:\sys\bin\emailclientapi.dll"
+"\epoc32\data\z\resource\plugins\emailclientapi.rsc"             - "c:\resource\plugins\emailclientapi.rsc"
+
 ; ipservices
 "\epoc32\release\armv5\urel\ipssosplugin.dll"                    - "c:\sys\bin\ipssosplugin.dll"
 "\epoc32\release\armv5\urel\ipssossettings.dll"                  - "c:\sys\bin\ipssossettings.dll"
@@ -243,7 +239,20 @@
 "\epoc32\data\Z\private\10202BE9\2001E610.txt"                   - "c:\private\10202be9\2001E610.txt"
 "\epoc32\data\Z\private\10202BE9\2001E611.txt"                   - "c:\private\10202be9\2001E611.txt"
 
-; HomeScreen widget still missing from here
+; Emailuis / emailwidgetsettings
+"\epoc32\release\armv5\urel\emailwidgetsettings.exe"               - "c:\sys\bin\emailwidgetsettings.exe"
+"\epoc32\data\z\private\10003a3f\apps\emailwidgetsettings_reg.rsc" - "c:\private\10003a3f\import\apps\emailwidgetsettings_reg.rsc"
+"\epoc32\data\z\resource\apps\emailwidgetsettings.rsc"             - "c:\resource\apps\emailwidgetsettings.rsc"
+"\epoc32\data\z\resource\apps\emailwidgetsettings.mif"             - "c:\resource\apps\emailwidgetsettings.mif"
+
+; Emailuis / widget
+; Non-localized files:
+"\epoc32\data\Z\private\200159c0\install\emailwidget\hsps\00\widgetconfiguration.xml"      - "c:\private\200159c0\install\emailwidget\hsps\00\widgetconfiguration.xml"
+"\epoc32\data\Z\private\200159c0\install\emailwidget\hsps\00\manifest.dat"                 - "c:\private\200159c0\install\emailwidget\hsps\00\manifest.dat"
+"\epoc32\data\Z\private\200159c0\install\emailwidget\hsps\00\qgn_menu_cmail.svg"           - "c:\private\200159c0\install\emailwidget\hsps\00\qgn_menu_cmail.svg"
+; Localized files (need to be clarified how these really work):
+"\epoc32\data\Z\private\200159c0\install\emailwidget\xuikon\00\EW.o0000"                   - "c:\private\200159c0\install\emailwidget\xuikon\00\EW.o0000"
+"\epoc32\data\Z\private\200159c0\install\emailwidget\hsps\00\emailwidgetconfiguration.dtd" - "c:\private\200159c0\install\emailwidget\hsps\00\emailwidgetconfiguration.dtd"
 
 ; emailservices / emailservermonitor
 "\epoc32\release\armv5\urel\emailservermonitor.exe"              - "c:\sys\bin\emailservermonitor.exe"
--- a/emailuis/emailui/sis/commonemail_loc.pkg	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/sis/commonemail_loc.pkg	Tue Feb 02 00:02:40 2010 +0200
@@ -70,6 +70,7 @@
 
 "\epoc32\data\z\private\2001E277\HtmlFile\attachment.gif"        - "c:\private\2001E277\HtmlFile\attachment.gif"
 "\epoc32\data\z\private\2001E277\HtmlFile\email.html"            - "c:\private\2001E277\HtmlFile\email.html"
+"\epoc32\data\z\private\2001E277\HtmlFile\email_rtl.html"        - "c:\private\2001E277\HtmlFile\email_rtl.html"
 "\epoc32\data\z\private\2001E277\HtmlFile\header.js"             - "c:\private\2001E277\HtmlFile\header.js"
 "\epoc32\data\z\private\2001E277\HtmlFile\plus.gif"              - "c:\private\2001E277\HtmlFile\plus.gif"
 "\epoc32\data\z\private\2001E277\HtmlFile\minus.gif"             - "c:\private\2001E277\HtmlFile\minus.gif"
@@ -101,14 +102,6 @@
 "\epoc32\data\Z\resource\messaging\fsuidatamtm.rsc"              - "c:\resource\messaging\fsuidatamtm.rsc"
 "\epoc32\data\z\resource\apps\fsuidatamtm.mif"                   - "c:\resource\apps\fsuidatamtm.mif"
 
-; Emailuis / widget
-; Only for TB 9.2, add after 5250+ branched:
-;"\epoc32\data\Z\private\200159c0\install\emailwidget\xuikon\00\EW.o0000"                   - "c:\private\200159c0\install\emailwidget\xuikon\00\EW.o0000"
-;"\epoc32\data\Z\private\200159c0\install\emailwidget\hsps\00\emailwidgetconfiguration.dtd" - "c:\private\200159c0\install\emailwidget\hsps\00\emailwidgetconfiguration.dtd"
-;"\epoc32\data\Z\private\200159c0\install\emailwidget\hsps\00\widgetconfiguration.xml"      - "c:\private\200159c0\install\emailwidget\hsps\00\widgetconfiguration.xml"
-;"\epoc32\data\Z\private\200159c0\install\emailwidget\hsps\00\manifest.dat"                 - "c:\private\200159c0\install\emailwidget\hsps\00\manifest.dat"
-; + CenRep
-
 ; emailservices / emailframework
 "\epoc32\release\armv5\urel\FSMailFramework.dll"                 - "c:\sys\bin\FSMailFramework.dll"
 "\epoc32\release\armv5\urel\FSFWCommonLib.dll"                   - "c:\sys\bin\FSFWCommonLib.dll"
@@ -123,7 +116,7 @@
 "\epoc32\release\armv5\urel\PsMruAdapter.dll"                    - "c:\sys\bin\PsMruAdapter.dll"
 "\epoc32\data\z\resource\plugins\PsMruAdapter.rsc"               - "c:\resource\plugins\PsMruAdapter.rsc"
 
-; emailstore
+; emailservices / emailstore
 "\epoc32\release\armv5\urel\baseplugin.dll"                      - "c:\sys\bin\baseplugin.dll"
 "\epoc32\release\armv5\urel\MessageStoreClient.dll"              - "c:\sys\bin\MessageStoreClient.dll"
 "\epoc32\release\armv5\urel\MessageStoreServer.dll"              - "c:\sys\bin\MessageStoreServer.dll"
@@ -131,7 +124,7 @@
 "\epoc32\release\armv5\urel\ImsPointSecMonitor.dll"              - "c:\sys\bin\ImsPointSecMonitor.dll"
 "\epoc32\release\armv5\urel\DebugLog.dll"                        - "c:\sys\bin\DebugLog.dll"
 
-; emailserver
+; emailservices / emailserver
 ; Following line is localized, so this Engineering English line is commented out
 ;"\epoc32\data\z\resource\apps\fsmailserver.rsc"                  - "c:\resource\apps\fsmailserver.rsc"
 "\epoc32\release\armv5\urel\fsmailserver.exe"                    - "c:\sys\bin\fsmailserver.exe"
@@ -142,6 +135,10 @@
 ; Following line is localized, so this Engineering English line is commented out
 ;"\epoc32\data\Z\resource\apps\emailwidget.rsc"                   - "c:\resource\apps\emailwidget.rsc"
 
+; emailservices / emailclientapi
+"\epoc32\release\armv5\urel\emailclientapi.dll"                  - "c:\sys\bin\emailclientapi.dll"
+"\epoc32\data\z\resource\plugins\emailclientapi.rsc"             - "c:\resource\plugins\emailclientapi.rsc"
+
 ; ipservices
 "\epoc32\release\armv5\urel\ipssosplugin.dll"                    - "c:\sys\bin\ipssosplugin.dll"
 "\epoc32\release\armv5\urel\ipssossettings.dll"                  - "c:\sys\bin\ipssossettings.dll"
@@ -255,7 +252,21 @@
 "\epoc32\data\Z\private\10202BE9\2001E610.txt"                   - "c:\private\10202be9\2001E610.txt"
 "\epoc32\data\Z\private\10202BE9\2001E611.txt"                   - "c:\private\10202be9\2001E611.txt"
 
-; HomeScreen widget still missing from here
+; Emailuis / emailwidgetsettings
+"\epoc32\release\armv5\urel\emailwidgetsettings.exe"               - "c:\sys\bin\emailwidgetsettings.exe"
+"\epoc32\data\z\private\10003a3f\apps\emailwidgetsettings_reg.rsc" - "c:\private\10003a3f\import\apps\emailwidgetsettings_reg.rsc"
+; Following line is localized, so this Engineering English line is commented out
+;"\epoc32\data\z\resource\apps\emailwidgetsettings.rsc"             - "c:\resource\apps\emailwidgetsettings.rsc"
+"\epoc32\data\z\resource\apps\emailwidgetsettings.mif"             - "c:\resource\apps\emailwidgetsettings.mif"
+
+; Emailuis / widget
+; Non-localized files:
+"\epoc32\data\Z\private\200159c0\install\emailwidget\hsps\00\widgetconfiguration.xml"      - "c:\private\200159c0\install\emailwidget\hsps\00\widgetconfiguration.xml"
+"\epoc32\data\Z\private\200159c0\install\emailwidget\hsps\00\manifest.dat"                 - "c:\private\200159c0\install\emailwidget\hsps\00\manifest.dat"
+"\epoc32\data\Z\private\200159c0\install\emailwidget\hsps\00\qgn_menu_cmail.svg"           - "c:\private\200159c0\install\emailwidget\hsps\00\qgn_menu_cmail.svg"
+; Localized files (need to be clarified how these really work):
+"\epoc32\data\Z\private\200159c0\install\emailwidget\xuikon\00\EW.o0000"                   - "c:\private\200159c0\install\emailwidget\xuikon\00\EW.o0000"
+"\epoc32\data\Z\private\200159c0\install\emailwidget\hsps\00\emailwidgetconfiguration.dtd" - "c:\private\200159c0\install\emailwidget\hsps\00\emailwidgetconfiguration.dtd"
 
 IF EXISTS( "z:\resource\avkon.r01" )
     "\epoc32\data\z\resource\apps\freestyleemailui.r01"              - "c:\resource\apps\freestyleemailui.r01"
@@ -271,6 +282,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r01"             - "c:\resource\apps\emailwidgetsettings.r01"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r02" )
@@ -287,6 +299,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r02"             - "c:\resource\apps\emailwidgetsettings.r02"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r03" )
@@ -303,6 +316,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r03"             - "c:\resource\apps\emailwidgetsettings.r03"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r04" )
@@ -319,6 +333,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r04"             - "c:\resource\apps\emailwidgetsettings.r04"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r05" )
@@ -335,6 +350,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r05"             - "c:\resource\apps\emailwidgetsettings.r05"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r06" )
@@ -351,6 +367,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r06"             - "c:\resource\apps\emailwidgetsettings.r06"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r07" )
@@ -367,6 +384,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r07"             - "c:\resource\apps\emailwidgetsettings.r07"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r08" )
@@ -383,6 +401,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r08"             - "c:\resource\apps\emailwidgetsettings.r08"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r09" )
@@ -399,6 +418,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r09"             - "c:\resource\apps\emailwidgetsettings.r09"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r10" )
@@ -415,6 +435,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r10"             - "c:\resource\apps\emailwidgetsettings.r10"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r13" )
@@ -431,6 +452,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r13"             - "c:\resource\apps\emailwidgetsettings.r13"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r14" )
@@ -447,6 +469,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r14"             - "c:\resource\apps\emailwidgetsettings.r14"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r15" )
@@ -463,6 +486,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r15"             - "c:\resource\apps\emailwidgetsettings.r15"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r16" )
@@ -479,6 +503,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r16"             - "c:\resource\apps\emailwidgetsettings.r16"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r17" )
@@ -495,6 +520,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r17"             - "c:\resource\apps\emailwidgetsettings.r17"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r18" )
@@ -511,6 +537,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r18"             - "c:\resource\apps\emailwidgetsettings.r18"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r25" )
@@ -527,6 +554,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r25"             - "c:\resource\apps\emailwidgetsettings.r25"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r26" )
@@ -543,6 +571,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r26"             - "c:\resource\apps\emailwidgetsettings.r26"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r27" )
@@ -559,6 +588,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r27"             - "c:\resource\apps\emailwidgetsettings.r27"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r28" )
@@ -575,6 +605,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r28"             - "c:\resource\apps\emailwidgetsettings.r28"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r29" )
@@ -591,6 +622,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r29"             - "c:\resource\apps\emailwidgetsettings.r29"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r30" )
@@ -607,6 +639,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r30"             - "c:\resource\apps\emailwidgetsettings.r30"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r31" )
@@ -623,6 +656,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r31"             - "c:\resource\apps\emailwidgetsettings.r31"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r32" )
@@ -639,6 +673,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r32"             - "c:\resource\apps\emailwidgetsettings.r32"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r33" )
@@ -655,6 +690,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r33"             - "c:\resource\apps\emailwidgetsettings.r33"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r37" )
@@ -671,6 +707,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r37"             - "c:\resource\apps\emailwidgetsettings.r37"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r39" )
@@ -687,6 +724,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r39"             - "c:\resource\apps\emailwidgetsettings.r39"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r42" )
@@ -703,6 +741,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r42"             - "c:\resource\apps\emailwidgetsettings.r42"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r44" )
@@ -719,6 +758,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r44"             - "c:\resource\apps\emailwidgetsettings.r44"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r45" )
@@ -735,6 +775,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r45"             - "c:\resource\apps\emailwidgetsettings.r45"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r49" )
@@ -751,6 +792,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r49"             - "c:\resource\apps\emailwidgetsettings.r49"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r50" )
@@ -767,6 +809,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r50"             - "c:\resource\apps\emailwidgetsettings.r50"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r51" )
@@ -783,6 +826,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r51"             - "c:\resource\apps\emailwidgetsettings.r51"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r54" )
@@ -799,6 +843,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r54"             - "c:\resource\apps\emailwidgetsettings.r54"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r57" )
@@ -815,6 +860,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r57"             - "c:\resource\apps\emailwidgetsettings.r57"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r59" )
@@ -831,6 +877,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r59"             - "c:\resource\apps\emailwidgetsettings.r59"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r67" )
@@ -847,6 +894,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r67"             - "c:\resource\apps\emailwidgetsettings.r67"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r68" )
@@ -863,6 +911,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r68"             - "c:\resource\apps\emailwidgetsettings.r68"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r70" )
@@ -879,6 +928,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r70"             - "c:\resource\apps\emailwidgetsettings.r70"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r76" )
@@ -895,6 +945,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r76"             - "c:\resource\apps\emailwidgetsettings.r76"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r78" )
@@ -911,6 +962,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r78"             - "c:\resource\apps\emailwidgetsettings.r78"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r79" )
@@ -927,6 +979,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r79"             - "c:\resource\apps\emailwidgetsettings.r79"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r83" )
@@ -943,6 +996,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r83"             - "c:\resource\apps\emailwidgetsettings.r83"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r93" )
@@ -959,6 +1013,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r93"             - "c:\resource\apps\emailwidgetsettings.r93"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r94" )
@@ -975,6 +1030,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r94"             - "c:\resource\apps\emailwidgetsettings.r94"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r96" )
@@ -991,6 +1047,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r96"             - "c:\resource\apps\emailwidgetsettings.r96"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r102" )
@@ -1007,6 +1064,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r102"             - "c:\resource\apps\emailwidgetsettings.r102"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r103" )
@@ -1023,6 +1081,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r103"             - "c:\resource\apps\emailwidgetsettings.r103"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r129" )
@@ -1039,6 +1098,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r129"             - "c:\resource\apps\emailwidgetsettings.r129"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r157" )
@@ -1055,6 +1115,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r157"             - "c:\resource\apps\emailwidgetsettings.r157"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r158" )
@@ -1071,6 +1132,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r158"             - "c:\resource\apps\emailwidgetsettings.r158"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r159" )
@@ -1087,6 +1149,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r159"             - "c:\resource\apps\emailwidgetsettings.r159"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r160" )
@@ -1103,6 +1166,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r160"             - "c:\resource\apps\emailwidgetsettings.r160"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r161" )
@@ -1119,6 +1183,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r161"             - "c:\resource\apps\emailwidgetsettings.r161"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r326" )
@@ -1135,6 +1200,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r326"             - "c:\resource\apps\emailwidgetsettings.r326"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r327" )
@@ -1151,6 +1217,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r327"             - "c:\resource\apps\emailwidgetsettings.r327"
 ENDIF
 
 ; emailservices / emailservermonitor
--- a/emailuis/emailui/sis/commonemail_udeb.pkg	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/sis/commonemail_udeb.pkg	Tue Feb 02 00:02:40 2010 +0200
@@ -57,7 +57,7 @@
 
 "\epoc32\data\z\private\2001E277\HtmlFile\attachment.gif"        - "c:\private\2001E277\HtmlFile\attachment.gif"
 "\epoc32\data\z\private\2001E277\HtmlFile\email.html"            - "c:\private\2001E277\HtmlFile\email.html"
-"\epoc32\data\z\private\2001E277\HtmlFile\email_rtl.html"            - "c:\private\2001E277\HtmlFile\email_rtl.html"
+"\epoc32\data\z\private\2001E277\HtmlFile\email_rtl.html"        - "c:\private\2001E277\HtmlFile\email_rtl.html"
 "\epoc32\data\z\private\2001E277\HtmlFile\header.js"             - "c:\private\2001E277\HtmlFile\header.js"
 "\epoc32\data\z\private\2001E277\HtmlFile\plus.gif"              - "c:\private\2001E277\HtmlFile\plus.gif"
 "\epoc32\data\z\private\2001E277\HtmlFile\minus.gif"             - "c:\private\2001E277\HtmlFile\minus.gif"
@@ -88,14 +88,6 @@
 "\epoc32\data\Z\resource\messaging\fsuidatamtm.rsc"              - "c:\resource\messaging\fsuidatamtm.rsc"
 "\epoc32\data\z\resource\apps\fsuidatamtm.mif"                   - "c:\resource\apps\fsuidatamtm.mif"
 
-; Emailuis / widget
-; Only for TB 9.2, add after 5250+ branched:
-;"\epoc32\data\Z\private\200159c0\install\emailwidget\xuikon\00\EW.o0000"                   - "c:\private\200159c0\install\emailwidget\xuikon\00\EW.o0000"
-;"\epoc32\data\Z\private\200159c0\install\emailwidget\hsps\00\emailwidgetconfiguration.dtd" - "c:\private\200159c0\install\emailwidget\hsps\00\emailwidgetconfiguration.dtd"
-;"\epoc32\data\Z\private\200159c0\install\emailwidget\hsps\00\widgetconfiguration.xml"      - "c:\private\200159c0\install\emailwidget\hsps\00\widgetconfiguration.xml"
-;"\epoc32\data\Z\private\200159c0\install\emailwidget\hsps\00\manifest.dat"                 - "c:\private\200159c0\install\emailwidget\hsps\00\manifest.dat"
-; + CenRep
-
 ; emailservices / emailframework
 "\epoc32\release\armv5\udeb\FSMailFramework.dll"                 - "c:\sys\bin\FSMailFramework.dll"
 "\epoc32\release\armv5\udeb\FSFWCommonLib.dll"                   - "c:\sys\bin\FSFWCommonLib.dll"
@@ -127,6 +119,10 @@
 "\epoc32\data\z\resource\apps\cmailhandlerplugin.mif"            - "c:\resource\apps\cmailhandlerplugin.mif"
 "\epoc32\data\Z\resource\apps\emailwidget.rsc"                   - "c:\resource\apps\emailwidget.rsc"
 
+; emailservices / emailclientapi
+"\epoc32\release\armv5\udeb\emailclientapi.dll"                  - "c:\sys\bin\emailclientapi.dll"
+"\epoc32\data\z\resource\plugins\emailclientapi.rsc"             - "c:\resource\plugins\emailclientapi.rsc"
+
 ; ipservices
 "\epoc32\release\armv5\udeb\ipssosplugin.dll"                    - "c:\sys\bin\ipssosplugin.dll"
 "\epoc32\release\armv5\udeb\ipssossettings.dll"                  - "c:\sys\bin\ipssossettings.dll"
@@ -231,7 +227,20 @@
 "\epoc32\data\Z\private\10202BE9\2001E610.txt"                   - "c:\private\10202be9\2001E610.txt"
 "\epoc32\data\Z\private\10202BE9\2001E611.txt"                   - "c:\private\10202be9\2001E611.txt"
 
-; HomeScreen widget still missing from here
+; Emailuis / emailwidgetsettings
+"\epoc32\release\armv5\udeb\emailwidgetsettings.exe"               - "c:\sys\bin\emailwidgetsettings.exe"
+"\epoc32\data\z\private\10003a3f\apps\emailwidgetsettings_reg.rsc" - "c:\private\10003a3f\import\apps\emailwidgetsettings_reg.rsc"
+"\epoc32\data\z\resource\apps\emailwidgetsettings.rsc"             - "c:\resource\apps\emailwidgetsettings.rsc"
+"\epoc32\data\z\resource\apps\emailwidgetsettings.mif"             - "c:\resource\apps\emailwidgetsettings.mif"
+
+; Emailuis / widget
+; Non-localized files:
+"\epoc32\data\Z\private\200159c0\install\emailwidget\hsps\00\widgetconfiguration.xml"      - "c:\private\200159c0\install\emailwidget\hsps\00\widgetconfiguration.xml"
+"\epoc32\data\Z\private\200159c0\install\emailwidget\hsps\00\manifest.dat"                 - "c:\private\200159c0\install\emailwidget\hsps\00\manifest.dat"
+"\epoc32\data\Z\private\200159c0\install\emailwidget\hsps\00\qgn_menu_cmail.svg"           - "c:\private\200159c0\install\emailwidget\hsps\00\qgn_menu_cmail.svg"
+; Localized files (need to be clarified how these really work):
+"\epoc32\data\Z\private\200159c0\install\emailwidget\xuikon\00\EW.o0000"                   - "c:\private\200159c0\install\emailwidget\xuikon\00\EW.o0000"
+"\epoc32\data\Z\private\200159c0\install\emailwidget\hsps\00\emailwidgetconfiguration.dtd" - "c:\private\200159c0\install\emailwidget\hsps\00\emailwidgetconfiguration.dtd"
 
 ; emailservices / emailservermonitor
 "\epoc32\release\armv5\udeb\emailservermonitor.exe"              - "c:\sys\bin\emailservermonitor.exe"
--- a/emailuis/emailui/sis/commonemail_udeb_loc.pkg	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/sis/commonemail_udeb_loc.pkg	Tue Feb 02 00:02:40 2010 +0200
@@ -58,6 +58,7 @@
 
 "\epoc32\data\z\private\2001E277\HtmlFile\attachment.gif"        - "c:\private\2001E277\HtmlFile\attachment.gif"
 "\epoc32\data\z\private\2001E277\HtmlFile\email.html"            - "c:\private\2001E277\HtmlFile\email.html"
+"\epoc32\data\z\private\2001E277\HtmlFile\email_rtl.html"        - "c:\private\2001E277\HtmlFile\email_rtl.html"
 "\epoc32\data\z\private\2001E277\HtmlFile\header.js"             - "c:\private\2001E277\HtmlFile\header.js"
 "\epoc32\data\z\private\2001E277\HtmlFile\plus.gif"              - "c:\private\2001E277\HtmlFile\plus.gif"
 "\epoc32\data\z\private\2001E277\HtmlFile\minus.gif"             - "c:\private\2001E277\HtmlFile\minus.gif"
@@ -89,14 +90,6 @@
 "\epoc32\data\Z\resource\messaging\fsuidatamtm.rsc"              - "c:\resource\messaging\fsuidatamtm.rsc"
 "\epoc32\data\z\resource\apps\fsuidatamtm.mif"                   - "c:\resource\apps\fsuidatamtm.mif"
 
-; Emailuis / widget
-; Only for TB 9.2, add after 5250+ branched:
-;"\epoc32\data\Z\private\200159c0\install\emailwidget\xuikon\00\EW.o0000"                   - "c:\private\200159c0\install\emailwidget\xuikon\00\EW.o0000"
-;"\epoc32\data\Z\private\200159c0\install\emailwidget\hsps\00\emailwidgetconfiguration.dtd" - "c:\private\200159c0\install\emailwidget\hsps\00\emailwidgetconfiguration.dtd"
-;"\epoc32\data\Z\private\200159c0\install\emailwidget\hsps\00\widgetconfiguration.xml"      - "c:\private\200159c0\install\emailwidget\hsps\00\widgetconfiguration.xml"
-;"\epoc32\data\Z\private\200159c0\install\emailwidget\hsps\00\manifest.dat"                 - "c:\private\200159c0\install\emailwidget\hsps\00\manifest.dat"
-; + CenRep
-
 ; emailservices / emailframework
 "\epoc32\release\armv5\udeb\FSMailFramework.dll"                 - "c:\sys\bin\FSMailFramework.dll"
 "\epoc32\release\armv5\udeb\FSFWCommonLib.dll"                   - "c:\sys\bin\FSFWCommonLib.dll"
@@ -130,6 +123,10 @@
 ; Following line is localized, so this Engineering English line is commented out
 ;"\epoc32\data\Z\resource\apps\emailwidget.rsc"                   - "c:\resource\apps\emailwidget.rsc"
 
+; emailservices / emailclientapi
+"\epoc32\release\armv5\udeb\emailclientapi.dll"                  - "c:\sys\bin\emailclientapi.dll"
+"\epoc32\data\z\resource\plugins\emailclientapi.rsc"             - "c:\resource\plugins\emailclientapi.rsc"
+
 ; ipservices
 "\epoc32\release\armv5\udeb\ipssosplugin.dll"                    - "c:\sys\bin\ipssosplugin.dll"
 "\epoc32\release\armv5\udeb\ipssossettings.dll"                  - "c:\sys\bin\ipssossettings.dll"
@@ -243,7 +240,21 @@
 "\epoc32\data\Z\private\10202BE9\2001E610.txt"                   - "c:\private\10202be9\2001E610.txt"
 "\epoc32\data\Z\private\10202BE9\2001E611.txt"                   - "c:\private\10202be9\2001E611.txt"
 
-; HomeScreen widget still missing from here
+; Emailuis / emailwidgetsettings
+"\epoc32\release\armv5\udeb\emailwidgetsettings.exe"               - "c:\sys\bin\emailwidgetsettings.exe"
+"\epoc32\data\z\private\10003a3f\apps\emailwidgetsettings_reg.rsc" - "c:\private\10003a3f\import\apps\emailwidgetsettings_reg.rsc"
+; Following line is localized, so this Engineering English line is commented out
+;"\epoc32\data\z\resource\apps\emailwidgetsettings.rsc"             - "c:\resource\apps\emailwidgetsettings.rsc"
+"\epoc32\data\z\resource\apps\emailwidgetsettings.mif"             - "c:\resource\apps\emailwidgetsettings.mif"
+
+; Emailuis / widget
+; Non-localized files:
+"\epoc32\data\Z\private\200159c0\install\emailwidget\hsps\00\widgetconfiguration.xml"      - "c:\private\200159c0\install\emailwidget\hsps\00\widgetconfiguration.xml"
+"\epoc32\data\Z\private\200159c0\install\emailwidget\hsps\00\manifest.dat"                 - "c:\private\200159c0\install\emailwidget\hsps\00\manifest.dat"
+"\epoc32\data\Z\private\200159c0\install\emailwidget\hsps\00\qgn_menu_cmail.svg"           - "c:\private\200159c0\install\emailwidget\hsps\00\qgn_menu_cmail.svg"
+; Localized files (need to be clarified how these really work):
+"\epoc32\data\Z\private\200159c0\install\emailwidget\xuikon\00\EW.o0000"                   - "c:\private\200159c0\install\emailwidget\xuikon\00\EW.o0000"
+"\epoc32\data\Z\private\200159c0\install\emailwidget\hsps\00\emailwidgetconfiguration.dtd" - "c:\private\200159c0\install\emailwidget\hsps\00\emailwidgetconfiguration.dtd"
 
 IF EXISTS( "z:\resource\avkon.r01" )
     "\epoc32\data\z\resource\apps\freestyleemailui.r01"              - "c:\resource\apps\freestyleemailui.r01"
@@ -259,6 +270,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r01"             - "c:\resource\apps\emailwidgetsettings.r01"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r02" )
@@ -275,6 +287,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r02"             - "c:\resource\apps\emailwidgetsettings.r02"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r03" )
@@ -291,6 +304,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r03"             - "c:\resource\apps\emailwidgetsettings.r03"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r04" )
@@ -307,6 +321,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r04"             - "c:\resource\apps\emailwidgetsettings.r04"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r05" )
@@ -323,6 +338,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r05"             - "c:\resource\apps\emailwidgetsettings.r05"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r06" )
@@ -339,6 +355,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r06"             - "c:\resource\apps\emailwidgetsettings.r06"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r07" )
@@ -355,6 +372,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r07"             - "c:\resource\apps\emailwidgetsettings.r07"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r08" )
@@ -371,6 +389,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r08"             - "c:\resource\apps\emailwidgetsettings.r08"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r09" )
@@ -387,6 +406,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r09"             - "c:\resource\apps\emailwidgetsettings.r09"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r10" )
@@ -403,6 +423,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r10"             - "c:\resource\apps\emailwidgetsettings.r10"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r13" )
@@ -419,6 +440,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r13"             - "c:\resource\apps\emailwidgetsettings.r13"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r14" )
@@ -435,6 +457,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r14"             - "c:\resource\apps\emailwidgetsettings.r14"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r15" )
@@ -451,6 +474,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r15"             - "c:\resource\apps\emailwidgetsettings.r15"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r16" )
@@ -467,6 +491,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r16"             - "c:\resource\apps\emailwidgetsettings.r16"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r17" )
@@ -483,6 +508,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r17"             - "c:\resource\apps\emailwidgetsettings.r17"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r18" )
@@ -499,6 +525,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r18"             - "c:\resource\apps\emailwidgetsettings.r18"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r25" )
@@ -515,6 +542,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r25"             - "c:\resource\apps\emailwidgetsettings.r25"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r26" )
@@ -531,6 +559,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r26"             - "c:\resource\apps\emailwidgetsettings.r26"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r27" )
@@ -547,6 +576,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r27"             - "c:\resource\apps\emailwidgetsettings.r27"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r28" )
@@ -563,6 +593,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r28"             - "c:\resource\apps\emailwidgetsettings.r28"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r29" )
@@ -579,6 +610,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r29"             - "c:\resource\apps\emailwidgetsettings.r29"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r30" )
@@ -595,6 +627,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r30"             - "c:\resource\apps\emailwidgetsettings.r30"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r31" )
@@ -611,6 +644,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r31"             - "c:\resource\apps\emailwidgetsettings.r31"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r32" )
@@ -627,6 +661,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r32"             - "c:\resource\apps\emailwidgetsettings.r32"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r33" )
@@ -643,6 +678,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r33"             - "c:\resource\apps\emailwidgetsettings.r33"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r37" )
@@ -659,6 +695,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r37"             - "c:\resource\apps\emailwidgetsettings.r37"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r39" )
@@ -675,6 +712,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r39"             - "c:\resource\apps\emailwidgetsettings.r39"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r42" )
@@ -691,6 +729,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r42"             - "c:\resource\apps\emailwidgetsettings.r42"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r44" )
@@ -707,6 +746,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r44"             - "c:\resource\apps\emailwidgetsettings.r44"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r45" )
@@ -723,6 +763,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r45"             - "c:\resource\apps\emailwidgetsettings.r45"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r49" )
@@ -739,6 +780,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r49"             - "c:\resource\apps\emailwidgetsettings.r49"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r50" )
@@ -755,6 +797,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r50"             - "c:\resource\apps\emailwidgetsettings.r50"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r51" )
@@ -771,6 +814,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r51"             - "c:\resource\apps\emailwidgetsettings.r51"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r54" )
@@ -787,6 +831,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r54"             - "c:\resource\apps\emailwidgetsettings.r54"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r57" )
@@ -803,6 +848,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r57"             - "c:\resource\apps\emailwidgetsettings.r57"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r59" )
@@ -819,6 +865,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r59"             - "c:\resource\apps\emailwidgetsettings.r59"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r67" )
@@ -835,6 +882,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r67"             - "c:\resource\apps\emailwidgetsettings.r67"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r68" )
@@ -851,6 +899,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r68"             - "c:\resource\apps\emailwidgetsettings.r68"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r70" )
@@ -867,6 +916,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r70"             - "c:\resource\apps\emailwidgetsettings.r70"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r76" )
@@ -883,6 +933,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r76"             - "c:\resource\apps\emailwidgetsettings.r76"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r78" )
@@ -899,6 +950,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r78"             - "c:\resource\apps\emailwidgetsettings.r78"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r79" )
@@ -915,6 +967,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r79"             - "c:\resource\apps\emailwidgetsettings.r79"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r83" )
@@ -931,6 +984,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r83"             - "c:\resource\apps\emailwidgetsettings.r83"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r93" )
@@ -947,6 +1001,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r93"             - "c:\resource\apps\emailwidgetsettings.r93"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r94" )
@@ -963,6 +1018,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r94"             - "c:\resource\apps\emailwidgetsettings.r94"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r96" )
@@ -979,6 +1035,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r96"             - "c:\resource\apps\emailwidgetsettings.r96"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r102" )
@@ -995,6 +1052,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r102"             - "c:\resource\apps\emailwidgetsettings.r102"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r103" )
@@ -1011,6 +1069,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r103"             - "c:\resource\apps\emailwidgetsettings.r103"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r129" )
@@ -1027,6 +1086,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r129"             - "c:\resource\apps\emailwidgetsettings.r129"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r157" )
@@ -1043,6 +1103,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r157"             - "c:\resource\apps\emailwidgetsettings.r157"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r158" )
@@ -1059,6 +1120,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r158"             - "c:\resource\apps\emailwidgetsettings.r158"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r159" )
@@ -1075,6 +1137,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r159"             - "c:\resource\apps\emailwidgetsettings.r159"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r160" )
@@ -1091,6 +1154,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r160"             - "c:\resource\apps\emailwidgetsettings.r160"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r161" )
@@ -1107,6 +1171,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r161"             - "c:\resource\apps\emailwidgetsettings.r161"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r326" )
@@ -1123,6 +1188,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r326"             - "c:\resource\apps\emailwidgetsettings.r326"
 ENDIF
 
 IF EXISTS( "z:\resource\avkon.r327" )
@@ -1139,6 +1205,7 @@
     "\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"
+    "\epoc32\data\z\resource\apps\emailwidgetsettings.r327"             - "c:\resource\apps\emailwidgetsettings.r327"
 ENDIF
 
 ; emailservices / emailservermonitor
--- a/emailuis/emailui/sis/commonemailstub.pkg	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/sis/commonemailstub.pkg	Tue Feb 02 00:02:40 2010 +0200
@@ -27,6 +27,16 @@
 ;Unique Vendor name 
 :"Symbian"
 
+; File list in this stub pkg is out-of-date. Current assumption is that we can
+; always use so called SU type certificates when signing our sisx-packages and
+; in that case there is no need to list the files in stub sis anymore. If it
+; becomes evident that this assumption is wrong, then this file list needs to
+; be updated based on the current content of the normal pkg-file(s).
+; 
+; Even if the assumption is correct, this file and the actual stub sis file
+; are still needed and the version number need to be up-to-date for IAD to
+; work correctly.
+
 ; emailuis / emailui 
 ""-"z:\sys\bin\FreestyleEmailUi.exe"
 ""-"z:\private\10003a3f\import\apps\FreestyleEmailUi_reg.r*"
Binary file emailuis/emailui/sis/commonemailstub.sis has changed
--- a/emailuis/emailui/sis/makecommonemailsisx.bat	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/sis/makecommonemailsisx.bat	Tue Feb 02 00:02:40 2010 +0200
@@ -48,14 +48,14 @@
 REM ----------------------------------------------------------------------------------------------------------
 REM MAIL FOR EXCHANGE
 
-IF EXIST ..\..\..\..\..\complementary\eas\sis (
+IF EXIST \ext\app\eas\sis (
 @echo ### Making Mail for Exchange SISX-package [eas_engine.sisx]
-cd ..\..\..\..\..\complementary\eas\sis
+cd \ext\app\eas\sis
 
 makesis eas_engine.pkg
 @echo.
 copy /Y eas_engine.SIS eas_engine.sisx
-signsis eas_engine.sisx eas_engine.sisx ..\..\..\app\commonemail\emailuis\emailui\sis\RnD_certs\s60\RDTest_02.der ..\..\..\app\commonemail\emailuis\emailui\sis\RnD_certs\s60\RDTest_02.key
+signsis eas_engine.sisx eas_engine.sisx \sf\app\commonemail\emailuis\emailui\sis\RnD_certs\s60\RDTest_02.der \sf\app\commonemail\emailuis\emailui\sis\RnD_certs\s60\RDTest_02.key
 @echo.
 
 @echo ### Making Mail for Exchange udeb SISX-package [eas_engine_udeb.sisx]
@@ -63,26 +63,35 @@
 makesis eas_engine_udeb.pkg
 @echo.
 copy /Y eas_engine_udeb.SIS eas_engine_udeb.sisx
-signsis eas_engine_udeb.sisx eas_engine_udeb.sisx ..\..\..\app\commonemail\emailuis\emailui\sis\RnD_certs\s60\RDTest_02.der ..\..\..\app\commonemail\emailuis\emailui\sis\RnD_certs\s60\RDTest_02.key
+signsis eas_engine_udeb.sisx eas_engine_udeb.sisx \sf\app\commonemail\emailuis\emailui\sis\RnD_certs\s60\RDTest_02.der \sf\app\commonemail\emailuis\emailui\sis\RnD_certs\s60\RDTest_02.key
 @echo.
 
 @echo ### Making Mail for Exchange localized SISX-package [eas_engine_loc.sisx]
 
-REM python ..\..\..\app\commonemail\emailuis\emailui\sis\pkg-localizer.py eas_engine.pkg
+REM python \sf\app\commonemail\emailuis\emailui\sis\pkg-localizer.py eas_engine.pkg
 
 makesis eas_engine_loc.pkg
 @echo.
 copy /Y eas_engine_loc.SIS eas_engine_loc.sisx
-signsis eas_engine_loc.sisx eas_engine_loc.sisx ..\..\..\app\commonemail\emailuis\emailui\sis\RnD_certs\s60\RDTest_02.der ..\..\..\app\commonemail\emailuis\emailui\sis\RnD_certs\s60\RDTest_02.key
+signsis eas_engine_loc.sisx eas_engine_loc.sisx \sf\app\commonemail\emailuis\emailui\sis\RnD_certs\s60\RDTest_02.der \sf\app\commonemail\emailuis\emailui\sis\RnD_certs\s60\RDTest_02.key
 @echo.
 
-copy /Y eas_engine.sisx ..\..\..\app\commonemail\emailuis\emailui\sis\
-copy /Y eas_engine_udeb.sisx ..\..\..\app\commonemail\emailuis\emailui\sis\
-copy /Y eas_engine_loc.sisx ..\..\..\app\commonemail\emailuis\emailui\sis\
+@echo ### Making Mail for Exchange localized udeb SISX-package [eas_engine_udeb_loc.sisx]
+
+makesis eas_engine_udeb_loc.pkg
+@echo.
+copy /Y eas_engine_udeb_loc.SIS eas_engine_udeb_loc.sisx
+signsis eas_engine_udeb_loc.sisx eas_engine_udeb_loc.sisx \sf\app\commonemail\emailuis\emailui\sis\RnD_certs\s60\RDTest_02.der \sf\app\commonemail\emailuis\emailui\sis\RnD_certs\s60\RDTest_02.key
+@echo.
 
-cd ..\..\..\app\commonemail\emailuis\emailui\sis
+copy /Y eas_engine.sisx \sf\app\commonemail\emailuis\emailui\sis\
+copy /Y eas_engine_udeb.sisx \sf\app\commonemail\emailuis\emailui\sis\
+copy /Y eas_engine_loc.sisx \sf\app\commonemail\emailuis\emailui\sis\
+copy /Y eas_engine_udeb_loc.sisx \sf\app\commonemail\emailuis\emailui\sis\
+
+cd \sf\app\commonemail\emailuis\emailui\sis
 ) ELSE (
-@echo ### *** Error: Can't make Mail for Exchange SISX-package; folder ..\..\..\..\..\complementary\eas\sis not found! ***
+@echo ### *** Error: Can't make Mail for Exchange SISX-package; folder \ext\app\eas\sis not found! ***
 )
 @echo.
 
@@ -122,6 +131,16 @@
 signsis commonemail_loc.sisx commonemail_loc.sisx RnD_certs\s60\RDTest_02.der RnD_certs\s60\RDTest_02.key
 @echo.
 
+@echo ### Making Common Email localized udeb SISX-package [commonemail_udeb_loc.sisx]
+
+REM python pkg-localizer.py commonemail.pkg
+
+makesis commonemail_udeb_loc.pkg
+@echo.
+copy /Y commonemail_udeb_loc.SIS commonemail_udeb_loc.sisx
+signsis commonemail_udeb_loc.sisx commonemail_udeb_loc.sisx RnD_certs\s60\RDTest_02.der RnD_certs\s60\RDTest_02.key
+@echo.
+
 
 @echo ### Making Email UI SISX-package [emailui.sisx]
 
@@ -149,6 +168,16 @@
 signsis emailui_loc.sisx emailui_loc.sisx RnD_certs\s60\RDTest_02.der RnD_certs\s60\RDTest_02.key
 @echo.
 
+@echo ### Making Email UI localized udeb SISX-package [emailui_udeb_loc.sisx]
+
+python pkg-localizer.py emailui_udeb.pkg
+
+makesis emailui_udeb_loc.pkg
+@echo.
+copy /Y emailui_udeb_loc.SIS emailui_udeb_loc.sisx
+signsis emailui_udeb_loc.sisx emailui_udeb_loc.sisx RnD_certs\s60\RDTest_02.der RnD_certs\s60\RDTest_02.key
+@echo.
+
 
 @echo ###  Done!  ###
 @echo ###############
--- a/emailuis/emailui/src/FreestyleEmailUiAknStatusIndicator.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/src/FreestyleEmailUiAknStatusIndicator.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -2,9 +2,9 @@
 * 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 "Symbian Foundation License v1.0"
+* under the terms of "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
-* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
 */ 
 
 #include "FreestyleEmailUiAknStatusIndicator.h"
--- a/emailuis/emailui/src/FreestyleEmailUiAppui.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/src/FreestyleEmailUiAppui.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -2039,10 +2039,13 @@
 	{
     FUNC_LOG;
 	TBool ret(EFalse);
-	if ( !iNavigationHistory->IsEmpty() )
-	    {
-	    ret = iNavigationHistory->Head()->IsNextMsgAvailable( aCurrentMsgId, aFoundNextMsgId, aFoundNextMsgFolder );
-	    }
+    if( iNavigationHistory )
+        {
+        if ( !iNavigationHistory->IsEmpty() )
+            {
+            ret = iNavigationHistory->Head()->IsNextMsgAvailable( aCurrentMsgId, aFoundNextMsgId, aFoundNextMsgFolder );
+            }
+        }
 	return ret;
 	}
 
@@ -2053,10 +2056,13 @@
 	{
     FUNC_LOG;
 	TBool ret(EFalse);
-	if ( !iNavigationHistory->IsEmpty() )
-	    {
-	    ret = iNavigationHistory->Head()->IsPreviousMsgAvailable( aCurrentMsgId, aFoundPreviousMsgId, aFoundPrevMsgFolder );
-	    }
+    if( iNavigationHistory )
+        {
+        if ( !iNavigationHistory->IsEmpty() )
+            {
+            ret = iNavigationHistory->Head()->IsPreviousMsgAvailable( aCurrentMsgId, aFoundPreviousMsgId, aFoundPrevMsgFolder );
+            }
+        }
 	return ret;
 	}
 
@@ -2493,12 +2499,9 @@
         return KErrNone;
         }
 
-    if (self->iMainUiGridVisualiser)
+    if (!self->iMainUiGridVisualiser || self->iMainUiGridVisualiser->UiOperationLaunched())
         {
-        if (self->iMainUiGridVisualiser->UiOperationLaunched())
-            {
-            return KErrNone;
-            }
+        return KErrNone;
         }
 
     TRAPD( err, self->DisplayCreateMailboxQueryL() );
@@ -2750,7 +2753,10 @@
 void CFSEmailUiAutosyncMonitor::StartMonitoring()
     {
     FUNC_LOG;
+    if ( IsActive() )
+        {
         Cancel();
+        }
 #ifdef __WINS__ // do not try to connect on the emulator
     iRegisterationStatus = RMobilePhone::ERegisteredOnHomeNetwork;
     TRequestStatus* status = &iStatus;
--- a/emailuis/emailui/src/FreestyleEmailUiHtmlViewerContainer.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/src/FreestyleEmailUiHtmlViewerContainer.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -151,7 +151,7 @@
     delete iBrCtlInterface;
     iConnection.Close();
     iSocketServer.Close();
-    
+    delete iStatusIndicator;
     delete iOverlayControlNext;
     delete iOverlayControlPrev;
     }
@@ -196,7 +196,7 @@
     TRect rect( TPoint(), Size() );
 
     iBrCtlInterface = CreateBrowserControlL( this, rect, brCtlCapabilities,
-        TBrCtlDefs::ECommandIdBase, NULL, this, this );
+        TBrCtlDefs::ECommandIdBase, NULL, this, this, NULL, NULL, this, NULL );
 
     iBrCtlInterface->SetBrowserSettingL( TBrCtlDefs::ESettingsEmbedded, ETrue );
     iBrCtlInterface->SetBrowserSettingL( TBrCtlDefs::ESettingsAutoLoadImages, ETrue );
@@ -216,6 +216,7 @@
             EMbmFreestyleemailuiQgn_indi_cmail_arrow_previous,
             EMbmFreestyleemailuiQgn_indi_cmail_arrow_previous_mask );
     iScrollPosition = 0;
+    iAttachmentDownloadImageHandle = 0;
     ActivateL();
     }
 
@@ -362,7 +363,6 @@
 
     CFSMailMessagePart* htmlBodyPart = iMessage->HtmlBodyPartL();
 
-    TBool bodyPartAvailable( EFalse );
     if ( htmlBodyPart )
         {
         CleanupStack::PushL( htmlBodyPart );
@@ -372,7 +372,6 @@
         
         // Copy html body part to email html file
         CopyFileToHtmlFileL( htmlFile, KBodyHtmlFile, *htmlBodyPart );
-        bodyPartAvailable = ETrue;
         
         CleanupStack::PopAndDestroy( &htmlFile );
         CleanupStack::PopAndDestroy( htmlBodyPart );
@@ -398,28 +397,29 @@
             
             contentBuffer8->Des().Copy(*contentBuffer);         
             CopyFileToHtmlFileL( *contentBuffer8, KBodyHtmlFile, *textBodyPart );
-            bodyPartAvailable = ETrue;
             
             CleanupStack::PopAndDestroy( contentBuffer8 );
             CleanupStack::PopAndDestroy( contentBuffer );
             CleanupStack::PopAndDestroy( textBodyPart ); 
             }
-        }
-    // pass the emailHtmlFile to the browser for it to load
-    if ( bodyPartAvailable )
-        {
-        TPath emailHtmlFile;
-        emailHtmlFile.Copy( iHtmlFolderPath );
-        if ( direction == TBidiText::ELeftToRight )
-            {
-            emailHtmlFile.Append( KMessageHtmlFile );
-            }
         else
             {
-            emailHtmlFile.Append( KMessageHtmlRTLFile );
+            WriteEmptyBodyHtmlL( KBodyHtmlFile );
             }
-        LoadContentFromFileL( emailHtmlFile );
         }
+
+    // pass the emailHtmlFile to the browser for it to load
+    TPath emailHtmlFile;
+    emailHtmlFile.Copy( iHtmlFolderPath );
+    if ( direction == TBidiText::ELeftToRight )
+        {
+        emailHtmlFile.Append( KMessageHtmlFile );
+        }
+    else
+        {
+        emailHtmlFile.Append( KMessageHtmlRTLFile );
+        }
+    LoadContentFromFileL( emailHtmlFile );
     
     UpdateOverlayButtons( ETrue );
     }
@@ -456,8 +456,8 @@
             return iBrCtlInterface;
             }
         case 1:
-            if ( iAttachmentStatus )
-                return iAttachmentStatus;
+            if ( iStatusIndicator )
+                return iStatusIndicator;
             else
                 return NULL;
         default:
@@ -474,7 +474,7 @@
 TInt CFsEmailUiHtmlViewerContainer::CountComponentControls() const
     {
     FUNC_LOG;
-    if ( iAttachmentStatus )
+    if ( iStatusIndicator )
         {
         return 2;
         }
@@ -534,10 +534,10 @@
     
     UpdateOverlayButtons( IsVisible() );
     
-    if ( iAttachmentStatus )
+    if ( iStatusIndicator )
         {
         TRect rect = CalcAttachmentStatusRect();
-        iAttachmentStatus->SetRect( rect );
+        iStatusIndicator->SetRect( rect );
         }
     }
 
@@ -1711,20 +1711,31 @@
     SetRect( iAppUi.ClientRect() );
     }
 
-void CFsEmailUiHtmlViewerContainer::ShowAttacthmentDownloadStatusL( 
+void CFsEmailUiHtmlViewerContainer::ShowAttachmentDownloadStatusL( 
         TFSProgress::TFSProgressStatus aProgressStatus, 
         const TAttachmentData& aAttachmentData )
     {
     TBool freshDraw = EFalse;
-    
-    if ( !iAttachmentStatus )
+    //If the indicator was displaying fetching body then we will be displaying a different indicator
+    //this is just to make sure the image is updated
+    if(iStatusIndicator)
+        {
+        if (iStatusIndicator->Image())
+            {
+            if(iStatusIndicator->Image()->Handle() != iAttachmentDownloadImageHandle)
+                {
+                freshDraw = ETrue;
+                }
+            }
+        }
+    if ( !iStatusIndicator )
         {
         TRect rect = CalcAttachmentStatusRect();
-        iAttachmentStatus = CFreestyleEmailUiAknStatusIndicator::NewL( rect, this );
+        iStatusIndicator = CFreestyleEmailUiAknStatusIndicator::NewL( rect, this );
         freshDraw = ETrue;
         }    
     
-    if ( !iAttachmentStatus->IsVisible() 
+    if ( !iStatusIndicator->IsVisible() 
          || ( aAttachmentData.downloadProgress == KNone ) 
          || ( aProgressStatus == TFSProgress::EFSStatus_RequestCancelled ) )
         {
@@ -1786,14 +1797,18 @@
                 {
                 iAppUi.FsTextureManager()->ProvideBitmapL(EAttachmentsDownload, image, imageMask );
                 }
-            iAttachmentStatus->ShowIndicatorL( image, imageMask, statusText, duration );
+            if(image)
+                {
+                iAttachmentDownloadImageHandle = image->Handle();
+                }
+            iStatusIndicator->ShowIndicatorL( image, imageMask, statusText, duration );
             }
         else
             {
-            iAttachmentStatus->SetTextL( statusText );
+            iStatusIndicator->SetTextL( statusText );
             if ( duration > -1 )
                 {
-                iAttachmentStatus->HideIndicator( duration );
+                iStatusIndicator->HideIndicator( duration );
                 }
             }
         }
@@ -1801,11 +1816,11 @@
     CleanupStack::Pop( statusText );
     }
 
-TBool CFsEmailUiHtmlViewerContainer::AttacthmentDownloadStatusVisible()
+TBool CFsEmailUiHtmlViewerContainer::AttachmentDownloadStatusVisible()
     {
-    if ( iAttachmentStatus )
+    if ( iStatusIndicator )
         {
-        return iAttachmentStatus->IsVisible();
+        return iStatusIndicator->IsVisible();
         }
     else
         {
@@ -1813,11 +1828,11 @@
         }
     }
 
-void CFsEmailUiHtmlViewerContainer::HideAttacthmentDownloadStatus()
+void CFsEmailUiHtmlViewerContainer::HideDownloadStatus()
     {
-    if ( iAttachmentStatus )
+    if ( iStatusIndicator )
         {
-        iAttachmentStatus->MakeVisible( EFalse );
+        iStatusIndicator->MakeVisible( EFalse );
         }
     }
 
@@ -1958,3 +1973,32 @@
     CleanupStack::PopAndDestroy( handler );
     }
 
+void CFsEmailUiHtmlViewerContainer::WriteEmptyBodyHtmlL( const TDesC& aFileName )
+    {
+    FUNC_LOG;
+    TFileName targetFileName;
+    targetFileName.Copy( iTempHtmlFolderPath );
+    targetFileName.Append( aFileName );
+    
+    RFile targetFile;
+    CleanupClosePushL( targetFile );
+    User::LeaveIfError( targetFile.Replace( iFs, targetFileName, EFileWrite ) );
+    User::LeaveIfError( targetFile.Write( KHTMLEmptyContent ) );   
+    CleanupStack::PopAndDestroy( &targetFile );    
+    }
+
+void CFsEmailUiHtmlViewerContainer::DisplayStatusIndicatorL()
+    {
+    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 );
+    }
--- a/emailuis/emailui/src/FreestyleEmailUiHtmlViewerView.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/src/FreestyleEmailUiHtmlViewerView.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -62,6 +62,7 @@
 #include "FreestyleEmailUiMailViewerConstants.h"
 #include "FSDelayedLoader.h"
 #include "FreestyleMessageHeaderURL.h"
+#include "FreestyleEmailUiAknStatusIndicator.h"
 #include <akntoolbar.h>
 // CONSTANTS
 // Zoom levels available on the UI
@@ -446,7 +447,7 @@
 
     if ( iContainer )
         {
-        iContainer->HideAttacthmentDownloadStatus();
+        iContainer->HideDownloadStatus();
         iContainer->MakeVisible( EFalse );
         iAppUi.RemoveFromStack( iContainer );
         }
@@ -477,8 +478,6 @@
     {
     FUNC_LOG;
     
-    TBool bodypartNotFound ( EFalse );
-    
     if ( iMrObserverToInform && 
          aCustomMessageId == KStartViewerReturnToPreviousMsg )
         {
@@ -523,11 +522,7 @@
         {
         iContainer = CFsEmailUiHtmlViewerContainer::NewL( iAppUi, *this );
         }
-    else if ( iContainer ) // Container exists, make sure that it has a correct rect
-        {
-        iContainer->SetRect( ContainerRect() );
-        }
-
+   
     // Check whether this activation is actually for a meeting request
     TBool openedInMrViewer( EFalse );    
     if ( THtmlViewerActivationData::EMailMessage == iActivationData.iActivationDataType )
@@ -598,15 +593,7 @@
 		            TPartData msgPartData( iActivationData.iMailBoxId, iActivationData.iFolderId, iActivationData.iMessageId);
 		            iAttachmentsListModel->UpdateListL( msgPartData );
                        
-            		TRAPD( error, LoadContentFromMailMessageL( iMessage, ETrue ) );
-            		if ( error == KErrNotFound || error == KErrInUse || error == KErrLocked )
-            		    {
-            		    bodypartNotFound = ETrue;
-            		    }
-            		else if ( error != KErrNone)
-            		    {
-            		    User::Leave( error );
-            		    }
+            		LoadContentFromMailMessageL( iMessage, ETrue );
             		}
                 
                 }
@@ -654,15 +641,7 @@
                 }                
             
     
-            TRAPD( error, LoadContentFromMailMessageL( iOpenMessages->Head(), ETrue ) );
-            if ( error == KErrNotFound || error == KErrInUse || error == KErrLocked )
-                {
-                bodypartNotFound = ETrue;
-                }
-            else if ( error != KErrNone)
-                {
-                User::Leave( error );
-                }
+            LoadContentFromMailMessageL( iOpenMessages->Head(), ETrue );
             
             // update tool bar as some action menu boton should not appear in embbeded messages.
             UpdateToolbarL();
@@ -710,35 +689,63 @@
             }
         }
     
-    if ( !openedInMrViewer )
+    if ( !openedInMrViewer && iMessage)
         {
         CFSMailMessagePart* htmlBodyPart = iMessage->HtmlBodyPartL();
         TFetchedType type;
-        if( htmlBodyPart )
+        if ( htmlBodyPart )
             {
             type = EMessageHtmlBodyPart;
+            delete htmlBodyPart;
             }
         else
             {
             type = EMessagePlainTextBodyPart;
             }
-        if( !MessageStructureKnown(*iMessage) )
+
+        if ( !MessageStructureKnown(*iMessage) )
             {
+            iContainer->DisplayStatusIndicatorL();
             StartWaitedFetchingL(EMessageStructure);
             iFetchingAlready = ETrue;
             }
-        else if ( bodypartNotFound )
+        else 
             {
-            iAsyncProcessComplete = EFalse;
-            iFetchingAlready = EFalse;
-            iStartAsyncFetchType = type;
-            if(iMessage)
+            TBool bodypartNotFound ( EFalse );
+            if ( type == EMessagePlainTextBodyPart )
                 {
-                StartFetchingMessagePartL( *iMessage, type );
+                CFSMailMessagePart* textBodyPart = iMessage->PlainTextBodyPartL();
+                if ( textBodyPart )
+                    {
+                    delete textBodyPart;
+                    }
+                else
+                    {
+                    bodypartNotFound = ETrue;
+                    }                
+                }
+            
+            if ( bodypartNotFound )
+                {
+                iAsyncProcessComplete = EFalse;
+                iFetchingAlready = EFalse;
+                iStartAsyncFetchType = type;
+                if(iMessage)
+                    {
+                    StartFetchingMessagePartL( *iMessage, type );
+                    }
                 }
             }
        }
     iNextOrPrevMessageSelected = EFalse;
+    
+    //update rect only if it has changed from previous time.
+    if ( iContainer->Rect() != ContainerRect()  )
+        {
+        iContainer->SetRect( ContainerRect() );
+        }
+
+    
     }
 
 // -----------------------------------------------------------------------------
@@ -1651,9 +1658,9 @@
     else if ( aAttachment.downloadProgress != KComplete )
         {
         DownloadAttachmentL( aAttachment );
-        if ( iContainer && !iContainer->AttacthmentDownloadStatusVisible() )
+        if ( iContainer && !iContainer->AttachmentDownloadStatusVisible() )
             {
-            iContainer->ShowAttacthmentDownloadStatusL( TFSProgress::EFSStatus_Status, aAttachment );
+            iContainer->ShowAttachmentDownloadStatusL( TFSProgress::EFSStatus_Status, aAttachment );
             }
         }
     else
@@ -1669,9 +1676,9 @@
         {
         TInt savedCount( 0 );
         TBool downloadRequired = iAttachmentsListModel->SaveAttachmentL( aAttachment, fileName, savedCount );
-        if ( downloadRequired && iContainer && !iContainer->AttacthmentDownloadStatusVisible() )
+        if ( downloadRequired && iContainer && !iContainer->AttachmentDownloadStatusVisible() )
             {
-            iContainer->ShowAttacthmentDownloadStatusL( TFSProgress::EFSStatus_Status, aAttachment );
+            iContainer->ShowAttachmentDownloadStatusL( TFSProgress::EFSStatus_Status, aAttachment );
             }
         
         if ( savedCount )
@@ -1687,14 +1694,14 @@
     if ( TFsEmailUiUtility::ShowSaveFolderDialogL( fileName ) )
         {
         TBool downloadRequired = iAttachmentsListModel->SaveAllAttachmentsL( fileName );
-        if ( downloadRequired && iContainer && !iContainer->AttacthmentDownloadStatusVisible() )
+        if ( downloadRequired && iContainer && !iContainer->AttachmentDownloadStatusVisible() )
             {
             for ( TInt i = 0; i < iAttachmentsListModel->GetModel().Count(); i++ )
                 {
                 const TAttachmentData& attachment = iAttachmentsListModel->GetModel()[i];
                 if ( attachment.downloadProgress < KComplete )
                     {
-                    iContainer->ShowAttacthmentDownloadStatusL( TFSProgress::EFSStatus_Status, attachment );
+                    iContainer->ShowAttachmentDownloadStatusL( TFSProgress::EFSStatus_Status, attachment );
                     break;
                     }
                 }
@@ -1775,7 +1782,7 @@
                 break;
             }
         
-        iContainer->ShowAttacthmentDownloadStatusL( aEvent.iProgressStatus, *attachment );
+        iContainer->ShowAttachmentDownloadStatusL( aEvent.iProgressStatus, *attachment );
         }
     }
 
@@ -2185,6 +2192,7 @@
                                             TFetchedType aFetchedContentType )
     {
     FUNC_LOG;
+    iContainer->DisplayStatusIndicatorL();
     if( aFetchedContentType == EMessagePlainTextBodyPart )
         {
         CFSMailMessagePart* textPart = aMessagePtr.PlainTextBodyPartL();
@@ -2295,19 +2303,21 @@
                 }
             }
         }
-    
+    if(iContainer)
+        {
+        iContainer->HideDownloadStatus();
+        }
     if ( reloadContent )
         {
     
         if (  iContainer )
             {
-            iContainer->ResetContent();
-            }
-                
-        if( iMessage )
-            {
-            LoadContentFromMailMessageL( iMessage , EFalse);  
-            SetMskL();
+            iContainer->ResetContent();                
+			if( iMessage )
+				{
+				LoadContentFromMailMessageL( iMessage , EFalse);  
+				SetMskL();
+				}
             }
         }
             
@@ -2670,7 +2680,7 @@
         case EESMRCmdDownloadAttachment:
         case EESMRCmdDownloadAllAttachments:
             {
-            if(iAttachmentsListModel == NULL)
+            if( !iAttachmentsListModel )
                 {
                 iAttachmentsListModel = CFSEmailUiAttachmentsListModel::NewL( iAppUi, *this );
                 iAttachmentsListModel->UpdateListL( iOpenMessages->Head() );
@@ -2687,7 +2697,7 @@
         case EESMRCmdSaveAttachment:
         case EESMRCmdSaveAllAttachments:
             {
-            if(iAttachmentsListModel == NULL)
+            if( !iAttachmentsListModel )
                 {
                 iAttachmentsListModel = CFSEmailUiAttachmentsListModel::NewL( iAppUi, *this );
                 iAttachmentsListModel->UpdateListL( iOpenMessages->Head() );
--- a/emailuis/emailui/src/FreestyleEmailUiLauncherGridVisualiser.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/src/FreestyleEmailUiLauncherGridVisualiser.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -50,12 +50,14 @@
 #include "fsalfscrollbarlayout.h"
 #include <csxhelp/cmail.hlp.hrh>
 #include <featmgr.h>
+#include <coecntrl.h>
 
 #include <aknmessagequerydialog.h>
 #include <aknstyluspopupmenu.h>
 #include <aknlayoutscalable_avkon.cdl.h>
 #include <aknlayoutscalable_apps.cdl.h>
 #include <layoutmetadata.cdl.h>
+#include <touchfeedback.h>
 
 // INTERNAL INCLUDE FILES
 #include "FSEmailBuildFlags.h"
@@ -233,7 +235,8 @@
 		iStylusPopUpMenu->ConstructFromResourceL( reader );
 		CleanupStack::PopAndDestroy(); // reader
         }
-
+    
+    iCoeControl = new( ELeave )CCoeControl;
     // Initial visual layout update is done when the view gets activated.
     iRefreshNeeded = ETrue;
 
@@ -306,6 +309,7 @@
     delete iScrollbar;
     delete iMailboxDeleter;
     delete iStylusPopUpMenu;
+    delete iCoeControl;
     }
 
 void CFSEmailUiLauncherGridVisualiser::CreateModelL()
@@ -1106,6 +1110,13 @@
             {
             case TPointerEvent::EButton1Down:
                 {
+                // tactile feedback
+                MTouchFeedback* feedback = MTouchFeedback::Instance();
+                if ( feedback )
+                    {
+                    feedback->InstantFeedback( ETouchFeedbackBasic );
+                    }
+
                 iItemIdInButtonDownEvent.iItemId = id;
                 iItemIdInButtonDownEvent.iLaunchSelection = ETrue;
                 SetFocusedItemL( id );
@@ -2251,6 +2262,16 @@
         VisualLayoutUpdatedL();
 
         UpdateFocusVisibility();
+        
+        // Stylus pop-up menu is closed during Layout switching
+        if( iStylusPopUpMenuLaunched )
+            {
+            TRAP_IGNORE(iStylusPopUpMenu->HandleControlEventL(iCoeControl,
+                    MCoeControlObserver::EEventRequestExit ));
+
+            iStylusPopUpMenuLaunched = EFalse;
+            }
+       
         }
  	}
 
--- a/emailuis/emailui/src/FreestyleEmailUiMailViewerVisualiser.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/src/FreestyleEmailUiMailViewerVisualiser.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -38,7 +38,7 @@
 #include "fssmileydictionary.h"
 ///</cmail>
 #include <commonphoneparser.h>
-#include <BrowserLauncher.h>
+#include <browserlauncher.h>
 //<cmail>
 #include "CFSMailMessagePart.h"
 #include "CFSMailClient.h"
@@ -83,7 +83,7 @@
 #include <BrowserLauncher.h>
 
 // for bookmarks
-#include <FavouritesLimits.h>	// KBrowserBookmarks
+#include <FavouritesLimits.h>   // KBrowserBookmarks
 #include <FavouritesDb.h>
 
 // for fonts
@@ -160,25 +160,25 @@
 // CFSEmailUiMailViewerVisualiser::NewLC
 // -----------------------------------------------------------------------------
 CFSEmailUiMailViewerVisualiser* CFSEmailUiMailViewerVisualiser::NewLC( CAlfEnv& aEnv, CFreestyleEmailUiAppUi& aAppUi, CAlfControlGroup& aMailViewerControlGroup )
-	{
+    {
     FUNC_LOG;
     CFSEmailUiMailViewerVisualiser* self = new (ELeave) CFSEmailUiMailViewerVisualiser( aEnv, aAppUi, aMailViewerControlGroup );
     CleanupStack::PushL( self );
     self->ConstructL();
     return self;
-	}
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::ConstructL
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::ConstructL()
-	{
+    {
     FUNC_LOG;
     BaseConstructL( R_FSEMAILUI_MAIL_VIEWER_VIEW );
-	iMessage = NULL;
-	iNextOrPevMessageSelected = EFalse;
-	iFirstStartCompleted = EFalse;
-	}
+    iMessage = NULL;
+    iNextOrPevMessageSelected = EFalse;
+    iFirstStartCompleted = EFalse;
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::DoFirstStartL()
@@ -208,7 +208,7 @@
     MenuBar()->SetContextMenuTitleResourceId( R_FSEMAILUI_MAILVIEWER_MSK_MENUBAR );
 
     iFirstStartCompleted = ETrue;
-	}
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::CFSEmailUiMailViewerVisualiser
@@ -230,25 +230,25 @@
 // CFSEmailUiMailViewerVisualiser::~CFSEmailUiMailViewerVisualiser
 // -----------------------------------------------------------------------------
 CFSEmailUiMailViewerVisualiser::~CFSEmailUiMailViewerVisualiser()
-	{
+    {
     FUNC_LOG;
         //<cmail> notewrapper is replaced by iWaitDialog
-	//delete iAsyncWaitNote;
+    //delete iAsyncWaitNote;
         //</cmail>
-	if( iIBServiceHandler )
-		{
-		iIBServiceHandler->Reset();
-		delete iIBServiceHandler;
-		}
-
-	if ( iAsyncCallback )
-	    {
-	    iAsyncCallback->Cancel();
-	    delete iAsyncCallback;
-	    }
-
-	iDownloadProgressControlGroup = NULL; // owned by AlfEnv
-	}
+    if( iIBServiceHandler )
+        {
+        iIBServiceHandler->Reset();
+        delete iIBServiceHandler;
+        }
+
+    if ( iAsyncCallback )
+        {
+        iAsyncCallback->Cancel();
+        delete iAsyncCallback;
+        }
+
+    iDownloadProgressControlGroup = NULL; // owned by AlfEnv
+    }
 
 void CFSEmailUiMailViewerVisualiser::PrepareForExit()
     {
@@ -259,9 +259,9 @@
     iNewMailTempAddress = NULL;
 
     // Text viewer control need to be removed control group and deleted here,
-	// because akn physics (used by text viewer control) object's destructor
-	// ends up calling CoeEnv->AppUi, so AppUi must be alive when deleting
-	// text viewer control
+    // because akn physics (used by text viewer control) object's destructor
+    // ends up calling CoeEnv->AppUi, so AppUi must be alive when deleting
+    // text viewer control
     if ( iTextViewerControl )
         {
         ControlGroup().Remove( iTextViewerControl );
@@ -330,7 +330,7 @@
         // <cmail> Action menu is dismissed if it's opened on an attachment
         // and the download has completed (to prevent canceling after completion).
         SViewerHeadingHotSpotData currentHeaderHotSpotData;
-		CFindItemEngine::SFoundItem currentBodyHotSpotData;
+        CFindItemEngine::SFoundItem currentBodyHotSpotData;
 
         THotspotType hotspotType = iViewerRichText->FindCurrentHotSpotL(
             currentHeaderHotSpotData, currentBodyHotSpotData );
@@ -347,7 +347,7 @@
 
             if( menu->IsDisplayed() )
                 {
-        		menu->MenuPane()->CloseCascadeMenu();
+                menu->MenuPane()->CloseCascadeMenu();
                 }
             }
         // </cmail>
@@ -359,7 +359,7 @@
 // for MFSMailRequestObserver callback
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::RequestResponseL( TFSProgress aEvent, TInt aRequestId )
-	{
+    {
     FUNC_LOG;
     if ( iFirstStartCompleted ) // Safety
         {
@@ -456,78 +456,78 @@
     if(iAsyncProcessComplete && iWaitDialog && iDialogNotDismissed)
         iWaitDialog->ProcessFinishedL(); // deletes the dialog
     //</cmail>
-	}
+    }
 
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::FolderSelectedL
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::FolderSelectedL(
-	TFSMailMsgId aSelectedFolderId, TFSEmailUiCtrlBarResponse aResponse )
-	{
+    TFSMailMsgId aSelectedFolderId, TFSEmailUiCtrlBarResponse aResponse )
+    {
     FUNC_LOG;
 
     if ( iMoveToFolderOngoing )
-		{
-		iMoveToFolderOngoing = EFalse;
-		if ( !iMovingMeetingRequest )
-			{
-			switch ( aResponse )
-				{
-				case EFSEmailUiCtrlBarResponseSelect:
-					{
-					iMoveDestinationFolder = aSelectedFolderId;
-					iAsyncCallback->Cancel(); // cancel any outstanding callback just to be safe
-					iAsyncCallback->Set( TCallBack( MoveToFolderAndExitL, this ) );
-					iAsyncCallback->CallBack();
-					}
-					break;
+        {
+        iMoveToFolderOngoing = EFalse;
+        if ( !iMovingMeetingRequest )
+            {
+            switch ( aResponse )
+                {
+                case EFSEmailUiCtrlBarResponseSelect:
+                    {
+                    iMoveDestinationFolder = aSelectedFolderId;
+                    iAsyncCallback->Cancel(); // cancel any outstanding callback just to be safe
+                    iAsyncCallback->Set( TCallBack( MoveToFolderAndExitL, this ) );
+                    iAsyncCallback->CallBack();
+                    }
+                    break;
+                case EFSEmailUiCtrlBarResponseCancel:
+                default:
+                    break;
+                }
+            }
+        else
+            {
+            iMovingMeetingRequest = EFalse;
+            switch ( aResponse )
+                {
                 case EFSEmailUiCtrlBarResponseCancel:
-				default:
-					break;
-				}
-			}
-		else
-		 	{
-		 	iMovingMeetingRequest = EFalse;
-			switch ( aResponse )
-				{
-				case EFSEmailUiCtrlBarResponseCancel:
-					iOpResult.iResultCode = KErrCancel;
-					break;
-				case EFSEmailUiCtrlBarResponseSelect:
-					{
-					// Do moving here, do not exit, because mrui exists itself.
-					iOpResult.iResultCode = KErrNone;
-					iMoveDestinationFolder = aSelectedFolderId;
-				    RArray<TFSMailMsgId> messageIds;
-					CleanupClosePushL( messageIds );
-					messageIds.Append( iMessage->GetMessageId() );
-					// Trap is needed because protocol might return KErrNotSupported
-					// if move away from current folder is not supprted
-					TRAPD(errMove, iAppUi.GetActiveMailbox()->MoveMessagesL( messageIds,
-			                                          iMessage->GetFolderId(), iMoveDestinationFolder ));
-	        		if ( errMove != KErrNotSupported )
-		       			{
-	        			if ( errMove == KErrNone )
-			       			{
-						    TFsEmailUiUtility::DisplayMsgsMovedNoteL( 1, iMoveDestinationFolder, ETrue );
-			       			}
-		       			else
-		       				{
-		       				User::Leave( errMove );
-		       				}
-		       			}
-					CleanupStack::PopAndDestroy( &messageIds );
-					}
-					break;
-				default:
-					break;
-				}
-		 	}
-		}
-
-	}
+                    iOpResult.iResultCode = KErrCancel;
+                    break;
+                case EFSEmailUiCtrlBarResponseSelect:
+                    {
+                    // Do moving here, do not exit, because mrui exists itself.
+                    iOpResult.iResultCode = KErrNone;
+                    iMoveDestinationFolder = aSelectedFolderId;
+                    RArray<TFSMailMsgId> messageIds;
+                    CleanupClosePushL( messageIds );
+                    messageIds.Append( iMessage->GetMessageId() );
+                    // Trap is needed because protocol might return KErrNotSupported
+                    // if move away from current folder is not supprted
+                    TRAPD(errMove, iAppUi.GetActiveMailbox()->MoveMessagesL( messageIds,
+                                                      iMessage->GetFolderId(), iMoveDestinationFolder ));
+                    if ( errMove != KErrNotSupported )
+                        {
+                        if ( errMove == KErrNone )
+                            {
+                            TFsEmailUiUtility::DisplayMsgsMovedNoteL( 1, iMoveDestinationFolder, ETrue );
+                            }
+                        else
+                            {
+                            User::Leave( errMove );
+                            }
+                        }
+                    CleanupStack::PopAndDestroy( &messageIds );
+                    }
+                    break;
+                default:
+                    break;
+                }
+            }
+        }
+
+    }
 
 // ---------------------------------------------------------------------------
 // From MFSEmailUiContactHandlerObserver
@@ -562,28 +562,28 @@
         static_cast<CFSEmailUiMailViewerVisualiser*>(aMailViewerVisualiser);
 
     RArray<TFSMailMsgId> messageIds;
-	CleanupClosePushL( messageIds );
+    CleanupClosePushL( messageIds );
     messageIds.Append( self->iMessage->GetMessageId() );
 
-	// Trap is needed because protocol might return KErrNotSupported
-	// if move away from current folder is not supprted
-	TRAPD(errMove, self->iAppUi.GetActiveMailbox()->MoveMessagesL( messageIds,
+    // Trap is needed because protocol might return KErrNotSupported
+    // if move away from current folder is not supprted
+    TRAPD(errMove, self->iAppUi.GetActiveMailbox()->MoveMessagesL( messageIds,
                                                      self->iMessage->GetFolderId(),
                                                      self->iMoveDestinationFolder ) );
-	if ( errMove != KErrNotSupported )
-		{
-		if ( errMove == KErrNone )
-			{
-			// move successfull, display note
-		    TFsEmailUiUtility::DisplayMsgsMovedNoteL( 1, self->iMoveDestinationFolder, ETrue );
-			}
-		else
-			{
-			// Leave with any other err code than KErrNone or KErrNotSupported.
-			User::Leave( errMove );
-			}
-		}
-	CleanupStack::PopAndDestroy( &messageIds );
+    if ( errMove != KErrNotSupported )
+        {
+        if ( errMove == KErrNone )
+            {
+            // move successfull, display note
+            TFsEmailUiUtility::DisplayMsgsMovedNoteL( 1, self->iMoveDestinationFolder, ETrue );
+            }
+        else
+            {
+            // Leave with any other err code than KErrNone or KErrNotSupported.
+            User::Leave( errMove );
+            }
+        }
+    CleanupStack::PopAndDestroy( &messageIds );
 
     // return to previous view
     self->HandleCommandL( EAknSoftkeyBack );
@@ -595,45 +595,45 @@
 // CFSEmailUiMailViewerVisualiser::OpenFolderListForMessageMovingL
 // -----------------------------------------------------------------------------
 TBool CFSEmailUiMailViewerVisualiser::OpenFolderListForMessageMovingL()
-	{
+    {
     FUNC_LOG;
-	TBool ret = EFalse;
-	// Ignore if mailbox doesn't support moving or we are viewing embedded message
-	if ( iAppUi.GetActiveMailbox()->HasCapability( EFSMBoxCapaMoveToFolder ) &&
-	        !iEmbeddedMessageMode )
-	    {
-	    // Activate folder selection view and handle moving after callback gets destination
-	    iMoveToFolderOngoing = ETrue;
-	    TFolderListActivationData folderListData;
-	    folderListData.iCallback = this;
-	    CFSMailFolder* folder = iAppUi.GetMailClient()->GetFolderByUidL( iMessage->GetMailBoxId(), iMessage->GetFolderId() );
-	    folderListData.iSourceFolderType = TFSFolderType( folder->GetFolderType() );
-	    delete folder;
-	    const TPckgBuf<TFolderListActivationData> pkgOut( folderListData );
-	    iAppUi.EnterFsEmailViewL( FolderListId, KFolderListMoveMessage, pkgOut );
-	    ret = ETrue;
-	    }
-	return ret;
-	}
+    TBool ret = EFalse;
+    // Ignore if mailbox doesn't support moving or we are viewing embedded message
+    if ( iAppUi.GetActiveMailbox()->HasCapability( EFSMBoxCapaMoveToFolder ) &&
+            !iEmbeddedMessageMode )
+        {
+        // Activate folder selection view and handle moving after callback gets destination
+        iMoveToFolderOngoing = ETrue;
+        TFolderListActivationData folderListData;
+        folderListData.iCallback = this;
+        CFSMailFolder* folder = iAppUi.GetMailClient()->GetFolderByUidL( iMessage->GetMailBoxId(), iMessage->GetFolderId() );
+        folderListData.iSourceFolderType = TFSFolderType( folder->GetFolderType() );
+        delete folder;
+        const TPckgBuf<TFolderListActivationData> pkgOut( folderListData );
+        iAppUi.EnterFsEmailViewL( FolderListId, KFolderListMoveMessage, pkgOut );
+        ret = ETrue;
+        }
+    return ret;
+    }
 
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::ViewerControl
 // -----------------------------------------------------------------------------
 CAlfControl* CFSEmailUiMailViewerVisualiser::ViewerControl()
-	{
+    {
     FUNC_LOG;
-	return iTextViewerControl;
-	}
+    return iTextViewerControl;
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::Id
 // -----------------------------------------------------------------------------
 TUid CFSEmailUiMailViewerVisualiser::Id() const
-	{
+    {
     FUNC_LOG;
-	return MailViewerId;
-	}
+    return MailViewerId;
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::ChildDoActivateL
@@ -648,7 +648,7 @@
     const TVwsViewId& aPrevViewId,
     TUid aCustomMessageId,
     const TDesC8& aCustomMessage )
-	{
+    {
     FUNC_LOG;
 
     // Read the activation parameters
@@ -792,7 +792,7 @@
         }
 
     iNextOrPevMessageSelected = EFalse;
-	}
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::OfferToolbarEventL
@@ -840,24 +840,24 @@
 // CFSEmailUiMailViewerVisualiser::ChildDoDeactivate
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::ChildDoDeactivate()
-	{
+    {
     FUNC_LOG;
-	CancelFetchings();
-	if ( iFetchingAnimationTimer )
-	    {
-	    iFetchingAnimationTimer->Stop();
-	    }
-	if ( iDownloadProgressIndicator )
-	    {
-	    iDownloadProgressIndicator->HideIndicator();
-	    }
-
-	// Hide this view's navipane
-	HideNaviPane();
-
-	// set view itself as toolbar observer again (e.g. MRGUI could have been changed it)
-	Toolbar()->SetToolbarObserver( this );
-	}
+    CancelFetchings();
+    if ( iFetchingAnimationTimer )
+        {
+        iFetchingAnimationTimer->Stop();
+        }
+    if ( iDownloadProgressIndicator )
+        {
+        iDownloadProgressIndicator->HideIndicator();
+        }
+
+    // Hide this view's navipane
+    HideNaviPane();
+
+    // set view itself as toolbar observer again (e.g. MRGUI could have been changed it)
+    Toolbar()->SetToolbarObserver( this );
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::HideNaviPane
@@ -893,7 +893,7 @@
 // message directly from list UI.
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::HandleMrCommandL(
-	TInt aCommandId,
+    TInt aCommandId,
     TFSMailMsgId aMailboxId,
     TFSMailMsgId aFolderId,
     TFSMailMsgId aMessageId )
@@ -902,16 +902,16 @@
 
     // All items should be run
     if ( !iFirstStartCompleted )
-    	{
-    	DoFirstStartL();
+        {
+        DoFirstStartL();
         }
 
-	UpdateMessagePtrL( aMailboxId, aFolderId, aMessageId );
+    UpdateMessagePtrL( aMailboxId, aFolderId, aMessageId );
 
     if ( aCommandId == EFsEmailUiCmdCalRemoveFromCalendar )
         {
         iAppUi.MrViewerInstanceL()->RemoveMeetingRequestFromCalendarL(
-			*iMessage, *this );
+            *iMessage, *this );
         }
     else
         {
@@ -929,7 +929,7 @@
             respondStatus = EESMRAttendeeStatusDecline;
             }
         iAppUi.MrViewerInstanceL()->ResponseToMeetingRequestL(
-        	respondStatus, *iMessage, *this );
+            respondStatus, *iMessage, *this );
         }
     }
 
@@ -938,7 +938,7 @@
 // From viewer observer for CFsTextViewer callbacks
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::HandleTextViewerEventL( TFsTextViewerEvent aEvent )
-	{
+    {
     FUNC_LOG;
     if ( iFirstStartCompleted ) // Safety
         {
@@ -988,7 +988,7 @@
             SetActionMenuIconVisbilityL();
             }
         }
-	}
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::HandleHeaderHotspotActionL
@@ -1036,26 +1036,26 @@
 
 // Helper funcitons to get viewed message ID and Folder id
 TFSMailMsgId CFSEmailUiMailViewerVisualiser::ViewedMessageFolderId()
-	{
+    {
     FUNC_LOG;
-	TFSMailMsgId ret;
-	if ( iMessage )
-		{
-		ret = iMessage->GetFolderId();
-		}
-	return ret;
-	}
+    TFSMailMsgId ret;
+    if ( iMessage )
+        {
+        ret = iMessage->GetFolderId();
+        }
+    return ret;
+    }
 
 TFSMailMsgId CFSEmailUiMailViewerVisualiser::ViewedMessageId()
-	{
+    {
     FUNC_LOG;
-	TFSMailMsgId ret;
-	if ( iMessage )
-		{
-		ret = iMessage->GetMessageId();
-		}
-	return ret;
-	}
+    TFSMailMsgId ret;
+    if ( iMessage )
+        {
+        ret = iMessage->GetMessageId();
+        }
+    return ret;
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::RefreshL
@@ -1071,16 +1071,16 @@
         //</cmail>
         if ( TFsEmailUiUtility::IsMessageBodyLargeL( iMessage ) )
             {
-	        //<cmail> using normal wait note instead of using global
-	        //waitNoteId = TFsEmailUiUtility::ShowGlobalWaitNoteLC( R_FSE_WAIT_OPENING_TEXT );
+            //<cmail> using normal wait note instead of using global
+            //waitNoteId = TFsEmailUiUtility::ShowGlobalWaitNoteLC( R_FSE_WAIT_OPENING_TEXT );
             iWaitDialogOpening = new(ELeave)CAknWaitDialog(
                                 (REINTERPRET_CAST(CEikDialog**,&iWaitDialogOpening)));
-	        HBufC* noteText = StringLoader::LoadLC( R_FSE_WAIT_OPENING_TEXT );
+            HBufC* noteText = StringLoader::LoadLC( R_FSE_WAIT_OPENING_TEXT );
             iWaitDialogOpening->SetTextL(*noteText);
             //iWaitDialogOpening->DrawableWindow()->SetOrdinalPosition(0);
-	        CleanupStack::PopAndDestroy(noteText);
+            CleanupStack::PopAndDestroy(noteText);
             iWaitDialogOpening->ExecuteLD(R_FSE_WAIT_DIALOG_NO_CANCEL);
-	        //</cmail>
+            //</cmail>
             }
 
         // Do the update
@@ -1098,12 +1098,12 @@
             }
 
         // Close the wait note if it was opened
-		if ( iWaitDialogOpening )//<cmail>
+        if ( iWaitDialogOpening )//<cmail>
             {
-		    //<cmail>
-		    //CleanupStack::PopAndDestroy( (TAny*)waitNoteId );
+            //<cmail>
+            //CleanupStack::PopAndDestroy( (TAny*)waitNoteId );
             iWaitDialogOpening->ProcessFinishedL(); //it destroys the waitnote also
-		    //</cmail>
+            //</cmail>
             }
         }
     }
@@ -1154,22 +1154,22 @@
 // If the structure is known but message body is not fetched yet, start fetching it.
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::CheckMessageStructureL()
-	{
+    {
     FUNC_LOG;
-	if ( iFirstStartCompleted && iMessage )
-		{
-		if ( !MessageStructureKnown( *iMessage ) )
-			{ // fetch structure
-			StartWaitedFetchingL( EMessageStructure );
-			}
-		else if ( StartFetchingBodyAfterOpeningL() )
-			{
-			iViewerRichText->AppendFetchingMoreTextL();
-			StartFetchingMessagePartL( *iMessage, EMessagePlainTextBodyPart );
-			iFetchingAnimationTimer->Start( KAnimationRefreshTimeIntervalInMilliseconds );
-			}
-		}
-	}
+    if ( iFirstStartCompleted && iMessage )
+        {
+        if ( !MessageStructureKnown( *iMessage ) )
+            { // fetch structure
+            StartWaitedFetchingL( EMessageStructure );
+            }
+        else if ( StartFetchingBodyAfterOpeningL() )
+            {
+            iViewerRichText->AppendFetchingMoreTextL();
+            StartFetchingMessagePartL( *iMessage, EMessagePlainTextBodyPart );
+            iFetchingAnimationTimer->Start( KAnimationRefreshTimeIntervalInMilliseconds );
+            }
+        }
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::UpdateDownloadIndicatorL
@@ -1240,68 +1240,68 @@
 // For dynamically dimm/undimm menu options according to currect message and focus in the viewer
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::DynInitMenuPaneL(
-	TInt aResourceId, CEikMenuPane* aMenuPane )
-	{
+    TInt aResourceId, CEikMenuPane* aMenuPane )
+    {
     FUNC_LOG;
-	if ( !iMessage || !iTextViewer )
-	    {
-	    User::Leave( KErrNotReady );
-	    }
-
-	if ( aResourceId == R_FSEMAILUI_MAILVIEWER_MENUPANE )
-		{
-		
-	    if ( FeatureManager::FeatureSupported( KFeatureIdFfCmailIntegration ) )
-		   {
-		   // remove help support in pf5250
-		   aMenuPane->SetItemDimmed( EFsEmailUiCmdHelp, ETrue);      
-		   }
-	    
+    if ( !iMessage || !iTextViewer )
+        {
+        User::Leave( KErrNotReady );
+        }
+
+    if ( aResourceId == R_FSEMAILUI_MAILVIEWER_MENUPANE )
+        {
+        
+        if ( FeatureManager::FeatureSupported( KFeatureIdFfCmailIntegration ) )
+           {
+           // remove help support in pf5250
+           aMenuPane->SetItemDimmed( EFsEmailUiCmdHelp, ETrue);      
+           }
+        
         // Folder independent options
 
-		// hide/show MessageReader
-		TBool hideMessageReader = iEmbeddedMessageMode || !iAppUi.MessageReaderSupportsFreestyle();
-		aMenuPane->SetItemDimmed( EFsEmailUiCmdReadEmail, hideMessageReader );
-
-		// hide/show actions sub menu
-		TBool hideActions = !ShowActionsMenuInOptionsL();
-		aMenuPane->SetItemDimmed( EFsEmailUiCmdMailActions, hideActions );
-
-		// hide/show next and previous message options
-		TBool hideNext = !ShowNextMessageMenuInOptions();
-		aMenuPane->SetItemDimmed( EFsEmailUiCmdNextMessage, hideNext );
-		TBool hidePrev = !ShowPreviousMessageMenuInOptions();
-		aMenuPane->SetItemDimmed( EFsEmailUiCmdPreviousMessage, hidePrev );
+        // hide/show MessageReader
+        TBool hideMessageReader = iEmbeddedMessageMode || !iAppUi.MessageReaderSupportsFreestyle();
+        aMenuPane->SetItemDimmed( EFsEmailUiCmdReadEmail, hideMessageReader );
+
+        // hide/show actions sub menu
+        TBool hideActions = !ShowActionsMenuInOptionsL();
+        aMenuPane->SetItemDimmed( EFsEmailUiCmdMailActions, hideActions );
+
+        // hide/show next and previous message options
+        TBool hideNext = !ShowNextMessageMenuInOptions();
+        aMenuPane->SetItemDimmed( EFsEmailUiCmdNextMessage, hideNext );
+        TBool hidePrev = !ShowPreviousMessageMenuInOptions();
+        aMenuPane->SetItemDimmed( EFsEmailUiCmdPreviousMessage, hidePrev );
 
         // hide/show copy to clipboard
         TBool hideCopyToClipBoard = !IsCopyToClipBoardAvailableL();
         aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsCopyToClipboard, hideCopyToClipBoard );
 
 
-		// Folder dependent options
-		TFSMailMsgId currentMessageFolderId = iMessage->GetFolderId();
-		CFSMailFolder* currentFolder = NULL;
-		if ( !iEmbeddedMessageMode )
-		    {
+        // Folder dependent options
+        TFSMailMsgId currentMessageFolderId = iMessage->GetFolderId();
+        CFSMailFolder* currentFolder = NULL;
+        if ( !iEmbeddedMessageMode )
+            {
             TRAP_IGNORE( currentFolder = iAppUi.GetMailClient()->GetFolderByUidL(
                     iMessage->GetMailBoxId(), currentMessageFolderId ) );
-		    }
-		CleanupStack::PushL( currentFolder );
-		if ( !currentFolder || currentFolder->GetFolderType() == EFSOutbox )
-			{ // outbox folder or embedded message
-			aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsForward, ETrue );
-			aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsReply, ETrue );
-			aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsReplyAll, ETrue );
-			aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsForward2, ETrue );
+            }
+        CleanupStack::PushL( currentFolder );
+        if ( !currentFolder || currentFolder->GetFolderType() == EFSOutbox )
+            { // outbox folder or embedded message
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsForward, ETrue );
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsReply, ETrue );
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsReplyAll, ETrue );
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsForward2, ETrue );
             aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsMoveToDrafts, !currentFolder );
-			aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsDelete, !currentFolder );
-			}
-		else
-			{ // other folders
-			aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsMoveToDrafts, ETrue );
-
-			// hide reply all if there's no multiple recipients
-			TInt numRecipients(0);
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsDelete, !currentFolder );
+            }
+        else
+            { // other folders
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsMoveToDrafts, ETrue );
+
+            // hide reply all if there's no multiple recipients
+            TInt numRecipients(0);
             if ( iMessage )
                 {
                 //Get # of recipients
@@ -1334,187 +1334,187 @@
                     }
                 }
 
-			TBool hideReplyAll = ( numRecipients <= 1 );
-		    aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsReplyAll, hideReplyAll );
+            TBool hideReplyAll = ( numRecipients <= 1 );
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsReplyAll, hideReplyAll );
 
             // In Sent folder, option forward is shown above options reply and reply all
             TBool forwardAboveReply = ( currentFolder->GetFolderType() == EFSSentFolder );
             aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsForward, !forwardAboveReply );
             aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsForward2, forwardAboveReply );
-			}
-		CleanupStack::PopAndDestroy( currentFolder );
-		}
-
-	if ( aResourceId == R_FSEMAILUI_MAILVIEWER_SUBMENU_MORE )
-		{
-		TFSMailMsgId currentMessageFolderId = iMessage->GetFolderId();
+            }
+        CleanupStack::PopAndDestroy( currentFolder );
+        }
+
+    if ( aResourceId == R_FSEMAILUI_MAILVIEWER_SUBMENU_MORE )
+        {
+        TFSMailMsgId currentMessageFolderId = iMessage->GetFolderId();
         CFSMailFolder* currentFolder = NULL;
         if ( !iEmbeddedMessageMode )
             {
             TRAP_IGNORE( currentFolder = iAppUi.GetMailClient()->GetFolderByUidL(
                     iMessage->GetMailBoxId(), currentMessageFolderId ) );
             }
-		CleanupStack::PushL( currentFolder );
-		if ( !currentFolder || currentFolder->GetFolderType() == EFSOutbox )
-			{  // outbox folder or embedded message
-			aMenuPane->SetItemDimmed( EFsEmailUiCmdMarkAsUnread, ETrue );
-			aMenuPane->SetItemDimmed( EFsEmailUiCmdMarkAsRead, ETrue );
-			aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsMoveMessage, ETrue );
-			aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsFlag, ETrue );
+        CleanupStack::PushL( currentFolder );
+        if ( !currentFolder || currentFolder->GetFolderType() == EFSOutbox )
+            {  // outbox folder or embedded message
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdMarkAsUnread, ETrue );
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdMarkAsRead, ETrue );
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsMoveMessage, ETrue );
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsFlag, ETrue );
 // <cmail> Prevent Download Manager opening with attachments
-//			aMenuPane->SetItemDimmed( EFsEmailUiCmdDownloadManager, ETrue );
+//          aMenuPane->SetItemDimmed( EFsEmailUiCmdDownloadManager, ETrue );
 // </cmail> Prevent Download Manager opening with attachments
-			}
-		else // other folders
-			{
-			// show read/unread according to current state
-			TBool messageIsRead = iMessage->IsFlagSet( EFSMsgFlag_Read );
-			aMenuPane->SetItemDimmed( EFsEmailUiCmdMarkAsRead, messageIsRead );
-			aMenuPane->SetItemDimmed( EFsEmailUiCmdMarkAsUnread, !messageIsRead );
-
-			// show/hide move message
-			TBool hideMove = !iAppUi.GetActiveMailbox()->HasCapability( EFSMBoxCapaMoveToFolder );
-			aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsMoveMessage, hideMove );
-
-			// show/hide flag for followup
-			TBool hideFlag = !TFsEmailUiUtility::IsFollowUpSupported( *iMailBox );
-			aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsFlag, hideFlag );
-
-			// hide/show download manager option
+            }
+        else // other folders
+            {
+            // show read/unread according to current state
+            TBool messageIsRead = iMessage->IsFlagSet( EFSMsgFlag_Read );
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdMarkAsRead, messageIsRead );
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdMarkAsUnread, !messageIsRead );
+
+            // show/hide move message
+            TBool hideMove = !iAppUi.GetActiveMailbox()->HasCapability( EFSMBoxCapaMoveToFolder );
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsMoveMessage, hideMove );
+
+            // show/hide flag for followup
+            TBool hideFlag = !TFsEmailUiUtility::IsFollowUpSupported( *iMailBox );
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsFlag, hideFlag );
+
+            // hide/show download manager option
 // <cmail> Prevent Download Manager opening with attachments
-//			TBool hideDownloadMan = !ShowDownloadManagerMenuInOptions();
-//			aMenuPane->SetItemDimmed( EFsEmailUiCmdDownloadManager, hideDownloadMan );
+//          TBool hideDownloadMan = !ShowDownloadManagerMenuInOptions();
+//          aMenuPane->SetItemDimmed( EFsEmailUiCmdDownloadManager, hideDownloadMan );
 // </cmail>
-			}
-		CleanupStack::PopAndDestroy( currentFolder );
-		}
-
-	if ( aResourceId == R_FSEMAILUI_MAILVIEWER_SUBMENU_ACTIONS )
-		{
-		// All menu items are hidden by default.
-		// Undimm items that should be visible in action menu.
-		SViewerHeadingHotSpotData currentHeaderHotSpotData;
-		CFindItemEngine::SFoundItem currentBodyHotSpotData;
-		THotspotType hotspotType = iViewerRichText->FindCurrentHotSpotL(
-			currentHeaderHotSpotData, currentBodyHotSpotData );
-
-		TBool remoteLookupAvailable =
-			TFsEmailUiUtility::IsRemoteLookupSupported( *iMailBox );
-
-		if ( ( hotspotType == EHeaderHotspot && (
-			currentHeaderHotSpotData.iType == ETypeFromAddressDisplayName ||
-			currentHeaderHotSpotData.iType == ETypeToAddressDisplayName ||
-			currentHeaderHotSpotData.iType == ETypeCcAddressDisplayName ||
-			currentHeaderHotSpotData.iType == ETypeBccAddressDisplayName ||
-			currentHeaderHotSpotData.iType == ETypeEmailAddress )  )
-			||
-			( hotspotType == EBodyHotspot &&
-			  currentBodyHotSpotData.iItemType ==
-				CFindItemEngine::EFindItemSearchMailAddressBin ) )
-			{
-			aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsCall, EFalse );
-			aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsCreateMessage, EFalse );
-			aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsCreateMail, EFalse );
-			aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsContactDetails, EFalse );
-			aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsAddContact2, EFalse );
-			aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsRemoteLookup, !remoteLookupAvailable );
-			}
-		else if ( hotspotType == EHeaderHotspot &&
+            }
+        CleanupStack::PopAndDestroy( currentFolder );
+        }
+
+    if ( aResourceId == R_FSEMAILUI_MAILVIEWER_SUBMENU_ACTIONS )
+        {
+        // All menu items are hidden by default.
+        // Undimm items that should be visible in action menu.
+        SViewerHeadingHotSpotData currentHeaderHotSpotData;
+        CFindItemEngine::SFoundItem currentBodyHotSpotData;
+        THotspotType hotspotType = iViewerRichText->FindCurrentHotSpotL(
+            currentHeaderHotSpotData, currentBodyHotSpotData );
+
+        TBool remoteLookupAvailable =
+            TFsEmailUiUtility::IsRemoteLookupSupported( *iMailBox );
+
+        if ( ( hotspotType == EHeaderHotspot && (
+            currentHeaderHotSpotData.iType == ETypeFromAddressDisplayName ||
+            currentHeaderHotSpotData.iType == ETypeToAddressDisplayName ||
+            currentHeaderHotSpotData.iType == ETypeCcAddressDisplayName ||
+            currentHeaderHotSpotData.iType == ETypeBccAddressDisplayName ||
+            currentHeaderHotSpotData.iType == ETypeEmailAddress )  )
+            ||
+            ( hotspotType == EBodyHotspot &&
+              currentBodyHotSpotData.iItemType ==
+                CFindItemEngine::EFindItemSearchMailAddressBin ) )
+            {
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsCall, EFalse );
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsCreateMessage, EFalse );
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsCreateMail, EFalse );
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsContactDetails, EFalse );
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsAddContact2, EFalse );
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsRemoteLookup, !remoteLookupAvailable );
+            }
+        else if ( hotspotType == EHeaderHotspot &&
                   currentHeaderHotSpotData.iType == ETypeAttachment )
-			{
-			TBool hideOpen = !ShowOpenAttachmentOptionL();
-   			aMenuPane->SetItemDimmed( EFsEmailUiCmdOpenAttachment, hideOpen );
-			TBool hideDownload = !ShowDownloadOptionL();
-			aMenuPane->SetItemDimmed( EFsEmailUiCmdDownload, hideDownload );
-			TBool hideCancel = !ShowCancelDownloadOption();
-			aMenuPane->SetItemDimmed( EFsEmailUiCmdCancelDownload, hideCancel );
-			TBool hideSave = !ShowSaveAttachmentOptionL();
-		    aMenuPane->SetItemDimmed( EFsEmailUiCmdSave, hideSave );
-
-		    TBool hideRemove = hideOpen;
+            {
+            TBool hideOpen = !ShowOpenAttachmentOptionL();
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdOpenAttachment, hideOpen );
+            TBool hideDownload = !ShowDownloadOptionL();
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdDownload, hideDownload );
+            TBool hideCancel = !ShowCancelDownloadOption();
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdCancelDownload, hideCancel );
+            TBool hideSave = !ShowSaveAttachmentOptionL();
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdSave, hideSave );
+
+            TBool hideRemove = hideOpen;
             aMenuPane->SetItemDimmed( EFsEmailUiCmdClearFetchedAttachment, hideRemove );
-			}
-		else if ( hotspotType == EHeaderHotspot &&
-		          currentHeaderHotSpotData.iType == ETypeAttachments )
-			{
-			TBool hideOpen = !ShowOpenAttachmentOptionL();
-   			aMenuPane->SetItemDimmed( EFsEmailUiCmdOpenAttachmentList, hideOpen );
-			TBool hideDownload = !ShowDownloadOptionL();
-			aMenuPane->SetItemDimmed( EFsEmailUiCmdDownloadAll, hideDownload );
-			TBool hideCancel = !ShowCancelDownloadOption();
-			aMenuPane->SetItemDimmed( EFsEmailUiCmdCancelAllDownloads, hideCancel );
-			TBool hideSave = !ShowSaveAttachmentOptionL();
-		    aMenuPane->SetItemDimmed( EFsEmailUiCmdSaveAll, hideSave );
-			}
-		else if ( hotspotType == EBodyHotspot &&
-				  currentBodyHotSpotData.iItemType == CFindItemEngine::EFindItemSearchPhoneNumberBin )
-			{
-			aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsCall, EFalse );
-			aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsAddContact, EFalse );
-			aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsCreateMessage, EFalse );
-			aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsRemoteLookup, !remoteLookupAvailable );
-			}
-		else if ( hotspotType == EBodyHotspot &&
-				  ( currentBodyHotSpotData.iItemType ==
-				  	CFindItemEngine::EFindItemSearchURLBin ||
-				  	currentBodyHotSpotData.iItemType ==
-				  	CFindItemEngine::EFindItemSearchScheme ) )
-			{
-			// Handle action menu for different search scheme, e.g mailto: and call:
-			TInt schemaLinkType = ResolveBodyTextSchemaUrlTypeL( currentBodyHotSpotData );
-			switch ( schemaLinkType )
-				{
-				case EFocusOnEMailInBodyText:
-					{
-					aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsCall, EFalse );
-					aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsCreateMessage, EFalse );
-					aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsContactDetails, EFalse );
-					aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsAddContact2, EFalse );
-					aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsRemoteLookup, !remoteLookupAvailable );
-					}
-					break;
-				case EFocusOnNumberWithinMessage:
-					{
-					aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsCall, EFalse );
-					aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsAddContact, EFalse );
-					// Drop out "Create message" selection for SIP addresses
-					HBufC* schemeText = iViewerRichText->GetHotspotTextLC( currentBodyHotSpotData );
-					if ( schemeText && schemeText->FindC( KVoipPrefix ) != 0 )
-						{
-						aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsCreateMessage, EFalse );
-						}
-					CleanupStack::PopAndDestroy( schemeText );
-					aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsRemoteLookup, !remoteLookupAvailable );
-					}
-					break;
-				default:
-					{
-					aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsOpenWeb, EFalse );
-
-					// Handle intranet browsing item by using AIW service
-					// handler's InitializeMenuPaneL-function, it will remove
-					// the IB menu item if IB is not available, or make the
-					// item visible if IB is available
-			        if ( iIBServiceHandler && iIBServiceHandler->IsAiwMenu( aResourceId ) )
-			            {
-			            TAiwGenericParam param( EGenericParamURL );
-			            CAiwGenericParamList* list = CAiwGenericParamList::NewLC();
-			            list->AppendL( param );
-			            iIBServiceHandler->InitializeMenuPaneL( *aMenuPane, aResourceId,
-			                    EFsEmailUiCmdActionsOpenInIntranetMenu, *list, ETrue );
-			            CleanupStack::PopAndDestroy( list );
-			            }
-
-					aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsAddBookmark, EFalse );
-					}
-					break;
-				}
-			}
-		}
-
-	iAppUi.ShortcutBinding().AppendShortcutHintsL( *aMenuPane,
-		CFSEmailUiShortcutBinding::EContextMailViewer );
-	}
+            }
+        else if ( hotspotType == EHeaderHotspot &&
+                  currentHeaderHotSpotData.iType == ETypeAttachments )
+            {
+            TBool hideOpen = !ShowOpenAttachmentOptionL();
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdOpenAttachmentList, hideOpen );
+            TBool hideDownload = !ShowDownloadOptionL();
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdDownloadAll, hideDownload );
+            TBool hideCancel = !ShowCancelDownloadOption();
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdCancelAllDownloads, hideCancel );
+            TBool hideSave = !ShowSaveAttachmentOptionL();
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdSaveAll, hideSave );
+            }
+        else if ( hotspotType == EBodyHotspot &&
+                  currentBodyHotSpotData.iItemType == CFindItemEngine::EFindItemSearchPhoneNumberBin )
+            {
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsCall, EFalse );
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsAddContact, EFalse );
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsCreateMessage, EFalse );
+            aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsRemoteLookup, !remoteLookupAvailable );
+            }
+        else if ( hotspotType == EBodyHotspot &&
+                  ( currentBodyHotSpotData.iItemType ==
+                    CFindItemEngine::EFindItemSearchURLBin ||
+                    currentBodyHotSpotData.iItemType ==
+                    CFindItemEngine::EFindItemSearchScheme ) )
+            {
+            // Handle action menu for different search scheme, e.g mailto: and call:
+            TInt schemaLinkType = ResolveBodyTextSchemaUrlTypeL( currentBodyHotSpotData );
+            switch ( schemaLinkType )
+                {
+                case EFocusOnEMailInBodyText:
+                    {
+                    aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsCall, EFalse );
+                    aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsCreateMessage, EFalse );
+                    aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsContactDetails, EFalse );
+                    aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsAddContact2, EFalse );
+                    aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsRemoteLookup, !remoteLookupAvailable );
+                    }
+                    break;
+                case EFocusOnNumberWithinMessage:
+                    {
+                    aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsCall, EFalse );
+                    aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsAddContact, EFalse );
+                    // Drop out "Create message" selection for SIP addresses
+                    HBufC* schemeText = iViewerRichText->GetHotspotTextLC( currentBodyHotSpotData );
+                    if ( schemeText && schemeText->FindC( KVoipPrefix ) != 0 )
+                        {
+                        aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsCreateMessage, EFalse );
+                        }
+                    CleanupStack::PopAndDestroy( schemeText );
+                    aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsRemoteLookup, !remoteLookupAvailable );
+                    }
+                    break;
+                default:
+                    {
+                    aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsOpenWeb, EFalse );
+
+                    // Handle intranet browsing item by using AIW service
+                    // handler's InitializeMenuPaneL-function, it will remove
+                    // the IB menu item if IB is not available, or make the
+                    // item visible if IB is available
+                    if ( iIBServiceHandler && iIBServiceHandler->IsAiwMenu( aResourceId ) )
+                        {
+                        TAiwGenericParam param( EGenericParamURL );
+                        CAiwGenericParamList* list = CAiwGenericParamList::NewLC();
+                        list->AppendL( param );
+                        iIBServiceHandler->InitializeMenuPaneL( *aMenuPane, aResourceId,
+                                EFsEmailUiCmdActionsOpenInIntranetMenu, *list, ETrue );
+                        CleanupStack::PopAndDestroy( list );
+                        }
+
+                    aMenuPane->SetItemDimmed( EFsEmailUiCmdActionsAddBookmark, EFalse );
+                    }
+                    break;
+                }
+            }
+        }
+
+    iAppUi.ShortcutBinding().AppendShortcutHintsL( *aMenuPane,
+        CFSEmailUiShortcutBinding::EContextMailViewer );
+    }
 
 
 // -----------------------------------------------------------------------------
@@ -1524,298 +1524,298 @@
 void CFSEmailUiMailViewerVisualiser::HandleCommandL( TInt aCommand )
     {
     FUNC_LOG;
-	if ( !iAppUi.ViewSwitchingOngoing() )
-    	{
-	    switch ( aCommand )
-	        {
-	        case EAknSoftkeyBack:
-	        	{
-	        	// Set empty MSK when navigating back
-	        	ChangeMskCommandL( R_FSE_QTN_MSK_EMPTY );
-	        	// Cancel MR viewer launching if Back is pressed in the middle
-	        	// of launching process.
-	            CancelPendingMrCommandL();
-	        	NavigateBackL();
-	 			}
-	        	break;
-	        // top level options
-	        case EFsEmailUiCmdActionsMoveToDrafts:
-	        	{
-	        	TFsEmailUiUtility::MoveMessageToDraftsL(
-	        		*iAppUi.GetActiveMailbox(), *iMessage );
-	        	}
-	        	break;
-	       	case EFsEmailUiCmdCalActionsReplyAsMail:
-			case EFsEmailUiCmdActionsReply:
-				{
-				if ( !iEmbeddedMessageMode )
-				    {
+    if ( !iAppUi.ViewSwitchingOngoing() )
+        {
+        switch ( aCommand )
+            {
+            case EAknSoftkeyBack:
+                {
+                // Set empty MSK when navigating back
+                ChangeMskCommandL( R_FSE_QTN_MSK_EMPTY );
+                // Cancel MR viewer launching if Back is pressed in the middle
+                // of launching process.
+                CancelPendingMrCommandL();
+                NavigateBackL();
+                }
+                break;
+            // top level options
+            case EFsEmailUiCmdActionsMoveToDrafts:
+                {
+                TFsEmailUiUtility::MoveMessageToDraftsL(
+                    *iAppUi.GetActiveMailbox(), *iMessage );
+                }
+                break;
+            case EFsEmailUiCmdCalActionsReplyAsMail:
+            case EFsEmailUiCmdActionsReply:
+                {
+                if ( !iEmbeddedMessageMode )
+                    {
                     TEditorLaunchParams params;
                     params.iMailboxId = iAppUi.GetActiveMailboxId();
                     params.iMsgId = iMessage->GetMessageId();
                     params.iActivatedExternally = EFalse;
                     iAppUi.LaunchEditorL( KEditorCmdReply, params );
-				    }
-				}
-	            break;
-			case EFsEmailUiCmdActionsReplyAll:
-				{
-				if ( !iEmbeddedMessageMode )
-				    {
+                    }
+                }
+                break;
+            case EFsEmailUiCmdActionsReplyAll:
+                {
+                if ( !iEmbeddedMessageMode )
+                    {
                     TEditorLaunchParams params;
                     params.iMailboxId = iAppUi.GetActiveMailboxId();
                     params.iMsgId = iMessage->GetMessageId();
                     params.iActivatedExternally = EFalse;
                     iAppUi.LaunchEditorL( KEditorCmdReplyAll, params );
-				    }
-				}
-	            break;
-	       	case EFsEmailUiCmdCalActionsForwardAsMail:
-			case EFsEmailUiCmdActionsForward:
-			case EFsEmailUiCmdActionsForward2:
-				{
-				if ( !iEmbeddedMessageMode )
-				    {
+                    }
+                }
+                break;
+            case EFsEmailUiCmdCalActionsForwardAsMail:
+            case EFsEmailUiCmdActionsForward:
+            case EFsEmailUiCmdActionsForward2:
+                {
+                if ( !iEmbeddedMessageMode )
+                    {
                     TEditorLaunchParams params;
                     params.iMailboxId = iAppUi.GetActiveMailboxId();
                     params.iMsgId = iMessage->GetMessageId();
                     params.iActivatedExternally = EFalse;
                     iAppUi.LaunchEditorL( KEditorCmdForward, params );
-				    }
-				}
-	            break;
-			case EFsEmailUiCmdActionsDelete:
-				{
-				DeleteMailL( *iMessage, ETrue );
-				}
-	            break;
-	        case EFsEmailUiCmdActionsCopyToClipboard:
-	        	{
-	        	CopyCurrentHotspotToClipBoardL();
-	        	}
-	        	break;
-	        case EFsEmailUiCmdPreviousMessage:
-	        	{
-				ShowPreviousMessageL();
-	        	}
-	        	break;
-	        case EFsEmailUiCmdNextMessage:
-	        	{
-				ShowNextMessageL();
-				}
-	        	break;
-	        case EFsEmailUiCmdHelp:
-	        	{
-	        	TFsEmailUiUtility::LaunchHelpL( KFSE_HLP_LAUNCHER_GRID );
-	        	}
-	        	break;
-	        case EFsEmailUiCmdExit:
-			    {
-		    	iAppUi.Exit();
-		        }
-		        break;
-	        case EFsEmailUiCmdReadEmail:
-	        	{
-	        	iAppUi.StartReadingEmailsL();
-	        	}
-	        	break;
-
-			// "actions" -sub menu options
-	        case EFsEmailUiCmdActionsCall:
-	        	{
-				CallHotSpotAddressL();
-	        	}
-				break;
-			case EFsEmailUiCmdActionsCreateMessage:
-				{
-				CreateMessageL();
-				}
-				break;
-			case EFsEmailUiCmdActionsCreateMail:
-			    {
-			    ComposeMailL();
-			    }
-			    break;
-	        case EFsEmailUiCmdActionsContactDetails:
-	        	{
-				OpenContactDetailsL();
-	        	}
-				break;
-	        case EFsEmailUiCmdActionsAddContact:
-	        case EFsEmailUiCmdActionsAddContact2:
-	        	{
-				SViewerHeadingHotSpotData currentHeaderHotSpotData;
-				CFindItemEngine::SFoundItem currentBodyHotSpotData;
-				THotspotType hotspotType =
-					iViewerRichText->FindCurrentHotSpotL(
-						currentHeaderHotSpotData, currentBodyHotSpotData );
-		     	if ( hotspotType == EHeaderHotspot )
-	        		{
-					HBufC* emailAddress =
-						iViewerRichText->GetHeaderHotspotEmailAddressLC(
-							currentHeaderHotSpotData );
-					SaveEmailAsContactL( *emailAddress );
-					CleanupStack::PopAndDestroy( emailAddress );
-					}
-	        	else if ( hotspotType == EBodyHotspot )
-	        		{
-					HBufC* hotspotText = iViewerRichText->GetHotspotTextLC(
-						currentBodyHotSpotData );
-					if ( currentBodyHotSpotData.iItemType ==
-						CFindItemEngine::EFindItemSearchPhoneNumberBin )
-						{
-						SavePhoneNumberAsContactL( *hotspotText );
-						}
-					else if ( currentBodyHotSpotData.iItemType ==
-						CFindItemEngine::EFindItemSearchMailAddressBin )
-						{
-						SaveEmailAsContactL( *hotspotText );
-						}
-					else if ( currentBodyHotSpotData.iItemType ==
-							CFindItemEngine::EFindItemSearchScheme)
-						{
-						if ( hotspotText->FindC( KMailtoPrefix ) == 0 )
-							{
-							// Save email address, prefix is stripped in SaveEmailAsContactL
-							SaveEmailAsContactL( *hotspotText );
-							}
-						else if ( hotspotText->FindC( KCallPrefix ) == 0 ||
-								  hotspotText->FindC( KTelPrefix ) == 0  ||
-								  hotspotText->FindC( KSmsPrefix ) == 0 ||
-								  hotspotText->FindC( KMmsPrefix ) == 0 )
-							{
-							// Save phone nukmber, prefix is stripped in SavePhoneNumberAsContactL
-							SavePhoneNumberAsContactL( *hotspotText );
-							}
-						}
-	 	      		CleanupStack::PopAndDestroy( hotspotText );
-	        		}
-	        	}
-				break;
-	 	    case EFsEmailUiCmdActionsRemoteLookup:
-	        	{
-				SViewerHeadingHotSpotData currentHeaderHotSpotData;
-				CFindItemEngine::SFoundItem currentBodyHotSpotData;
-				THotspotType hotspotType =
-					iViewerRichText->FindCurrentHotSpotL(
-						currentHeaderHotSpotData, currentBodyHotSpotData );
-		     	if ( hotspotType == EHeaderHotspot )
-	        		{
-					HBufC* emailAddress =
-						iViewerRichText->GetHeaderHotspotEmailAddressLC(
-							currentHeaderHotSpotData );
-					LaunchRemoteLookupL( *emailAddress );
-					CleanupStack::PopAndDestroy( emailAddress );
-	      			}
-	        	else if ( hotspotType == EBodyHotspot )
-	        		{
-					HBufC* hotspotText = iViewerRichText->GetHotspotTextLC(
-						currentBodyHotSpotData );
-					LaunchRemoteLookupL( *hotspotText );
-	 	      		CleanupStack::PopAndDestroy( hotspotText );
-		       		}
-	 		  	}
-				break;
-	 	    case EFsEmailUiCmdActionsOpenHtmlViewer:
-	 	        {
-	 	        LaunchHtmlViewerL();
-	 	        }
-	 	        break;
-	        case EFsEmailUiCmdActionsOpenWeb:
-	        	{
-				CFindItemEngine::SFoundItem currentBodyHotSpotData;
-				TBool bodyHotSpotFound =
-					iViewerRichText->FindCurrentBodyHotSpotL(
-						currentBodyHotSpotData );
-				OpenHotSpotUrlInBrowserL( currentBodyHotSpotData );
-	        	}
-				break;
-	        case EFsEmailUiCmdActionsOpenInIntranetMenu:
-	        	{
-				OpenLinkInIntranetL( ETrue );
-		       	}
-				break;
-	        case EFsEmailUiCmdActionsAddBookmark:
-	        	{
-				CFindItemEngine::SFoundItem currentBodyHotSpotData;
-				TBool bodyHotSpotFound =
-					iViewerRichText->FindCurrentBodyHotSpotL(
-						currentBodyHotSpotData );
-				AddToBookmarksL( currentBodyHotSpotData );
-		       	}
-				break;
-	        case EAknSoftkeyOpen:
-	        case EFsEmailUiCmdOpenAttachment:
-	            {
-	            OpenAttachmentL();
-	            }
-	            break;
-			case EFsEmailUiCmdOpenAttachmentList:
-				{
-				OpenAttachmentsViewL();
-				}
-				break;
-			case EFsEmailUiCmdDownload:
-	        case EFsEmailUiCmdDownloadAll:
-				{
-				StartDowloadingAttachmentsL();
-				}
-				break;
-	        case EFsEmailUiCmdCancelDownload:
-	        case EFsEmailUiCmdCancelAllDownloads:
-		       	{
-				CancelDowloadingAttachmentsL();
-	        	}
-				break;
-	        case EFsEmailUiCmdSave:
-	        case EFsEmailUiCmdSaveAll:
-	        	{
-				SaveAllAttachmentsL();
-	        	}
-				break;
-	        case EFsEmailUiCmdClearFetchedAttachment:
-	            {
-	            RemoveFetchedAttachmentL();
-	            }
-	            break;
-
-			// "more" -sub menu options
-	        case EFsEmailUiCmdMarkAsUnread:
-	        	{
-	        	ChangeMsgReadStatusL( EFalse, EFalse );
-	        	}
-				break;
-	        case EFsEmailUiCmdMarkAsRead:
-	        	{
-	        	ChangeMsgReadStatusL( ETrue, EFalse );
-	        	}
-				break;
-			case EFsEmailUiCmdActionsMoveMessage:
-				{
+                    }
+                }
+                break;
+            case EFsEmailUiCmdActionsDelete:
+                {
+                DeleteMailL( *iMessage, ETrue );
+                }
+                break;
+            case EFsEmailUiCmdActionsCopyToClipboard:
+                {
+                CopyCurrentHotspotToClipBoardL();
+                }
+                break;
+            case EFsEmailUiCmdPreviousMessage:
+                {
+                ShowPreviousMessageL();
+                }
+                break;
+            case EFsEmailUiCmdNextMessage:
+                {
+                ShowNextMessageL();
+                }
+                break;
+            case EFsEmailUiCmdHelp:
+                {
+                TFsEmailUiUtility::LaunchHelpL( KFSE_HLP_LAUNCHER_GRID );
+                }
+                break;
+            case EFsEmailUiCmdExit:
+                {
+                iAppUi.Exit();
+                }
+                break;
+            case EFsEmailUiCmdReadEmail:
+                {
+                iAppUi.StartReadingEmailsL();
+                }
+                break;
+
+            // "actions" -sub menu options
+            case EFsEmailUiCmdActionsCall:
+                {
+                CallHotSpotAddressL();
+                }
+                break;
+            case EFsEmailUiCmdActionsCreateMessage:
+                {
+                CreateMessageL();
+                }
+                break;
+            case EFsEmailUiCmdActionsCreateMail:
+                {
+                ComposeMailL();
+                }
+                break;
+            case EFsEmailUiCmdActionsContactDetails:
+                {
+                OpenContactDetailsL();
+                }
+                break;
+            case EFsEmailUiCmdActionsAddContact:
+            case EFsEmailUiCmdActionsAddContact2:
+                {
+                SViewerHeadingHotSpotData currentHeaderHotSpotData;
+                CFindItemEngine::SFoundItem currentBodyHotSpotData;
+                THotspotType hotspotType =
+                    iViewerRichText->FindCurrentHotSpotL(
+                        currentHeaderHotSpotData, currentBodyHotSpotData );
+                if ( hotspotType == EHeaderHotspot )
+                    {
+                    HBufC* emailAddress =
+                        iViewerRichText->GetHeaderHotspotEmailAddressLC(
+                            currentHeaderHotSpotData );
+                    SaveEmailAsContactL( *emailAddress );
+                    CleanupStack::PopAndDestroy( emailAddress );
+                    }
+                else if ( hotspotType == EBodyHotspot )
+                    {
+                    HBufC* hotspotText = iViewerRichText->GetHotspotTextLC(
+                        currentBodyHotSpotData );
+                    if ( currentBodyHotSpotData.iItemType ==
+                        CFindItemEngine::EFindItemSearchPhoneNumberBin )
+                        {
+                        SavePhoneNumberAsContactL( *hotspotText );
+                        }
+                    else if ( currentBodyHotSpotData.iItemType ==
+                        CFindItemEngine::EFindItemSearchMailAddressBin )
+                        {
+                        SaveEmailAsContactL( *hotspotText );
+                        }
+                    else if ( currentBodyHotSpotData.iItemType ==
+                            CFindItemEngine::EFindItemSearchScheme)
+                        {
+                        if ( hotspotText->FindC( KMailtoPrefix ) == 0 )
+                            {
+                            // Save email address, prefix is stripped in SaveEmailAsContactL
+                            SaveEmailAsContactL( *hotspotText );
+                            }
+                        else if ( hotspotText->FindC( KCallPrefix ) == 0 ||
+                                  hotspotText->FindC( KTelPrefix ) == 0  ||
+                                  hotspotText->FindC( KSmsPrefix ) == 0 ||
+                                  hotspotText->FindC( KMmsPrefix ) == 0 )
+                            {
+                            // Save phone nukmber, prefix is stripped in SavePhoneNumberAsContactL
+                            SavePhoneNumberAsContactL( *hotspotText );
+                            }
+                        }
+                    CleanupStack::PopAndDestroy( hotspotText );
+                    }
+                }
+                break;
+            case EFsEmailUiCmdActionsRemoteLookup:
+                {
+                SViewerHeadingHotSpotData currentHeaderHotSpotData;
+                CFindItemEngine::SFoundItem currentBodyHotSpotData;
+                THotspotType hotspotType =
+                    iViewerRichText->FindCurrentHotSpotL(
+                        currentHeaderHotSpotData, currentBodyHotSpotData );
+                if ( hotspotType == EHeaderHotspot )
+                    {
+                    HBufC* emailAddress =
+                        iViewerRichText->GetHeaderHotspotEmailAddressLC(
+                            currentHeaderHotSpotData );
+                    LaunchRemoteLookupL( *emailAddress );
+                    CleanupStack::PopAndDestroy( emailAddress );
+                    }
+                else if ( hotspotType == EBodyHotspot )
+                    {
+                    HBufC* hotspotText = iViewerRichText->GetHotspotTextLC(
+                        currentBodyHotSpotData );
+                    LaunchRemoteLookupL( *hotspotText );
+                    CleanupStack::PopAndDestroy( hotspotText );
+                    }
+                }
+                break;
+            case EFsEmailUiCmdActionsOpenHtmlViewer:
+                {
+                LaunchHtmlViewerL();
+                }
+                break;
+            case EFsEmailUiCmdActionsOpenWeb:
+                {
+                CFindItemEngine::SFoundItem currentBodyHotSpotData;
+                TBool bodyHotSpotFound =
+                    iViewerRichText->FindCurrentBodyHotSpotL(
+                        currentBodyHotSpotData );
+                OpenHotSpotUrlInBrowserL( currentBodyHotSpotData );
+                }
+                break;
+            case EFsEmailUiCmdActionsOpenInIntranetMenu:
+                {
+                OpenLinkInIntranetL( ETrue );
+                }
+                break;
+            case EFsEmailUiCmdActionsAddBookmark:
+                {
+                CFindItemEngine::SFoundItem currentBodyHotSpotData;
+                TBool bodyHotSpotFound =
+                    iViewerRichText->FindCurrentBodyHotSpotL(
+                        currentBodyHotSpotData );
+                AddToBookmarksL( currentBodyHotSpotData );
+                }
+                break;
+            case EAknSoftkeyOpen:
+            case EFsEmailUiCmdOpenAttachment:
+                {
+                OpenAttachmentL();
+                }
+                break;
+            case EFsEmailUiCmdOpenAttachmentList:
+                {
+                OpenAttachmentsViewL();
+                }
+                break;
+            case EFsEmailUiCmdDownload:
+            case EFsEmailUiCmdDownloadAll:
+                {
+                StartDowloadingAttachmentsL();
+                }
+                break;
+            case EFsEmailUiCmdCancelDownload:
+            case EFsEmailUiCmdCancelAllDownloads:
+                {
+                CancelDowloadingAttachmentsL();
+                }
+                break;
+            case EFsEmailUiCmdSave:
+            case EFsEmailUiCmdSaveAll:
+                {
+                SaveAllAttachmentsL();
+                }
+                break;
+            case EFsEmailUiCmdClearFetchedAttachment:
+                {
+                RemoveFetchedAttachmentL();
+                }
+                break;
+
+            // "more" -sub menu options
+            case EFsEmailUiCmdMarkAsUnread:
+                {
+                ChangeMsgReadStatusL( EFalse, EFalse );
+                }
+                break;
+            case EFsEmailUiCmdMarkAsRead:
+                {
+                ChangeMsgReadStatusL( ETrue, EFalse );
+                }
+                break;
+            case EFsEmailUiCmdActionsMoveMessage:
+                {
                 OpenFolderListForMessageMovingL();
-				}
-				break;
-	        case EFsEmailUiCmdActionsFlag:
-		        {
-	       		SetMessageFollowupFlagL();
-		        }
-		        break;
-			case EFsEmailUiCmdCompose:
-				{
-				iAppUi.CreateNewMailL();
-				}
-				break;
-			case EFsEmailUiCmdComposeTo:
-			    {
-			    ComposeMailL();
-			    }
-			    break;
-	       	case EFsEmailUiCmdMessageDetails:
-	       	case EFsEmailUiCmdViewAll:
-				{
-				TUid activationCmdId = KStartMsgDetailsToBeginning;
-				if ( aCommand == EFsEmailUiCmdViewAll )
-				    {
+                }
+                break;
+            case EFsEmailUiCmdActionsFlag:
+                {
+                SetMessageFollowupFlagL();
+                }
+                break;
+            case EFsEmailUiCmdCompose:
+                {
+                iAppUi.CreateNewMailL();
+                }
+                break;
+            case EFsEmailUiCmdComposeTo:
+                {
+                ComposeMailL();
+                }
+                break;
+            case EFsEmailUiCmdMessageDetails:
+            case EFsEmailUiCmdViewAll:
+                {
+                TUid activationCmdId = KStartMsgDetailsToBeginning;
+                if ( aCommand == EFsEmailUiCmdViewAll )
+                    {
                     SViewerHeadingHotSpotData currentHeaderHotSpotData;
                     iViewerRichText->FindCurrentHeaderHotSpotL( currentHeaderHotSpotData );
                     if( currentHeaderHotSpotData.iType == ETypeToNMoreRecipients )
@@ -1830,23 +1830,23 @@
                         {
                         activationCmdId = KStartMsgDetailsToBcc;
                         }
-				    }
+                    }
 
                 TMsgDetailsActivationData msgDetailsData;
-	  			msgDetailsData.iMailBoxId = iMessage->GetMailBoxId();
-	  			msgDetailsData.iFolderId = iMessage->GetFolderId();
-	  			msgDetailsData.iMessageId = iMessage->GetMessageId();
-				const TPckgBuf<TMsgDetailsActivationData> pkgOut( msgDetailsData );
-				iAppUi.EnterFsEmailViewL(
-					MsgDetailsViewId, activationCmdId,  pkgOut );
-				}
-				break;
+                msgDetailsData.iMailBoxId = iMessage->GetMailBoxId();
+                msgDetailsData.iFolderId = iMessage->GetFolderId();
+                msgDetailsData.iMessageId = iMessage->GetMessageId();
+                const TPckgBuf<TMsgDetailsActivationData> pkgOut( msgDetailsData );
+                iAppUi.EnterFsEmailViewL(
+                    MsgDetailsViewId, activationCmdId,  pkgOut );
+                }
+                break;
 // <cmail> Prevent Download Manager opening with attachments
-//			case EFsEmailUiCmdDownloadManager:
-//				{
-//	  			iAppUi.EnterFsEmailViewL( DownloadManagerViewId );
-//				}
-//				break;
+//          case EFsEmailUiCmdDownloadManager:
+//              {
+//              iAppUi.EnterFsEmailViewL( DownloadManagerViewId );
+//              }
+//              break;
 // </cmail>
             case EFsEmailUiCmdMarkAsReadUnreadToggle:
                 {
@@ -1873,9 +1873,9 @@
                 // <cmail>
                 // Do nothing if focus is already in top
                 if ( iTextViewer->GetFirstDisplayedLine() > 1 )
-                	{
+                    {
                     iTextViewer->FocusLineL( 1 );
-                	}
+                    }
                 }
                 // </cmail>
                 break;
@@ -1895,25 +1895,25 @@
             // and the Fn mappings vary between variants.
             // Similar mechanism is used inside AknFep with key codes EKeyF19...EKeyF24,
             // so collisions with these must be avoided.
-	        case EFsEmailUiCmdScrollUp:
-	            {
-	            TKeyEvent simEvent = { KKeyCodeArtificialScrollUp, EStdKeyNull, 0, 0 };
-	            iCoeEnv->SimulateKeyEventL( simEvent, EEventKey );
-	            }
-	            break;
-	        case EFsEmailUiCmdScrollDown:
-	            {
-	            TKeyEvent simEvent = { KKeyCodeArtificialScrollDown, EStdKeyNull, 0, 0 };
-	            iCoeEnv->SimulateKeyEventL( simEvent, EEventKey );
-	            }
+            case EFsEmailUiCmdScrollUp:
+                {
+                TKeyEvent simEvent = { KKeyCodeArtificialScrollUp, EStdKeyNull, 0, 0 };
+                iCoeEnv->SimulateKeyEventL( simEvent, EEventKey );
+                }
                 break;
-	        case EFsEmailUiCmdPageUp:
+            case EFsEmailUiCmdScrollDown:
+                {
+                TKeyEvent simEvent = { KKeyCodeArtificialScrollDown, EStdKeyNull, 0, 0 };
+                iCoeEnv->SimulateKeyEventL( simEvent, EEventKey );
+                }
+                break;
+            case EFsEmailUiCmdPageUp:
                 {
                 TKeyEvent simEvent = { EKeyPageUp, EStdKeyNull, 0, 0 };
                 iCoeEnv->SimulateKeyEventL( simEvent, EEventKey );
                 }
                 break;
-	        case EFsEmailUiCmdPageDown:
+            case EFsEmailUiCmdPageDown:
                 {
                 TKeyEvent simEvent = { EKeyPageDown, EStdKeyNull, 0, 0 };
                 iCoeEnv->SimulateKeyEventL( simEvent, EEventKey );
@@ -1923,8 +1923,8 @@
                 break;
 
             default:
-	        	break;
-	        }
+                break;
+            }
         }
     }
 
@@ -1990,25 +1990,25 @@
 
 
 void CFSEmailUiMailViewerVisualiser::ProcessAsyncCommandL( TESMRIcalViewerOperationType aCommandId,
-		                								 const CFSMailMessage& aMessage,
-                										 MESMRIcalViewerObserver* aObserver )
-	{
-	FUNC_LOG;
-	if ( aObserver )
-		{
-		iMrObserverToInform = aObserver;
-		}
-	// we must cast constness away from message because of flaws in MRUI API
-	CFSMailMessage* messagePtr = const_cast<CFSMailMessage*>(&aMessage);
-	if ( messagePtr )
-		{
+                                                         const CFSMailMessage& aMessage,
+                                                         MESMRIcalViewerObserver* aObserver )
+    {
+    FUNC_LOG;
+    if ( aObserver )
+        {
+        iMrObserverToInform = aObserver;
+        }
+    // we must cast constness away from message because of flaws in MRUI API
+    CFSMailMessage* messagePtr = const_cast<CFSMailMessage*>(&aMessage);
+    if ( messagePtr )
+        {
         // Fill in result struct
         iOpResult.iOpType = aCommandId;
         iOpResult.iMessage = messagePtr;
         iOpResult.iResultCode = KErrNotFound;
 
         switch ( aCommandId )
-			{
+            {
             case EESMRCmdMailMessageDetails:
                 {
                 iOpResult.iResultCode = KErrNone;
@@ -2100,117 +2100,117 @@
                     }
                 }
                 break;
-			case EESMRCmdDownloadManager:
-				{
-				// Check that there is something in dwnld manager to show
-				if ( ShowDownloadManagerMenuInOptions() )
-				    {
-				    iOpResult.iResultCode = KErrNone;
-				    iAppUi.EnterFsEmailViewL( DownloadManagerViewId );
-				    }
-				}
-				break;
+            case EESMRCmdDownloadManager:
+                {
+                // Check that there is something in dwnld manager to show
+                if ( ShowDownloadManagerMenuInOptions() )
+                    {
+                    iOpResult.iResultCode = KErrNone;
+                    iAppUi.EnterFsEmailViewL( DownloadManagerViewId );
+                    }
+                }
+                break;
             case EESMRCmdMailComposeMessage:
                 {
                 iOpResult.iResultCode = KErrNone;
                 iAppUi.CreateNewMailL();
                 }
                 break;
-			case EESMRCmdMailReply:
-			case EESMRCmdMailReplyAll:
-			case EESMRCmdMailForwardAsMessage:
-				{
-				// Fill result codes for mrui
-				iOpResult.iResultCode = KErrNone;
-				// Fill launc params
-	    		TEditorLaunchParams params;
-	    		params.iMailboxId = iAppUi.GetActiveMailboxId();
-	    		params.iActivatedExternally = EFalse;
-	    		params.iMsgId = messagePtr->GetMessageId();
-				if ( aCommandId == EESMRCmdMailForwardAsMessage )
-					{
-		    		iAppUi.LaunchEditorL( KEditorCmdForward, params );
-					}
-				else if ( aCommandId == EESMRCmdMailReply )
-					{
-		    		iAppUi.LaunchEditorL( KEditorCmdReply, params );
-					}
-				else if ( aCommandId == EESMRCmdMailReplyAll )
-					{
-		    		iAppUi.LaunchEditorL( KEditorCmdReplyAll, params );
-					}
-				}
-				break;
-	  		case EESMRCmdMailPreviousMessage:
-	  		    {
+            case EESMRCmdMailReply:
+            case EESMRCmdMailReplyAll:
+            case EESMRCmdMailForwardAsMessage:
+                {
+                // Fill result codes for mrui
+                iOpResult.iResultCode = KErrNone;
+                // Fill launc params
+                TEditorLaunchParams params;
+                params.iMailboxId = iAppUi.GetActiveMailboxId();
+                params.iActivatedExternally = EFalse;
+                params.iMsgId = messagePtr->GetMessageId();
+                if ( aCommandId == EESMRCmdMailForwardAsMessage )
+                    {
+                    iAppUi.LaunchEditorL( KEditorCmdForward, params );
+                    }
+                else if ( aCommandId == EESMRCmdMailReply )
+                    {
+                    iAppUi.LaunchEditorL( KEditorCmdReply, params );
+                    }
+                else if ( aCommandId == EESMRCmdMailReplyAll )
+                    {
+                    iAppUi.LaunchEditorL( KEditorCmdReplyAll, params );
+                    }
+                }
+                break;
+            case EESMRCmdMailPreviousMessage:
+                {
                 iNextOrPevMessageSelected = ETrue; // prevent back navigation when operation completed received
                 ShowPreviousMessageL();
                 iOpResult.iResultCode = KErrNone;
                 CompletePendingMrCommand();
-	  		    }
-	  		    break;
-			case EESMRCmdMailNextMessage:
-				{
-				iNextOrPevMessageSelected = ETrue; // prevent back navigation when operation completed received
-				ShowNextMessageL();
+                }
+                break;
+            case EESMRCmdMailNextMessage:
+                {
+                iNextOrPevMessageSelected = ETrue; // prevent back navigation when operation completed received
+                ShowNextMessageL();
                 iOpResult.iResultCode = KErrNone;
-				CompletePendingMrCommand();
+                CompletePendingMrCommand();
                 }
-				break;
-			default:
-				break;
-			}
-		}
-
-	// Complete immediately if handling command failed. It makes no harm if following
-	// function gets called several times in some case.
-	if ( iOpResult.iResultCode < 0 )
-	    {
-	    CompletePendingMrCommand();
-	    }
-	}
+                break;
+            default:
+                break;
+            }
+        }
+
+    // Complete immediately if handling command failed. It makes no harm if following
+    // function gets called several times in some case.
+    if ( iOpResult.iResultCode < 0 )
+        {
+        CompletePendingMrCommand();
+        }
+    }
 
 
 void CFSEmailUiMailViewerVisualiser::ProcessSyncCommandL(
-	TESMRIcalViewerOperationType aCommandId,
-	const CFSMailMessage& aMessage )
-	{
+    TESMRIcalViewerOperationType aCommandId,
+    const CFSMailMessage& aMessage )
+    {
     FUNC_LOG;
-	if ( &aMessage )
-		{
-		switch ( aCommandId )
-			{
-			case EESMRCmdMailMarkUnread:
-				{
-				ChangeMsgReadStatusL( EFalse, ETrue );
-				}
-				break;
-			case EESMRCmdMailMarkRead:
-				{
-				ChangeMsgReadStatusL( ETrue, ETrue );
-				}
-				break;
-			case EESMRCmdMailFlagMessage:
-				{
-		 		if ( iMessage )
-					{
-					if ( !iFlagSelectionHanler )
-						{
-						// Create when used for the first time
-						iFlagSelectionHanler =
-							CFlagSelectionGlobalNoteHandler::NewL( *this );
-						}
-					// Call to LaunchFlagListQueryDialogL will lead
-					// to FlagselectionCompleteL
-					iFlagSelectionHanler->LaunchFlagListQueryDialogL();
-					}
-				}
-				break;
-			default:
-				break;
-			}
-		}
-	}
+    if ( &aMessage )
+        {
+        switch ( aCommandId )
+            {
+            case EESMRCmdMailMarkUnread:
+                {
+                ChangeMsgReadStatusL( EFalse, ETrue );
+                }
+                break;
+            case EESMRCmdMailMarkRead:
+                {
+                ChangeMsgReadStatusL( ETrue, ETrue );
+                }
+                break;
+            case EESMRCmdMailFlagMessage:
+                {
+                if ( iMessage )
+                    {
+                    if ( !iFlagSelectionHanler )
+                        {
+                        // Create when used for the first time
+                        iFlagSelectionHanler =
+                            CFlagSelectionGlobalNoteHandler::NewL( *this );
+                        }
+                    // Call to LaunchFlagListQueryDialogL will lead
+                    // to FlagselectionCompleteL
+                    iFlagSelectionHanler->LaunchFlagListQueryDialogL();
+                    }
+                }
+                break;
+            default:
+                break;
+            }
+        }
+    }
 
 
 // ---------------------------------------------------------------------------
@@ -2220,19 +2220,19 @@
 // ---------------------------------------------------------------------------
 //
 TBool CFSEmailUiMailViewerVisualiser::CanProcessCommand(
-	TESMRIcalViewerOperationType aCommandId  ) const
-	{
+    TESMRIcalViewerOperationType aCommandId  ) const
+    {
     FUNC_LOG;
-	TBool ret( EFalse );
-	TInt numRecipients(0);
-	switch ( aCommandId )
-		{
-		case EESMRCmdMailReply:
-		    ret = ETrue;
-		    break;
-		case EESMRCmdMailReplyAll:
-			//Get # of recipients
-		    if ( iMessage )
+    TBool ret( EFalse );
+    TInt numRecipients(0);
+    switch ( aCommandId )
+        {
+        case EESMRCmdMailReply:
+            ret = ETrue;
+            break;
+        case EESMRCmdMailReplyAll:
+            //Get # of recipients
+            if ( iMessage )
                 {
                 numRecipients=TFsEmailUiUtility::CountRecepients( iMessage );
                 if ( numRecipients == 1 )
@@ -2262,78 +2262,78 @@
                         }
                     }
                 }
-			ret = ( iMessage && numRecipients > 1 );
-			break;
-		case EESMRCmdDownloadManager:
-			ret = ShowDownloadManagerMenuInOptions();
-			break;
+            ret = ( iMessage && numRecipients > 1 );
+            break;
+        case EESMRCmdDownloadManager:
+            ret = ShowDownloadManagerMenuInOptions();
+            break;
 // <cmail>
-		case EESMRCmdOpenAttachment:
-    	case EESMRCmdSaveAttachment:
-    	case EESMRCmdSaveAllAttachments:
-    	case EESMRCmdDownloadAttachment:
-    	case EESMRCmdDownloadAllAttachments:
+        case EESMRCmdOpenAttachment:
+        case EESMRCmdSaveAttachment:
+        case EESMRCmdSaveAllAttachments:
+        case EESMRCmdDownloadAttachment:
+        case EESMRCmdDownloadAllAttachments:
 // </cmail>
-		case EESMRCmdOpenAttachmentView:
-			ret = ETrue;
-			break;
-		case EESMRCmdMailComposeMessage:
-			ret = ETrue;
-			break;
-		case EESMRCmdMailMarkUnread:
-			{
-			ret = EFalse;
-			if ( iMessage && iMessage->IsFlagSet(EFSMsgFlag_Read) )
-				{
-				// Read, unread should be available
-				ret = ETrue;
-				}
-			}
-			break;
-		case EESMRCmdMailMarkRead:
-			{
-			ret = EFalse;
-			if ( iMessage && !iMessage->IsFlagSet(EFSMsgFlag_Read) )
-				{
-				// Read, unread should be available
-				ret = ETrue;
-				}
-			}
-			break;
-		case EESMRCmdMailMoveMessage:
-			{
-			ret = EFalse;
-			if ( iMessage )
-				{
-				// confirmed pointer exists, check whether mb has capa
-				ret = iAppUi.GetActiveMailbox()->HasCapability( EFSMBoxCapaMoveToFolder );
-				}
-			}
-			break;
-		case EESMRCmdMailForwardAsMessage:
-			ret = ETrue;
-			break;
-		case EESMRCmdMailFlagMessage:
-			ret = TFsEmailUiUtility::IsFollowUpSupported( *iMailBox );
-			break;
-	    case EESMRCmdMailMessageDetails:
-			ret = ETrue;
-			break;
-		case EESMRCmdMailDelete:
-			ret = ETrue;
-			break;
-   		case EESMRCmdMailPreviousMessage:
-   		    ret = ShowPreviousMessageMenuInOptions();
-   		    break;
- 		case EESMRCmdMailNextMessage:
- 		    ret = ShowNextMessageMenuInOptions();
- 			break;
-		default:
-			ret = EFalse;
-			break;
-		}
-	return ret;
-	}
+        case EESMRCmdOpenAttachmentView:
+            ret = ETrue;
+            break;
+        case EESMRCmdMailComposeMessage:
+            ret = ETrue;
+            break;
+        case EESMRCmdMailMarkUnread:
+            {
+            ret = EFalse;
+            if ( iMessage && iMessage->IsFlagSet(EFSMsgFlag_Read) )
+                {
+                // Read, unread should be available
+                ret = ETrue;
+                }
+            }
+            break;
+        case EESMRCmdMailMarkRead:
+            {
+            ret = EFalse;
+            if ( iMessage && !iMessage->IsFlagSet(EFSMsgFlag_Read) )
+                {
+                // Read, unread should be available
+                ret = ETrue;
+                }
+            }
+            break;
+        case EESMRCmdMailMoveMessage:
+            {
+            ret = EFalse;
+            if ( iMessage )
+                {
+                // confirmed pointer exists, check whether mb has capa
+                ret = iAppUi.GetActiveMailbox()->HasCapability( EFSMBoxCapaMoveToFolder );
+                }
+            }
+            break;
+        case EESMRCmdMailForwardAsMessage:
+            ret = ETrue;
+            break;
+        case EESMRCmdMailFlagMessage:
+            ret = TFsEmailUiUtility::IsFollowUpSupported( *iMailBox );
+            break;
+        case EESMRCmdMailMessageDetails:
+            ret = ETrue;
+            break;
+        case EESMRCmdMailDelete:
+            ret = ETrue;
+            break;
+        case EESMRCmdMailPreviousMessage:
+            ret = ShowPreviousMessageMenuInOptions();
+            break;
+        case EESMRCmdMailNextMessage:
+            ret = ShowNextMessageMenuInOptions();
+            break;
+        default:
+            ret = EFalse;
+            break;
+        }
+    return ret;
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::CompletePendingMrCommand()
@@ -2389,17 +2389,17 @@
             TRAP_IGNORE( TFsEmailUiUtility::ShowGlobalInfoNoteL( noteTextId ) );
             }
         }
-	}
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::OperationError()
 // -----------------------------------------------------------------------------
 //
 void CFSEmailUiMailViewerVisualiser::OperationError( TIcalViewerOperationResult aResult )
-	{
+    {
     FUNC_LOG;
     // Show message in standard mail viewer in case launchin MRUI fails for any
-	// other reason than viewer being cancelled by calling CancelPendingMrCommand().
+    // other reason than viewer being cancelled by calling CancelPendingMrCommand().
     if ( aResult.iOpType == EESMRViewLaunch )
         {
         iMrUiActive = EFalse;
@@ -2414,7 +2414,7 @@
                 );
             }
         }
-	}
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::SetMskL()
@@ -2534,7 +2534,7 @@
             }
         else
             {
-	    //it will set context menu for email (reply, forward, etc.)
+        //it will set context menu for email (reply, forward, etc.)
             ChangeMskCommandL( R_FSE_QTN_MSK_BODY_MENU );
             }
         }
@@ -2682,8 +2682,8 @@
         iTextViewer->SetTextL( &iViewerRichText->RichText(), iSmDictionary );
 
         // ownerships are transfered to AlfEnviroment.
-	    //<cmail> Compared to S60 3.2.3 in S60 5.0 Alf offers the key events in
-	    // opposite order.
+        //<cmail> Compared to S60 3.2.3 in S60 5.0 Alf offers the key events in
+        // opposite order.
         // Create control for capturing left and right navigation events
         iControl = CFreestyleEmailUiMailViewerControl::NewL( iEnv, *this );
         ControlGroup().AppendL( iControl );
@@ -2698,132 +2698,132 @@
 // CFSEmailUiMailViewerVisualiser::SetActionButtonIconAndHighLight
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::SetActionButtonIconAndHighLight()
-	{
+    {
     FUNC_LOG;
-	CFreestyleEmailUiTextureManager* textureMgr = iAppUi.FsTextureManager();
+    CFreestyleEmailUiTextureManager* textureMgr = iAppUi.FsTextureManager();
     CFSEmailUiLayoutHandler* layoutMgr = iAppUi.LayoutHandler();
 
     // get textures from texture manager
-	CAlfTexture& menuTexture = textureMgr->TextureByIndex( EListControlMenuIcon );
-	CAlfTexture& selectortexture = textureMgr->TextureByIndex( EViewerHighlightTexture );
+    CAlfTexture& menuTexture = textureMgr->TextureByIndex( EListControlMenuIcon );
+    CAlfTexture& selectortexture = textureMgr->TextureByIndex( EViewerHighlightTexture );
 
     iTextViewer->SetLiteLineBg( selectortexture, layoutMgr->ViewerSelectorOpacity() );
 
-	iTextViewer->SetActionButton( menuTexture, 1  );
-	iTextViewer->SetActionButtonMargin( layoutMgr->ViewerActionMenuIconMargin() );
-	TSize btnSize = layoutMgr->ViewerActionMenuIconSize();
-	iTextViewer->SetActionButtonSize( btnSize.iWidth, btnSize.iHeight );
-	}
+    iTextViewer->SetActionButton( menuTexture, 1  );
+    iTextViewer->SetActionButtonMargin( layoutMgr->ViewerActionMenuIconMargin() );
+    TSize btnSize = layoutMgr->ViewerActionMenuIconSize();
+    iTextViewer->SetActionButtonSize( btnSize.iWidth, btnSize.iHeight );
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::LaunchActionMenuL
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::LaunchActionMenuL()
-	{
+    {
     FUNC_LOG;
-	// check that current hotspot is visible
-	TInt ignoreThis; // not used here. Only return value is used not this mandatory reference parameter
-	TBool visibleHotsSpot = iTextViewer->GetVisibleFocusedHotspotLine( ignoreThis );
-	if( visibleHotsSpot )
-		{
-		// Remove items
-		CFSEmailUiActionMenu::RemoveAllL();
-
-		// check which hotspot is active.
-		SViewerHeadingHotSpotData currentHeaderHotSpotData;
-		CFindItemEngine::SFoundItem currentBodyHotSpotData;
-		THotspotType hotspotType = iViewerRichText->FindCurrentHotSpotL( currentHeaderHotSpotData, currentBodyHotSpotData );
-
-		TActionMenuType currentActionMenuType = ENoActionMenuFocused;
-		if( hotspotType == EHeaderHotspot && (
-			currentHeaderHotSpotData.iType == ETypeFromAddressDisplayName ||
-			currentHeaderHotSpotData.iType == ETypeToAddressDisplayName ||
-			currentHeaderHotSpotData.iType == ETypeCcAddressDisplayName ||
-			currentHeaderHotSpotData.iType == ETypeBccAddressDisplayName ||
-			currentHeaderHotSpotData.iType == ETypeEmailAddress ) )
-			{
-			currentActionMenuType = EFocusOnNameInAddressField;
-			}
-		else if( hotspotType == EHeaderHotspot && (
-			currentHeaderHotSpotData.iType == ETypeAttachment ) )
-			{
-			currentActionMenuType =	EFocusOnAttachmentName;
-			}
-		else if( hotspotType == EHeaderHotspot && (
-			currentHeaderHotSpotData.iType == ETypeAttachments ) )
-			{
-			currentActionMenuType =	EFocusOnAttachmentsText;
-			}
-		else if( hotspotType == EBodyHotspot &&
-				currentBodyHotSpotData.iItemType == CFindItemEngine::EFindItemSearchPhoneNumberBin )
-			{
-			currentActionMenuType = EFocusOnNumberWithinMessage;
-			}
-		else if( hotspotType == EBodyHotspot && ( currentBodyHotSpotData.iItemType == CFindItemEngine::EFindItemSearchURLBin ||
-			   	 currentBodyHotSpotData.iItemType == CFindItemEngine::EFindItemSearchScheme ) )
-			{
-			TInt schemaLinkType = ResolveBodyTextSchemaUrlTypeL( currentBodyHotSpotData );
-			switch ( schemaLinkType )
-				{
-				case EFocusOnEMailInBodyText:
-					currentActionMenuType = EFocusOnEMailInBodyText;
-					break;
-				case EFocusOnNumberWithinMessage:
-					currentActionMenuType = EFocusOnNumberWithinMessage;
-					break;
-				default:
-					currentActionMenuType = EFocusOnHyperLinkWithinMessage;
-					break;
-
-				}
-			}
-		else if( hotspotType == EBodyHotspot &&
-				currentBodyHotSpotData.iItemType == CFindItemEngine::EFindItemSearchMailAddressBin )
-			{
-			currentActionMenuType = EFocusOnEMailInBodyText;
-			}
-
-
-		if( currentActionMenuType != ENoActionMenuFocused )
-			{
-			CreateActionMenuItemsL( currentActionMenuType );
-		    TActionMenuCustomItemId menuResult = CFSEmailUiActionMenu::ExecuteL( EFscCenter );
-		    if ( menuResult != FsEActionMenuCasItemSelectedAndExecuted &&
-		    		menuResult != FsEActionMenuDismissed	)
-		    	{
-		    	HandleActionMenuCommandL( menuResult, currentActionMenuType );
-		    	}
-			}
-		}
-	}
+    // check that current hotspot is visible
+    TInt ignoreThis; // not used here. Only return value is used not this mandatory reference parameter
+    TBool visibleHotsSpot = iTextViewer->GetVisibleFocusedHotspotLine( ignoreThis );
+    if( visibleHotsSpot )
+        {
+        // Remove items
+        CFSEmailUiActionMenu::RemoveAllL();
+
+        // check which hotspot is active.
+        SViewerHeadingHotSpotData currentHeaderHotSpotData;
+        CFindItemEngine::SFoundItem currentBodyHotSpotData;
+        THotspotType hotspotType = iViewerRichText->FindCurrentHotSpotL( currentHeaderHotSpotData, currentBodyHotSpotData );
+
+        TActionMenuType currentActionMenuType = ENoActionMenuFocused;
+        if( hotspotType == EHeaderHotspot && (
+            currentHeaderHotSpotData.iType == ETypeFromAddressDisplayName ||
+            currentHeaderHotSpotData.iType == ETypeToAddressDisplayName ||
+            currentHeaderHotSpotData.iType == ETypeCcAddressDisplayName ||
+            currentHeaderHotSpotData.iType == ETypeBccAddressDisplayName ||
+            currentHeaderHotSpotData.iType == ETypeEmailAddress ) )
+            {
+            currentActionMenuType = EFocusOnNameInAddressField;
+            }
+        else if( hotspotType == EHeaderHotspot && (
+            currentHeaderHotSpotData.iType == ETypeAttachment ) )
+            {
+            currentActionMenuType = EFocusOnAttachmentName;
+            }
+        else if( hotspotType == EHeaderHotspot && (
+            currentHeaderHotSpotData.iType == ETypeAttachments ) )
+            {
+            currentActionMenuType = EFocusOnAttachmentsText;
+            }
+        else if( hotspotType == EBodyHotspot &&
+                currentBodyHotSpotData.iItemType == CFindItemEngine::EFindItemSearchPhoneNumberBin )
+            {
+            currentActionMenuType = EFocusOnNumberWithinMessage;
+            }
+        else if( hotspotType == EBodyHotspot && ( currentBodyHotSpotData.iItemType == CFindItemEngine::EFindItemSearchURLBin ||
+                 currentBodyHotSpotData.iItemType == CFindItemEngine::EFindItemSearchScheme ) )
+            {
+            TInt schemaLinkType = ResolveBodyTextSchemaUrlTypeL( currentBodyHotSpotData );
+            switch ( schemaLinkType )
+                {
+                case EFocusOnEMailInBodyText:
+                    currentActionMenuType = EFocusOnEMailInBodyText;
+                    break;
+                case EFocusOnNumberWithinMessage:
+                    currentActionMenuType = EFocusOnNumberWithinMessage;
+                    break;
+                default:
+                    currentActionMenuType = EFocusOnHyperLinkWithinMessage;
+                    break;
+
+                }
+            }
+        else if( hotspotType == EBodyHotspot &&
+                currentBodyHotSpotData.iItemType == CFindItemEngine::EFindItemSearchMailAddressBin )
+            {
+            currentActionMenuType = EFocusOnEMailInBodyText;
+            }
+
+
+        if( currentActionMenuType != ENoActionMenuFocused )
+            {
+            CreateActionMenuItemsL( currentActionMenuType );
+            TActionMenuCustomItemId menuResult = CFSEmailUiActionMenu::ExecuteL( EFscCenter );
+            if ( menuResult != FsEActionMenuCasItemSelectedAndExecuted &&
+                    menuResult != FsEActionMenuDismissed    )
+                {
+                HandleActionMenuCommandL( menuResult, currentActionMenuType );
+                }
+            }
+        }
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::ResolveBodyTextSchemaUrlTypeL
 // -----------------------------------------------------------------------------
 TInt CFSEmailUiMailViewerVisualiser::ResolveBodyTextSchemaUrlTypeL( CFindItemEngine::SFoundItem aHotSpot )
-	{
+    {
     FUNC_LOG;
-	TInt ret( EFocusOnHyperLinkWithinMessage );
-	HBufC* schemeText = iViewerRichText->GetHotspotTextLC( aHotSpot );
-	if ( schemeText->FindC( KMailtoPrefix ) == 0 )
-		{
-		ret = EFocusOnEMailInBodyText;
-		}
-	else if ( schemeText->FindC( KCallPrefix ) == 0 ||
-			  schemeText->FindC( KTelPrefix ) == 0 ||
-			  schemeText->FindC( KSmsPrefix ) == 0 ||
-			  schemeText->FindC( KMmsPrefix ) == 0 ||
-			  schemeText->FindC( KVoipPrefix ) == 0 )
-		{
-		ret = EFocusOnNumberWithinMessage;
-		}
-	else
-		{
-		ret = EFocusOnHyperLinkWithinMessage;
-		}
-	CleanupStack::PopAndDestroy( schemeText );
-	return ret;
-	}
+    TInt ret( EFocusOnHyperLinkWithinMessage );
+    HBufC* schemeText = iViewerRichText->GetHotspotTextLC( aHotSpot );
+    if ( schemeText->FindC( KMailtoPrefix ) == 0 )
+        {
+        ret = EFocusOnEMailInBodyText;
+        }
+    else if ( schemeText->FindC( KCallPrefix ) == 0 ||
+              schemeText->FindC( KTelPrefix ) == 0 ||
+              schemeText->FindC( KSmsPrefix ) == 0 ||
+              schemeText->FindC( KMmsPrefix ) == 0 ||
+              schemeText->FindC( KVoipPrefix ) == 0 )
+        {
+        ret = EFocusOnNumberWithinMessage;
+        }
+    else
+        {
+        ret = EFocusOnHyperLinkWithinMessage;
+        }
+    CleanupStack::PopAndDestroy( schemeText );
+    return ret;
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::SetActionMenuIconVisbilityL
@@ -2848,477 +2848,477 @@
 // CFSEmailUiMailViewerVisualiser::CreateActionMenuItemsL
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::CreateActionMenuItemsL(
-	TActionMenuType aActionMenuType )
-	{
+    TActionMenuType aActionMenuType )
+    {
     FUNC_LOG;
-	// See the ui spec for all the right action menus according to
-	// currently selected hotspot
-	RArray<TActionMenuCustomItemId> uids;
-	CleanupClosePushL( uids );
-	if ( aActionMenuType == EFocusOnNumberWithinMessage )
-		{
-		uids.Append( FsEActionMenuCall );
-		uids.Append( FsEActionMenuAddToContacts );
-		// Drop FsEActionMenuCreateMessage from sip: addresses
-		// First check which hotspot is active.
-		SViewerHeadingHotSpotData currentHeaderHotSpotData;
-		CFindItemEngine::SFoundItem currentBodyHotSpotData;
-		THotspotType hotspotType = iViewerRichText->FindCurrentHotSpotL(
-			currentHeaderHotSpotData, currentBodyHotSpotData );
-		HBufC* schemeText = iViewerRichText->GetHotspotTextLC( currentBodyHotSpotData );
-		if ( schemeText &&  schemeText->FindC( KVoipPrefix ) != 0 )
-			{
-			uids.Append( FsEActionMenuCreateMessage );
-			}
-		CleanupStack::PopAndDestroy( schemeText );
-		if ( TFsEmailUiUtility::IsRemoteLookupSupported( *iMailBox ) )
-			{
-			uids.Append( FsEActionMenuRemoteLookup );
-			}
-		}
-	else if ( aActionMenuType == EFocusOnNameInAddressField ||
-			  aActionMenuType == EFocusOnEMailInBodyText )
-		{
-		uids.Append( FsEActionMenuCall );
-		uids.Append( FsEActionMenuCreateMessage );
-	    uids.Append( FsEActionMenuCreateEmail );
-		uids.Append( FsEActionMenuContactDetails );
-		uids.Append( FsEActionMenuAddToContacts );
-		if ( TFsEmailUiUtility::IsRemoteLookupSupported( *iMailBox ) )
-			{
-			uids.Append( FsEActionMenuRemoteLookup );
-			}
-		}
-	else if ( aActionMenuType == EFocusOnHyperLinkWithinMessage )
-		{
-		uids.Append( FsEActionMenuOpenInWeb );
-		uids.Append( FsEActionMenuOpenInIntranet );
-		uids.Append( FsEActionMenuBookmark );
-		}
-	else if ( aActionMenuType == EFocusOnAttachmentName )
-		{
-		if ( ShowOpenAttachmentOptionL() )
-		    {
-    		uids.Append( FsEActionAttachmentOpen );
-		    }
-		if ( ShowDownloadOptionL() )
-			{
-			uids.Append( FsEActionAttachmentDownload );
-			}
-		if ( ShowCancelDownloadOption() )
-			{
-			uids.Append( FsEActionAttachmentCancelDownload );
-			}
-		if ( ShowSaveAttachmentOptionL() )
-		    {
-		    uids.Append( FsEActionAttachmentSave );
-		    }
+    // See the ui spec for all the right action menus according to
+    // currently selected hotspot
+    RArray<TActionMenuCustomItemId> uids;
+    CleanupClosePushL( uids );
+    if ( aActionMenuType == EFocusOnNumberWithinMessage )
+        {
+        uids.Append( FsEActionMenuCall );
+        uids.Append( FsEActionMenuAddToContacts );
+        // Drop FsEActionMenuCreateMessage from sip: addresses
+        // First check which hotspot is active.
+        SViewerHeadingHotSpotData currentHeaderHotSpotData;
+        CFindItemEngine::SFoundItem currentBodyHotSpotData;
+        THotspotType hotspotType = iViewerRichText->FindCurrentHotSpotL(
+            currentHeaderHotSpotData, currentBodyHotSpotData );
+        HBufC* schemeText = iViewerRichText->GetHotspotTextLC( currentBodyHotSpotData );
+        if ( schemeText &&  schemeText->FindC( KVoipPrefix ) != 0 )
+            {
+            uids.Append( FsEActionMenuCreateMessage );
+            }
+        CleanupStack::PopAndDestroy( schemeText );
+        if ( TFsEmailUiUtility::IsRemoteLookupSupported( *iMailBox ) )
+            {
+            uids.Append( FsEActionMenuRemoteLookup );
+            }
+        }
+    else if ( aActionMenuType == EFocusOnNameInAddressField ||
+              aActionMenuType == EFocusOnEMailInBodyText )
+        {
+        uids.Append( FsEActionMenuCall );
+        uids.Append( FsEActionMenuCreateMessage );
+        uids.Append( FsEActionMenuCreateEmail );
+        uids.Append( FsEActionMenuContactDetails );
+        uids.Append( FsEActionMenuAddToContacts );
+        if ( TFsEmailUiUtility::IsRemoteLookupSupported( *iMailBox ) )
+            {
+            uids.Append( FsEActionMenuRemoteLookup );
+            }
+        }
+    else if ( aActionMenuType == EFocusOnHyperLinkWithinMessage )
+        {
+        uids.Append( FsEActionMenuOpenInWeb );
+        uids.Append( FsEActionMenuOpenInIntranet );
+        uids.Append( FsEActionMenuBookmark );
+        }
+    else if ( aActionMenuType == EFocusOnAttachmentName )
+        {
+        if ( ShowOpenAttachmentOptionL() )
+            {
+            uids.Append( FsEActionAttachmentOpen );
+            }
+        if ( ShowDownloadOptionL() )
+            {
+            uids.Append( FsEActionAttachmentDownload );
+            }
+        if ( ShowCancelDownloadOption() )
+            {
+            uids.Append( FsEActionAttachmentCancelDownload );
+            }
+        if ( ShowSaveAttachmentOptionL() )
+            {
+            uids.Append( FsEActionAttachmentSave );
+            }
         if ( ShowOpenAttachmentOptionL() )
             {
             uids.Append( FsEActionAttachmentClearFetchedContent );
             }
-		}
-	else if ( aActionMenuType == EFocusOnAttachmentsText )
-		{
-		if ( ShowOpenAttachmentOptionL() )
-		    {
-    		uids.Append( FsEActionAttachmentViewAll );
-		    }
-		if ( ShowDownloadOptionL() )
-			{
-			uids.Append( FsEActionAttachmentDownloadAll );
-			}
-		if ( ShowCancelDownloadOption() )
-			{
-			uids.Append( FsEActionAttachmentCancelAllDownloads );
-			}
-		if ( ShowSaveAttachmentOptionL() )
-		    {
-		    uids.Append( FsEActionAttachmentSaveAll );
-		    }
-		}
-
-	TInt uidsCount = uids.Count();
-	for ( TInt i = 0; i <  uidsCount; i++ )
-		{
-		CFSEmailUiActionMenu::AddCustomItemL( uids[i] );
-		}
-	CleanupStack::PopAndDestroy( &uids );
-	}
+        }
+    else if ( aActionMenuType == EFocusOnAttachmentsText )
+        {
+        if ( ShowOpenAttachmentOptionL() )
+            {
+            uids.Append( FsEActionAttachmentViewAll );
+            }
+        if ( ShowDownloadOptionL() )
+            {
+            uids.Append( FsEActionAttachmentDownloadAll );
+            }
+        if ( ShowCancelDownloadOption() )
+            {
+            uids.Append( FsEActionAttachmentCancelAllDownloads );
+            }
+        if ( ShowSaveAttachmentOptionL() )
+            {
+            uids.Append( FsEActionAttachmentSaveAll );
+            }
+        }
+
+    TInt uidsCount = uids.Count();
+    for ( TInt i = 0; i <  uidsCount; i++ )
+        {
+        CFSEmailUiActionMenu::AddCustomItemL( uids[i] );
+        }
+    CleanupStack::PopAndDestroy( &uids );
+    }
 
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::HandleActionMenuCommandL
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::HandleActionMenuCommandL(
-	TActionMenuCustomItemId aSelectedActionMenuItem,
-	TActionMenuType aActionMenuType )
-	{
+    TActionMenuCustomItemId aSelectedActionMenuItem,
+    TActionMenuType aActionMenuType )
+    {
     FUNC_LOG;
-	// check which hotspot is active.
-	SViewerHeadingHotSpotData currentHeaderHotSpotData;
-	CFindItemEngine::SFoundItem currentBodyHotSpotData;
-	THotspotType hotspotType = iViewerRichText->FindCurrentHotSpotL(
-		currentHeaderHotSpotData, currentBodyHotSpotData );
-
-	if ( aActionMenuType == EFocusOnNumberWithinMessage )
-		{
-		switch ( aSelectedActionMenuItem  )
-			{
-			case FsEActionMenuCall: // Call
-				{
-				CallToBodyHotSpotNumberL( currentBodyHotSpotData );
-				}
-				break;
-			case FsEActionMenuAddToContacts: // Add to Contacts
-				{
-				HBufC* hotspotText = iViewerRichText->GetHotspotTextLC(
-					currentBodyHotSpotData );
-				SavePhoneNumberAsContactL( *hotspotText );
-				CleanupStack::PopAndDestroy( hotspotText );
-				}
-				break;
-			case FsEActionMenuCreateMessage: // Create message
-				{
-				CreateMessageL();
-				}
-				break;
-			case FsEActionMenuRemoteLookup: // Remote lookup
-				{
-				HBufC* hotspotText = iViewerRichText->GetHotspotTextLC(
-					currentBodyHotSpotData );
-				LaunchRemoteLookupL( *hotspotText );
-				CleanupStack::PopAndDestroy( hotspotText );
-				}
-				break;
-			}
-		}
-	else if ( aActionMenuType == EFocusOnNameInAddressField )
-		{
-		switch( aSelectedActionMenuItem )
-			{
-			case FsEActionMenuCall: // Call
-				{
-				CallHotSpotAddressL();
-				}
-				break;
-			case FsEActionMenuCreateMessage: // Create message
-				{
-				CreateMessageL();
-				}
-				break;
+    // check which hotspot is active.
+    SViewerHeadingHotSpotData currentHeaderHotSpotData;
+    CFindItemEngine::SFoundItem currentBodyHotSpotData;
+    THotspotType hotspotType = iViewerRichText->FindCurrentHotSpotL(
+        currentHeaderHotSpotData, currentBodyHotSpotData );
+
+    if ( aActionMenuType == EFocusOnNumberWithinMessage )
+        {
+        switch ( aSelectedActionMenuItem  )
+            {
+            case FsEActionMenuCall: // Call
+                {
+                CallToBodyHotSpotNumberL( currentBodyHotSpotData );
+                }
+                break;
+            case FsEActionMenuAddToContacts: // Add to Contacts
+                {
+                HBufC* hotspotText = iViewerRichText->GetHotspotTextLC(
+                    currentBodyHotSpotData );
+                SavePhoneNumberAsContactL( *hotspotText );
+                CleanupStack::PopAndDestroy( hotspotText );
+                }
+                break;
+            case FsEActionMenuCreateMessage: // Create message
+                {
+                CreateMessageL();
+                }
+                break;
+            case FsEActionMenuRemoteLookup: // Remote lookup
+                {
+                HBufC* hotspotText = iViewerRichText->GetHotspotTextLC(
+                    currentBodyHotSpotData );
+                LaunchRemoteLookupL( *hotspotText );
+                CleanupStack::PopAndDestroy( hotspotText );
+                }
+                break;
+            }
+        }
+    else if ( aActionMenuType == EFocusOnNameInAddressField )
+        {
+        switch( aSelectedActionMenuItem )
+            {
+            case FsEActionMenuCall: // Call
+                {
+                CallHotSpotAddressL();
+                }
+                break;
+            case FsEActionMenuCreateMessage: // Create message
+                {
+                CreateMessageL();
+                }
+                break;
             case FsEActionMenuCreateEmail: // Create message
                 {
                 ComposeMailL();
                 }
                 break;
-			case FsEActionMenuContactDetails: // Contact details
-				{
-				OpenContactDetailsL();
-				}
-				break;
-			case FsEActionMenuAddToContacts: // Add to Contacts
-				{
-				HBufC* emailAddress =
-					iViewerRichText->GetHeaderHotspotEmailAddressLC(
-						currentHeaderHotSpotData );
-				SaveEmailAsContactL( *emailAddress );
-				CleanupStack::PopAndDestroy( emailAddress );
-				}
-				break;
-			case FsEActionMenuRemoteLookup: // Remote lookup
-				{
-				HBufC* emailAddress =
-					iViewerRichText->GetHeaderHotspotEmailAddressLC(
-						currentHeaderHotSpotData );
-				LaunchRemoteLookupL( *emailAddress );
-				CleanupStack::PopAndDestroy( emailAddress );
-				}
-				break;
-			}
-		}
-	else if ( aActionMenuType == EFocusOnHyperLinkWithinMessage )
-		{
-		switch ( aSelectedActionMenuItem )
-			{
-			case FsEActionMenuOpenInWeb: // Open in web
-				{
-				OpenHotSpotUrlInBrowserL( currentBodyHotSpotData );
-				}
-				break;
-			case FsEActionMenuOpenInIntranet: // Open in intranet
-				{
-				OpenLinkInIntranetL( EFalse );
-				}
-				break;
-			case FsEActionMenuBookmark: // Bookmark
-				{
-				AddToBookmarksL( currentBodyHotSpotData );
-				}
-				break;
-			}
-		}
-	else if ( aActionMenuType == EFocusOnAttachmentName ||
-              aActionMenuType == EFocusOnAttachmentsText )
-		{
-		switch ( aSelectedActionMenuItem )
-			{
-			case FsEActionAttachmentOpen: // Open single attachment
-			    {
-			    OpenAttachmentL();
+            case FsEActionMenuContactDetails: // Contact details
+                {
+                OpenContactDetailsL();
+                }
+                break;
+            case FsEActionMenuAddToContacts: // Add to Contacts
+                {
+                HBufC* emailAddress =
+                    iViewerRichText->GetHeaderHotspotEmailAddressLC(
+                        currentHeaderHotSpotData );
+                SaveEmailAsContactL( *emailAddress );
+                CleanupStack::PopAndDestroy( emailAddress );
+                }
+                break;
+            case FsEActionMenuRemoteLookup: // Remote lookup
+                {
+                HBufC* emailAddress =
+                    iViewerRichText->GetHeaderHotspotEmailAddressLC(
+                        currentHeaderHotSpotData );
+                LaunchRemoteLookupL( *emailAddress );
+                CleanupStack::PopAndDestroy( emailAddress );
+                }
+                break;
+            }
+        }
+    else if ( aActionMenuType == EFocusOnHyperLinkWithinMessage )
+        {
+        switch ( aSelectedActionMenuItem )
+            {
+            case FsEActionMenuOpenInWeb: // Open in web
+                {
+                OpenHotSpotUrlInBrowserL( currentBodyHotSpotData );
+                }
+                break;
+            case FsEActionMenuOpenInIntranet: // Open in intranet
+                {
+                OpenLinkInIntranetL( EFalse );
+                }
+                break;
+            case FsEActionMenuBookmark: // Bookmark
+                {
+                AddToBookmarksL( currentBodyHotSpotData );
                 }
                 break;
-			case FsEActionAttachmentViewAll: // Open attachments list
-			    {
-			    OpenAttachmentsViewL();
-			    }
-				break;
-			case FsEActionAttachmentDownload: // Dowload one
-			case FsEActionAttachmentDownloadAll : /// all attachments
-				{
-				StartDowloadingAttachmentsL();
-				}
-				break;
-			case FsEActionAttachmentCancelDownload: // Cancel one / all downloads
-			case FsEActionAttachmentCancelAllDownloads:
-				{
-				CancelDowloadingAttachmentsL();
-				}
-				break;
-			case FsEActionAttachmentSave: // Save one / all attachments
-			case FsEActionAttachmentSaveAll:
-				{
-				SaveAllAttachmentsL();
-				}
-				break;
-			case FsEActionAttachmentClearFetchedContent:
-			    {
-			    RemoveFetchedAttachmentL();
-			    }
-			    break;
-			}
-		}
-	else if ( aActionMenuType == EFocusOnEMailInBodyText )
-		{
-		switch ( aSelectedActionMenuItem )
-			{
-			case FsEActionMenuCall: // Call
-				{
-				CallHotSpotAddressL();
-				}
-				break;
-			case FsEActionMenuCreateMessage: // Create message
-				{
-				CreateMessageL();
-				}
-				break;
+            }
+        }
+    else if ( aActionMenuType == EFocusOnAttachmentName ||
+              aActionMenuType == EFocusOnAttachmentsText )
+        {
+        switch ( aSelectedActionMenuItem )
+            {
+            case FsEActionAttachmentOpen: // Open single attachment
+                {
+                OpenAttachmentL();
+                }
+                break;
+            case FsEActionAttachmentViewAll: // Open attachments list
+                {
+                OpenAttachmentsViewL();
+                }
+                break;
+            case FsEActionAttachmentDownload: // Dowload one
+            case FsEActionAttachmentDownloadAll : /// all attachments
+                {
+                StartDowloadingAttachmentsL();
+                }
+                break;
+            case FsEActionAttachmentCancelDownload: // Cancel one / all downloads
+            case FsEActionAttachmentCancelAllDownloads:
+                {
+                CancelDowloadingAttachmentsL();
+                }
+                break;
+            case FsEActionAttachmentSave: // Save one / all attachments
+            case FsEActionAttachmentSaveAll:
+                {
+                SaveAllAttachmentsL();
+                }
+                break;
+            case FsEActionAttachmentClearFetchedContent:
+                {
+                RemoveFetchedAttachmentL();
+                }
+                break;
+            }
+        }
+    else if ( aActionMenuType == EFocusOnEMailInBodyText )
+        {
+        switch ( aSelectedActionMenuItem )
+            {
+            case FsEActionMenuCall: // Call
+                {
+                CallHotSpotAddressL();
+                }
+                break;
+            case FsEActionMenuCreateMessage: // Create message
+                {
+                CreateMessageL();
+                }
+                break;
             case FsEActionMenuCreateEmail: // Create message
                 {
                 ComposeMailL();
                 }
                 break;
-			case FsEActionMenuContactDetails: // Contact details
-				{
-				OpenContactDetailsL();
-				}
-				break;
-			case FsEActionMenuAddToContacts: // Add to Contacts
-				{
-				HBufC* hotspotText = iViewerRichText->GetHotspotTextLC(
-					currentBodyHotSpotData );
-				if ( currentBodyHotSpotData.iItemType ==
-					CFindItemEngine::EFindItemSearchPhoneNumberBin )
-					{
-					SavePhoneNumberAsContactL( *hotspotText );
-					}
-				else if ( currentBodyHotSpotData.iItemType ==
-					CFindItemEngine::EFindItemSearchMailAddressBin )
-					{
-					SaveEmailAsContactL( *hotspotText );
-					}
-				else if ( currentBodyHotSpotData.iItemType ==
-					CFindItemEngine::EFindItemSearchScheme )
-					{
-					if ( hotspotText->FindC( KMailtoPrefix ) == 0 )
-						{
-						// Save email as contact, address mailto: strip is done in SaveEmailAsContactL
-						SaveEmailAsContactL( *hotspotText );
-						}
-					}
-				CleanupStack::PopAndDestroy( hotspotText );
-				}
-				break;
-			case FsEActionMenuRemoteLookup: // Remote lookup
-				{
-				HBufC* hotspotText = iViewerRichText->GetHotspotTextLC(
-					currentBodyHotSpotData );
-				LaunchRemoteLookupL( *hotspotText );
-				CleanupStack::PopAndDestroy( hotspotText );
-				}
-				break;
-			}
-		}
-	}
+            case FsEActionMenuContactDetails: // Contact details
+                {
+                OpenContactDetailsL();
+                }
+                break;
+            case FsEActionMenuAddToContacts: // Add to Contacts
+                {
+                HBufC* hotspotText = iViewerRichText->GetHotspotTextLC(
+                    currentBodyHotSpotData );
+                if ( currentBodyHotSpotData.iItemType ==
+                    CFindItemEngine::EFindItemSearchPhoneNumberBin )
+                    {
+                    SavePhoneNumberAsContactL( *hotspotText );
+                    }
+                else if ( currentBodyHotSpotData.iItemType ==
+                    CFindItemEngine::EFindItemSearchMailAddressBin )
+                    {
+                    SaveEmailAsContactL( *hotspotText );
+                    }
+                else if ( currentBodyHotSpotData.iItemType ==
+                    CFindItemEngine::EFindItemSearchScheme )
+                    {
+                    if ( hotspotText->FindC( KMailtoPrefix ) == 0 )
+                        {
+                        // Save email as contact, address mailto: strip is done in SaveEmailAsContactL
+                        SaveEmailAsContactL( *hotspotText );
+                        }
+                    }
+                CleanupStack::PopAndDestroy( hotspotText );
+                }
+                break;
+            case FsEActionMenuRemoteLookup: // Remote lookup
+                {
+                HBufC* hotspotText = iViewerRichText->GetHotspotTextLC(
+                    currentBodyHotSpotData );
+                LaunchRemoteLookupL( *hotspotText );
+                CleanupStack::PopAndDestroy( hotspotText );
+                }
+                break;
+            }
+        }
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::OpenContactDetailsL
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::OpenContactDetailsL()
-	{
+    {
     FUNC_LOG;
-	SViewerHeadingHotSpotData currentHeaderHotSpotData;
-	CFindItemEngine::SFoundItem currentBodyHotSpotData;
-	THotspotType hotspotType = iViewerRichText->FindCurrentHotSpotL( currentHeaderHotSpotData, currentBodyHotSpotData );
-
-	HBufC* emailAddress = NULL;
-	if ( hotspotType == EHeaderHotspot )
-		{
-		emailAddress = iViewerRichText->GetHeaderHotspotEmailAddressLC( currentHeaderHotSpotData );
-		}
-	else if ( hotspotType == EBodyHotspot )
-		{
-		emailAddress = iViewerRichText->GetHotspotTextLC( currentBodyHotSpotData );
-		// Delete "mailto:" prefix if found
-		if ( emailAddress->FindC( KMailtoPrefix ) == 0 )
-			{
-			emailAddress->Des().Delete( 0, KMailtoPrefix().Length() );
-			}
-		}
-	else
-		{
-		return;
-		}
-
-	CFsDelayedLoader::InstanceL()->GetContactHandlerL()->ShowContactDetailsL(
-			*emailAddress, EContactUpdateEmail, NULL );
-
-	CleanupStack::PopAndDestroy( emailAddress );
-	}
+    SViewerHeadingHotSpotData currentHeaderHotSpotData;
+    CFindItemEngine::SFoundItem currentBodyHotSpotData;
+    THotspotType hotspotType = iViewerRichText->FindCurrentHotSpotL( currentHeaderHotSpotData, currentBodyHotSpotData );
+
+    HBufC* emailAddress = NULL;
+    if ( hotspotType == EHeaderHotspot )
+        {
+        emailAddress = iViewerRichText->GetHeaderHotspotEmailAddressLC( currentHeaderHotSpotData );
+        }
+    else if ( hotspotType == EBodyHotspot )
+        {
+        emailAddress = iViewerRichText->GetHotspotTextLC( currentBodyHotSpotData );
+        // Delete "mailto:" prefix if found
+        if ( emailAddress->FindC( KMailtoPrefix ) == 0 )
+            {
+            emailAddress->Des().Delete( 0, KMailtoPrefix().Length() );
+            }
+        }
+    else
+        {
+        return;
+        }
+
+    CFsDelayedLoader::InstanceL()->GetContactHandlerL()->ShowContactDetailsL(
+            *emailAddress, EContactUpdateEmail, NULL );
+
+    CleanupStack::PopAndDestroy( emailAddress );
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::LaunchHtmlViewerL
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::LaunchHtmlViewerL()
-	{
+    {
     FUNC_LOG;
-	if ( MessagePartFullyFetchedL( EMessageHtmlBodyPart ) )
-		{
-		THtmlViewerActivationData htmlData;
-		htmlData.iActivationDataType = THtmlViewerActivationData::EMailMessage;
-		htmlData.iMailBoxId = iMessage->GetMailBoxId();
+    if ( MessagePartFullyFetchedL( EMessageHtmlBodyPart ) )
+        {
+        THtmlViewerActivationData htmlData;
+        htmlData.iActivationDataType = THtmlViewerActivationData::EMailMessage;
+        htmlData.iMailBoxId = iMessage->GetMailBoxId();
         htmlData.iFolderId = iMessage->GetFolderId();
         htmlData.iMessageId = iMessage->GetMessageId();
         htmlData.iEmbeddedMessageMode = iEmbeddedMessageMode;
-		TPckgBuf<THtmlViewerActivationData> pckgData( htmlData );
-
-		iAppUi.EnterFsEmailViewL( HtmlViewerId, KHtmlViewerOpenNew, pckgData );
-		}
-	else
-		{
-		StartWaitedFetchingL( EMessageHtmlBodyPart );
-		}
-	}
+        TPckgBuf<THtmlViewerActivationData> pckgData( htmlData );
+
+        iAppUi.EnterFsEmailViewL( HtmlViewerId, KHtmlViewerOpenNew, pckgData );
+        }
+    else
+        {
+        StartWaitedFetchingL( EMessageHtmlBodyPart );
+        }
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::LaunchRemoteLookupL
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::LaunchRemoteLookupL( const TDesC& aDes ) const
-	{
+    {
     FUNC_LOG;
-	// this method assumes that remote lookup is available with current plugin.
-	HBufC* textData = HBufC::NewLC( aDes.Length() );
-	textData->Des().Append( aDes );
-	if ( textData->FindC( KMailtoPrefix ) == 0 )
-		{
-		textData->Des().Delete( 0, KMailtoPrefix().Length() );
-		}
-	else if ( textData->FindC( KCallPrefix ) == 0 )
-		{
-		textData->Des().Delete( 0, KCallPrefix().Length() );
-		}
-	else if ( textData->FindC( KTelPrefix ) == 0 )
-		{
-		textData->Des().Delete( 0, KTelPrefix().Length() );
-		}
-	else if ( textData->FindC( KSmsPrefix ) == 0 )
-		{
-		textData->Des().Delete( 0, KSmsPrefix().Length() );
-		}
-	else if ( textData->FindC( KMmsPrefix ) == 0 )
-		{
-		textData->Des().Delete( 0, KMmsPrefix().Length() );
-		}
-	else if ( textData->FindC( KVoipPrefix ) == 0 )
-		{
-		textData->Des().Delete( 0, KVoipPrefix().Length() );
-		}
-
-	CFsDelayedLoader::InstanceL()->GetContactHandlerL()->LaunchRemoteLookupWithQueryL( *iMailBox, *textData );
-	CleanupStack::PopAndDestroy( textData );
-	}
+    // this method assumes that remote lookup is available with current plugin.
+    HBufC* textData = HBufC::NewLC( aDes.Length() );
+    textData->Des().Append( aDes );
+    if ( textData->FindC( KMailtoPrefix ) == 0 )
+        {
+        textData->Des().Delete( 0, KMailtoPrefix().Length() );
+        }
+    else if ( textData->FindC( KCallPrefix ) == 0 )
+        {
+        textData->Des().Delete( 0, KCallPrefix().Length() );
+        }
+    else if ( textData->FindC( KTelPrefix ) == 0 )
+        {
+        textData->Des().Delete( 0, KTelPrefix().Length() );
+        }
+    else if ( textData->FindC( KSmsPrefix ) == 0 )
+        {
+        textData->Des().Delete( 0, KSmsPrefix().Length() );
+        }
+    else if ( textData->FindC( KMmsPrefix ) == 0 )
+        {
+        textData->Des().Delete( 0, KMmsPrefix().Length() );
+        }
+    else if ( textData->FindC( KVoipPrefix ) == 0 )
+        {
+        textData->Des().Delete( 0, KVoipPrefix().Length() );
+        }
+
+    CFsDelayedLoader::InstanceL()->GetContactHandlerL()->LaunchRemoteLookupWithQueryL( *iMailBox, *textData );
+    CleanupStack::PopAndDestroy( textData );
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::AddToBookmarksL
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::AddToBookmarksL(
-				const CFindItemEngine::SFoundItem& aBodyHotspotData ) const
-	{
+                const CFindItemEngine::SFoundItem& aBodyHotspotData ) const
+    {
     FUNC_LOG;
-	HBufC* hotspotText =
-		iViewerRichText->GetHotspotTextLC( aBodyHotspotData );
-
-	RFavouritesSession fSession;
-	User::LeaveIfError( fSession.Connect() );
-	CleanupClosePushL( fSession );
-
-	RFavouritesDb favoris;
-	User::LeaveIfError( favoris.Open( fSession, KBrowserBookmarks ) );
-	CleanupClosePushL( favoris );
-
-	CFavouritesItem *favorisItem = CFavouritesItem::NewLC();
-	favorisItem->SetType( CFavouritesItem::EItem );
-	favorisItem->SetUrlL( *hotspotText );
+    HBufC* hotspotText =
+        iViewerRichText->GetHotspotTextLC( aBodyHotspotData );
+
+    RFavouritesSession fSession;
+    User::LeaveIfError( fSession.Connect() );
+    CleanupClosePushL( fSession );
+
+    RFavouritesDb favoris;
+    User::LeaveIfError( favoris.Open( fSession, KBrowserBookmarks ) );
+    CleanupClosePushL( favoris );
+
+    CFavouritesItem *favorisItem = CFavouritesItem::NewLC();
+    favorisItem->SetType( CFavouritesItem::EItem );
+    favorisItem->SetUrlL( *hotspotText );
     // Should be less than KFavouritesMaxName ( 50 )
-	if ( hotspotText->Length() > KFavouritesMaxName )
-		{
-		favorisItem->SetNameL( hotspotText->Left( KFavouritesMaxName ) );
-		}
-	else
-		{
-     	favorisItem->SetNameL( *hotspotText );
-		}
-
-	favorisItem->SetParentFolder( KFavouritesRootUid );
-
-	TInt error = favoris.Add( *favorisItem, ETrue );
-
-	CleanupStack::PopAndDestroy( favorisItem );
-	CleanupStack::PopAndDestroy( &favoris );
-	CleanupStack::PopAndDestroy( &fSession );
-
-	CleanupStack::PopAndDestroy( hotspotText );
-
-	if ( error == KErrNone )
-		{
-		TFsEmailUiUtility::ShowInfoNoteL(
-			R_FREESTYLE_EMAIL_UI_VIEWER_BOOKMARK_ADDED, ETrue );
-		}
-	else // Error in bookmark creation, show could not complete message
-		{
-		TFsEmailUiUtility::ShowErrorNoteL(
-			R_FREESTYLE_EMAIL_ERROR_GENERAL_UNABLE_TO_COMPLETE, ETrue );
-		}
-	}
+    if ( hotspotText->Length() > KFavouritesMaxName )
+        {
+        favorisItem->SetNameL( hotspotText->Left( KFavouritesMaxName ) );
+        }
+    else
+        {
+        favorisItem->SetNameL( *hotspotText );
+        }
+
+    favorisItem->SetParentFolder( KFavouritesRootUid );
+
+    TInt error = favoris.Add( *favorisItem, ETrue );
+
+    CleanupStack::PopAndDestroy( favorisItem );
+    CleanupStack::PopAndDestroy( &favoris );
+    CleanupStack::PopAndDestroy( &fSession );
+
+    CleanupStack::PopAndDestroy( hotspotText );
+
+    if ( error == KErrNone )
+        {
+        TFsEmailUiUtility::ShowInfoNoteL(
+            R_FREESTYLE_EMAIL_UI_VIEWER_BOOKMARK_ADDED, ETrue );
+        }
+    else // Error in bookmark creation, show could not complete message
+        {
+        TFsEmailUiUtility::ShowErrorNoteL(
+            R_FREESTYLE_EMAIL_ERROR_GENERAL_UNABLE_TO_COMPLETE, ETrue );
+        }
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::CallHotSpotAddressL
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::CallHotSpotAddressL()
-	{
+    {
     FUNC_LOG;
-	SViewerHeadingHotSpotData currentHeaderHotSpotData;
-	CFindItemEngine::SFoundItem currentBodyHotSpotData;
-	THotspotType hotspotType = iViewerRichText->FindCurrentHotSpotL( currentHeaderHotSpotData, currentBodyHotSpotData );
+    SViewerHeadingHotSpotData currentHeaderHotSpotData;
+    CFindItemEngine::SFoundItem currentBodyHotSpotData;
+    THotspotType hotspotType = iViewerRichText->FindCurrentHotSpotL( currentHeaderHotSpotData, currentBodyHotSpotData );
 
    if( hotspotType == EHeaderHotspot &&  currentHeaderHotSpotData.iType == ETypeFromAddressDisplayName )
         {
@@ -3328,123 +3328,123 @@
            CleanupStack::PopAndDestroy( emailAddress );
         }
    else if( ( hotspotType == EHeaderHotspot &&
-			( currentHeaderHotSpotData.iType == ETypeToAddressDisplayName ||
-			currentHeaderHotSpotData.iType == ETypeCcAddressDisplayName ||
-			currentHeaderHotSpotData.iType == ETypeBccAddressDisplayName ||
-			currentHeaderHotSpotData.iType == ETypeEmailAddress )
-			)
-		)
-		{
-		HBufC* emailAddress = iViewerRichText->GetHeaderHotspotEmailAddressLC( currentHeaderHotSpotData );
-		CFsDelayedLoader::InstanceL()->GetContactHandlerL()->FindAndCallToContactByEmailL( *emailAddress,
-				 iAppUi.GetActiveMailbox(), this, EFalse /*use call sender text*/);
-		CleanupStack::PopAndDestroy( emailAddress );
-		}
-	else if( hotspotType == EBodyHotspot &&
-				currentBodyHotSpotData.iItemType == CFindItemEngine::EFindItemSearchMailAddressBin	)
-		{
-		HBufC* emailAddress = iViewerRichText->GetHotspotTextLC( currentBodyHotSpotData );
-		CFsDelayedLoader::InstanceL()->GetContactHandlerL()->FindAndCallToContactByEmailL( *emailAddress,
-				 iAppUi.GetActiveMailbox(), this, EFalse );
-		CleanupStack::PopAndDestroy( emailAddress );
-		}
-	else if( hotspotType == EBodyHotspot &&
-				currentBodyHotSpotData.iItemType == CFindItemEngine::EFindItemSearchPhoneNumberBin )
-		{
-		CallToBodyHotSpotNumberL( currentBodyHotSpotData );
-		}
-	else if ( currentBodyHotSpotData.iItemType == CFindItemEngine::EFindItemSearchScheme )
-		{
-		// Get scheme text and make sure there is "mailto:" text or "call:" text
-		HBufC* schemeText = iViewerRichText->GetHotspotTextLC( currentBodyHotSpotData );
-		if ( schemeText &&  schemeText->FindC( KMailtoPrefix ) == 0 )
-			{
-			schemeText->Des().Delete( 0, KMailtoPrefix().Length() );
-			CFsDelayedLoader::InstanceL()->GetContactHandlerL()->FindAndCallToContactByEmailL( *schemeText,
-				 iAppUi.GetActiveMailbox(), this, EFalse);
-			}
-		else if ( schemeText->FindC( KCallPrefix ) == 0 ||
-				  schemeText->FindC( KTelPrefix ) == 0 ||
-				  schemeText->FindC( KSmsPrefix ) == 0 ||
-				  schemeText->FindC( KMmsPrefix ) == 0 ||
-				  schemeText->FindC( KVoipPrefix ) == 0 )
-			{
-			CallToBodyHotSpotNumberL( currentBodyHotSpotData );
-			}
-		CleanupStack::PopAndDestroy( schemeText );
-		}
-
-	}
+            ( currentHeaderHotSpotData.iType == ETypeToAddressDisplayName ||
+            currentHeaderHotSpotData.iType == ETypeCcAddressDisplayName ||
+            currentHeaderHotSpotData.iType == ETypeBccAddressDisplayName ||
+            currentHeaderHotSpotData.iType == ETypeEmailAddress )
+            )
+        )
+        {
+        HBufC* emailAddress = iViewerRichText->GetHeaderHotspotEmailAddressLC( currentHeaderHotSpotData );
+        CFsDelayedLoader::InstanceL()->GetContactHandlerL()->FindAndCallToContactByEmailL( *emailAddress,
+                 iAppUi.GetActiveMailbox(), this, EFalse /*use call sender text*/);
+        CleanupStack::PopAndDestroy( emailAddress );
+        }
+    else if( hotspotType == EBodyHotspot &&
+                currentBodyHotSpotData.iItemType == CFindItemEngine::EFindItemSearchMailAddressBin  )
+        {
+        HBufC* emailAddress = iViewerRichText->GetHotspotTextLC( currentBodyHotSpotData );
+        CFsDelayedLoader::InstanceL()->GetContactHandlerL()->FindAndCallToContactByEmailL( *emailAddress,
+                 iAppUi.GetActiveMailbox(), this, EFalse );
+        CleanupStack::PopAndDestroy( emailAddress );
+        }
+    else if( hotspotType == EBodyHotspot &&
+                currentBodyHotSpotData.iItemType == CFindItemEngine::EFindItemSearchPhoneNumberBin )
+        {
+        CallToBodyHotSpotNumberL( currentBodyHotSpotData );
+        }
+    else if ( currentBodyHotSpotData.iItemType == CFindItemEngine::EFindItemSearchScheme )
+        {
+        // Get scheme text and make sure there is "mailto:" text or "call:" text
+        HBufC* schemeText = iViewerRichText->GetHotspotTextLC( currentBodyHotSpotData );
+        if ( schemeText &&  schemeText->FindC( KMailtoPrefix ) == 0 )
+            {
+            schemeText->Des().Delete( 0, KMailtoPrefix().Length() );
+            CFsDelayedLoader::InstanceL()->GetContactHandlerL()->FindAndCallToContactByEmailL( *schemeText,
+                 iAppUi.GetActiveMailbox(), this, EFalse);
+            }
+        else if ( schemeText->FindC( KCallPrefix ) == 0 ||
+                  schemeText->FindC( KTelPrefix ) == 0 ||
+                  schemeText->FindC( KSmsPrefix ) == 0 ||
+                  schemeText->FindC( KMmsPrefix ) == 0 ||
+                  schemeText->FindC( KVoipPrefix ) == 0 )
+            {
+            CallToBodyHotSpotNumberL( currentBodyHotSpotData );
+            }
+        CleanupStack::PopAndDestroy( schemeText );
+        }
+
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::CreateMessageL
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::CreateMessageL() const
-	{
+    {
     FUNC_LOG;
-	SViewerHeadingHotSpotData currentHeaderHotSpotData;
-	CFindItemEngine::SFoundItem currentBodyHotSpotData;
-	THotspotType hotspotType = iViewerRichText->FindCurrentHotSpotL( currentHeaderHotSpotData, currentBodyHotSpotData );
-
-	if( hotspotType == EHeaderHotspot )
-		{
-		HBufC* emailAddress = iViewerRichText->GetHeaderHotspotEmailAddressLC( currentHeaderHotSpotData );
-		CFSEmailUiContactHandler* cntHandlerInstance = CFsDelayedLoader::InstanceL()->GetContactHandlerL();
-		cntHandlerInstance->FindAndCreateMsgToContactByEmailL( *emailAddress, iAppUi.GetActiveMailbox() );
-		CleanupStack::PopAndDestroy( emailAddress );
-		}
-	else if( hotspotType == EBodyHotspot )
-		{
-		// Sending based on email address, goes to contact handler
-		if ( currentBodyHotSpotData.iItemType == CFindItemEngine::EFindItemSearchMailAddressBin )
-			{
-			HBufC* emailAddress = iViewerRichText->GetHotspotTextLC( currentBodyHotSpotData );
-			CFSEmailUiContactHandler* cntHandlerInstance = CFsDelayedLoader::InstanceL()->GetContactHandlerL();
-			cntHandlerInstance->FindAndCreateMsgToContactByEmailL( *emailAddress, iAppUi.GetActiveMailbox() );
-			CleanupStack::PopAndDestroy( emailAddress );
-			}
-		// Sending based on found number, goes to utility class
-		else if ( currentBodyHotSpotData.iItemType == CFindItemEngine::EFindItemSearchPhoneNumberBin )
-			{
-			HBufC* hotspotText = iViewerRichText->GetHotspotTextLC( currentBodyHotSpotData );
-			TFsEmailUiUtility::ShowCreateMessageQueryL( *hotspotText );
-			CleanupStack::PopAndDestroy( hotspotText );
-			}
-		else if ( currentBodyHotSpotData.iItemType == CFindItemEngine::EFindItemSearchScheme )
-			{
-			// Get scheme text and make sure there is "mailto:" text or "call:" text
-			HBufC* schemeText = iViewerRichText->GetHotspotTextLC( currentBodyHotSpotData );
-			if ( schemeText && ( schemeText->FindC( KMailtoPrefix ) == 0 ||
-				 schemeText->FindC( KVoipPrefix ) == 0) )
-				{
-				schemeText->Des().Delete( 0, KMailtoPrefix().Length() );
-				CFSEmailUiContactHandler* cntHandlerInstance = CFsDelayedLoader::InstanceL()->GetContactHandlerL();
-				cntHandlerInstance->FindAndCreateMsgToContactByEmailL( *schemeText, iAppUi.GetActiveMailbox() );
-				}
-			else if ( schemeText && schemeText->FindC( KCallPrefix ) == 0 )
-				{
-				schemeText->Des().Delete( 0, KCallPrefix().Length() );
-				TFsEmailUiUtility::ShowCreateMessageQueryL( *schemeText );
-				}
-			else if ( schemeText && schemeText->FindC( KTelPrefix ) == 0 )
-				{
-				schemeText->Des().Delete( 0, KTelPrefix().Length() );
-				TFsEmailUiUtility::ShowCreateMessageQueryL( *schemeText );
-				}
-			else if ( schemeText && schemeText->FindC( KSmsPrefix ) == 0 )
-				{
-				schemeText->Des().Delete( 0, KSmsPrefix().Length() );
-				TFsEmailUiUtility::ShowCreateMessageQueryL( *schemeText );
-				}
-			else if ( schemeText && schemeText->FindC( KMmsPrefix ) == 0 )
-				{
-				schemeText->Des().Delete( 0, KMmsPrefix().Length() );
-				TFsEmailUiUtility::ShowCreateMessageQueryL( *schemeText );
-				}
-			CleanupStack::PopAndDestroy( schemeText );
-			}
-		}
-	}
+    SViewerHeadingHotSpotData currentHeaderHotSpotData;
+    CFindItemEngine::SFoundItem currentBodyHotSpotData;
+    THotspotType hotspotType = iViewerRichText->FindCurrentHotSpotL( currentHeaderHotSpotData, currentBodyHotSpotData );
+
+    if( hotspotType == EHeaderHotspot )
+        {
+        HBufC* emailAddress = iViewerRichText->GetHeaderHotspotEmailAddressLC( currentHeaderHotSpotData );
+        CFSEmailUiContactHandler* cntHandlerInstance = CFsDelayedLoader::InstanceL()->GetContactHandlerL();
+        cntHandlerInstance->FindAndCreateMsgToContactByEmailL( *emailAddress, iAppUi.GetActiveMailbox() );
+        CleanupStack::PopAndDestroy( emailAddress );
+        }
+    else if( hotspotType == EBodyHotspot )
+        {
+        // Sending based on email address, goes to contact handler
+        if ( currentBodyHotSpotData.iItemType == CFindItemEngine::EFindItemSearchMailAddressBin )
+            {
+            HBufC* emailAddress = iViewerRichText->GetHotspotTextLC( currentBodyHotSpotData );
+            CFSEmailUiContactHandler* cntHandlerInstance = CFsDelayedLoader::InstanceL()->GetContactHandlerL();
+            cntHandlerInstance->FindAndCreateMsgToContactByEmailL( *emailAddress, iAppUi.GetActiveMailbox() );
+            CleanupStack::PopAndDestroy( emailAddress );
+            }
+        // Sending based on found number, goes to utility class
+        else if ( currentBodyHotSpotData.iItemType == CFindItemEngine::EFindItemSearchPhoneNumberBin )
+            {
+            HBufC* hotspotText = iViewerRichText->GetHotspotTextLC( currentBodyHotSpotData );
+            TFsEmailUiUtility::ShowCreateMessageQueryL( *hotspotText );
+            CleanupStack::PopAndDestroy( hotspotText );
+            }
+        else if ( currentBodyHotSpotData.iItemType == CFindItemEngine::EFindItemSearchScheme )
+            {
+            // Get scheme text and make sure there is "mailto:" text or "call:" text
+            HBufC* schemeText = iViewerRichText->GetHotspotTextLC( currentBodyHotSpotData );
+            if ( schemeText && ( schemeText->FindC( KMailtoPrefix ) == 0 ||
+                 schemeText->FindC( KVoipPrefix ) == 0) )
+                {
+                schemeText->Des().Delete( 0, KMailtoPrefix().Length() );
+                CFSEmailUiContactHandler* cntHandlerInstance = CFsDelayedLoader::InstanceL()->GetContactHandlerL();
+                cntHandlerInstance->FindAndCreateMsgToContactByEmailL( *schemeText, iAppUi.GetActiveMailbox() );
+                }
+            else if ( schemeText && schemeText->FindC( KCallPrefix ) == 0 )
+                {
+                schemeText->Des().Delete( 0, KCallPrefix().Length() );
+                TFsEmailUiUtility::ShowCreateMessageQueryL( *schemeText );
+                }
+            else if ( schemeText && schemeText->FindC( KTelPrefix ) == 0 )
+                {
+                schemeText->Des().Delete( 0, KTelPrefix().Length() );
+                TFsEmailUiUtility::ShowCreateMessageQueryL( *schemeText );
+                }
+            else if ( schemeText && schemeText->FindC( KSmsPrefix ) == 0 )
+                {
+                schemeText->Des().Delete( 0, KSmsPrefix().Length() );
+                TFsEmailUiUtility::ShowCreateMessageQueryL( *schemeText );
+                }
+            else if ( schemeText && schemeText->FindC( KMmsPrefix ) == 0 )
+                {
+                schemeText->Des().Delete( 0, KMmsPrefix().Length() );
+                TFsEmailUiUtility::ShowCreateMessageQueryL( *schemeText );
+                }
+            CleanupStack::PopAndDestroy( schemeText );
+            }
+        }
+    }
 
 TBool CFSEmailUiMailViewerVisualiser::IsCopyToClipBoardAvailableL() const
     {
@@ -3498,7 +3498,7 @@
 // CFSEmailUiMailViewerVisualiser::CopyCurrentHotspotToClipBoardL
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::CopyCurrentHotspotToClipBoardL() const
-	{
+    {
     FUNC_LOG;
     TInt ignoreThis( 0 );
     TBool visibleHotsSpot =
@@ -3551,7 +3551,7 @@
             CleanupStack::PopAndDestroy( clipBoardText );
             }
         }
-	}
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::ShowOpenAttachmentOptionL
@@ -3561,9 +3561,9 @@
     FUNC_LOG;
     TInt ret = EFalse;
 
-	RPointerArray<CFSMailMessagePart> attachments;
-	CleanupResetAndDestroyClosePushL( attachments );
-	iMessage->AttachmentListL( attachments );
+    RPointerArray<CFSMailMessagePart> attachments;
+    CleanupResetAndDestroyClosePushL( attachments );
+    iMessage->AttachmentListL( attachments );
 
     // The Open option is always available when focus on the multiple
     // attachments item.
@@ -3630,28 +3630,28 @@
 // CFSEmailUiMailViewerVisualiser::ShowDownloadOptionL
 // -----------------------------------------------------------------------------
 TBool CFSEmailUiMailViewerVisualiser::ShowDownloadOptionL()
-	{
+    {
     FUNC_LOG;
-	TBool retVal = EFalse;
-
-	TPartData partData = MailData();
-
-	RPointerArray<CFSMailMessagePart> attachments;
-	CleanupResetAndDestroyClosePushL( attachments );
-	iMessage->AttachmentListL( attachments );
-	TInt attachmentsCount = attachments.Count();
-	for ( TInt i = 0; i < attachmentsCount; i++ )
-		{
-		partData.iMessagePartId = attachments[i]->GetPartId();
-		if ( iAppUi.DownloadInfoMediator() && iAppUi.DownloadInfoMediator()->IsDownloadableL( partData ) )
-			{
-	    	retVal = ETrue;
-	    	break;
-			}
-		}
-	CleanupStack::PopAndDestroy( &attachments );
-	return retVal;
-	}
+    TBool retVal = EFalse;
+
+    TPartData partData = MailData();
+
+    RPointerArray<CFSMailMessagePart> attachments;
+    CleanupResetAndDestroyClosePushL( attachments );
+    iMessage->AttachmentListL( attachments );
+    TInt attachmentsCount = attachments.Count();
+    for ( TInt i = 0; i < attachmentsCount; i++ )
+        {
+        partData.iMessagePartId = attachments[i]->GetPartId();
+        if ( iAppUi.DownloadInfoMediator() && iAppUi.DownloadInfoMediator()->IsDownloadableL( partData ) )
+            {
+            retVal = ETrue;
+            break;
+            }
+        }
+    CleanupStack::PopAndDestroy( &attachments );
+    return retVal;
+    }
 
 
 // -----------------------------------------------------------------------------
@@ -3687,178 +3687,178 @@
 // CFSEmailUiMailViewerVisualiser::ShowCancelDownloadOption
 // -----------------------------------------------------------------------------
 TBool CFSEmailUiMailViewerVisualiser::ShowCancelDownloadOption()
-	{
+    {
     FUNC_LOG;
-	TBool ret( EFalse );
-	if ( iMessage && iAppUi.DownloadInfoMediator() )
-		{
-		ret = iAppUi.DownloadInfoMediator()->IsAnyAttachmentDownloads(
-		        iMessage->GetMessageId() );
-		}
-	return ret;
-	}
+    TBool ret( EFalse );
+    if ( iMessage && iAppUi.DownloadInfoMediator() )
+        {
+        ret = iAppUi.DownloadInfoMediator()->IsAnyAttachmentDownloads(
+                iMessage->GetMessageId() );
+        }
+    return ret;
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::OpenAttachmentL
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::OpenAttachmentL()
-	{
+    {
     FUNC_LOG;
-	if ( !iMessage )
-	    {
-	    User::Leave( KErrNotReady );
-	    }
-
-	RPointerArray<CFSMailMessagePart> attachments;
-	CleanupResetAndDestroyClosePushL( attachments );
-	iMessage->AttachmentListL( attachments );
-
-	// start downloading if not yet downloaded.
-	if ( ShowDownloadOptionL() )
-		{
-		StartDowloadingAttachmentsL();
-		}
-	else if ( ShowCancelDownloadOption() ) // show download ongoing info
-		{
-		TFsEmailUiUtility::ShowInfoNoteL(
-			R_FSE_VIEWER_NOTE_ATTACHMENT_DOWNLOADING_PROGRESS );
-		}
-	else // open if attachment is already downloaded
-		{
-		TInt attachmentsCount = attachments.Count();
-		if ( attachmentsCount )
-			{
-			// <cmail>
-			TFsEmailUiUtility::OpenAttachmentL( *attachments[attachmentsCount-1] );
-			// </cmail>
-			}
-		}
-
-	CleanupStack::PopAndDestroy( &attachments );
-	}
+    if ( !iMessage )
+        {
+        User::Leave( KErrNotReady );
+        }
+
+    RPointerArray<CFSMailMessagePart> attachments;
+    CleanupResetAndDestroyClosePushL( attachments );
+    iMessage->AttachmentListL( attachments );
+
+    // start downloading if not yet downloaded.
+    if ( ShowDownloadOptionL() )
+        {
+        StartDowloadingAttachmentsL();
+        }
+    else if ( ShowCancelDownloadOption() ) // show download ongoing info
+        {
+        TFsEmailUiUtility::ShowInfoNoteL(
+            R_FSE_VIEWER_NOTE_ATTACHMENT_DOWNLOADING_PROGRESS );
+        }
+    else // open if attachment is already downloaded
+        {
+        TInt attachmentsCount = attachments.Count();
+        if ( attachmentsCount )
+            {
+            // <cmail>
+            TFsEmailUiUtility::OpenAttachmentL( *attachments[attachmentsCount-1] );
+            // </cmail>
+            }
+        }
+
+    CleanupStack::PopAndDestroy( &attachments );
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::OpenAttachmentsViewL
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::OpenAttachmentsViewL()
-	{
+    {
     FUNC_LOG;
-	// give pointer to current for attachments list view
-	TAttachmentListActivationData params;
-	params.iMailBoxId = iMessage->GetMailBoxId();
-	params.iFolderId = iMessage->GetFolderId();
-	params.iMessageId = iMessage->GetMessageId();
-	params.iEmbeddedMsgMode = iEmbeddedMessageMode;
-	// use package buffer to pass the params
-	TPckgBuf<TAttachmentListActivationData> buf( params );
-	TUid emptyCustomMessageId = { 0 };
-	iAppUi.EnterFsEmailViewL(
-		AttachmentMngrViewId, emptyCustomMessageId, buf );
-	}
+    // give pointer to current for attachments list view
+    TAttachmentListActivationData params;
+    params.iMailBoxId = iMessage->GetMailBoxId();
+    params.iFolderId = iMessage->GetFolderId();
+    params.iMessageId = iMessage->GetMessageId();
+    params.iEmbeddedMsgMode = iEmbeddedMessageMode;
+    // use package buffer to pass the params
+    TPckgBuf<TAttachmentListActivationData> buf( params );
+    TUid emptyCustomMessageId = { 0 };
+    iAppUi.EnterFsEmailViewL(
+        AttachmentMngrViewId, emptyCustomMessageId, buf );
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::StartDowloadingAttachmentsL
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::StartDowloadingAttachmentsL()
-	{
+    {
     FUNC_LOG;
-	TPartData partData = MailData();
-
-	RPointerArray<CFSMailMessagePart> attachments;
-	CleanupResetAndDestroyClosePushL( attachments );
-	iMessage->AttachmentListL( attachments );
-	TInt attachmentsCount = attachments.Count();
-	for( TInt i = 0; i < attachmentsCount; i++)
-		{
-		if ( attachments[i]->FetchLoadState() == EFSNone ||
-	    	 attachments[i]->FetchLoadState() == EFSPartial )
-			{
-			partData.iMessagePartId = attachments[i]->GetPartId();
-			if ( iAppUi.DownloadInfoMediator() )
-				{
-				iAppUi.DownloadInfoMediator()->DownloadL( partData );
-				}
-			}
-		}
-	CleanupStack::PopAndDestroy( &attachments );
-	}
+    TPartData partData = MailData();
+
+    RPointerArray<CFSMailMessagePart> attachments;
+    CleanupResetAndDestroyClosePushL( attachments );
+    iMessage->AttachmentListL( attachments );
+    TInt attachmentsCount = attachments.Count();
+    for( TInt i = 0; i < attachmentsCount; i++)
+        {
+        if ( attachments[i]->FetchLoadState() == EFSNone ||
+             attachments[i]->FetchLoadState() == EFSPartial )
+            {
+            partData.iMessagePartId = attachments[i]->GetPartId();
+            if ( iAppUi.DownloadInfoMediator() )
+                {
+                iAppUi.DownloadInfoMediator()->DownloadL( partData );
+                }
+            }
+        }
+    CleanupStack::PopAndDestroy( &attachments );
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::CancelDowloadingAttachmentsL
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::CancelDowloadingAttachmentsL()
-	{
+    {
     FUNC_LOG;
-	RPointerArray<CFSMailMessagePart> attachments;
-	CleanupResetAndDestroyClosePushL( attachments );
-	iMessage->AttachmentListL( attachments );
-	TInt attachmentsCount = attachments.Count();
-
-	// ask confirmation for cancel
-	TInt promptTextId = R_FSE_VIEWER_CANCEL_DOWNLOAD_QUERY;
-	if ( attachmentsCount > 1 )
-		{
-		promptTextId = R_FSE_VIEWER_CANCEL_DOWNLOADS_QUERY;
-		}
-
-	if ( TFsEmailUiUtility::ShowConfirmationQueryL(promptTextId) && iAppUi.DownloadInfoMediator() )
-		{
-		for ( TInt i = 0 ; i < attachmentsCount ; i++ )
-			{
-			TFSPartFetchState fetchState = attachments[i]->FetchLoadState();
-			if ( fetchState == EFSPartial || fetchState == EFSNone )
-				{
-		    	iAppUi.DownloadInfoMediator()->CancelDownloadL( attachments[i]->GetPartId() );
-				}
-			}
-		}
-	CleanupStack::PopAndDestroy( &attachments );
-	}
+    RPointerArray<CFSMailMessagePart> attachments;
+    CleanupResetAndDestroyClosePushL( attachments );
+    iMessage->AttachmentListL( attachments );
+    TInt attachmentsCount = attachments.Count();
+
+    // ask confirmation for cancel
+    TInt promptTextId = R_FSE_VIEWER_CANCEL_DOWNLOAD_QUERY;
+    if ( attachmentsCount > 1 )
+        {
+        promptTextId = R_FSE_VIEWER_CANCEL_DOWNLOADS_QUERY;
+        }
+
+    if ( TFsEmailUiUtility::ShowConfirmationQueryL(promptTextId) && iAppUi.DownloadInfoMediator() )
+        {
+        for ( TInt i = 0 ; i < attachmentsCount ; i++ )
+            {
+            TFSPartFetchState fetchState = attachments[i]->FetchLoadState();
+            if ( fetchState == EFSPartial || fetchState == EFSNone )
+                {
+                iAppUi.DownloadInfoMediator()->CancelDownloadL( attachments[i]->GetPartId() );
+                }
+            }
+        }
+    CleanupStack::PopAndDestroy( &attachments );
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::SaveAllAttachmentsL
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::SaveAllAttachmentsL()
-	{
+    {
     FUNC_LOG;
-	TFileName fileName;
-  	if ( TFsEmailUiUtility::ShowSaveFolderDialogL( fileName ) )
-		{
-		// start downloading attachemts which are not downloaded.
-		// Save all attachment which all already downloaded
-		TPartData partData = MailData();
-
-		RPointerArray<CFSMailMessagePart> attachments;
-		CleanupResetAndDestroyClosePushL( attachments );
-		iMessage->AttachmentListL( attachments );
-		TInt attachmentsCount = attachments.Count();
+    TFileName fileName;
+    if ( TFsEmailUiUtility::ShowSaveFolderDialogL( fileName ) )
+        {
+        // start downloading attachemts which are not downloaded.
+        // Save all attachment which all already downloaded
+        TPartData partData = MailData();
+
+        RPointerArray<CFSMailMessagePart> attachments;
+        CleanupResetAndDestroyClosePushL( attachments );
+        iMessage->AttachmentListL( attachments );
+        TInt attachmentsCount = attachments.Count();
 
         // <cmail> remove the MRUI part of the message so we
-	    // don't save unnecessary .ics file
+        // don't save unnecessary .ics file
         CFSMailMessagePart* calendarPart = iMessage->FindBodyPartL( KFSMailContentTypeTextCalendar );
         CleanupStack::PushL( calendarPart );
         // </cmail>
 
-		TInt savedCount( 0 );
-		for ( TInt i = 0; i < attachmentsCount; i++ )
-			{
-			partData.iMessagePartId = attachments[i]->GetPartId();
-			if ( iAppUi.DownloadInfoMediator() && iAppUi.DownloadInfoMediator()->IsDownloadableL( partData ) )
-				{ // start download and let mediator do the saving
-				iAppUi.DownloadInfoMediator()->DownloadAndSaveL( partData, fileName );
-				}
-			else // save immediately.
-				{
-				// <cmail>
+        TInt savedCount( 0 );
+        for ( TInt i = 0; i < attachmentsCount; i++ )
+            {
+            partData.iMessagePartId = attachments[i]->GetPartId();
+            if ( iAppUi.DownloadInfoMediator() && iAppUi.DownloadInfoMediator()->IsDownloadableL( partData ) )
+                { // start download and let mediator do the saving
+                iAppUi.DownloadInfoMediator()->DownloadAndSaveL( partData, fileName );
+                }
+            else // save immediately.
+                {
+                // <cmail>
                 if( (calendarPart && partData.iMessagePartId != calendarPart->GetPartId() ||
                     !calendarPart) && TFsEmailUiUtility::OkToSaveFileL( fileName, *attachments[i] ) )
                     {
-		    		attachments[i]->CopyContentFileL( fileName );
-		    		savedCount++;
+                    attachments[i]->CopyContentFileL( fileName );
+                    savedCount++;
                     }
-				// </cmail>
-				}
-			}
+                // </cmail>
+                }
+            }
         if ( savedCount )
             {
             TFsEmailUiUtility::ShowFilesSavedToFolderNoteL( savedCount );
@@ -3866,9 +3866,9 @@
         // <cmail>
         CleanupStack::PopAndDestroy( calendarPart );
         // </cmail>
-		CleanupStack::PopAndDestroy( &attachments );
-		}
-	}
+        CleanupStack::PopAndDestroy( &attachments );
+        }
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::RemoveFetchedAttachmentL
@@ -3898,175 +3898,175 @@
 // CFSEmailUiMailViewerVisualiser::MailData
 // -----------------------------------------------------------------------------
 TPartData CFSEmailUiMailViewerVisualiser::MailData()
-	{
+    {
     FUNC_LOG;
-	TPartData newPartData;
-	newPartData.iMailBoxId = iMessage->GetMailBoxId();
-	newPartData.iFolderId = iMessage->GetFolderId();
-	newPartData.iMessageId = iMessage->GetMessageId();
-	return newPartData;
-	}
+    TPartData newPartData;
+    newPartData.iMailBoxId = iMessage->GetMailBoxId();
+    newPartData.iFolderId = iMessage->GetFolderId();
+    newPartData.iMessageId = iMessage->GetMessageId();
+    return newPartData;
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::StartFetchingBodyAfterOpeningL
 // -----------------------------------------------------------------------------
 TBool CFSEmailUiMailViewerVisualiser::StartFetchingBodyAfterOpeningL() const
-	{
+    {
     FUNC_LOG;
-	TBool retVal = EFalse;
-	CFSMailMessagePart* textPart = iMessage->PlainTextBodyPartL();
-	if ( textPart )
-		{
-		TFSPartFetchState currentPlainTextFetchState = textPart->FetchLoadState();
-		if ( currentPlainTextFetchState == EFSNone )
-			{
-			retVal = ETrue;
-			}
-		}
-	delete textPart;
-	return retVal;
-	}
+    TBool retVal = EFalse;
+    CFSMailMessagePart* textPart = iMessage->PlainTextBodyPartL();
+    if ( textPart )
+        {
+        TFSPartFetchState currentPlainTextFetchState = textPart->FetchLoadState();
+        if ( currentPlainTextFetchState == EFSNone )
+            {
+            retVal = ETrue;
+            }
+        }
+    delete textPart;
+    return retVal;
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::MessagePartFullyFetchedL
 // -----------------------------------------------------------------------------
 TBool CFSEmailUiMailViewerVisualiser::MessagePartFullyFetchedL( TFetchedContentType aFetchedContentType ) const
-	{
+    {
     FUNC_LOG;
-	TBool retVal = ETrue;
-	if( aFetchedContentType == EMessagePlainTextBodyPart )
-		{
-		CFSMailMessagePart* textPart = iMessage->PlainTextBodyPartL();
-		if( textPart )
-			{
-			TFSPartFetchState currentPlainTextFetchState = textPart->FetchLoadState();
-			if( currentPlainTextFetchState != EFSFull )
-				{
-				retVal = EFalse;
-				}
-			}
-		delete textPart;
-		}
-	else if( aFetchedContentType == EMessageHtmlBodyPart )
-		{
-		CFSMailMessagePart* htmlPart = iMessage->HtmlBodyPartL();
-		if( htmlPart )
-			{
-			TFSPartFetchState currentHtmlTextFetchState = htmlPart->FetchLoadState();
-			if( currentHtmlTextFetchState != EFSFull )
-				{
-				retVal = EFalse;
-				}
-			}
-		delete htmlPart;
-		}
-	else if( aFetchedContentType == EMessageStructure )
-		{
-		retVal = MessageStructureKnown( *iMessage );
-		}
-	else
-		{
-		User::Leave( KErrNotSupported );
-		}
-	return retVal;
-	}
+    TBool retVal = ETrue;
+    if( aFetchedContentType == EMessagePlainTextBodyPart )
+        {
+        CFSMailMessagePart* textPart = iMessage->PlainTextBodyPartL();
+        if( textPart )
+            {
+            TFSPartFetchState currentPlainTextFetchState = textPart->FetchLoadState();
+            if( currentPlainTextFetchState != EFSFull )
+                {
+                retVal = EFalse;
+                }
+            }
+        delete textPart;
+        }
+    else if( aFetchedContentType == EMessageHtmlBodyPart )
+        {
+        CFSMailMessagePart* htmlPart = iMessage->HtmlBodyPartL();
+        if( htmlPart )
+            {
+            TFSPartFetchState currentHtmlTextFetchState = htmlPart->FetchLoadState();
+            if( currentHtmlTextFetchState != EFSFull )
+                {
+                retVal = EFalse;
+                }
+            }
+        delete htmlPart;
+        }
+    else if( aFetchedContentType == EMessageStructure )
+        {
+        retVal = MessageStructureKnown( *iMessage );
+        }
+    else
+        {
+        User::Leave( KErrNotSupported );
+        }
+    return retVal;
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::StartFetchingMessagePartL
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::StartFetchingMessagePartL( CFSMailMessage& aMessagePtr,
-											TFetchedContentType aFetchedContentType )
-	{
+                                            TFetchedContentType aFetchedContentType )
+    {
     FUNC_LOG;
-	if( aFetchedContentType == EMessagePlainTextBodyPart )
-		{
-		CFSMailMessagePart* textPart = aMessagePtr.PlainTextBodyPartL();
-		CleanupStack::PushL( textPart );
-		TFSMailMsgId textPartId = textPart->GetPartId();
-		iFetchingPlainTextMessageBody = ETrue;
-		iCurrentPlainTextBodyFetchRequestId = textPart->FetchMessagePartL( textPartId, *this, 0 );
-		CleanupStack::PopAndDestroy( textPart );
-		}
-	else if( aFetchedContentType == EMessageHtmlBodyPart )
-		{
-		CFSMailMessagePart* htmlPart = aMessagePtr.HtmlBodyPartL();
-		CleanupStack::PushL( htmlPart );
-		TFSMailMsgId htmlPartId = htmlPart->GetPartId();
-		iFetchingHtmlMessageBody = ETrue;
-		iCurrentHtmlBodyFetchRequestId = htmlPart->FetchMessagePartL( htmlPartId, *this, 0 );
-		CleanupStack::PopAndDestroy( htmlPart );
-		}
-	else if( aFetchedContentType == EMessageStructure )
-		{
-		StartFetchingMessageStructureL( aMessagePtr );
-		}
-	else
-		{
-		User::Leave( KErrNotSupported );
-		}
-	}
+    if( aFetchedContentType == EMessagePlainTextBodyPart )
+        {
+        CFSMailMessagePart* textPart = aMessagePtr.PlainTextBodyPartL();
+        CleanupStack::PushL( textPart );
+        TFSMailMsgId textPartId = textPart->GetPartId();
+        iFetchingPlainTextMessageBody = ETrue;
+        iCurrentPlainTextBodyFetchRequestId = textPart->FetchMessagePartL( textPartId, *this, 0 );
+        CleanupStack::PopAndDestroy( textPart );
+        }
+    else if( aFetchedContentType == EMessageHtmlBodyPart )
+        {
+        CFSMailMessagePart* htmlPart = aMessagePtr.HtmlBodyPartL();
+        CleanupStack::PushL( htmlPart );
+        TFSMailMsgId htmlPartId = htmlPart->GetPartId();
+        iFetchingHtmlMessageBody = ETrue;
+        iCurrentHtmlBodyFetchRequestId = htmlPart->FetchMessagePartL( htmlPartId, *this, 0 );
+        CleanupStack::PopAndDestroy( htmlPart );
+        }
+    else if( aFetchedContentType == EMessageStructure )
+        {
+        StartFetchingMessageStructureL( aMessagePtr );
+        }
+    else
+        {
+        User::Leave( KErrNotSupported );
+        }
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::CancelFetchings
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::CancelFetchings()
-	{
+    {
     FUNC_LOG;
-	if( iFetchingPlainTextMessageBody )
-		{
-		TRAP_IGNORE( iAppUi.GetMailClient()->CancelL( iCurrentPlainTextBodyFetchRequestId ) );
-		iFetchingPlainTextMessageBody = EFalse;
-		}
-	if( iFetchingHtmlMessageBody )
-		{
-		TRAP_IGNORE( iAppUi.GetMailClient()->CancelL( iCurrentHtmlBodyFetchRequestId ) );
-		iFetchingHtmlMessageBody = EFalse;
-		}
-	if( iFetchingMessageStructure )
-		{
-		TRAP_IGNORE( iAppUi.GetMailClient()->CancelL( iCurrentStructureFetchRequestId ) );
-		iFetchingMessageStructure = EFalse;
-		}
-	iAsyncProcessComplete = ETrue;
-	//<cmail>
+    if( iFetchingPlainTextMessageBody )
+        {
+        TRAP_IGNORE( iAppUi.GetMailClient()->CancelL( iCurrentPlainTextBodyFetchRequestId ) );
+        iFetchingPlainTextMessageBody = EFalse;
+        }
+    if( iFetchingHtmlMessageBody )
+        {
+        TRAP_IGNORE( iAppUi.GetMailClient()->CancelL( iCurrentHtmlBodyFetchRequestId ) );
+        iFetchingHtmlMessageBody = EFalse;
+        }
+    if( iFetchingMessageStructure )
+        {
+        TRAP_IGNORE( iAppUi.GetMailClient()->CancelL( iCurrentStructureFetchRequestId ) );
+        iFetchingMessageStructure = EFalse;
+        }
+    iAsyncProcessComplete = ETrue;
+    //<cmail>
     if(iWaitDialog && iDialogNotDismissed)
-	    TRAP_IGNORE(iWaitDialog->ProcessFinishedL()); // deletes the dialog
-	//</cmail>
-	}
+        TRAP_IGNORE(iWaitDialog->ProcessFinishedL()); // deletes the dialog
+    //</cmail>
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::MessageStructureKnownL
 // -----------------------------------------------------------------------------
 TBool CFSEmailUiMailViewerVisualiser::MessageStructureKnown( CFSMailMessage& aMsg ) const
-	{
+    {
     FUNC_LOG;
-	return TFsEmailUiUtility::IsMessageStructureKnown( aMsg );
-	}
+    return TFsEmailUiUtility::IsMessageStructureKnown( aMsg );
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::StartFetchingMessageStructureL
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::StartFetchingMessageStructureL( CFSMailMessage& aMsg )
-	{
+    {
     FUNC_LOG;
-	TFSMailMsgId currentMailboxId = aMsg.GetMailBoxId();
-	TFSMailMsgId currentMessageFolderId = aMsg.GetFolderId();
-	CFSMailFolder* currentFolder  = iAppUi.GetMailClient()->GetFolderByUidL( currentMailboxId, currentMessageFolderId );
-	CleanupStack::PushL( currentFolder );
-	RArray<TFSMailMsgId> messageIds;
-	CleanupClosePushL( messageIds );
-	messageIds.Append( aMsg.GetMessageId() );
-	iFetchingMessageStructure = ETrue;
-	iCurrentStructureFetchRequestId = currentFolder->FetchMessagesL( messageIds, EFSMsgDataStructure, *this );
-	CleanupStack::PopAndDestroy( &messageIds );
-	CleanupStack::PopAndDestroy( currentFolder );
-	}
+    TFSMailMsgId currentMailboxId = aMsg.GetMailBoxId();
+    TFSMailMsgId currentMessageFolderId = aMsg.GetFolderId();
+    CFSMailFolder* currentFolder  = iAppUi.GetMailClient()->GetFolderByUidL( currentMailboxId, currentMessageFolderId );
+    CleanupStack::PushL( currentFolder );
+    RArray<TFSMailMsgId> messageIds;
+    CleanupClosePushL( messageIds );
+    messageIds.Append( aMsg.GetMessageId() );
+    iFetchingMessageStructure = ETrue;
+    iCurrentStructureFetchRequestId = currentFolder->FetchMessagesL( messageIds, EFSMsgDataStructure, *this );
+    CleanupStack::PopAndDestroy( &messageIds );
+    CleanupStack::PopAndDestroy( currentFolder );
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::StartWaitedFetchingL
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::StartWaitedFetchingL( TFetchedContentType aFetchedContentType )
-	{
+    {
     FUNC_LOG;
     iAsyncProcessComplete = EFalse;
     iFetchingAlready = EFalse;
@@ -4086,10 +4086,10 @@
     iWaitDialog->SetCallback(this);
     iDialogNotDismissed = ETrue;
     iWaitDialog->ExecuteLD(R_FSE_FETCHING_WAIT_DIALOG);
-		StartFetchingMessagePartL( *iMessage, iStartAsyncFetchType );
- 		iFetchingAlready = ETrue;
+        StartFetchingMessagePartL( *iMessage, iStartAsyncFetchType );
+        iFetchingAlready = ETrue;
     //</cmail>
-	}
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::StartFetchingRemaininBodyLinesIfAtBottomL
@@ -4119,14 +4119,14 @@
 // CFSEmailUiMailViewerVisualiser::TimerEventL
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::TimerEventL( CFSEmailUiGenericTimer* aTriggeredTimer )
-	{
+    {
     FUNC_LOG;
-	if ( aTriggeredTimer == iFetchingAnimationTimer )
-	    {
-    	iViewerRichText->AppendFetchingMoreTextL();
-    	iFetchingAnimationTimer->Start( KAnimationRefreshTimeIntervalInMilliseconds );
-	    }
-	}
+    if ( aTriggeredTimer == iFetchingAnimationTimer )
+        {
+        iViewerRichText->AppendFetchingMoreTextL();
+        iFetchingAnimationTimer->Start( KAnimationRefreshTimeIntervalInMilliseconds );
+        }
+    }
 
 // MAknBackgroundProcess methods
 //
@@ -4136,14 +4136,14 @@
 //<cmail>
 /*
 void CFSEmailUiMailViewerVisualiser::StepL()
-	{
+    {
     FUNC_LOG;
-	if( !iFetchingAlready )
-		{
-		StartFetchingMessagePartL( *iMessage, iStartAsyncFetchType );
- 		iFetchingAlready = ETrue;
- 		}
- 	}*/
+    if( !iFetchingAlready )
+        {
+        StartFetchingMessagePartL( *iMessage, iStartAsyncFetchType );
+        iFetchingAlready = ETrue;
+        }
+    }*/
 //</cmail>
 
 // -----------------------------------------------------------------------------
@@ -4155,7 +4155,7 @@
     {
     FUNC_LOG;
     return iAsyncProcessComplete;
-	}*/
+    }*/
 //</cmail>
 
 // -----------------------------------------------------------------------------
@@ -4169,14 +4169,14 @@
 // CFSEmailUiMailViewerVisualiser::DialogDismissedL
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::DialogDismissedL( TInt aButtonId )
-	{
+    {
     FUNC_LOG;
     iDialogNotDismissed = EFalse;
-	if( aButtonId == EAknSoftkeyCancel )
-		{
-		CancelFetchings();
-		}
-	}
+    if( aButtonId == EAknSoftkeyCancel )
+        {
+        CancelFetchings();
+        }
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::CycleError
@@ -4196,87 +4196,87 @@
 // CFSEmailUiMailViewerVisualiser::AddBackgroundPicturesL
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::AddBackgroundPicturesL()
-	{
-	CAlfTexture& headerTexture = iAppUi.FsTextureManager()->TextureByIndex( EViewerTextureHeaderBackGround );
-	CAlfTexture& backgroundTexture = iAppUi.FsTextureManager()->TextureByIndex( EBackgroundTextureMailList );
-
-	// add header texture
-	// -1 is here for to bottom space icon
-	// // <cmail> S60 Skin support
-	//	iTextViewer->SetPartBgImageL( 0, iViewerRichText->HeaderLengthInCharacters()-2, headerTexture );
-	// </cmail>
-
-	// add bg texture
-	//<cmail> S60 skin support
-	//iTextViewer->SetBackgroundImageL( backgroundTexture );
+    {
+    CAlfTexture& headerTexture = iAppUi.FsTextureManager()->TextureByIndex( EViewerTextureHeaderBackGround );
+    CAlfTexture& backgroundTexture = iAppUi.FsTextureManager()->TextureByIndex( EBackgroundTextureMailList );
+
+    // add header texture
+    // -1 is here for to bottom space icon
+    // // <cmail> S60 Skin support
+    //  iTextViewer->SetPartBgImageL( 0, iViewerRichText->HeaderLengthInCharacters()-2, headerTexture );
+    // </cmail>
+
+    // add bg texture
+    //<cmail> S60 skin support
+    //iTextViewer->SetBackgroundImageL( backgroundTexture );
     //</cmail>
-	}
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::SetMessageFollowupFlagL
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::SetMessageFollowupFlagL()
-	{
+    {
     FUNC_LOG;
- 	if ( iMessage &&
- 	     iTextViewer &&
- 	     iViewerRichText &&
- 	     TFsEmailUiUtility::IsFollowUpSupported( *iMailBox ) &&
- 	     !iEmbeddedMessageMode )
-		{
-		TFollowUpNewState newState = TFsEmailUiUtility::SetMessageFollowupFlagL( *iMessage );
-
-		switch ( newState )
-			{
-			case EFollowUp:
-				{
-				iViewerRichText->UpdateIconL( CFSEmailUiMailViewerRichText::EViewerIconFollowUp );
-				}
-				break;
-			case EFollowUpComplete:
-				{
-				iViewerRichText->UpdateIconL( CFSEmailUiMailViewerRichText::EViewerIconFollowUpComplete );
-				}
-				break;
-			case EFollowUpClear:
-				{
-				iViewerRichText->UpdateIconL( CFSEmailUiMailViewerRichText::EViewerIconFollowUpNone );
-				}
-				break;
-			case EFollowUpNoChanges:
-			default:
-				{
-				// do nothing.
-				}
-				break;
-			}
-
-		if ( newState != EFollowUpNoChanges )
-		    {
-		    // Update icon in viewer
-	        TInt iconLine = iViewerRichText->FollowupIconLine();
+    if ( iMessage &&
+         iTextViewer &&
+         iViewerRichText &&
+         TFsEmailUiUtility::IsFollowUpSupported( *iMailBox ) &&
+         !iEmbeddedMessageMode )
+        {
+        TFollowUpNewState newState = TFsEmailUiUtility::SetMessageFollowupFlagL( *iMessage );
+
+        switch ( newState )
+            {
+            case EFollowUp:
+                {
+                iViewerRichText->UpdateIconL( CFSEmailUiMailViewerRichText::EViewerIconFollowUp );
+                }
+                break;
+            case EFollowUpComplete:
+                {
+                iViewerRichText->UpdateIconL( CFSEmailUiMailViewerRichText::EViewerIconFollowUpComplete );
+                }
+                break;
+            case EFollowUpClear:
+                {
+                iViewerRichText->UpdateIconL( CFSEmailUiMailViewerRichText::EViewerIconFollowUpNone );
+                }
+                break;
+            case EFollowUpNoChanges:
+            default:
+                {
+                // do nothing.
+                }
+                break;
+            }
+
+        if ( newState != EFollowUpNoChanges )
+            {
+            // Update icon in viewer
+            TInt iconLine = iViewerRichText->FollowupIconLine();
             iTextViewer->ReloadPicturesL( iconLine );
             // Notify appui of changed mail item
             SendEventToAppUiL( TFSEventMailChanged );
-		    }
-		}
-	}
+            }
+        }
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::DeleteMailL
 // -----------------------------------------------------------------------------
 TInt CFSEmailUiMailViewerVisualiser::DeleteMailL( CFSMailMessage& aMessagePtr, TBool aReturnPreviousView, TBool aDisableNote )
-	{
+    {
     FUNC_LOG;
-	TInt ret( KErrCancel );
-
-	if ( iEmbeddedMessageMode )
-	    {
-	    // embedded messages can't be deleted
-	    ret = KErrNotSupported;
-	    }
-	else
-	    {
+    TInt ret( KErrCancel );
+
+    if ( iEmbeddedMessageMode )
+        {
+        // embedded messages can't be deleted
+        ret = KErrNotSupported;
+        }
+    else
+        {
         TInt okToDelete( ETrue );
         if ( !aDisableNote )
             {
@@ -4311,81 +4311,81 @@
                 {
                 // return only if we are in mail viewer
                 if ( iAppUi.CurrentActiveView()->Id() == MailViewerId )
-                	{
-                	HandleCommandL( EAknSoftkeyBack );
-                	}
+                    {
+                    HandleCommandL( EAknSoftkeyBack );
+                    }
                 }
             }
         if ( okToDelete )
             {
             ret = KErrNone;
             }
-	    }
-	return ret;
-	}
+        }
+    return ret;
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::ShowActionsMenuInOptionsL
 // -----------------------------------------------------------------------------
 TBool CFSEmailUiMailViewerVisualiser::ShowActionsMenuInOptionsL() const
-	{
+    {
     FUNC_LOG;
-	TBool retVal = ETrue;
-
-	SViewerHeadingHotSpotData currentHeaderHotSpotData;
-	CFindItemEngine::SFoundItem currentBodyHotSpotData;
-	THotspotType hotspotType = iViewerRichText->FindCurrentHotSpotL( currentHeaderHotSpotData, currentBodyHotSpotData );
-
-	if( hotspotType == ENoHotspot || ( hotspotType == EHeaderHotspot && (
-		currentHeaderHotSpotData.iType == ETypeToNMoreRecipients ||
-		currentHeaderHotSpotData.iType == ETypeCcNMoreRecipients ||
-		currentHeaderHotSpotData.iType == ETypeBccNMoreRecipients ||
-		currentHeaderHotSpotData.iType == ETypeHtml ) ) )
-		{
-		retVal = EFalse;
-		}
-	return retVal;
-	}
+    TBool retVal = ETrue;
+
+    SViewerHeadingHotSpotData currentHeaderHotSpotData;
+    CFindItemEngine::SFoundItem currentBodyHotSpotData;
+    THotspotType hotspotType = iViewerRichText->FindCurrentHotSpotL( currentHeaderHotSpotData, currentBodyHotSpotData );
+
+    if( hotspotType == ENoHotspot || ( hotspotType == EHeaderHotspot && (
+        currentHeaderHotSpotData.iType == ETypeToNMoreRecipients ||
+        currentHeaderHotSpotData.iType == ETypeCcNMoreRecipients ||
+        currentHeaderHotSpotData.iType == ETypeBccNMoreRecipients ||
+        currentHeaderHotSpotData.iType == ETypeHtml ) ) )
+        {
+        retVal = EFalse;
+        }
+    return retVal;
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::ShowDownloadManagerMenuInOptions
 // -----------------------------------------------------------------------------
 TBool CFSEmailUiMailViewerVisualiser::ShowDownloadManagerMenuInOptions() const
-	{
+    {
     FUNC_LOG;
-	TBool ret(EFalse);
+    TBool ret(EFalse);
 /* <cmail> Download Manager blocked
-	if ( iAppUi.DownloadInfoMediator() )
-		{
-		ret = iAppUi.DownloadInfoMediator()->IsAnyAttachmentDownloads();
-		}
+    if ( iAppUi.DownloadInfoMediator() )
+        {
+        ret = iAppUi.DownloadInfoMediator()->IsAnyAttachmentDownloads();
+        }
 </cmail> */
-	return ret;
-	}
+    return ret;
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::ShowNextMessageMenuInOptions
 // -----------------------------------------------------------------------------
 TBool CFSEmailUiMailViewerVisualiser::ShowNextMessageMenuInOptions() const
-	{
+    {
     FUNC_LOG;
-	TBool available = EFalse;
-	// Next/previous message options are inavailable in the embedded mode
-	if ( iMessage && !iEmbeddedMessageMode )
-	    {
+    TBool available = EFalse;
+    // Next/previous message options are inavailable in the embedded mode
+    if ( iMessage && !iEmbeddedMessageMode )
+        {
         TFSMailMsgId currentMsgId = iMessage->GetMessageId();
         TFSMailMsgId nextMsgId;
         TFSMailMsgId nextMsgFolderId;
         available = iAppUi.IsNextMsgAvailable( currentMsgId, nextMsgId, nextMsgFolderId );
-	    }
-	return available;
-	}
+        }
+    return available;
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::ShowPreviousMessageMenuInOptions
 // -----------------------------------------------------------------------------
 TBool CFSEmailUiMailViewerVisualiser::ShowPreviousMessageMenuInOptions() const
-	{
+    {
     FUNC_LOG;
     TBool available = EFalse;
     // Next/previous message options are inavailable in the embedded mode
@@ -4397,59 +4397,59 @@
         available = iAppUi.IsPreviousMsgAvailable( currentMsgId, prevMsgId, prevMsgFolderId );
         }
     return available;
-	}
+    }
 
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::ShowNextMessageL
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::ShowNextMessageL()
-	{
+    {
     FUNC_LOG;
-	if ( iMessage && !iEmbeddedMessageMode )
-		{
-		TFSMailMsgId currentMsgId = iMessage->GetMessageId();
-		TFSMailMsgId nextMsgId;
-		TFSMailMsgId nextMsgFolderId;
-		if ( iAppUi.IsNextMsgAvailable( currentMsgId, nextMsgId, nextMsgFolderId ) )
-			{
-			// Stop timer and cancel fetchings before showing next message
-			iFetchingAnimationTimer->Stop();
-			CancelFetchings();
-
-			// Change empty msk when moving to next
-			ChangeMskCommandL( R_FSE_QTN_MSK_EMPTY );
-
-			iAppUi.MoveToNextMsgL( currentMsgId, nextMsgId );
-			// Next message is displayed in this view through doactivate, because view is re-activate by mail list
-			}
-		}
-	}
+    if ( iMessage && !iEmbeddedMessageMode )
+        {
+        TFSMailMsgId currentMsgId = iMessage->GetMessageId();
+        TFSMailMsgId nextMsgId;
+        TFSMailMsgId nextMsgFolderId;
+        if ( iAppUi.IsNextMsgAvailable( currentMsgId, nextMsgId, nextMsgFolderId ) )
+            {
+            // Stop timer and cancel fetchings before showing next message
+            iFetchingAnimationTimer->Stop();
+            CancelFetchings();
+
+            // Change empty msk when moving to next
+            ChangeMskCommandL( R_FSE_QTN_MSK_EMPTY );
+
+            iAppUi.MoveToNextMsgL( currentMsgId, nextMsgId );
+            // Next message is displayed in this view through doactivate, because view is re-activate by mail list
+            }
+        }
+    }
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::ShowPreviousMessageL
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::ShowPreviousMessageL()
-	{
+    {
     FUNC_LOG;
-	if ( iMessage && !iEmbeddedMessageMode )
-		{
-		TFSMailMsgId currentMsgId = iMessage->GetMessageId();
-		TFSMailMsgId prevMsgId;
-		TFSMailMsgId prevMsgFolderId;
-		if ( iAppUi.IsPreviousMsgAvailable( currentMsgId, prevMsgId, prevMsgFolderId ) )
-			{
-			// Stop timer and cancel fetchings before showing prev message
-			iFetchingAnimationTimer->Stop();
-			CancelFetchings();
-
-		    // Change empty msk when moving to previous
-		    ChangeMskCommandL( R_FSE_QTN_MSK_EMPTY );
-
-			iAppUi.MoveToPreviousMsgL( currentMsgId, prevMsgId );
-			// Previous message is displayed in this view through doactivate, because view is re-activate by mail list
-			}
-		}
-	}
+    if ( iMessage && !iEmbeddedMessageMode )
+        {
+        TFSMailMsgId currentMsgId = iMessage->GetMessageId();
+        TFSMailMsgId prevMsgId;
+        TFSMailMsgId prevMsgFolderId;
+        if ( iAppUi.IsPreviousMsgAvailable( currentMsgId, prevMsgId, prevMsgFolderId ) )
+            {
+            // Stop timer and cancel fetchings before showing prev message
+            iFetchingAnimationTimer->Stop();
+            CancelFetchings();
+
+            // Change empty msk when moving to previous
+            ChangeMskCommandL( R_FSE_QTN_MSK_EMPTY );
+
+            iAppUi.MoveToPreviousMsgL( currentMsgId, prevMsgId );
+            // Previous message is displayed in this view through doactivate, because view is re-activate by mail list
+            }
+        }
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::UpdateMessagePtrL
@@ -4629,31 +4629,31 @@
 // CFSEmailUiMailViewerVisualiser::HandleDynamicVariantSwitchL
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::HandleDynamicVariantSwitchL( CFsEmailUiViewBase::TDynamicSwitchType /*aType*/ )
-	{
+    {
     FUNC_LOG;
-	// Set scroll offset to match screen height
-	if ( iFirstStartCompleted && iTextViewer && iMessage )
-	    {
-	    // <cmail>
-	    TInt firstLine = iTextViewer->GetFirstDisplayedLine();        // get first line number
-	    TInt firstChar = iTextViewer->GetFirstCharInLine(firstLine);  // get first char offset
-	    // </cmail>
-
-	    iAppUi.Display().Roster().Hide( ControlGroup() );
-	    RefreshL();
-
-	    // <cmail>
-	    TInt newLine = iTextViewer->GetLineNumber(firstChar);   // get the new line number for this offset
-	    if(newLine<0) newLine = firstLine;                       // in case of error go to the prev. line number
-	    iTextViewer->FocusLineL(newLine,ETrue);                  // focus on the found line number
-	    // </cmail>
-	    // <cmail>
-	    SetActionMenuIconVisbilityL();
+    // Set scroll offset to match screen height
+    if ( iFirstStartCompleted && iTextViewer && iMessage )
+        {
+        // <cmail>
+        TInt firstLine = iTextViewer->GetFirstDisplayedLine();        // get first line number
+        TInt firstChar = iTextViewer->GetFirstCharInLine(firstLine);  // get first char offset
+        // </cmail>
+
+        iAppUi.Display().Roster().Hide( ControlGroup() );
+        RefreshL();
+
+        // <cmail>
+        TInt newLine = iTextViewer->GetLineNumber(firstChar);   // get the new line number for this offset
+        if(newLine<0) newLine = firstLine;                       // in case of error go to the prev. line number
+        iTextViewer->FocusLineL(newLine,ETrue);                  // focus on the found line number
+        // </cmail>
+        // <cmail>
+        SetActionMenuIconVisbilityL();
             // </cmail>
             iAppUi.Display().Roster().ShowL( ControlGroup() );
-	    iDownloadProgressIndicator->NotifyLayoutChange();
-	    }
- 	}
+        iDownloadProgressIndicator->NotifyLayoutChange();
+        }
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::HandleDynamicVariantSwitchOnBackgroundL
@@ -4668,18 +4668,18 @@
 // CFSEmailUiMailViewerVisualiser::OpenLinkInIntranetL
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::OpenLinkInIntranetL( TBool aMenuSelection )
-	{
+    {
     FUNC_LOG;
-	CFindItemEngine::SFoundItem currentBodyHotSpotData;
-	TBool bodyHotSpotFound = iViewerRichText->FindCurrentBodyHotSpotL( currentBodyHotSpotData );
-	if ( bodyHotSpotFound )
-		{
- 		HBufC* intranetUrl = iViewerRichText->GetHotspotTextLC( currentBodyHotSpotData );
- 		TInt len = intranetUrl->Length();
- 		HBufC8* eightBitUrl = HBufC8::NewLC( len );
-		eightBitUrl->Des().Copy( *intranetUrl );
-
-		TAiwGenericParam param( EGenericParamURL, TAiwVariant(*eightBitUrl) );
+    CFindItemEngine::SFoundItem currentBodyHotSpotData;
+    TBool bodyHotSpotFound = iViewerRichText->FindCurrentBodyHotSpotL( currentBodyHotSpotData );
+    if ( bodyHotSpotFound )
+        {
+        HBufC* intranetUrl = iViewerRichText->GetHotspotTextLC( currentBodyHotSpotData );
+        TInt len = intranetUrl->Length();
+        HBufC8* eightBitUrl = HBufC8::NewLC( len );
+        eightBitUrl->Des().Copy( *intranetUrl );
+
+        TAiwGenericParam param( EGenericParamURL, TAiwVariant(*eightBitUrl) );
         CAiwGenericParamList& paramList = iIBServiceHandler->InParamListL();
         paramList.AppendL( param );
         if ( aMenuSelection )
@@ -4692,284 +4692,284 @@
             iIBServiceHandler->ExecuteServiceCmdL( KAiwCmdView,
                 paramList, iIBServiceHandler->OutParamListL() );
             }
-		CleanupStack::PopAndDestroy( eightBitUrl );
-		CleanupStack::PopAndDestroy( intranetUrl );
-		}
-	}
+        CleanupStack::PopAndDestroy( eightBitUrl );
+        CleanupStack::PopAndDestroy( intranetUrl );
+        }
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::ChangeMsgReadStatusL
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::ChangeMsgReadStatusL(
-	TBool aRead, TBool aCmdFromMrui )
-	{
+    TBool aRead, TBool aCmdFromMrui )
+    {
     FUNC_LOG;
-	if ( iMessage && !iEmbeddedMessageMode )
-		{
-		if ( aRead )
- 			{
-			// Send flags, local and server
- 			iMessage->SetFlag( EFSMsgFlag_Read );
-			}
-		else
-			{
-			// Send flags, local and server
- 			iMessage->ResetFlag( EFSMsgFlag_Read );
-			}
-		iMessage->SaveMessageL(); // Save read status
-		SendEventToAppUiL( TFSEventMailChanged );
-
-		if ( !aCmdFromMrui && iViewerRichText && iTextViewer )
-			{
-			iViewerRichText->UpdateIconL(
-				CFSEmailUiMailViewerRichText::EViewerEmailStatus );
-			TInt iconLine = iViewerRichText->EmailStatusIconLine();
-	        iTextViewer->ReloadPicturesL( iconLine );
-			}
-		}
-	}
+    if ( iMessage && !iEmbeddedMessageMode )
+        {
+        if ( aRead )
+            {
+            // Send flags, local and server
+            iMessage->SetFlag( EFSMsgFlag_Read );
+            }
+        else
+            {
+            // Send flags, local and server
+            iMessage->ResetFlag( EFSMsgFlag_Read );
+            }
+        iMessage->SaveMessageL(); // Save read status
+        SendEventToAppUiL( TFSEventMailChanged );
+
+        if ( !aCmdFromMrui && iViewerRichText && iTextViewer )
+            {
+            iViewerRichText->UpdateIconL(
+                CFSEmailUiMailViewerRichText::EViewerEmailStatus );
+            TInt iconLine = iViewerRichText->EmailStatusIconLine();
+            iTextViewer->ReloadPicturesL( iconLine );
+            }
+        }
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::OpenHotSpotUrlInBrowserL
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::OpenHotSpotUrlInBrowserL(  CFindItemEngine::SFoundItem& aHotSpot  )
-	{
+    {
     FUNC_LOG;
-	if ( aHotSpot.iItemType == CFindItemEngine::EFindItemSearchURLBin ||
-		 aHotSpot.iItemType == CFindItemEngine::EFindItemSearchScheme ) // Scheme is needed also
-		{
-		// use browser launcher API here
-		HBufC* urlToOpen = iViewerRichText->GetHotspotTextLC( aHotSpot );
-		// Check if the address is rtsp url and send it media player
-		if ( aHotSpot.iItemType == CFindItemEngine::EFindItemSearchScheme &&
-			 urlToOpen->FindC( KRtspUrlPrefix ) == 0 )
-			{
-			RApaLsSession appArcSession;
-			User::LeaveIfError( appArcSession.Connect() );
-			TThreadId id;
-			appArcSession.StartDocument( urlToOpen->Des(), KUidMediaPlayer , id );
-			appArcSession.Close();
-			}
-		else
-			{
-			// Check wheter the url text has some prefix (http, https, ftp, etc.).
-			// If no prefix found, try with the default prefix http.
-			TInt urlPos = urlToOpen->Find( KUrlPrefixIdentifier );
-			if ( urlPos == KErrNotFound )
-			    {
-			    HBufC* newBuf = urlToOpen->ReAllocL( urlToOpen->Length() + KHttpUrlPrefix().Length() );
-		        CleanupStack::Pop( urlToOpen );
-		        urlToOpen = newBuf;
-	            CleanupStack::PushL( urlToOpen );
-	            TPtr urlToOpenPtr = urlToOpen->Des();
-	            urlToOpenPtr.Insert( 0, KHttpUrlPrefix );
-			    }
-
-			// Use scheme handler to launch the browser as a stand alone application
-	        CSchemeHandler* handler = CSchemeHandler::NewL( *urlToOpen );
-	        CleanupStack::PushL( handler );
-	        handler->HandleUrlStandaloneL();
-	        CleanupStack::PopAndDestroy( handler );
-			}
-
-		CleanupStack::PopAndDestroy( urlToOpen );
-		}
-	}
+    if ( aHotSpot.iItemType == CFindItemEngine::EFindItemSearchURLBin ||
+         aHotSpot.iItemType == CFindItemEngine::EFindItemSearchScheme ) // Scheme is needed also
+        {
+        // use browser launcher API here
+        HBufC* urlToOpen = iViewerRichText->GetHotspotTextLC( aHotSpot );
+        // Check if the address is rtsp url and send it media player
+        if ( aHotSpot.iItemType == CFindItemEngine::EFindItemSearchScheme &&
+             urlToOpen->FindC( KRtspUrlPrefix ) == 0 )
+            {
+            RApaLsSession appArcSession;
+            User::LeaveIfError( appArcSession.Connect() );
+            TThreadId id;
+            appArcSession.StartDocument( urlToOpen->Des(), KUidMediaPlayer , id );
+            appArcSession.Close();
+            }
+        else
+            {
+            // Check wheter the url text has some prefix (http, https, ftp, etc.).
+            // If no prefix found, try with the default prefix http.
+            TInt urlPos = urlToOpen->Find( KUrlPrefixIdentifier );
+            if ( urlPos == KErrNotFound )
+                {
+                HBufC* newBuf = urlToOpen->ReAllocL( urlToOpen->Length() + KHttpUrlPrefix().Length() );
+                CleanupStack::Pop( urlToOpen );
+                urlToOpen = newBuf;
+                CleanupStack::PushL( urlToOpen );
+                TPtr urlToOpenPtr = urlToOpen->Des();
+                urlToOpenPtr.Insert( 0, KHttpUrlPrefix );
+                }
+
+            // Use scheme handler to launch the browser as a stand alone application
+            CSchemeHandler* handler = CSchemeHandler::NewL( *urlToOpen );
+            CleanupStack::PushL( handler );
+            handler->HandleUrlStandaloneL();
+            CleanupStack::PopAndDestroy( handler );
+            }
+
+        CleanupStack::PopAndDestroy( urlToOpen );
+        }
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::CallToBodyHotSpotNumberL
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::CallToBodyHotSpotNumberL( CFindItemEngine::SFoundItem& aHotSpot )
-	{
+    {
     FUNC_LOG;
 
-	if ( aHotSpot.iItemType == CFindItemEngine::EFindItemSearchPhoneNumberBin )
-		{
-		HBufC* phoneNumber = iViewerRichText->GetHotspotTextLC( aHotSpot );
-		TInt answer = TFsEmailUiUtility::ShowConfirmationQueryL(
-		        R_FREESTYLE_EMAIL_UI_VIEWER_CALL_HOTSPOT, *phoneNumber );
-		if ( answer )
-			{
-	        TPtr numberPtr = phoneNumber->Des();
-		    CommonPhoneParser::ParsePhoneNumber( numberPtr,
-		                          CommonPhoneParser::EPhoneClientNumber);
-
-		    CFsDelayedLoader::InstanceL()->GetContactHandlerL()->MakeAiwCallL( NULL, *phoneNumber );
-			}
+    if ( aHotSpot.iItemType == CFindItemEngine::EFindItemSearchPhoneNumberBin )
+        {
+        HBufC* phoneNumber = iViewerRichText->GetHotspotTextLC( aHotSpot );
+        TInt answer = TFsEmailUiUtility::ShowConfirmationQueryL(
+                R_FREESTYLE_EMAIL_UI_VIEWER_CALL_HOTSPOT, *phoneNumber );
+        if ( answer )
+            {
+            TPtr numberPtr = phoneNumber->Des();
+            CommonPhoneParser::ParsePhoneNumber( numberPtr,
+                                  CommonPhoneParser::EPhoneClientNumber);
+
+            CFsDelayedLoader::InstanceL()->GetContactHandlerL()->MakeAiwCallL( NULL, *phoneNumber );
+            }
         CleanupStack::PopAndDestroy( phoneNumber );
-		}
-	else if ( aHotSpot.iItemType == CFindItemEngine::EFindItemSearchScheme )
-		{
-		TBool voipCall( EFalse );
-		HBufC* schemeText = iViewerRichText->GetHotspotTextLC( aHotSpot );
-		// Strip scheme prefix text if found
-		if ( schemeText && schemeText->FindC( KCallPrefix ) == 0 )
-			{
-			schemeText->Des().Delete( 0, KCallPrefix().Length() );
-			}
-		else if ( schemeText && schemeText->FindC( KTelPrefix ) == 0 )
-			{
-			schemeText->Des().Delete( 0, KTelPrefix().Length() );
-			}
-		else if ( schemeText && schemeText->FindC( KSmsPrefix ) == 0 )
-			{
-			schemeText->Des().Delete( 0, KSmsPrefix().Length() );
-			}
-		else if ( schemeText && schemeText->FindC( KMmsPrefix ) == 0 )
-			{
-			schemeText->Des().Delete( 0, KMmsPrefix().Length() );
-			}
-		else if ( schemeText && schemeText->FindC( KVoipPrefix ) == 0 )
-			{
-			voipCall = ETrue;
-			schemeText->Des().Delete( 0, KVoipPrefix().Length() );
-			}
-
-		TInt answer = TFsEmailUiUtility::ShowConfirmationQueryL(
-		        R_FREESTYLE_EMAIL_UI_VIEWER_CALL_HOTSPOT, *schemeText );
-		if ( answer )
-			{
-			if ( !voipCall )
-				{
-				// use common phone parser for other than voip numbers
-		        TPtr numberPtr = schemeText->Des();
-			    CommonPhoneParser::ParsePhoneNumber( numberPtr,
-		                         CommonPhoneParser::EPhoneClientNumber );
-				}
-		    CFsDelayedLoader::InstanceL()->GetContactHandlerL()->MakeAiwCallL( NULL, *schemeText, voipCall );
-			}
-		CleanupStack::PopAndDestroy( schemeText );
-		}
-	}
+        }
+    else if ( aHotSpot.iItemType == CFindItemEngine::EFindItemSearchScheme )
+        {
+        TBool voipCall( EFalse );
+        HBufC* schemeText = iViewerRichText->GetHotspotTextLC( aHotSpot );
+        // Strip scheme prefix text if found
+        if ( schemeText && schemeText->FindC( KCallPrefix ) == 0 )
+            {
+            schemeText->Des().Delete( 0, KCallPrefix().Length() );
+            }
+        else if ( schemeText && schemeText->FindC( KTelPrefix ) == 0 )
+            {
+            schemeText->Des().Delete( 0, KTelPrefix().Length() );
+            }
+        else if ( schemeText && schemeText->FindC( KSmsPrefix ) == 0 )
+            {
+            schemeText->Des().Delete( 0, KSmsPrefix().Length() );
+            }
+        else if ( schemeText && schemeText->FindC( KMmsPrefix ) == 0 )
+            {
+            schemeText->Des().Delete( 0, KMmsPrefix().Length() );
+            }
+        else if ( schemeText && schemeText->FindC( KVoipPrefix ) == 0 )
+            {
+            voipCall = ETrue;
+            schemeText->Des().Delete( 0, KVoipPrefix().Length() );
+            }
+
+        TInt answer = TFsEmailUiUtility::ShowConfirmationQueryL(
+                R_FREESTYLE_EMAIL_UI_VIEWER_CALL_HOTSPOT, *schemeText );
+        if ( answer )
+            {
+            if ( !voipCall )
+                {
+                // use common phone parser for other than voip numbers
+                TPtr numberPtr = schemeText->Des();
+                CommonPhoneParser::ParsePhoneNumber( numberPtr,
+                                 CommonPhoneParser::EPhoneClientNumber );
+                }
+            CFsDelayedLoader::InstanceL()->GetContactHandlerL()->MakeAiwCallL( NULL, *schemeText, voipCall );
+            }
+        CleanupStack::PopAndDestroy( schemeText );
+        }
+    }
 
 // -----------------------------------------------------------------------------
 // CFSEmailUiMailViewerVisualiser::WriteEmailToHotSpotAddressL
 // -----------------------------------------------------------------------------
 void CFSEmailUiMailViewerVisualiser::WriteEmailToHotSpotAddressL( CFindItemEngine::SFoundItem& aHotSpot )
-	{
+    {
     FUNC_LOG;
-	if ( aHotSpot.iItemType == CFindItemEngine::EFindItemSearchMailAddressBin )
-		{
-		delete iNewMailTempAddress; iNewMailTempAddress = NULL;
-		iNewMailTempAddress = CFSMailAddress::NewL();
-		HBufC* mailAddress = iViewerRichText->GetHotspotTextLC( aHotSpot );
-		iNewMailTempAddress->SetEmailAddress( *mailAddress );
- 		CleanupStack::PopAndDestroy( mailAddress );
-		iAppUi.LaunchEditorL( iNewMailTempAddress );
-		}
-	else if ( aHotSpot.iItemType == CFindItemEngine::EFindItemSearchScheme )
-		{
-		HBufC* schemeText = iViewerRichText->GetHotspotTextLC( aHotSpot );
-		if ( schemeText && schemeText->FindC( KMailtoPrefix ) == 0)
-			{
-			schemeText->Des().Delete( 0, KMailtoPrefix().Length() );
-			delete iNewMailTempAddress; iNewMailTempAddress = NULL;
-			iNewMailTempAddress = CFSMailAddress::NewL();
-			iNewMailTempAddress->SetEmailAddress( *schemeText );
-			iAppUi.LaunchEditorL( iNewMailTempAddress );
-			}
-		CleanupStack::PopAndDestroy( schemeText );
-		}
-	}
+    if ( aHotSpot.iItemType == CFindItemEngine::EFindItemSearchMailAddressBin )
+        {
+        delete iNewMailTempAddress; iNewMailTempAddress = NULL;
+        iNewMailTempAddress = CFSMailAddress::NewL();
+        HBufC* mailAddress = iViewerRichText->GetHotspotTextLC( aHotSpot );
+        iNewMailTempAddress->SetEmailAddress( *mailAddress );
+        CleanupStack::PopAndDestroy( mailAddress );
+        iAppUi.LaunchEditorL( iNewMailTempAddress );
+        }
+    else if ( aHotSpot.iItemType == CFindItemEngine::EFindItemSearchScheme )
+        {
+        HBufC* schemeText = iViewerRichText->GetHotspotTextLC( aHotSpot );
+        if ( schemeText && schemeText->FindC( KMailtoPrefix ) == 0)
+            {
+            schemeText->Des().Delete( 0, KMailtoPrefix().Length() );
+            delete iNewMailTempAddress; iNewMailTempAddress = NULL;
+            iNewMailTempAddress = CFSMailAddress::NewL();
+            iNewMailTempAddress->SetEmailAddress( *schemeText );
+            iAppUi.LaunchEditorL( iNewMailTempAddress );
+            }
+        CleanupStack::PopAndDestroy( schemeText );
+        }
+    }
 
 void CFSEmailUiMailViewerVisualiser::SaveEmailAsContactL(
-	const TDesC& aEmailAddress )
-	{
+    const TDesC& aEmailAddress )
+    {
     FUNC_LOG;
-	TAddToContactsType type;
-	// Query to "update existing" or "Create new"
-	// --> EFALSE = user chose "cancel"
-	if ( CFsDelayedLoader::InstanceL()->GetContactHandlerL()->
-		AddtoContactsQueryL( type ) )
-		{
-		// Create buffer and strip scheme data such as mailto: and call:
-		HBufC* textData = aEmailAddress.AllocLC();
-		if ( textData->FindC( KMailtoPrefix ) == 0 )
-			{
-			textData->Des().Delete( 0, KMailtoPrefix().Length() );
-			}
-		CFsDelayedLoader::InstanceL()->GetContactHandlerL()->AddToContactL(
-				*textData, EContactUpdateEmail, type, this );
-		CleanupStack::PopAndDestroy( textData );
-		}
-	}
+    TAddToContactsType type;
+    // Query to "update existing" or "Create new"
+    // --> EFALSE = user chose "cancel"
+    if ( CFsDelayedLoader::InstanceL()->GetContactHandlerL()->
+        AddtoContactsQueryL( type ) )
+        {
+        // Create buffer and strip scheme data such as mailto: and call:
+        HBufC* textData = aEmailAddress.AllocLC();
+        if ( textData->FindC( KMailtoPrefix ) == 0 )
+            {
+            textData->Des().Delete( 0, KMailtoPrefix().Length() );
+            }
+        CFsDelayedLoader::InstanceL()->GetContactHandlerL()->AddToContactL(
+                *textData, EContactUpdateEmail, type, this );
+        CleanupStack::PopAndDestroy( textData );
+        }
+    }
 
 void CFSEmailUiMailViewerVisualiser::SavePhoneNumberAsContactL(
-	const TDesC& aPhoneNumber )
-	{
+    const TDesC& aPhoneNumber )
+    {
     FUNC_LOG;
-	TAddToContactsType type;
-	// Query to "update existing" or "Create new"
-	// --> EFALSE = user chose "cancel"
-	if ( CFsDelayedLoader::InstanceL()->GetContactHandlerL()->
-		AddtoContactsQueryL( type ) )
-		{
-		// Create buffer and strip scheme data such as mailto: and call:
-		HBufC* textData = aPhoneNumber.AllocLC();
-		// Strip scheme prefix text if found
-		if ( textData && textData->FindC( KCallPrefix ) == 0 )
-			{
-			textData->Des().Delete( 0, KCallPrefix().Length() );
-			}
-		else if ( textData && textData->FindC( KTelPrefix ) == 0 )
-			{
-			textData->Des().Delete( 0, KTelPrefix().Length() );
-			}
-		else if ( textData && textData->FindC( KSmsPrefix ) == 0 )
-			{
-			textData->Des().Delete( 0, KSmsPrefix().Length() );
-			}
-		else if ( textData && textData->FindC( KMmsPrefix ) == 0 )
-			{
-			textData->Des().Delete( 0, KMmsPrefix().Length() );
-			}
-		CFsDelayedLoader::InstanceL()->GetContactHandlerL()->AddToContactL(
-			*textData, EContactUpdateNumber, type, this );
-		CleanupStack::PopAndDestroy( textData );
-		}
-	}
+    TAddToContactsType type;
+    // Query to "update existing" or "Create new"
+    // --> EFALSE = user chose "cancel"
+    if ( CFsDelayedLoader::InstanceL()->GetContactHandlerL()->
+        AddtoContactsQueryL( type ) )
+        {
+        // Create buffer and strip scheme data such as mailto: and call:
+        HBufC* textData = aPhoneNumber.AllocLC();
+        // Strip scheme prefix text if found
+        if ( textData && textData->FindC( KCallPrefix ) == 0 )
+            {
+            textData->Des().Delete( 0, KCallPrefix().Length() );
+            }
+        else if ( textData && textData->FindC( KTelPrefix ) == 0 )
+            {
+            textData->Des().Delete( 0, KTelPrefix().Length() );
+            }
+        else if ( textData && textData->FindC( KSmsPrefix ) == 0 )
+            {
+            textData->Des().Delete( 0, KSmsPrefix().Length() );
+            }
+        else if ( textData && textData->FindC( KMmsPrefix ) == 0 )
+            {
+            textData->Des().Delete( 0, KMmsPrefix().Length() );
+            }
+        CFsDelayedLoader::InstanceL()->GetContactHandlerL()->AddToContactL(
+            *textData, EContactUpdateNumber, type, this );
+        CleanupStack::PopAndDestroy( textData );
+        }
+    }
 
 
 void CFSEmailUiMailViewerVisualiser::FlagselectionCompleteL( TInt aSelection )
-	{
+    {
     FUNC_LOG;
-	// Set message follow up flag
-	if ( iMessage && aSelection != KErrNotFound )
-		{
-		switch ( aSelection )
-			{
-			case EFollowUp:
-				{
-				iMessage->SetFlag( EFSMsgFlag_FollowUp );
-				iMessage->ResetFlag( EFSMsgFlag_FollowUpComplete );
-				iMessage->SaveMessageL();
-				}
-				break;
-			case EFollowUpComplete:
-				{
-				iMessage->SetFlag( EFSMsgFlag_FollowUpComplete );
-				iMessage->ResetFlag( EFSMsgFlag_FollowUp );
-				iMessage->SaveMessageL();
-				}
-				break;
-			case EFollowUpClear:
-				{
-				iMessage->ResetFlag( EFSMsgFlag_FollowUp | EFSMsgFlag_FollowUpComplete );
-				iMessage->SaveMessageL();
-				}
-				break;
-			default:
-				break;
-			}
-		}
-	}
+    // Set message follow up flag
+    if ( iMessage && aSelection != KErrNotFound )
+        {
+        switch ( aSelection )
+            {
+            case EFollowUp:
+                {
+                iMessage->SetFlag( EFSMsgFlag_FollowUp );
+                iMessage->ResetFlag( EFSMsgFlag_FollowUpComplete );
+                iMessage->SaveMessageL();
+                }
+                break;
+            case EFollowUpComplete:
+                {
+                iMessage->SetFlag( EFSMsgFlag_FollowUpComplete );
+                iMessage->ResetFlag( EFSMsgFlag_FollowUp );
+                iMessage->SaveMessageL();
+                }
+                break;
+            case EFollowUpClear:
+                {
+                iMessage->ResetFlag( EFSMsgFlag_FollowUp | EFSMsgFlag_FollowUpComplete );
+                iMessage->SaveMessageL();
+                }
+                break;
+            default:
+                break;
+            }
+        }
+    }
 
 
 void CFSEmailUiMailViewerVisualiser::SetMailboxNameToStatusPaneL()
-	{
+    {
     FUNC_LOG;
-	iAppUi.SetActiveMailboxNameToStatusPaneL();
-	}
+    iAppUi.SetActiveMailboxNameToStatusPaneL();
+    }
 
 void CFSEmailUiMailViewerVisualiser::GetParentLayoutsL( RPointerArray<CAlfVisual>& aLayoutArray ) const
     {
@@ -5087,22 +5087,22 @@
     {
     FUNC_LOG;
     if ( iFirstStartCompleted && iMessage && aMailbox.Id() == iAppUi.GetActiveMailboxId().Id() &&
-    	 aEvent == TFSEventMailDeleted && aParam1 ) // Safety, in list events that only concern active mailbox are handled
+         aEvent == TFSEventMailDeleted && aParam1 ) // Safety, in list events that only concern active mailbox are handled
         {
         TFSMailMsgId curMsgId = iMessage->GetMessageId();
-		RArray<TFSMailMsgId>* removedEntries = static_cast<RArray<TFSMailMsgId>*>(aParam1);
-		for ( TInt i=0 ; i < removedEntries->Count() ; i++ )
-			{
-		    //<cmail>
-			if ( (curMsgId == (*removedEntries)[i]) &&
-					(iDeletedMessageFromMrui != curMsgId) )
-				{
-				//</cmail>
-	        	ChangeMskCommandL( R_FSE_QTN_MSK_EMPTY );
-	        	NavigateBackL();
-				break;
-				}
-			}
+        RArray<TFSMailMsgId>* removedEntries = static_cast<RArray<TFSMailMsgId>*>(aParam1);
+        for ( TInt i=0 ; i < removedEntries->Count() ; i++ )
+            {
+            //<cmail>
+            if ( (curMsgId == (*removedEntries)[i]) &&
+                    (iDeletedMessageFromMrui != curMsgId) )
+                {
+                //</cmail>
+                ChangeMskCommandL( R_FSE_QTN_MSK_EMPTY );
+                NavigateBackL();
+                break;
+                }
+            }
         }
     }
 
@@ -5125,80 +5125,80 @@
     {
     FUNC_LOG;
     CFlagSelectionGlobalNoteHandler* self =
-       	 new (ELeave) CFlagSelectionGlobalNoteHandler( aViewerVisualiser );
+         new (ELeave) CFlagSelectionGlobalNoteHandler( aViewerVisualiser );
     return self;
     }
 
 
 CFlagSelectionGlobalNoteHandler::~CFlagSelectionGlobalNoteHandler()
-	{
+    {
     FUNC_LOG;
-	delete iPrompt;
-	delete iGlobalFlagQuery;
-	}
+    delete iPrompt;
+    delete iGlobalFlagQuery;
+    }
 
 void CFlagSelectionGlobalNoteHandler::Cancel()
-	{
+    {
     FUNC_LOG;
-	}
+    }
 
 void CFlagSelectionGlobalNoteHandler::LaunchFlagListQueryDialogL()
-	{
+    {
     FUNC_LOG;
-	iSelection = 0;
-	if ( !iPrompt )
-		{
-	    iPrompt = StringLoader::LoadL( R_FREESTYLE_EMAIL_UI_VIEWER_FLAG_DIALOG_HEADER );
-		}
- 	if ( !iGlobalFlagQuery )
-	 	{
-	    iGlobalFlagQuery = CAknGlobalListQuery::NewL();
-		iGlobalFlagQuery->SetHeadingL( *iPrompt ); // Set query heading.
- 		}
-
-	CDesCArrayFlat* array = new (ELeave) CDesCArrayFlat( 3 );
-	CleanupStack::PushL( array );
-	// Add follow up text
-	HBufC* followUp = StringLoader::LoadLC( R_FREESTYLE_EMAIL_UI_FLAG_FOLLOW_UP );
+    iSelection = 0;
+    if ( !iPrompt )
+        {
+        iPrompt = StringLoader::LoadL( R_FREESTYLE_EMAIL_UI_VIEWER_FLAG_DIALOG_HEADER );
+        }
+    if ( !iGlobalFlagQuery )
+        {
+        iGlobalFlagQuery = CAknGlobalListQuery::NewL();
+        iGlobalFlagQuery->SetHeadingL( *iPrompt ); // Set query heading.
+        }
+
+    CDesCArrayFlat* array = new (ELeave) CDesCArrayFlat( 3 );
+    CleanupStack::PushL( array );
+    // Add follow up text
+    HBufC* followUp = StringLoader::LoadLC( R_FREESTYLE_EMAIL_UI_FLAG_FOLLOW_UP );
     array->AppendL( *followUp );
-	CleanupStack::PopAndDestroy( followUp );
-
-	// Add flag complete text
-	HBufC* completeFlag = StringLoader::LoadLC( R_FREESTYLE_EMAIL_UI_FLAG_COMPLETE );
+    CleanupStack::PopAndDestroy( followUp );
+
+    // Add flag complete text
+    HBufC* completeFlag = StringLoader::LoadLC( R_FREESTYLE_EMAIL_UI_FLAG_COMPLETE );
     array->AppendL( *completeFlag );
-	CleanupStack::PopAndDestroy( completeFlag );
-
-	// Add clear flag text
-	HBufC* clearFlag = StringLoader::LoadLC( R_FREESTYLE_EMAIL_UI_FLAG_CLEAR );
+    CleanupStack::PopAndDestroy( completeFlag );
+
+    // Add clear flag text
+    HBufC* clearFlag = StringLoader::LoadLC( R_FREESTYLE_EMAIL_UI_FLAG_CLEAR );
     array->AppendL( *clearFlag );
-	CleanupStack::PopAndDestroy( clearFlag );
+    CleanupStack::PopAndDestroy( clearFlag );
 
     // Show query
     iGlobalFlagQuery->ShowListQueryL( array, iStatus, iSelection );
-	CleanupStack::PopAndDestroy( array );
-
-	// Set active
+    CleanupStack::PopAndDestroy( array );
+
+    // Set active
     SetActive();
-	}
+    }
 
 void CFlagSelectionGlobalNoteHandler::RunL()
-	{
+    {
     FUNC_LOG;
     TInt status = iStatus.Int();
-	iViewerVisualiser.FlagselectionCompleteL( status );
-	}
+    iViewerVisualiser.FlagselectionCompleteL( status );
+    }
 
 void CFlagSelectionGlobalNoteHandler::DoCancel()
-	{
+    {
     FUNC_LOG;
-	}
+    }
 
 TInt CFlagSelectionGlobalNoteHandler::RunError( TInt /*aError*/ )
-	{
+    {
     FUNC_LOG;
-	TInt err( KErrNone );
-	return err;
-	}
+    TInt err( KErrNone );
+    return err;
+    }
 
 CFlagSelectionGlobalNoteHandler::CFlagSelectionGlobalNoteHandler(  CFSEmailUiMailViewerVisualiser& aViewerVisualiser )
     : CActive ( EPriorityHigh ),
--- a/emailuis/emailui/src/FreestyleEmailUiSearchListVisualiser.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/src/FreestyleEmailUiSearchListVisualiser.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -287,9 +287,9 @@
     iEnv( &aEnv ),
     iLatestSearchText( 0 ),
     iListAddedToControlGroup( EFalse ),
+    iPreparedForExit( EFalse ),
     iConsumeStdKeyYes_KeyUp( EFalse ), // for consuming the call event if call for contact processed
-    iRequiredSearchPriority( KStandardSearchPriority ),  // for search email priority decreasing
-    iPreparedForExit( EFalse )
+    iRequiredSearchPriority( KStandardSearchPriority )  // for search email priority decreasing
 	{
     FUNC_LOG;
 	}
@@ -764,8 +764,8 @@
             {
             TRgb normalColor = iAppUi.LayoutHandler()->ListNormalStateTextSkinColor();
             iSearchTreeListVisualizer->RootNodeVisualizer()->SetNormalStateTextColor( normalColor );
-            }
-        ReScaleUiL();
+            ReScaleUiL();
+            }       
         }
 	}
 
--- a/emailuis/emailui/src/FreestyleEmailUiSettingsListView.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/src/FreestyleEmailUiSettingsListView.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -619,8 +619,7 @@
 		CAknView::HandleStatusPaneSizeChange();
 		
 		// this may fail, but we're not able to propagate exceptions here
-		TInt result;
-		TRAP( result, SetupStatusPaneL() ); 
+        TRAP_IGNORE( SetupStatusPaneL() ); 
 		}
 	}
 
--- a/emailuis/emailui/src/FreestyleMessageHeaderURLEventHandler.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/src/FreestyleMessageHeaderURLEventHandler.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -59,36 +59,6 @@
     iMessageHeaderURL = CFreestyleMessageHeaderURL::NewL();   
     iHTMLReloadAO = CFSHtmlReloadAO::NewL(iView);
     
-    if(!iEmailAddressStylusPopup)
-        {
-        TPoint point( 0, 0 );
-        iEmailAddressStylusPopup = CAknStylusPopUpMenu::NewL( this , point );
-		TResourceReader reader;
-		CCoeEnv::Static()->CreateResourceReaderLC( reader, R_STYLUS_POPUP_MENU_HTML_VIEW_EMAIL_ADDRESS );
-		iEmailAddressStylusPopup->ConstructFromResourceL( reader );
-		CleanupStack::PopAndDestroy(); //resource reader
-        }
-    
-    if( !iAttachmentStylusPopup )
-    	{
-    	TPoint point( 0, 0 );
-    	iAttachmentStylusPopup = CAknStylusPopUpMenu::NewL( this , point );
-		TResourceReader reader;
-		CCoeEnv::Static()->CreateResourceReaderLC( reader, R_STYLUS_POPUP_MENU_HTML_VIEW_ATTACHMENT );
-		iAttachmentStylusPopup->ConstructFromResourceL( reader );
-		CleanupStack::PopAndDestroy(); //resource reader
-    	}
-    
-    if( !iWebAddressStylusPopup )
-		{
-		TPoint point( 0, 0 );
-		iWebAddressStylusPopup = CAknStylusPopUpMenu::NewL( this , point );
-		TResourceReader reader;
-		CCoeEnv::Static()->CreateResourceReaderLC( reader, R_STYLUS_POPUP_MENU_HTML_VIEW_WEB_ADDRESS );
-		iWebAddressStylusPopup->ConstructFromResourceL( reader );
-		CleanupStack::PopAndDestroy(); //resource reader
-		}
-    
     }
 
 CFreestyleMessageHeaderURLEventHandler::~CFreestyleMessageHeaderURLEventHandler ()
@@ -130,7 +100,7 @@
         		iUrl = NULL;
         		}
         	iUrl = aUri.AllocL();
-        	LaunchWebAddressMenu( );
+        	LaunchWebAddressMenuL( );
         	return ETrue;
         	}         
         //Link wasn't handled
@@ -169,7 +139,24 @@
  * @param aType the type of the link the user selected
  */
 void CFreestyleMessageHeaderURLEventHandler::LaunchEmailAddressMenuL()
-    {     
+    {
+    
+    //Change the creation of the stylus menu here to avoid crash when calling SetItemDimmed(ETrue) multiple times 
+    //on same instance of the menu (if created only once in constructor).
+    //Creating the menu everytime the user clicks on the link avoids this crash however performance is affected.
+    if( iEmailAddressStylusPopup)
+       {
+       delete iEmailAddressStylusPopup;
+       iEmailAddressStylusPopup = NULL;
+       }
+   
+    TPoint point( 0, 0 );
+    iEmailAddressStylusPopup = CAknStylusPopUpMenu::NewL( this , point );
+    TResourceReader reader;
+    CCoeEnv::Static()->CreateResourceReaderLC( reader, R_STYLUS_POPUP_MENU_HTML_VIEW_EMAIL_ADDRESS );
+    iEmailAddressStylusPopup->ConstructFromResourceL( reader );
+    CleanupStack::PopAndDestroy(); //resource reader
+         
     iEmailAddressStylusPopup->SetItemDimmed( EFsEmailUiCmdActionsRemoteLookup, 
 											 !iView.IsRemoteLookupSupportedL() ); 
     iEmailAddressStylusPopup->SetPosition( iAppUi.ClientRect().Center(), 
@@ -273,6 +260,22 @@
     {
     ASSERT( iAppUi.DownloadInfoMediator() );
     
+    //Change the creation of the stylus menu here to avoid crash when calling SetItemDimmed(ETrue) multiple times 
+    //on same instance of the menu (if created only once in constructor).
+    //Creating the menu everytime the user clicks on the link avoids this crash however performance is affected.
+    if( iAttachmentStylusPopup )
+       {
+       delete iAttachmentStylusPopup;
+       iAttachmentStylusPopup = NULL;
+       }
+    TPoint point( 0, 0 );
+    iAttachmentStylusPopup = CAknStylusPopUpMenu::NewL( this , point );
+    TResourceReader reader;
+    CCoeEnv::Static()->CreateResourceReaderLC( reader, R_STYLUS_POPUP_MENU_HTML_VIEW_ATTACHMENT );
+    iAttachmentStylusPopup->ConstructFromResourceL( reader );
+    CleanupStack::PopAndDestroy(); //resource reader
+    
+    
     //Dim all item by default
     iAttachmentStylusPopup->SetItemDimmed( EFsEmailUiCmdOpenAttachment, ETrue );
     iAttachmentStylusPopup->SetItemDimmed( EFsEmailUiCmdSave, ETrue );
@@ -325,8 +328,25 @@
     }
 
 //Open the Avkon stylus popup when a web address link was pressed
-void CFreestyleMessageHeaderURLEventHandler::LaunchWebAddressMenu()
+void CFreestyleMessageHeaderURLEventHandler::LaunchWebAddressMenuL()
     {
+    
+    //Change the creation of the stylus menu here to avoid crash when calling SetItemDimmed(ETrue) multiple times 
+    //on same instance of the menu (if created only once in constructor).
+    //Creating the menu everytime the user clicks on the link avoids this crash however performance is affected.
+    if( iWebAddressStylusPopup )
+        {
+        delete iWebAddressStylusPopup;
+        iWebAddressStylusPopup = NULL;
+        }
+    
+    TPoint point( 0, 0 );
+    iWebAddressStylusPopup = CAknStylusPopUpMenu::NewL( this , point );
+    TResourceReader reader;
+    CCoeEnv::Static()->CreateResourceReaderLC( reader, R_STYLUS_POPUP_MENU_HTML_VIEW_WEB_ADDRESS );
+    iWebAddressStylusPopup->ConstructFromResourceL( reader );
+    CleanupStack::PopAndDestroy(); //resource reader
+ 
     iWebAddressStylusPopup->SetPosition( iAppUi.ClientRect().Center(), 
 										   CAknStylusPopUpMenu::EPositionTypeRightBottom );
     iWebAddressStylusPopup->ShowMenu();
--- a/emailuis/emailui/src/ncsaifeditor.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/src/ncsaifeditor.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -1324,6 +1324,7 @@
             }
         HandleTextChangedL();
         SetCursorPosL( cursorPos + 1, EFalse );
+        iSizeObserver->UpdateFieldSizeL( ETrue );
         iPartialRemove = EFalse;
         }
     else
--- a/emailuis/emailui/src/ncscomposeview.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/src/ncscomposeview.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -614,7 +614,7 @@
         	}
         }
 
-    if ( aResourceId == R_NCS_MORE_MENU )
+    if ( aResourceId == R_NCS_EXTRA_RECEPIENT_FIELDS_MENU )
         {
 		// Select which View->CC menu items to show
 		if ( iContainer->IsCcFieldVisible() )
--- a/emailuis/emailui/src/ncscomposeviewcontainer.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/src/ncscomposeviewcontainer.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -705,16 +705,20 @@
 // This is called through MNcsFieldSizeObserver when the rects have changed
 // -----------------------------------------------------------------------------
 //
-TBool CNcsComposeViewContainer::UpdateFieldSizeL()
+TBool CNcsComposeViewContainer::UpdateFieldSizeL( TBool aDoScroll )
     {
     FUNC_LOG;
 
 	// We may not have finished construction
-	if ( iHeader && iMessageField && iReadOnlyQuoteField )
+	if ( iHeader && iMessageField && iReadOnlyQuoteField && !aDoScroll )
 	    {
 	    SizeChanged();
 	    DrawDeferred();
 	    }
+	if ( iHeader && aDoScroll )
+	    {
+	    iHeader->DoScrollL();
+	    }
 
 	return EFalse;
     }
--- a/emailuis/emailui/src/ncsheadercontainer.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/emailui/src/ncsheadercontainer.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -526,7 +526,6 @@
 		        {
 		        FindFocused()->OfferKeyEventL( aKeyEvent, aType );
 		        ret = EKeyWasConsumed;
-		        doScroll = ETrue;
 		        }
 		    }
     	}
@@ -543,27 +542,7 @@
 
     if( doScroll )
     	{
-		// scroll the screen if the cursor goes beyond the screen
-		CNcsComposeViewContainer& parent = 
-            static_cast<CNcsComposeViewContainer&>( iParent );
-		
-		TInt screenPos( -Position().iY );
-		TInt cursorPos( CursorPosition() );
-		TInt lineHeight( Rect().Height() / LineCount() );
-		TInt screenHeight( parent.Rect().Height() );
-		
-		if( cursorPos - lineHeight < screenPos )
-			{
-			screenPos = cursorPos - lineHeight;		    	
-			}
-		else
-		if( cursorPos + lineHeight > screenPos + screenHeight )
-			{
-			screenPos = cursorPos + lineHeight - screenHeight;
-			}
-		
-		parent.ScrollL( screenPos );
-		PositionChanged();
+    	DoScrollL();
     	}
 
     return ret;
@@ -657,6 +636,7 @@
     if ( ret == EKeyWasConsumed )
         {
         container->UpdateScrollBarL();
+        DoScrollL();
         }
 
 	// NOTE: If we're leaving the header (down was pushed on last control)
@@ -1979,3 +1959,30 @@
         }
     }
 
+// -----------------------------------------------------------------------------
+// CNcsHeaderContainer::DoScrollL
+// 
+// -----------------------------------------------------------------------------
+void CNcsHeaderContainer::DoScrollL()
+    {
+    // scroll the screen if the cursor goes beyond the screen
+    CNcsComposeViewContainer& parent = static_cast<CNcsComposeViewContainer&>( iParent );
+    
+    TInt screenPos( -Position().iY );
+    TInt cursorPos( CursorPosition() );
+    TInt lineHeight( Rect().Height() / LineCount() );
+    TInt screenHeight( parent.Rect().Height() );
+    
+    if( cursorPos - lineHeight < screenPos )
+        {
+        screenPos = cursorPos - lineHeight;             
+        }
+    else
+    if( cursorPos + lineHeight > screenPos + screenHeight )
+        {
+        screenPos = cursorPos + lineHeight - screenHeight;
+        }
+    
+    parent.ScrollL( screenPos );
+    PositionChanged();    
+    }
--- a/emailuis/gsemailsettings/group/GSEmailSettings.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/gsemailsettings/group/GSEmailSettings.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -19,6 +19,7 @@
 #include <platform_paths.hrh>
 
 #include "../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../inc/emailtraceconfig.hrh"
 
 TARGET			GSEmailSettingsPluginDll.dll
 TARGETTYPE		PLUGIN
@@ -70,5 +71,8 @@
 LIBRARY			aknicon.lib
 LIBRARY			egul.lib
 LIBRARY                 cmaillogger.lib
+#ifdef TRACE_INTO_FILE
+LIBRARY                 flogger.lib
+#endif // TRACE_INTO_FILE
 
 DEFFILE         GSEmailSettingsPluginDll.def
--- a/emailuis/uicomponents/fsscrollbarplugin/data/2001E281.rss	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/uicomponents/fsscrollbarplugin/data/2001E281.rss	Tue Feb 02 00:02:40 2010 +0200
@@ -14,29 +14,29 @@
 * Description: ECOM plugin resource definition.
 *
 */
-#include <registryinfo.rh>
+#include <ecom/registryinfo.rh>
 #include <alf/alfred.hrh>
 #include "../../../../inc/emailversionnumbers.hrh" // KEmailEcomVersionNumber
 
 RESOURCE REGISTRY_INFO theInfo
 {
-	dll_uid = 0x2001E281;
-	interfaces =
-	{
-	INTERFACE_INFO
-		{
-		interface_uid = K_ALF_FACTORY_INTERFACE;
-		implementations =
-				{
-				IMPLEMENTATION_INFO
-					{
-					implementation_uid = 0x2001E282;
-					version_no = KEmailEcomVersionNumber;
-					display_name = "fsscrollbar";
-					default_data = "";
-					opaque_data	 = "0";
-					}
-				};
-		}
-	};
+    dll_uid = 0x2001E281;
+    interfaces =
+    {
+    INTERFACE_INFO
+        {
+        interface_uid = K_ALF_FACTORY_INTERFACE;
+        implementations =
+                {
+                IMPLEMENTATION_INFO
+                    {
+                    implementation_uid = 0x2001E282;
+                    version_no = KEmailEcomVersionNumber;
+                    display_name = "fsscrollbar";
+                    default_data = "";
+                    opaque_data  = "0";
+                    }
+                };
+        }
+    };
 }
--- a/emailuis/uicomponents/fsscrollbarplugin/group/fsscrollbarplugin.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/uicomponents/fsscrollbarplugin/group/fsscrollbarplugin.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -20,9 +20,10 @@
 #include <bldvariant.hrh>
 
 #include "../../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../../inc/emailtraceconfig.hrh"
 
 TARGET          fsscrollbarplugin.dll
-TARGETTYPE     	PLUGIN
+TARGETTYPE      PLUGIN
 UID             0x10009d8d 0x2001E281
 
 CAPABILITY      CAP_ECOM_PLUGIN
@@ -37,9 +38,7 @@
 
 APP_LAYER_SYSTEMINCLUDE
 
-SYSTEMINCLUDE   /epoc32/include/ecom
-
-SOURCEPATH		../data
+SOURCEPATH      ../data
 START RESOURCE 2001E281.rss
 TARGET fsscrollbarplugin.rsc
 END
@@ -67,6 +66,10 @@
 LIBRARY         alfclient.lib // alftimedvalue
 LIBRARY         cmaillogger.lib
 
+#ifdef TRACE_INTO_FILE
+LIBRARY        flogger.lib
+#endif // TRACE_INTO_FILE
+
 DEFFILE         fs_scrollbarpugin.def
 
 START WINS
--- a/emailuis/uicomponents/fsscrollbarplugin/src/fsscrollbarfactory.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/uicomponents/fsscrollbarplugin/src/fsscrollbarfactory.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -18,11 +18,9 @@
 
 
 #include "emailtrace.h"
-#include <implementationproxy.h>
-//<cmail> SF
+#include <ecom/implementationproxy.h>
 #include <alf/alfconstants.h>
 #include <alf/alflayouthandlers.h>
-//</cmail>
 #include "fsscrollbarfactory.h"
 #include "fsscrollbarlayouthandler.h"
 #include "fsscrollbarpluginconstants.h"
@@ -31,30 +29,30 @@
 // ======== LOCAL FUNCTIONS ========
 
 MAlfExtensionFactory* Instance()
-	{
+    {
     FUNC_LOG;
-	TFsScrollbarFactory* me = NULL;
-	me = new TFsScrollbarFactory;
-	return me;
-	}
+    TFsScrollbarFactory* me = NULL;
+    me = new TFsScrollbarFactory;
+    return me;
+    }
 
 
 const TImplementationProxy ImplementationTable[] =
-	{
-	//<cmail>
+    {
+    //<cmail>
     IMPLEMENTATION_PROXY_ENTRY( KFsScrollbarImplementationId,
-	                            Instance )
-    //</cmail>	                            
-	};
+                                Instance )
+    //</cmail>                              
+    };
 
 
 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(
     TInt& aTableCount )
-	{
-	aTableCount = sizeof( ImplementationTable )
+    {
+    aTableCount = sizeof( ImplementationTable )
         / sizeof( TImplementationProxy ) ;
-	return ImplementationTable;
-	}
+    return ImplementationTable;
+    }
 
 
 // ======== MEMBER FUNCTIONS ========
--- a/emailuis/uicomponents/src/fstreevisualizerbase.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/uicomponents/src/fstreevisualizerbase.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -2231,8 +2231,8 @@
     MFsTreeNodeVisualizer* nodeVisualizer =
             iTreeData->NodeVisualizer(aNodeId);
     TRect rc;
-    TUint index = iWorld.GetItemRect(aNodeId, rc);
-    if (!nodeVisualizer->IsExpanded())
+    TInt index = iWorld.GetItemRect(aNodeId, rc);
+    if (!nodeVisualizer->IsExpanded() && index != KErrNotFound )
         {
         nodeVisualizer->SetExpanded(ETrue, &iTreeData->ItemData(aNodeId));
 
--- a/emailuis/widget/emailwidgetsettings/group/bld.inf	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/widget/emailwidgetsettings/group/bld.inf	Tue Feb 02 00:02:40 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009 - 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"
@@ -32,8 +32,9 @@
 END
 
 PRJ_EXPORTS
-../rom/emailwidgetsettings.iby          CORE_APP_LAYER_IBY_EXPORT_PATH(emailwidgetsettings.iby)
-../loc/emailwidgetsettings.loc          APP_LAYER_LOC_EXPORT_PATH(emailwidgetsettings.loc)
+../rom/emailwidgetsettings.iby                  CORE_APP_LAYER_IBY_EXPORT_PATH(emailwidgetsettings.iby)
+../loc/emailwidgetsettings.loc                  APP_LAYER_LOC_EXPORT_PATH(emailwidgetsettings.loc)
+../rom/emailwidgetsettings_resources.iby        LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(emailwidgetsettings_resources.iby)
 
-../conf/cmailwidget.confml              APP_LAYER_CONFML(cmailwidget.confml)
-../conf/cmailwidget_2001E272.crml       APP_LAYER_CRML(cmailwidget_2001E272.crml)
+../conf/cmailwidget.confml                      APP_LAYER_CONFML(cmailwidget.confml)
+../conf/cmailwidget_2001E272.crml               APP_LAYER_CRML(cmailwidget_2001E272.crml)
--- a/emailuis/widget/emailwidgetsettings/group/emailwidgetsettings.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/widget/emailwidgetsettings/group/emailwidgetsettings.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -36,14 +36,15 @@
 SOURCE           emailwidgetsettingsappui.cpp
 SOURCE           emailwidgetsettingslistview.cpp
 SOURCE           emailwidgetsettingslistviewcontainer.cpp
-SOURCE       	 emailwidgetsettingsmailboxes.cpp
+SOURCE           emailwidgetsettingsmailboxes.cpp
 
 SOURCEPATH       ../data
 
 START RESOURCE   emailwidgetsettings.rss
 HEADER
 TARGET           emailwidgetsettings
-TARGETPATH       resource/apps
+TARGETPATH       APP_RESOURCE_DIR
+LANGUAGE_IDS
 END //RESOURCE
 
 START RESOURCE   emailwidgetsettings_reg.rss
@@ -56,7 +57,6 @@
 USERINCLUDE      ../inc
 USERINCLUDE      ../loc
 USERINCLUDE      ../../../../inc
-SYSTEMINCLUDE    /epoc32/include/ecom
 
 LIBRARY          euser.lib
 LIBRARY          apparc.lib
--- a/emailuis/widget/emailwidgetsettings/rom/emailwidgetsettings.iby	Tue Jan 26 11:45:42 2010 +0200
+++ b/emailuis/widget/emailwidgetsettings/rom/emailwidgetsettings.iby	Tue Feb 02 00:02:40 2010 +0200
@@ -21,8 +21,7 @@
 #include <data_caging_paths_for_iby.hrh>
 
 file=ABI_DIR\BUILD_DIR\emailwidgetsettings.exe                          PROGRAMS_DIR\emailwidgetsettings.exe
-data=\epoc32\data\z\private\10003a3f\apps\emailwidgetsettings_reg.rsc   private\10003a3f\apps\emailwidgetsettings_reg.rsc
-data=DATAZ_\APP_RESOURCE_DIR\emailwidgetsettings.rsc                    APP_RESOURCE_DIR\emailwidgetsettings.rsc
+S60_UPGRADABLE_APP_REG_RSC(emailwidgetsettings)
 SCALABLE_IMAGE(APP_BITMAP_DIR,APP_BITMAP_DIR,emailwidgetsettings)
 
 #endif // EMAILWIDGETSETTINGS_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailuis/widget/emailwidgetsettings/rom/emailwidgetsettings_resources.iby	Tue Feb 02 00:02:40 2010 +0200
@@ -0,0 +1,25 @@
+/*
+* 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:  Email Widget Settings iby file
+*
+*/
+
+#ifndef EMAILWIDGETSETTINGS_RESOURCES_IBY
+#define EMAILWIDGETSETTINGS_RESOURCES_IBY
+
+#include <data_caging_paths_for_iby.hrh>
+
+data=DATAZ_\APP_RESOURCE_DIR\emailwidgetsettings.rsc                    APP_RESOURCE_DIR\emailwidgetsettings.rsc
+
+#endif // EMAILWIDGETSETTINGS_RESOURCES_IBY
--- a/group/bld.inf	Tue Jan 26 11:45:42 2010 +0200
+++ b/group/bld.inf	Tue Feb 02 00:02:40 2010 +0200
@@ -23,9 +23,3 @@
 #include "../meetingrequest/group/bld.inf"                   
 #include "../emailuis/group/bld.inf"
 #include "../email_plat/group/bld.inf"                       
-
-
-// Remove when Cmail is integrated to the Starter-list. (<=done)
-#ifdef __CMAIL_OZ_NB_ONLY
-#include "../legacy/starteroz/group/bld.inf"
-#endif
--- a/ipsservices/ipssosaoplugin/group/IPSSosAOPlugin.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/ipsservices/ipssosaoplugin/group/IPSSosAOPlugin.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -20,6 +20,7 @@
 #include <platform_paths.hrh>
 
 #include "../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../inc/emailtraceconfig.hrh"
 
 TARGET                  IPSSosAOPlugin.dll
 TARGETTYPE              PLUGIN
@@ -66,8 +67,14 @@
 LIBRARY                 imcm.lib
 LIBRARY                 gsecomplugin.lib
 LIBRARY                 eikcore.lib
-LIBRARY			        ipssosplugin.lib
+LIBRARY                 ipssosplugin.lib
 LIBRARY                 IpsSosSettings.lib
 LIBRARY                 cmaillogger.lib
+LIBRARY					cmmanager.lib
 DEBUGLIBRARY            flogger.lib
-DEFFILE                 IPSSOSAOPLUGIN.DEF
\ No newline at end of file
+
+#ifdef TRACE_INTO_FILE
+LIBRARY                 flogger.lib
+#endif // TRACE_INTO_FILE
+
+DEFFILE                 IPSSOSAOPLUGIN.DEF
--- a/ipsservices/ipssosaoplugin/src/IpsSosAOMboxLogic.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/ipsservices/ipssosaoplugin/src/IpsSosAOMboxLogic.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -23,6 +23,8 @@
 #endif // _DEBUG*/
 //</cmail>
 
+#include <cmmanager.h>
+
 #include "emailtrace.h"
 #include "IpsSosAOMboxLogic.h"
 #include "ipssetdataapi.h"
@@ -753,13 +755,20 @@
     {
     FUNC_LOG;
     TBool ret = ETrue;
-    LoadSettingsL();
-    if ( ( iExtendedSettings->EmailNotificationState() == EMailEmnHomeOnly 
-          || iExtendedSettings->AlwaysOnlineState() == EMailAoHomeOnly
-          || iExtendedSettings->RoamHomeOnlyFlag() ) && iIsRoaming )
+
+    RCmManager cmManager;
+    cmManager.OpenLC();
+    TCmGenConnSettings OccSettings;
+    
+    //ask roaming settings from occ
+    cmManager.ReadGenConnSettingsL(OccSettings);
+    if(OccSettings.iSeamlessnessVisitor == ECmCellularDataUsageDisabled && iIsRoaming)
         {
         ret = EFalse;
         }
+    
+    CleanupStack::PopAndDestroy(&cmManager); // cmManager
+    
     return ret;          
     }
 
@@ -778,9 +787,7 @@
     iExtendedSettings->SetFirstEmnReceived( ETrue );
     
     //if alwaysonline was allowed to roam, so will EMN be.
-    iExtendedSettings->SetEmailNotificationState(
-            iExtendedSettings->AlwaysOnlineState() == 
-            EMailAoAlways ? EMailEmnAutomatic : EMailEmnHomeOnly );
+    iExtendedSettings->SetEmailNotificationState( EMailEmnAutomatic );
     
     
     // set always online state off when emn is on
--- a/ipsservices/ipssosplugin/group/IPSSosPlugin.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/ipsservices/ipssosplugin/group/IPSSosPlugin.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -19,6 +19,7 @@
 #include <platform_paths.hrh>
 
 #include "../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../inc/emailtraceconfig.hrh"
 
 TARGET                  ipssosplugin.dll
 TARGETTYPE              PLUGIN
@@ -97,12 +98,15 @@
 LIBRARY                 ipssossettings.lib
 LIBRARY                 AlwaysOnlineManagerClient.lib
 LIBRARY                 CommonEngine.lib
-LIBRARY            	    charconv.lib
+LIBRARY                 charconv.lib
 LIBRARY                 ConnMon.lib
 LIBRARY                 avkon.lib
 LIBRARY                 cmaillogger.lib
+LIBRARY                 featmgr.lib 
 
-// logging
-DEBUGLIBRARY            flogger.lib
+
+#ifdef TRACE_INTO_FILE
+LIBRARY                 flogger.lib
+#endif // TRACE_INTO_FILE
 
 DEFFILE                 IPSSOSPLUGIN.DEF
--- a/ipsservices/ipssosplugin/inc/ipsplgsmtpoperation.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/ipsservices/ipssosplugin/inc/ipsplgsmtpoperation.h	Tue Feb 02 00:02:40 2010 +0200
@@ -106,6 +106,17 @@
      */    
     void ConstructL( );
 
+    /**
+     * Completes observer with status aStatus
+     * @param aStatus: Status of the operation.
+     */
+    void CompleteObserver( TInt aStatus = KErrNone );
+
+    /**
+     * Completes itself with KErrNone status
+     */
+    void CompleteThis();
+
 private: // From CActive
 
     enum TIpsSendState
--- a/ipsservices/ipssosplugin/inc/ipsplgsmtpservice.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/ipsservices/ipssosplugin/inc/ipsplgsmtpservice.h	Tue Feb 02 00:02:40 2010 +0200
@@ -190,6 +190,11 @@
     CMsvSession& iSession;
     
     CIpsPlgMsgMapper* iMsgMapper;
+    
+    /**
+     * Own: Feature manager initialization flag
+     */
+    TBool iFeatureManagerInitialized;
 
     };
 
--- a/ipsservices/ipssosplugin/src/ipsplgimap4connectop.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/ipsservices/ipssosplugin/src/ipsplgimap4connectop.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -522,7 +522,10 @@
 // 
 void CIpsPlgImap4ConnectOp::QueryUserPwdL()
     {
-    iEventHandler->QueryUsrPassL( iService, this );
+    if ( iEventHandler )
+        {
+        iEventHandler->QueryUsrPassL( iService, this );
+        }
     }
 
     
--- a/ipsservices/ipssosplugin/src/ipsplgpop3connectop.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/ipsservices/ipssosplugin/src/ipsplgpop3connectop.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -433,7 +433,11 @@
 void CIpsPlgPop3ConnectOp::QueryUsrPassL()
     {
     FUNC_LOG;
-    iEventHandler->QueryUsrPassL( iEntry->EntryId(), this );
+
+    if ( iEventHandler )
+        {
+        iEventHandler->QueryUsrPassL( iEntry->EntryId(), this );
+        }
     }
 
 
--- a/ipsservices/ipssosplugin/src/ipsplgsmtpoperation.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/ipsservices/ipssosplugin/src/ipsplgsmtpoperation.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -94,7 +94,32 @@
     iSelection = new (ELeave) CMsvEntrySelection();
     CActiveScheduler::Add( this );
     }
-    
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void CIpsPlgSmtpOperation::CompleteObserver( TInt aStatus /*= KErrNone*/ )
+    {
+    FUNC_LOG;
+
+    TRequestStatus* status = &iObserverRequestStatus;
+    if ( status && status->Int() == KRequestPending )
+        {
+        User::RequestComplete( status, aStatus );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+void CIpsPlgSmtpOperation::CompleteThis()
+    {
+    FUNC_LOG;
+
+    TRequestStatus* status = &iStatus;
+    User::RequestComplete( status, KErrNone );
+    }
+
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 //
@@ -115,10 +140,9 @@
         TImSmtpProgress prog;
         TPckg<TImSmtpProgress> param(prog);
         param.Copy( iOperation->FinalProgress() ); 
-        
-        TRequestStatus* status = &iObserverRequestStatus;
-        User::RequestComplete( status, prog.Error() );
-        }    
+
+        CompleteObserver( prog.Error() );
+        }
     }
     
 // ---------------------------------------------------------------------------
@@ -132,8 +156,8 @@
         {
         iOperation->Cancel();
         }
-    TRequestStatus* status = &iObserverRequestStatus;
-    User::RequestComplete(status, KErrCancel);
+
+    CompleteObserver( KErrCancel );
     }
 
 // ---------------------------------------------------------------------------
@@ -271,6 +295,12 @@
         {
         CallSendL();
         }
+    else
+        {
+        // nothing to do, finish operation
+        CompleteObserver( KErrNone );
+        }
+
     return retValue;
     }
 
--- a/ipsservices/ipssosplugin/src/ipsplgsmtpservice.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/ipsservices/ipssosplugin/src/ipsplgsmtpservice.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -19,6 +19,9 @@
 #include "emailtrace.h"
 #include "ipsplgheaders.h"
 
+#include <featmgr.h>
+#include <bldvariant.hrh> // for feature definitions
+
 // <cmail> const TInt KIpsSetUtilsCharAt = '@'; </cmail>
 const TInt KIpsSetUtilsCharLessThan = '<';
 const TInt KIpsSetUtilsCharMoreThan = '>';
@@ -48,6 +51,11 @@
     {
     FUNC_LOG;
     delete iMsgMapper;
+    
+    if( iFeatureManagerInitialized )
+    	{
+    	FeatureManager::UnInitializeLib();  
+    	}
     }    
 
 // ---------------------------------------------------------------------------
@@ -89,6 +97,9 @@
     {
     FUNC_LOG;
     iMsgMapper = CIpsPlgMsgMapper::NewL( iSession, iPlugin );
+    
+    FeatureManager::InitializeLibL();
+    iFeatureManagerInitialized = ETrue;
     }
 
 // ---------------------------------------------------------------------------
@@ -523,10 +534,44 @@
     {
     FUNC_LOG;
 
+    
+   
+    // tp teleca change for korean specific email encoding
     // Default charset
     TUid charset;
     charset.iUid = KCharacterSetIdentifierUtf8;
 
+      // korea specific charset
+      if ( FeatureManager::FeatureSupported( KFeatureIdKorean ))
+      {
+      
+      //const TUid KCRUidEMailCharsets = {0x20018441};    // korea needs different default charset
+          const TInt KoreanMib = 36; // magic number to read from cen rep would be better
+            
+		  CCnvCharacterSetConverter* charConv = NULL;
+		  TRAPD( err, charConv = CCnvCharacterSetConverter::NewL() );
+		  if( err == KErrNone )
+			  {
+			  TUint characterSetId = KCharacterSetIdentifierUtf8;
+			  RFs fs;
+			  TInt err = fs.Connect();
+			  
+			  if( err == KErrNone )
+				  {
+				  TRAP( err, characterSetId = charConv->ConvertMibEnumOfCharacterSetToIdentifierL( KoreanMib, fs ));
+				   if( err == KErrNone )
+					   { // set korean specific charset
+					   charset = TUid::Uid( characterSetId );
+					   }
+				   fs.Close();
+				  }
+			  }
+
+         delete charConv; 
+     
+      }
+      // tp teleca change END
+
     // set in preparation flag, altought 
     // not known where this affects
     TMsvId dummy;
--- a/ipsservices/ipssossettings/bwins/ipssossettingsu.def	Tue Jan 26 11:45:42 2010 +0200
+++ b/ipsservices/ipssossettings/bwins/ipssossettingsu.def	Tue Feb 02 00:02:40 2010 +0200
@@ -1,76 +1,74 @@
 EXPORTS
 	?ImplementationGroupProxy@@YAPBUTImplementationProxy@@AAH@Z @ 1 NONAME ; struct TImplementationProxy const * ImplementationGroupProxy(int &)
-	?SaveSyncStatusL@CIpsSetDataApi@@QAEXVTMsvEntry@@H@Z @ 2 NONAME ; void CIpsSetDataApi::SaveSyncStatusL(class TMsvEntry, int)
-	?SetNewPasswordL@CIpsSetDataApi@@QAEXAAVCMsvEntry@@ABVTDesC16@@@Z @ 3 NONAME ; void CIpsSetDataApi::SetNewPasswordL(class CMsvEntry &, class TDesC16 const &)
-	?RoamHomeOnlyFlag@CIpsSetDataExtension@@QAEHXZ @ 4 NONAME ; int CIpsSetDataExtension::RoamHomeOnlyFlag(void)
-	?SetSyncStatus@CIpsSetDataExtension@@QAEXH@Z @ 5 NONAME ; void CIpsSetDataExtension::SetSyncStatus(int)
-	?Protocol@CIpsSetDataExtension@@QBE?AVTUid@@XZ @ 6 NONAME ; class TUid CIpsSetDataExtension::Protocol(void) const
-	?OutgoingLogin@CIpsSetDataExtension@@QBEHXZ @ 7 NONAME ; int CIpsSetDataExtension::OutgoingLogin(void) const
-	?GetMailboxAddressL@CIpsSetDataApi@@QAEXABVTMsvEntry@@AAPAVHBufC16@@@Z @ 8 NONAME ; void CIpsSetDataApi::GetMailboxAddressL(class TMsvEntry const &, class HBufC16 * &)
-	?NewL@CIpsSetDataExtension@@SAPAV1@XZ @ 9 NONAME ; class CIpsSetDataExtension * CIpsSetDataExtension::NewL(void)
-	?IsValidEmailAddressL@IpsSetUtils@@SAHABVTDesC16@@@Z @ 10 NONAME ; int IpsSetUtils::IsValidEmailAddressL(class TDesC16 const &)
-	?GetLastSyncStatusL@CIpsSetDataApi@@QAEHVTMsvEntry@@@Z @ 11 NONAME ; int CIpsSetDataApi::GetLastSyncStatusL(class TMsvEntry)
-	?HandleMailboxCreation@CIpsSetDataApi@@QAEHVTUid@@AAVCMsvSession@@@Z @ 12 NONAME ; int CIpsSetDataApi::HandleMailboxCreation(class TUid, class CMsvSession &)
-	?LaunchSettingsL@CIpsSetDataApi@@SAHJ@Z @ 13 NONAME ; int CIpsSetDataApi::LaunchSettingsL(long)
-	?SelectedTimeStart@CIpsSetDataExtension@@QBE?AVTTime@@XZ @ 14 NONAME ; class TTime CIpsSetDataExtension::SelectedTimeStart(void) const
-	?GetSubscribedImapFoldersL@CIpsSetDataApi@@QAEXJAAV?$RArray@J@@@Z @ 15 NONAME ; void CIpsSetDataApi::GetSubscribedImapFoldersL(long, class RArray<long> &)
-	?NewL@CIpsSetDataApi@@SAPAV1@AAVCMsvSession@@@Z @ 16 NONAME ; class CIpsSetDataApi * CIpsSetDataApi::NewL(class CMsvSession &)
-	?StatusFlags@CIpsSetDataExtension@@QBE_KXZ @ 17 NONAME ; unsigned long long CIpsSetDataExtension::StatusFlags(void) const
-	?SetStatusFlags@CIpsSetDataExtension@@QAEX_K@Z @ 18 NONAME ; void CIpsSetDataExtension::SetStatusFlags(unsigned long long)
-	?IsSettingsValid@CIpsSetDataExtension@@QBEHXZ @ 19 NONAME ; int CIpsSetDataExtension::IsSettingsValid(void) const
-	?SetRoamHomeOnlyFlag@CIpsSetDataExtension@@QAEXH@Z @ 20 NONAME ; void CIpsSetDataExtension::SetRoamHomeOnlyFlag(int)
-	?SetSelectedWeekDays@CIpsSetDataExtension@@QAEXI@Z @ 21 NONAME ; void CIpsSetDataExtension::SetSelectedWeekDays(unsigned int)
-	?SetProtocol@CIpsSetDataExtension@@QAEXABVTUid@@@Z @ 22 NONAME ; void CIpsSetDataExtension::SetProtocol(class TUid const &)
-	?SetHideMsgs@CIpsSetDataExtension@@QAEXH@Z @ 23 NONAME ; void CIpsSetDataExtension::SetHideMsgs(int)
-	?LoadExtendedSettingsL@CIpsSetDataApi@@QAEXJAAVCIpsSetDataExtension@@@Z @ 24 NONAME ; void CIpsSetDataApi::LoadExtendedSettingsL(long, class CIpsSetDataExtension &)
-	?SetLastModified@CIpsSetDataExtension@@QAEXVTTime@@@Z @ 25 NONAME ; void CIpsSetDataExtension::SetLastModified(class TTime)
-	?RemoveAccountL@CIpsSetDataApi@@QAEXABVTMsvEntry@@AAVCMsvSession@@@Z @ 26 NONAME ; void CIpsSetDataApi::RemoveAccountL(class TMsvEntry const &, class CMsvSession &)
-	?SetSelectedTimeStart@CIpsSetDataExtension@@QAEXVTTime@@@Z @ 27 NONAME ; void CIpsSetDataExtension::SetSelectedTimeStart(class TTime)
-	?SetOutgoingLogin@CIpsSetDataExtension@@QAEXH@Z @ 28 NONAME ; void CIpsSetDataExtension::SetOutgoingLogin(int)
+	?SetUpdateMode@CIpsSetDataExtension@@QAEXW4TIpsSetDataAoUpdateModes@@@Z @ 2 NONAME ; void CIpsSetDataExtension::SetUpdateMode(enum TIpsSetDataAoUpdateModes)
+	?GetServerAddressL@CIpsSetDataApi@@QAEAAVTDesC16@@ABVCMsvEntry@@@Z @ 3 NONAME ; class TDesC16 & CIpsSetDataApi::GetServerAddressL(class CMsvEntry const &)
+	?IsValidEmailAddressL@IpsSetUtils@@SAHABVTDesC16@@@Z @ 4 NONAME ; int IpsSetUtils::IsValidEmailAddressL(class TDesC16 const &)
+	?SetInboxRefreshTime@CIpsSetDataExtension@@QAEXH@Z @ 5 NONAME ; void CIpsSetDataExtension::SetInboxRefreshTime(int)
+	?PopulateDefaults@CIpsSetDataExtension@@QAEXXZ @ 6 NONAME ; void CIpsSetDataExtension::PopulateDefaults(void)
+	?LastSyncStatus@CIpsSetDataExtension@@QBEHXZ @ 7 NONAME ; int CIpsSetDataExtension::LastSyncStatus(void) const
+	?SetSelectedTimeStop@CIpsSetDataExtension@@QAEXVTTime@@@Z @ 8 NONAME ; void CIpsSetDataExtension::SetSelectedTimeStop(class TTime)
+	?AccountId@CIpsSetDataExtension@@QBEKXZ @ 9 NONAME ; unsigned long CIpsSetDataExtension::AccountId(void) const
+	?SetEmailAddress@CIpsSetDataExtension@@QAEXABVTDesC16@@@Z @ 10 NONAME ; void CIpsSetDataExtension::SetEmailAddress(class TDesC16 const &)
+	?LaunchSettingsL@CIpsSetDataApi@@SAHJ@Z @ 11 NONAME ; int CIpsSetDataApi::LaunchSettingsL(long)
+	?EmailAddress@CIpsSetDataExtension@@QBEABVTDesC16@@XZ @ 12 NONAME ; class TDesC16 const & CIpsSetDataExtension::EmailAddress(void) const
+	?ConstructImapPartialFetchInfo@CIpsSetDataApi@@SAXAAVTImImap4GetPartialMailInfo@@AAVCImImap4Settings@@@Z @ 13 NONAME ; void CIpsSetDataApi::ConstructImapPartialFetchInfo(class TImImap4GetPartialMailInfo &, class CImImap4Settings &)
+	?SetAlwaysOnlineState@CIpsSetDataExtension@@QAEXW4TIpsSetDataAoStates@@H@Z @ 14 NONAME ; void CIpsSetDataExtension::SetAlwaysOnlineState(enum TIpsSetDataAoStates, int)
+	?GetLastSyncStatusL@CIpsSetDataApi@@QAEHVTMsvEntry@@@Z @ 15 NONAME ; int CIpsSetDataApi::GetLastSyncStatusL(class TMsvEntry)
+	?GoOnlineL@CIpsSetDataApi@@QAEXVTMsvEntry@@@Z @ 16 NONAME ; void CIpsSetDataApi::GoOnlineL(class TMsvEntry)
+	?SetHideMsgs@CIpsSetDataExtension@@QAEXH@Z @ 17 NONAME ; void CIpsSetDataExtension::SetHideMsgs(int)
+	?LastModified@CIpsSetDataExtension@@QBE?AVTTime@@XZ @ 18 NONAME ; class TTime CIpsSetDataExtension::LastModified(void) const
+	?NewL@CIpsSetDataExtension@@SAPAV1@XZ @ 19 NONAME ; class CIpsSetDataExtension * CIpsSetDataExtension::NewL(void)
+	?SetProtocol@CIpsSetDataExtension@@QAEXABVTUid@@@Z @ 20 NONAME ; void CIpsSetDataExtension::SetProtocol(class TUid const &)
+	?IsSettingsValid@CIpsSetDataExtension@@QBEHXZ @ 21 NONAME ; int CIpsSetDataExtension::IsSettingsValid(void) const
+	?SetDataHidden@CIpsSetDataExtension@@QAEXH@Z @ 22 NONAME ; void CIpsSetDataExtension::SetDataHidden(int)
+	?FirstEmnReceived@CIpsSetDataExtension@@QBEHXZ @ 23 NONAME ; int CIpsSetDataExtension::FirstEmnReceived(void) const
+	?SaveExtendedSettingsL@CIpsSetDataApi@@QAEXABVCIpsSetDataExtension@@@Z @ 24 NONAME ; void CIpsSetDataApi::SaveExtendedSettingsL(class CIpsSetDataExtension const &)
+	?RemoveAccountL@CIpsSetDataApi@@QAEXABVTMsvEntry@@AAVCMsvSession@@@Z @ 25 NONAME ; void CIpsSetDataApi::RemoveAccountL(class TMsvEntry const &, class CMsvSession &)
+	?AlwaysOnlineState@CIpsSetDataExtension@@QBE?AW4TIpsSetDataAoStates@@XZ @ 26 NONAME ; enum TIpsSetDataAoStates CIpsSetDataExtension::AlwaysOnlineState(void) const
+	?EmailNotificationState@CIpsSetDataExtension@@QBE?AW4TIpsSetDataEmnStates@@XZ @ 27 NONAME ; enum TIpsSetDataEmnStates CIpsSetDataExtension::EmailNotificationState(void) const
+	?InboxRefreshTime@CIpsSetDataExtension@@QBEHXZ @ 28 NONAME ; int CIpsSetDataExtension::InboxRefreshTime(void) const
 	?SetEmailNotificationState@CIpsSetDataExtension@@QAEXW4TIpsSetDataEmnStates@@@Z @ 29 NONAME ; void CIpsSetDataExtension::SetEmailNotificationState(enum TIpsSetDataEmnStates)
-	?AlwaysOnlineState@CIpsSetDataExtension@@QBE?AW4TIpsSetDataAoStates@@XZ @ 30 NONAME ; enum TIpsSetDataAoStates CIpsSetDataExtension::AlwaysOnlineState(void) const
-	?SetEmnReceivedButNotSyncedFlag@CIpsSetDataExtension@@QAEXH@Z @ 31 NONAME ; void CIpsSetDataExtension::SetEmnReceivedButNotSyncedFlag(int)
-	?CreateCenRepKeyL@CIpsSetDataApi@@QAEKKABVTUid@@K@Z @ 32 NONAME ; unsigned long CIpsSetDataApi::CreateCenRepKeyL(unsigned long, class TUid const &, unsigned long)
-	?SetNewMailIndicators@CIpsSetDataExtension@@QAEXH@Z @ 33 NONAME ; void CIpsSetDataExtension::SetNewMailIndicators(int)
-	?ExtensionId@CIpsSetDataExtension@@QBEKXZ @ 34 NONAME ; unsigned long CIpsSetDataExtension::ExtensionId(void) const
-	?SetMailboxNameL@CIpsSetDataApi@@QAEXAAVTMsvEntry@@ABVTDesC16@@@Z @ 35 NONAME ; void CIpsSetDataApi::SetMailboxNameL(class TMsvEntry &, class TDesC16 const &)
-	?PopulateDefaults@CIpsSetDataExtension@@QAEXXZ @ 36 NONAME ; void CIpsSetDataExtension::PopulateDefaults(void)
-	?OpenHtmlMail@CIpsSetDataExtension@@QBEHXZ @ 37 NONAME ; int CIpsSetDataExtension::OpenHtmlMail(void) const
-	?SelectedTimeStop@CIpsSetDataExtension@@QBE?AVTTime@@XZ @ 38 NONAME ; class TTime CIpsSetDataExtension::SelectedTimeStop(void) const
-	?AccountId@CIpsSetDataExtension@@QBEKXZ @ 39 NONAME ; unsigned long CIpsSetDataExtension::AccountId(void) const
-	?GetServerAddressL@CIpsSetDataApi@@QAEAAVTDesC16@@ABVCMsvEntry@@@Z @ 40 NONAME ; class TDesC16 & CIpsSetDataApi::GetServerAddressL(class CMsvEntry const &)
-	?GetIMEIFromThePhoneL@CIpsSetDataApi@@QAEXAAV?$TBuf@$0DC@@@@Z @ 41 NONAME ; void CIpsSetDataApi::GetIMEIFromThePhoneL(class TBuf<50> &)
-	?EmailAddress@CIpsSetDataExtension@@QBEABVTDesC16@@XZ @ 42 NONAME ; class TDesC16 const & CIpsSetDataExtension::EmailAddress(void) const
-	?SetEmailAddress@CIpsSetDataExtension@@QAEXABVTDesC16@@@Z @ 43 NONAME ; void CIpsSetDataExtension::SetEmailAddress(class TDesC16 const &)
-	?DataHidden@CIpsSetDataExtension@@QBEHXZ @ 44 NONAME ; int CIpsSetDataExtension::DataHidden(void) const
-	?NewLC@CIpsSetDataExtension@@SAPAV1@XZ @ 45 NONAME ; class CIpsSetDataExtension * CIpsSetDataExtension::NewLC(void)
-	?SetDataHidden@CIpsSetDataExtension@@QAEXH@Z @ 46 NONAME ; void CIpsSetDataExtension::SetDataHidden(int)
-	?SetLastUpdateInfo@CIpsSetDataExtension@@QAEXABUTAOInfo@@@Z @ 47 NONAME ; void CIpsSetDataExtension::SetLastUpdateInfo(struct TAOInfo const &)
-	?SetSelectedTimeStop@CIpsSetDataExtension@@QAEXVTTime@@@Z @ 48 NONAME ; void CIpsSetDataExtension::SetSelectedTimeStop(class TTime)
-	?CopyL@CIpsSetDataExtension@@QAEXABV1@@Z @ 49 NONAME ; void CIpsSetDataExtension::CopyL(class CIpsSetDataExtension const &)
-	?SetOpenHtmlMail@CIpsSetDataExtension@@QAEXH@Z @ 50 NONAME ; void CIpsSetDataExtension::SetOpenHtmlMail(int)
-	?NewMailIndicators@CIpsSetDataExtension@@QBEHXZ @ 51 NONAME ; int CIpsSetDataExtension::NewMailIndicators(void) const
-	?SelectedWeekDays@CIpsSetDataExtension@@QBEIXZ @ 52 NONAME ; unsigned int CIpsSetDataExtension::SelectedWeekDays(void) const
-	?SetMailboxId@CIpsSetDataExtension@@QAEXJ@Z @ 53 NONAME ; void CIpsSetDataExtension::SetMailboxId(long)
-	?ConstructImapPartialFetchInfo@CIpsSetDataApi@@SAXAAVTImImap4GetPartialMailInfo@@AAVCImImap4Settings@@@Z @ 54 NONAME ; void CIpsSetDataApi::ConstructImapPartialFetchInfo(class TImImap4GetPartialMailInfo &, class CImImap4Settings &)
-	?HideMsgs@CIpsSetDataExtension@@QBEHXZ @ 55 NONAME ; int CIpsSetDataExtension::HideMsgs(void) const
-	?SetInboxRefreshTime@CIpsSetDataExtension@@QAEXH@Z @ 56 NONAME ; void CIpsSetDataExtension::SetInboxRefreshTime(int)
-	?SetAlwaysOnlineState@CIpsSetDataExtension@@QAEXW4TIpsSetDataAoStates@@H@Z @ 57 NONAME ; void CIpsSetDataExtension::SetAlwaysOnlineState(enum TIpsSetDataAoStates, int)
-	?SetAccountId@CIpsSetDataExtension@@QAEXK@Z @ 58 NONAME ; void CIpsSetDataExtension::SetAccountId(unsigned long)
-	?Version@CIpsSetDataExtension@@QBEHXZ @ 59 NONAME ; int CIpsSetDataExtension::Version(void) const
-	?GoOnlineL@CIpsSetDataApi@@QAEXVTMsvEntry@@@Z @ 60 NONAME ; void CIpsSetDataApi::GoOnlineL(class TMsvEntry)
-	?InboxRefreshTime@CIpsSetDataExtension@@QBEHXZ @ 61 NONAME ; int CIpsSetDataExtension::InboxRefreshTime(void) const
-	?LastUpdateInfo@CIpsSetDataExtension@@QBE?AUTAOInfo@@XZ @ 62 NONAME ; struct TAOInfo CIpsSetDataExtension::LastUpdateInfo(void) const
-	?EmnReceivedButNotSyncedFlag@CIpsSetDataExtension@@QBEHXZ @ 63 NONAME ; int CIpsSetDataExtension::EmnReceivedButNotSyncedFlag(void) const
-	?SetExtensionId@CIpsSetDataExtension@@QAEXK@Z @ 64 NONAME ; void CIpsSetDataExtension::SetExtensionId(unsigned long)
-	?GoOfflineL@CIpsSetDataApi@@QAEXVTMsvEntry@@@Z @ 65 NONAME ; void CIpsSetDataApi::GoOfflineL(class TMsvEntry)
-	?MailboxId@CIpsSetDataExtension@@QBEJXZ @ 66 NONAME ; long CIpsSetDataExtension::MailboxId(void) const
-	?UpdateMode@CIpsSetDataExtension@@QBE?AW4TIpsSetDataAoUpdateModes@@XZ @ 67 NONAME ; enum TIpsSetDataAoUpdateModes CIpsSetDataExtension::UpdateMode(void) const
-	?SaveExtendedSettingsL@CIpsSetDataApi@@QAEXABVCIpsSetDataExtension@@@Z @ 68 NONAME ; void CIpsSetDataApi::SaveExtendedSettingsL(class CIpsSetDataExtension const &)
-	?LastSyncStatus@CIpsSetDataExtension@@QBEHXZ @ 69 NONAME ; int CIpsSetDataExtension::LastSyncStatus(void) const
-	?LastModified@CIpsSetDataExtension@@QBE?AVTTime@@XZ @ 70 NONAME ; class TTime CIpsSetDataExtension::LastModified(void) const
-	?SetUpdateMode@CIpsSetDataExtension@@QAEXW4TIpsSetDataAoUpdateModes@@@Z @ 71 NONAME ; void CIpsSetDataExtension::SetUpdateMode(enum TIpsSetDataAoUpdateModes)
-	?EmailNotificationState@CIpsSetDataExtension@@QBE?AW4TIpsSetDataEmnStates@@XZ @ 72 NONAME ; enum TIpsSetDataEmnStates CIpsSetDataExtension::EmailNotificationState(void) const
-	?FirstEmnReceived@CIpsSetDataExtension@@QBEHXZ @ 73 NONAME ; int CIpsSetDataExtension::FirstEmnReceived(void) const
-	?SetFirstEmnReceived@CIpsSetDataExtension@@QAEXH@Z @ 74 NONAME ; void CIpsSetDataExtension::SetFirstEmnReceived(int)
+	?SetSelectedTimeStart@CIpsSetDataExtension@@QAEXVTTime@@@Z @ 30 NONAME ; void CIpsSetDataExtension::SetSelectedTimeStart(class TTime)
+	?SetFirstEmnReceived@CIpsSetDataExtension@@QAEXH@Z @ 31 NONAME ; void CIpsSetDataExtension::SetFirstEmnReceived(int)
+	?NewL@CIpsSetDataApi@@SAPAV1@AAVCMsvSession@@@Z @ 32 NONAME ; class CIpsSetDataApi * CIpsSetDataApi::NewL(class CMsvSession &)
+	?SetOutgoingLogin@CIpsSetDataExtension@@QAEXH@Z @ 33 NONAME ; void CIpsSetDataExtension::SetOutgoingLogin(int)
+	?SelectedTimeStop@CIpsSetDataExtension@@QBE?AVTTime@@XZ @ 34 NONAME ; class TTime CIpsSetDataExtension::SelectedTimeStop(void) const
+	?HideMsgs@CIpsSetDataExtension@@QBEHXZ @ 35 NONAME ; int CIpsSetDataExtension::HideMsgs(void) const
+	?SetStatusFlags@CIpsSetDataExtension@@QAEX_K@Z @ 36 NONAME ; void CIpsSetDataExtension::SetStatusFlags(unsigned long long)
+	?SelectedWeekDays@CIpsSetDataExtension@@QBEIXZ @ 37 NONAME ; unsigned int CIpsSetDataExtension::SelectedWeekDays(void) const
+	?MailboxId@CIpsSetDataExtension@@QBEJXZ @ 38 NONAME ; long CIpsSetDataExtension::MailboxId(void) const
+	?GetIMEIFromThePhoneL@CIpsSetDataApi@@QAEXAAV?$TBuf@$0DC@@@@Z @ 39 NONAME ; void CIpsSetDataApi::GetIMEIFromThePhoneL(class TBuf<50> &)
+	?OpenHtmlMail@CIpsSetDataExtension@@QBEHXZ @ 40 NONAME ; int CIpsSetDataExtension::OpenHtmlMail(void) const
+	?SetNewMailIndicators@CIpsSetDataExtension@@QAEXH@Z @ 41 NONAME ; void CIpsSetDataExtension::SetNewMailIndicators(int)
+	?SetSyncStatus@CIpsSetDataExtension@@QAEXH@Z @ 42 NONAME ; void CIpsSetDataExtension::SetSyncStatus(int)
+	?StatusFlags@CIpsSetDataExtension@@QBE_KXZ @ 43 NONAME ; unsigned long long CIpsSetDataExtension::StatusFlags(void) const
+	?Version@CIpsSetDataExtension@@QBEHXZ @ 44 NONAME ; int CIpsSetDataExtension::Version(void) const
+	?SetLastUpdateInfo@CIpsSetDataExtension@@QAEXABUTAOInfo@@@Z @ 45 NONAME ; void CIpsSetDataExtension::SetLastUpdateInfo(struct TAOInfo const &)
+	?LoadExtendedSettingsL@CIpsSetDataApi@@QAEXJAAVCIpsSetDataExtension@@@Z @ 46 NONAME ; void CIpsSetDataApi::LoadExtendedSettingsL(long, class CIpsSetDataExtension &)
+	?DataHidden@CIpsSetDataExtension@@QBEHXZ @ 47 NONAME ; int CIpsSetDataExtension::DataHidden(void) const
+	?SetExtensionId@CIpsSetDataExtension@@QAEXK@Z @ 48 NONAME ; void CIpsSetDataExtension::SetExtensionId(unsigned long)
+	?SetOpenHtmlMail@CIpsSetDataExtension@@QAEXH@Z @ 49 NONAME ; void CIpsSetDataExtension::SetOpenHtmlMail(int)
+	?HandleMailboxCreation@CIpsSetDataApi@@QAEHVTUid@@AAVCMsvSession@@@Z @ 50 NONAME ; int CIpsSetDataApi::HandleMailboxCreation(class TUid, class CMsvSession &)
+	?SetAccountId@CIpsSetDataExtension@@QAEXK@Z @ 51 NONAME ; void CIpsSetDataExtension::SetAccountId(unsigned long)
+	?LastUpdateInfo@CIpsSetDataExtension@@QBE?AUTAOInfo@@XZ @ 52 NONAME ; struct TAOInfo CIpsSetDataExtension::LastUpdateInfo(void) const
+	?SetLastModified@CIpsSetDataExtension@@QAEXVTTime@@@Z @ 53 NONAME ; void CIpsSetDataExtension::SetLastModified(class TTime)
+	?OutgoingLogin@CIpsSetDataExtension@@QBEHXZ @ 54 NONAME ; int CIpsSetDataExtension::OutgoingLogin(void) const
+	?GoOfflineL@CIpsSetDataApi@@QAEXVTMsvEntry@@@Z @ 55 NONAME ; void CIpsSetDataApi::GoOfflineL(class TMsvEntry)
+	?CreateCenRepKeyL@CIpsSetDataApi@@QAEKKABVTUid@@K@Z @ 56 NONAME ; unsigned long CIpsSetDataApi::CreateCenRepKeyL(unsigned long, class TUid const &, unsigned long)
+	?NewMailIndicators@CIpsSetDataExtension@@QBEHXZ @ 57 NONAME ; int CIpsSetDataExtension::NewMailIndicators(void) const
+	?CopyL@CIpsSetDataExtension@@QAEXABV1@@Z @ 58 NONAME ; void CIpsSetDataExtension::CopyL(class CIpsSetDataExtension const &)
+	?SetNewPasswordL@CIpsSetDataApi@@QAEXAAVCMsvEntry@@ABVTDesC16@@@Z @ 59 NONAME ; void CIpsSetDataApi::SetNewPasswordL(class CMsvEntry &, class TDesC16 const &)
+	?EmnReceivedButNotSyncedFlag@CIpsSetDataExtension@@QBEHXZ @ 60 NONAME ; int CIpsSetDataExtension::EmnReceivedButNotSyncedFlag(void) const
+	?SetEmnReceivedButNotSyncedFlag@CIpsSetDataExtension@@QAEXH@Z @ 61 NONAME ; void CIpsSetDataExtension::SetEmnReceivedButNotSyncedFlag(int)
+	?ExtensionId@CIpsSetDataExtension@@QBEKXZ @ 62 NONAME ; unsigned long CIpsSetDataExtension::ExtensionId(void) const
+	?SetMailboxNameL@CIpsSetDataApi@@QAEXAAVTMsvEntry@@ABVTDesC16@@@Z @ 63 NONAME ; void CIpsSetDataApi::SetMailboxNameL(class TMsvEntry &, class TDesC16 const &)
+	?GetMailboxAddressL@CIpsSetDataApi@@QAEXABVTMsvEntry@@AAPAVHBufC16@@@Z @ 64 NONAME ; void CIpsSetDataApi::GetMailboxAddressL(class TMsvEntry const &, class HBufC16 * &)
+	?SaveSyncStatusL@CIpsSetDataApi@@QAEXVTMsvEntry@@H@Z @ 65 NONAME ; void CIpsSetDataApi::SaveSyncStatusL(class TMsvEntry, int)
+	?SelectedTimeStart@CIpsSetDataExtension@@QBE?AVTTime@@XZ @ 66 NONAME ; class TTime CIpsSetDataExtension::SelectedTimeStart(void) const
+	?GetSubscribedImapFoldersL@CIpsSetDataApi@@QAEXJAAV?$RArray@J@@@Z @ 67 NONAME ; void CIpsSetDataApi::GetSubscribedImapFoldersL(long, class RArray<long> &)
+	?SetMailboxId@CIpsSetDataExtension@@QAEXJ@Z @ 68 NONAME ; void CIpsSetDataExtension::SetMailboxId(long)
+	?SetSelectedWeekDays@CIpsSetDataExtension@@QAEXI@Z @ 69 NONAME ; void CIpsSetDataExtension::SetSelectedWeekDays(unsigned int)
+	?UpdateMode@CIpsSetDataExtension@@QBE?AW4TIpsSetDataAoUpdateModes@@XZ @ 70 NONAME ; enum TIpsSetDataAoUpdateModes CIpsSetDataExtension::UpdateMode(void) const
+	?NewLC@CIpsSetDataExtension@@SAPAV1@XZ @ 71 NONAME ; class CIpsSetDataExtension * CIpsSetDataExtension::NewLC(void)
+	?Protocol@CIpsSetDataExtension@@QBE?AVTUid@@XZ @ 72 NONAME ; class TUid CIpsSetDataExtension::Protocol(void) const
 
--- a/ipsservices/ipssossettings/data/ipssetuimailsettings.ra	Tue Jan 26 11:45:42 2010 +0200
+++ b/ipsservices/ipssossettings/data/ipssetuimailsettings.ra	Tue Feb 02 00:02:40 2010 +0200
@@ -46,18 +46,19 @@
     {
     items=
         {
-        // Open
-        MENU_ITEM
-            {
-            command = EAknSoftkeyOpen;
-            txt = qtn_options_open;
-            },
-        // Change
-        MENU_ITEM
-            {
-            command = EAknSoftkeySelect;
-            txt = qtn_options_change;
-            },
+// Single click changes        		
+// Open
+//        MENU_ITEM
+//            {
+//            command = EAknSoftkeyOpen;
+//            txt = qtn_options_open;
+//            },
+//        // Change
+//        MENU_ITEM
+//            {
+//            command = EAknSoftkeySelect;
+//            txt = qtn_options_change;
+//            },
         MENU_ITEM
             {
             command = EAknCmdHelp;
@@ -227,6 +228,8 @@
             itemid = EIpsSetUiMailboxIncludeSignature;
             itemtype = EIpsSetUiRadioButtonArray;
             itemarray = r_ips_set_array_signature_radio;
+            // Single click changes        		
+            itemflags = KIpsSetUiFlagEnterPressed;
             },
         // Signature line
         IPS_SET_ITEM
@@ -466,7 +469,8 @@
             itemid = EIpsSetUiWhatRetrieveImap4Menu;
             itemlabel = qtn_fse_settings_mail_downl_ctrl_retrieve_limit;
             itemarray = r_ips_set_what_to_sync_array_email_retrieve_imap4;
-            itemflags = KIpsSetUiFlagImap4Only;
+            // Single click changes        		
+            itemflags = KIpsSetUiFlagEnterPressed | KIpsSetUiFlagImap4Only;
             },
         // Imap4 folder path
         IPS_SET_ITEM
@@ -522,14 +526,6 @@
             itemid = EIpsSetUiWhenSchedule;
             itemlabel = qtn_fse_settings_mail_interval;
             itemarray = r_ips_set_when_to_sync_array_sync_schedule;
-            },
-        // Retrieve while roaming
-        IPS_SET_ITEM
-            {
-            itemtype = EIpsSetUiRadioButtonArray;
-            itemid = EIpsSetUiWhenRoaming;
-            itemlabel = qtn_fse_settings_mail_retrieve_roaming;
-            itemarray = r_ips_set_when_to_sync_array_roaming;
             }
         };
     }
@@ -1069,33 +1065,6 @@
 
 // ---------------------------------------------------------------------------
 //
-//   r_ips_set_when_to_sync_array_roaming
-//
-// ---------------------------------------------------------------------------
-//
-RESOURCE IPS_SET_ARRAY r_ips_set_when_to_sync_array_roaming
-    {
-    items =
-        {
-        //
-        IPS_SET_ITEM
-            {
-            itemtype = EIpsSetUiItemRadioButton;
-            itemid = EIpsSetUiWhenRoamingBtnOn;
-            itemlabel = qtn_fse_settings_mail_alwaysconnected;
-            },
-        //
-        IPS_SET_ITEM
-            {
-            itemtype = EIpsSetUiItemRadioButton;
-            itemid = EIpsSetUiWhenRoamingBtnOff;
-            itemlabel = qtn_fse_settings_mail_onlyinhome;
-            }
-        };
-    }
-
-// ---------------------------------------------------------------------------
-//
 //   r_ips_set_when_to_sync_array_sync_hours
 //
 // ---------------------------------------------------------------------------
--- a/ipsservices/ipssossettings/eabi/IPSSOSSETTINGSU.DEF	Tue Jan 26 11:45:42 2010 +0200
+++ b/ipsservices/ipssossettings/eabi/IPSSOSSETTINGSU.DEF	Tue Feb 02 00:02:40 2010 +0200
@@ -32,31 +32,31 @@
 	_ZN20CIpsSetDataExtension15SetLastModifiedE5TTime @ 31 NONAME
 	_ZN20CIpsSetDataExtension15SetOpenHtmlMailEi @ 32 NONAME
 	_ZN20CIpsSetDataExtension16PopulateDefaultsEv @ 33 NONAME
-	_ZN20CIpsSetDataExtension16RoamHomeOnlyFlagEv @ 34 NONAME
-	_ZN20CIpsSetDataExtension16SetOutgoingLoginEi @ 35 NONAME
-	_ZN20CIpsSetDataExtension17SetLastUpdateInfoERK7TAOInfo @ 36 NONAME
+	_ZN20CIpsSetDataExtension16SetOutgoingLoginEi @ 34 NONAME
+	_ZN20CIpsSetDataExtension17SetLastUpdateInfoERK7TAOInfo @ 35 NONAME
+	_ZN20CIpsSetDataExtension19SetFirstEmnReceivedEi @ 36 NONAME
 	_ZN20CIpsSetDataExtension19SetInboxRefreshTimeEi @ 37 NONAME
-	_ZN20CIpsSetDataExtension19SetRoamHomeOnlyFlagEi @ 38 NONAME
-	_ZN20CIpsSetDataExtension19SetSelectedTimeStopE5TTime @ 39 NONAME
-	_ZN20CIpsSetDataExtension19SetSelectedWeekDaysEj @ 40 NONAME
-	_ZN20CIpsSetDataExtension20SetAlwaysOnlineStateE19TIpsSetDataAoStatesi @ 41 NONAME
-	_ZN20CIpsSetDataExtension20SetNewMailIndicatorsEi @ 42 NONAME
-	_ZN20CIpsSetDataExtension20SetSelectedTimeStartE5TTime @ 43 NONAME
-	_ZN20CIpsSetDataExtension25SetEmailNotificationStateE20TIpsSetDataEmnStates @ 44 NONAME
-	_ZN20CIpsSetDataExtension30SetEmnReceivedButNotSyncedFlagEi @ 45 NONAME
-	_ZN20CIpsSetDataExtension4NewLEv @ 46 NONAME
-	_ZN20CIpsSetDataExtension5NewLCEv @ 47 NONAME
-	_ZNK20CIpsSetDataExtension10DataHiddenEv @ 48 NONAME
-	_ZNK20CIpsSetDataExtension10UpdateModeEv @ 49 NONAME
-	_ZNK20CIpsSetDataExtension11ExtensionIdEv @ 50 NONAME
-	_ZNK20CIpsSetDataExtension11StatusFlagsEv @ 51 NONAME
-	_ZNK20CIpsSetDataExtension12EmailAddressEv @ 52 NONAME
-	_ZNK20CIpsSetDataExtension12LastModifiedEv @ 53 NONAME
-	_ZNK20CIpsSetDataExtension12OpenHtmlMailEv @ 54 NONAME
-	_ZNK20CIpsSetDataExtension13OutgoingLoginEv @ 55 NONAME
-	_ZNK20CIpsSetDataExtension14LastSyncStatusEv @ 56 NONAME
-	_ZNK20CIpsSetDataExtension14LastUpdateInfoEv @ 57 NONAME
-	_ZNK20CIpsSetDataExtension15IsSettingsValidEv @ 58 NONAME
+	_ZN20CIpsSetDataExtension19SetSelectedTimeStopE5TTime @ 38 NONAME
+	_ZN20CIpsSetDataExtension19SetSelectedWeekDaysEj @ 39 NONAME
+	_ZN20CIpsSetDataExtension20SetAlwaysOnlineStateE19TIpsSetDataAoStatesi @ 40 NONAME
+	_ZN20CIpsSetDataExtension20SetNewMailIndicatorsEi @ 41 NONAME
+	_ZN20CIpsSetDataExtension20SetSelectedTimeStartE5TTime @ 42 NONAME
+	_ZN20CIpsSetDataExtension25SetEmailNotificationStateE20TIpsSetDataEmnStates @ 43 NONAME
+	_ZN20CIpsSetDataExtension30SetEmnReceivedButNotSyncedFlagEi @ 44 NONAME
+	_ZN20CIpsSetDataExtension4NewLEv @ 45 NONAME
+	_ZN20CIpsSetDataExtension5NewLCEv @ 46 NONAME
+	_ZNK20CIpsSetDataExtension10DataHiddenEv @ 47 NONAME
+	_ZNK20CIpsSetDataExtension10UpdateModeEv @ 48 NONAME
+	_ZNK20CIpsSetDataExtension11ExtensionIdEv @ 49 NONAME
+	_ZNK20CIpsSetDataExtension11StatusFlagsEv @ 50 NONAME
+	_ZNK20CIpsSetDataExtension12EmailAddressEv @ 51 NONAME
+	_ZNK20CIpsSetDataExtension12LastModifiedEv @ 52 NONAME
+	_ZNK20CIpsSetDataExtension12OpenHtmlMailEv @ 53 NONAME
+	_ZNK20CIpsSetDataExtension13OutgoingLoginEv @ 54 NONAME
+	_ZNK20CIpsSetDataExtension14LastSyncStatusEv @ 55 NONAME
+	_ZNK20CIpsSetDataExtension14LastUpdateInfoEv @ 56 NONAME
+	_ZNK20CIpsSetDataExtension15IsSettingsValidEv @ 57 NONAME
+	_ZNK20CIpsSetDataExtension16FirstEmnReceivedEv @ 58 NONAME
 	_ZNK20CIpsSetDataExtension16InboxRefreshTimeEv @ 59 NONAME
 	_ZNK20CIpsSetDataExtension16SelectedTimeStopEv @ 60 NONAME
 	_ZNK20CIpsSetDataExtension16SelectedWeekDaysEv @ 61 NONAME
@@ -70,58 +70,56 @@
 	_ZNK20CIpsSetDataExtension8ProtocolEv @ 69 NONAME
 	_ZNK20CIpsSetDataExtension9AccountIdEv @ 70 NONAME
 	_ZNK20CIpsSetDataExtension9MailboxIdEv @ 71 NONAME
-	_ZTI11CIpsSetData @ 72 NONAME ; #<TI>#
-	_ZTI11CIpsSetView @ 73 NONAME ; #<TI>#
-	_ZTI13CIpsSetUiItem @ 74 NONAME ; #<TI>#
-	_ZTI14CIpsSetDataApi @ 75 NONAME ; #<TI>#
-	_ZTI14CIpsSetUiNotes @ 76 NONAME ; #<TI>#
-	_ZTI15CIpsSetUiFinder @ 77 NONAME ; #<TI>#
-	_ZTI17CIpsSetDataStorer @ 78 NONAME ; #<TI>#
-	_ZTI17CIpsSetUiApprover @ 79 NONAME ; #<TI>#
-	_ZTI17CIpsSetUiItemLink @ 80 NONAME ; #<TI>#
-	_ZTI18CIpsSetDataManager @ 81 NONAME ; #<TI>#
-	_ZTI18CIpsSetUiBaseArray @ 82 NONAME ; #<TI>#
-	_ZTI18CIpsSetUiItemValue @ 83 NONAME ; #<TI>#
-	_ZTI19CIpsSetUiBaseDialog @ 84 NONAME ; #<TI>#
-	_ZTI19CIpsSetUiDialogCtrl @ 85 NONAME ; #<TI>#
-	_ZTI20CIpsSetDataExtension @ 86 NONAME ; #<TI>#
-	_ZTI20CIpsSetDataSignature @ 87 NONAME ; #<TI>#
-	_ZTI20CIpsSetUiItemLinkExt @ 88 NONAME ; #<TI>#
-	_ZTI20CIpsSetWizardAdapter @ 89 NONAME ; #<TI>#
-	_ZTI21CIpsSetDataCtrlCenrep @ 90 NONAME ; #<TI>#
-	_ZTI22CIpsSetUiItemsEditText @ 91 NONAME ; #<TI>#
-	_ZTI24CIpsSetUiFolderListArray @ 92 NONAME ; #<TI>#
-	_ZTI24CIpsSetUiItemAccessPoint @ 93 NONAME ; #<TI>#
-	_ZTI25CIpsSetUtilsOperationWait @ 94 NONAME ; #<TI>#
-	_ZTI27CIpsSetUiSubscriptionDialog @ 95 NONAME ; #<TI>#
-	_ZTI9CIpsSetUi @ 96 NONAME ; #<TI>#
-	_ZTV11CIpsSetData @ 97 NONAME ; #<VT>#
-	_ZTV11CIpsSetView @ 98 NONAME ; #<VT>#
-	_ZTV13CIpsSetUiItem @ 99 NONAME ; #<VT>#
-	_ZTV14CIpsSetDataApi @ 100 NONAME ; #<VT>#
-	_ZTV14CIpsSetUiNotes @ 101 NONAME ; #<VT>#
-	_ZTV15CIpsSetUiFinder @ 102 NONAME ; #<VT>#
-	_ZTV17CIpsSetDataStorer @ 103 NONAME ; #<VT>#
-	_ZTV17CIpsSetUiApprover @ 104 NONAME ; #<VT>#
-	_ZTV17CIpsSetUiItemLink @ 105 NONAME ; #<VT>#
-	_ZTV18CIpsSetDataManager @ 106 NONAME ; #<VT>#
-	_ZTV18CIpsSetUiBaseArray @ 107 NONAME ; #<VT>#
-	_ZTV18CIpsSetUiItemValue @ 108 NONAME ; #<VT>#
-	_ZTV19CIpsSetUiBaseDialog @ 109 NONAME ; #<VT>#
-	_ZTV19CIpsSetUiDialogCtrl @ 110 NONAME ; #<VT>#
-	_ZTV20CIpsSetDataExtension @ 111 NONAME ; #<VT>#
-	_ZTV20CIpsSetDataSignature @ 112 NONAME ; #<VT>#
-	_ZTV20CIpsSetUiItemLinkExt @ 113 NONAME ; #<VT>#
-	_ZTV20CIpsSetWizardAdapter @ 114 NONAME ; #<VT>#
-	_ZTV21CIpsSetDataCtrlCenrep @ 115 NONAME ; #<VT>#
-	_ZTV22CIpsSetUiItemsEditText @ 116 NONAME ; #<VT>#
-	_ZTV24CIpsSetUiFolderListArray @ 117 NONAME ; #<VT>#
-	_ZTV24CIpsSetUiItemAccessPoint @ 118 NONAME ; #<VT>#
-	_ZTV25CIpsSetUtilsOperationWait @ 119 NONAME ; #<VT>#
-	_ZTV27CIpsSetUiSubscriptionDialog @ 120 NONAME ; #<VT>#
-	_ZTV9CIpsSetUi @ 121 NONAME ; #<VT>#
-	_ZTI31CSubscriptionDialogActiveHelper @ 122 NONAME ; #<TI>#
-	_ZTV31CSubscriptionDialogActiveHelper @ 123 NONAME ; #<VT>#
-	_ZN20CIpsSetDataExtension19SetFirstEmnReceivedEi @ 124 NONAME
-	_ZNK20CIpsSetDataExtension16FirstEmnReceivedEv @ 125 NONAME
+	_ZTI11CIpsSetData @ 72 NONAME
+	_ZTI11CIpsSetView @ 73 NONAME
+	_ZTI13CIpsSetUiItem @ 74 NONAME
+	_ZTI14CIpsSetDataApi @ 75 NONAME
+	_ZTI14CIpsSetUiNotes @ 76 NONAME
+	_ZTI15CIpsSetUiFinder @ 77 NONAME
+	_ZTI17CIpsSetDataStorer @ 78 NONAME
+	_ZTI17CIpsSetUiApprover @ 79 NONAME
+	_ZTI17CIpsSetUiItemLink @ 80 NONAME
+	_ZTI18CIpsSetDataManager @ 81 NONAME
+	_ZTI18CIpsSetUiBaseArray @ 82 NONAME
+	_ZTI18CIpsSetUiItemValue @ 83 NONAME
+	_ZTI19CIpsSetUiBaseDialog @ 84 NONAME
+	_ZTI19CIpsSetUiDialogCtrl @ 85 NONAME
+	_ZTI20CIpsSetDataExtension @ 86 NONAME
+	_ZTI20CIpsSetDataSignature @ 87 NONAME
+	_ZTI20CIpsSetUiItemLinkExt @ 88 NONAME
+	_ZTI20CIpsSetWizardAdapter @ 89 NONAME
+	_ZTI21CIpsSetDataCtrlCenrep @ 90 NONAME
+	_ZTI22CIpsSetUiItemsEditText @ 91 NONAME
+	_ZTI24CIpsSetUiFolderListArray @ 92 NONAME
+	_ZTI24CIpsSetUiItemAccessPoint @ 93 NONAME
+	_ZTI25CIpsSetUtilsOperationWait @ 94 NONAME
+	_ZTI27CIpsSetUiSubscriptionDialog @ 95 NONAME
+	_ZTI31CSubscriptionDialogActiveHelper @ 96 NONAME
+	_ZTI9CIpsSetUi @ 97 NONAME
+	_ZTV11CIpsSetData @ 98 NONAME
+	_ZTV11CIpsSetView @ 99 NONAME
+	_ZTV13CIpsSetUiItem @ 100 NONAME
+	_ZTV14CIpsSetDataApi @ 101 NONAME
+	_ZTV14CIpsSetUiNotes @ 102 NONAME
+	_ZTV15CIpsSetUiFinder @ 103 NONAME
+	_ZTV17CIpsSetDataStorer @ 104 NONAME
+	_ZTV17CIpsSetUiApprover @ 105 NONAME
+	_ZTV17CIpsSetUiItemLink @ 106 NONAME
+	_ZTV18CIpsSetDataManager @ 107 NONAME
+	_ZTV18CIpsSetUiBaseArray @ 108 NONAME
+	_ZTV18CIpsSetUiItemValue @ 109 NONAME
+	_ZTV19CIpsSetUiBaseDialog @ 110 NONAME
+	_ZTV19CIpsSetUiDialogCtrl @ 111 NONAME
+	_ZTV20CIpsSetDataExtension @ 112 NONAME
+	_ZTV20CIpsSetDataSignature @ 113 NONAME
+	_ZTV20CIpsSetUiItemLinkExt @ 114 NONAME
+	_ZTV20CIpsSetWizardAdapter @ 115 NONAME
+	_ZTV21CIpsSetDataCtrlCenrep @ 116 NONAME
+	_ZTV22CIpsSetUiItemsEditText @ 117 NONAME
+	_ZTV24CIpsSetUiFolderListArray @ 118 NONAME
+	_ZTV24CIpsSetUiItemAccessPoint @ 119 NONAME
+	_ZTV25CIpsSetUtilsOperationWait @ 120 NONAME
+	_ZTV27CIpsSetUiSubscriptionDialog @ 121 NONAME
+	_ZTV31CSubscriptionDialogActiveHelper @ 122 NONAME
+	_ZTV9CIpsSetUi @ 123 NONAME
 
--- a/ipsservices/ipssossettings/group/ipssossettings.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/ipsservices/ipssossettings/group/ipssossettings.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -20,6 +20,7 @@
 #include <platform_paths.hrh>
 
 #include "../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../inc/emailtraceconfig.hrh"
 
 // Details
 TARGET          IPSSOSSETTINGS.DLL
@@ -33,9 +34,9 @@
 KEmailBinaryDemandPaging
 
 // Resource definition
-SOURCEPATH		../data
-START RESOURCE	2000E53C.rss
-TARGET			IpsSosSettings.rsc
+SOURCEPATH      ../data
+START RESOURCE  2000E53C.rss
+TARGET          IpsSosSettings.rsc
 END
 
 START RESOURCE  ipssossettings.rss
@@ -130,7 +131,10 @@
 LIBRARY     ipssosplugin.lib
 LIBRARY     CdlEngine.lib
 LIBRARY     cmaillogger.lib
-DEBUGLIBRARY     flogger.lib
+
+#ifdef TRACE_INTO_FILE
+LIBRARY     flogger.lib
+#endif // TRACE_INTO_FILE
 
 START               wins
     BASEADDRESS     0x4A980000
--- a/ipsservices/ipssossettings/inc/ipssetdata.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/ipsservices/ipssossettings/inc/ipssetdata.h	Tue Feb 02 00:02:40 2010 +0200
@@ -329,11 +329,6 @@
     TTime Hours( const TBool aStartTime ) const;
 
     /**
-     * @return Roaming setting
-     */
-    TBool Roaming() const;
-
-    /**
      * @param aProtocol Protocol MTM ID for settings
      */
     void SetProtocol( const TUid& aProtocol );
--- a/ipsservices/ipssossettings/inc/ipssetdataextension.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/ipsservices/ipssossettings/inc/ipssetdataextension.h	Tue Feb 02 00:02:40 2010 +0200
@@ -315,17 +315,6 @@
     /**
     *
     */
-    IMPORT_C void SetRoamHomeOnlyFlag( TBool aTrue );
-        
-    /**
-    *
-    */
-    IMPORT_C TBool RoamHomeOnlyFlag();
-        
-
-    /**
-    *
-    */
     IMPORT_C void SetLastModified( TTime aTime );
 
     /**
@@ -468,7 +457,6 @@
      */
     TIpsSetDataEmnStates iEmnState;
             
-    TBool               iRoamHomeOnly;
     TBool               iHideMessages;
     TBool               iNewMailIndicators;
     
--- a/ipsservices/ipssossettings/inc/ipssetutilsconsts.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/ipsservices/ipssossettings/inc/ipssetutilsconsts.h	Tue Feb 02 00:02:40 2010 +0200
@@ -122,7 +122,6 @@
 const TInt KIpsSetExtDefaultNewMailIndicators = ETrue;
 const TInt KIpsSetExtDefaultOpenHtmlMail = EFalse;
 const TInt KIpsSetExtDefaultOutgoingLogin = CIpsSetData::EOwnOutgoing;
-const TInt KIpsSetExtDefaultRoamHomeOnlyFlag = ETrue;
 const TInt64 KIpsSetExtDefaultSelectedTimeStart = 0;
 const TInt64 KIpsSetExtDefaultSelectedTimeStop = 0;
 const TUint KIpsSetExtDefaultSelectedWeekDays = KIpsSetDataEveryDayMask;
--- a/ipsservices/ipssossettings/inc/ipssetutilspageids.hrh	Tue Jan 26 11:45:42 2010 +0200
+++ b/ipsservices/ipssossettings/inc/ipssetutilspageids.hrh	Tue Feb 02 00:02:40 2010 +0200
@@ -73,8 +73,6 @@
     EIpsSetUiWhenDays,
     EIpsSetUiWhenHours,
     EIpsSetUiWhenHoursCustom,
-    EIpsSetUiWhenRoaming,
-
 
 // BUTTON IDS
 
@@ -150,11 +148,8 @@
     EIpsSetUiWhenHoursBtnCustomize,
     EIpsSetUiWhenHoursEditCustomizeFrom,  //3650
     EIpsSetUiWhenHoursEditCustomizeTo,
-    EIpsSetUiWhenHoursBtnAllDay,
+    EIpsSetUiWhenHoursBtnAllDay
 
-    // Sync when roaming
-    EIpsSetUiWhenRoamingBtnOff,
-    EIpsSetUiWhenRoamingBtnOn
     };
 
 #endif // IPSSETUTILSPAGEIDS_HRH
--- a/ipsservices/ipssossettings/src/ipssetdata.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/ipsservices/ipssossettings/src/ipssetdata.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -745,17 +745,6 @@
     }
 
 // ---------------------------------------------------------------------------
-// CIpsSetData::Roaming()
-// ---------------------------------------------------------------------------
-//
-TBool CIpsSetData::Roaming() const
-    {
-    FUNC_LOG;
-    return ( iExtendedSettings->AlwaysOnlineState() == EMailAoHomeOnly ||
-        iExtendedSettings->EmailNotificationState() == EMailEmnHomeOnly );
-    }
-
-// ---------------------------------------------------------------------------
 // CIpsSetData::SetProtocol()
 // ---------------------------------------------------------------------------
 //
@@ -1147,11 +1136,8 @@
     // Always Online in use        
     if ( aSchedule >= E5Mins && aSchedule <= E1Day )
         {
-        iExtendedSettings->SetAlwaysOnlineState( 
-            aRoaming ? EMailAoHomeOnly : EMailAoAlways );
+        iExtendedSettings->SetAlwaysOnlineState( EMailAoAlways );
         iExtendedSettings->SetInboxRefreshTime( time );
-        iExtendedSettings->SetRoamHomeOnlyFlag( aRoaming );
-        // set emn off when ao is in use
         iExtendedSettings->SetEmailNotificationState( EMailEmnOff );
         }
     // Set EMN        
@@ -1159,8 +1145,7 @@
         {
         // set always online state off when emn is on
         iExtendedSettings->SetAlwaysOnlineState( EMailAoOff );
-        iExtendedSettings->SetEmailNotificationState( 
-            aRoaming ? EMailEmnHomeOnly : EMailEmnAutomatic );
+        iExtendedSettings->SetEmailNotificationState( EMailEmnAutomatic );
         iExtendedSettings->SetInboxRefreshTime( KErrNotFound );
         }
     // Manual connection mode        
--- a/ipsservices/ipssossettings/src/ipssetdataextension.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/ipsservices/ipssossettings/src/ipssetdataextension.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -47,7 +47,6 @@
     iUpdateMode( EMailAoHeadersOnly ),
     iEmailAddress( NULL ),
     iEmnState( EMailEmnOff ),
-    iRoamHomeOnly( EFalse ),
     iHideMessages( EFalse ), 
     iNewMailIndicators( ETrue ),
     //<cmail>
@@ -121,7 +120,6 @@
     iAccountId = aExtension.iAccountId;
     iExtensionId = aExtension.iExtensionId;
     iProtocol = aExtension.iProtocol;
-    iRoamHomeOnly = aExtension.iRoamHomeOnly;
     iHideMessages = aExtension.iHideMessages;
     iNewMailIndicators = aExtension.iNewMailIndicators;
     iOpenHtmlMail = aExtension.iOpenHtmlMail;
@@ -470,16 +468,6 @@
         //a call from plugin's GoOnline will not change this flag.
         return;
         }
-        
-    if ( iAlwaysOnlineState == EMailAoHomeOnly )
-        {
-        SetRoamHomeOnlyFlag( ETrue );
-        }
-    else if ( iAlwaysOnlineState == EMailAoAlways )
-        {
-        SetRoamHomeOnlyFlag( EFalse );
-        }
-        
     //EMailAoOff will not cause any flag changes.
     }
 
@@ -642,21 +630,6 @@
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-EXPORT_C void CIpsSetDataExtension::SetRoamHomeOnlyFlag( TBool aTrue )
-    {
-    FUNC_LOG;
-    iRoamHomeOnly = aTrue;
-    }
-
-// ---------------------------------------------------------------------------
-// ---------------------------------------------------------------------------
-EXPORT_C TBool CIpsSetDataExtension::RoamHomeOnlyFlag()
-    {
-    FUNC_LOG;
-    return iRoamHomeOnly;
-    }
-// ---------------------------------------------------------------------------
-// ---------------------------------------------------------------------------
 EXPORT_C void CIpsSetDataExtension::SetLastModified( TTime aTime )
     {
     FUNC_LOG;
@@ -704,7 +677,6 @@
     iEmailAddress = KNullDesC16;
     iEmnState = static_cast<TIpsSetDataEmnStates>(
             KIpsSetExtDefaultEmailNotificationState);
-    iRoamHomeOnly = KIpsSetExtDefaultRoamHomeOnlyFlag;
     iHideMessages = KIpsSetExtDefaultHideMsgs;
     iNewMailIndicators = KIpsSetExtDefaultNewMailIndicators;
     iLastUpdateInfo.iLastUpdateFailed = 
--- a/ipsservices/ipssossettings/src/ipssetuidialog.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/ipsservices/ipssossettings/src/ipssetuidialog.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -327,10 +327,6 @@
             InitAnyItem( aBaseItem, iData->Schedule(), KNullDesC );
             break;
 
-        case EIpsSetUiWhenRoaming:
-            InitRoaming( aBaseItem, iData->Roaming() );
-            break;
-
         // these have leaving init functions
         case EIpsSetUiMailboxSignature:
         case EIpsSetUiOutgoingIap:
@@ -689,10 +685,8 @@
         GetItem( TUid::Uid( EIpsSetUiWhatDownloadSize ) )->Value(),
         GetItem( TUid::Uid( EIpsSetUiWhatDownloadSizeEditPlus ) )->Value() );
     StoreRetrievalLimit();
-
     iData->SetSchedule(
-        GetItem( TUid::Uid( EIpsSetUiWhenSchedule ) )->Value(),
-        GetItem( TUid::Uid( EIpsSetUiWhenRoaming ) )->Value() );
+        GetItem( TUid::Uid( EIpsSetUiWhenSchedule ) )->Value(), EFalse );
     iData->SetDays(
         GetItem( TUid::Uid( EIpsSetUiWhenDays ) )->Value() );
     iData->SetHours(
@@ -991,10 +985,6 @@
             HandleEventDaysL( aBaseItem );
             break;
 
-        case EIpsSetUiWhenSchedule:
-            HandleEventSchedule( aBaseItem );
-            break;
-
         case EIpsSetUiWhatDownloadSize:
             HandleDownloadSizeL( aBaseItem );
             break;
@@ -1100,17 +1090,6 @@
     }
 
 // ---------------------------------------------------------------------------
-// CIpsSetUiDialogCtrl::HandleEventSchedule()
-// ---------------------------------------------------------------------------
-//
-void CIpsSetUiDialogCtrl::HandleEventSchedule( CIpsSetUiItem& aBaseItem )
-    {
-    FUNC_LOG;
-    SetHideItem( aBaseItem.Value() == CIpsSetData::EManual,
-        TUid::Uid( EIpsSetUiWhenRoaming ), ETrue );
-    }
-
-// ---------------------------------------------------------------------------
 // CIpsSetUiDialogCtrl::HandleEventDaysL()
 // ---------------------------------------------------------------------------
 //
--- a/meetingrequest/mragnversit2/group/esmragnversit2.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/meetingrequest/mragnversit2/group/esmragnversit2.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -20,6 +20,7 @@
 #include <data_caging_paths.hrh>
 
 #include "../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../inc/emailtraceconfig.hrh"
 #include "../../inc/esmrinternaluid.h"
 
 TARGET          esmragnversit2.dll
@@ -78,4 +79,8 @@
 LIBRARY esmrcommon.lib
 LIBRARY cmaillogger.lib
 
+#ifdef TRACE_INTO_FILE
+LIBRARY flogger.lib
+#endif // TRACE_INTO_FILE
+
 // End of file
--- a/meetingrequest/mrcasplugin/group/esmrcasplugin.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/meetingrequest/mrcasplugin/group/esmrcasplugin.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -19,6 +19,7 @@
 #include "../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
 #include "../../inc/esmrinternaluid.h"
 #include "../../../inc/fsccontactactionserviceuids.hrh" // <cmail>
+#include "../../../inc/emailtraceconfig.hrh"
 #include <data_caging_paths.hrh>
 #include <platform_paths.hrh>
 
@@ -41,14 +42,12 @@
 SOURCE                  cesmrcasplugincontactretriever.cpp
 
 USERINCLUDE             ../group
-USERINCLUDE	            ../inc
+USERINCLUDE             ../inc
 USERINCLUDE             ../../inc
 USERINCLUDE             ../../../inc
 
 APP_LAYER_SYSTEMINCLUDE
 
-SYSTEMINCLUDE 			/epoc32/include/ecom
-
 LIBRARY                 avkon.lib
 LIBRARY                 aknicon.lib
 LIBRARY                 efsrv.lib
@@ -66,6 +65,10 @@
 LIBRARY                 eikcore.lib
 LIBRARY                 cmaillogger.lib
 
+#ifdef TRACE_INTO_FILE
+LIBRARY                 flogger.lib
+#endif // TRACE_INTO_FILE
+
 SOURCEPATH              ../data
 START RESOURCE          2001F3FF.rss
 TARGET                  esmrcasplugin.rsc
--- a/meetingrequest/mrcasplugin/src/cesmrcaspluginimpl.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/meetingrequest/mrcasplugin/src/cesmrcaspluginimpl.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -12,7 +12,7 @@
 * Contributors:
 *
  *  Description : Implementation of the class CESMRCasPluginImpl.
- *  Version     : %version: tr1sido#9 % << Don't touch! Updated by Synergy at check-out.
+ *  Version     : %version: 10 % << Don't touch! Updated by Synergy at check-out.
  *
  */
 
@@ -35,7 +35,7 @@
 #include <CalenInterimUtils2.h>
 #include <badesca.h>
 
-#include <implementationproxy.h>
+#include <ecom/implementationproxy.h>
 #include <StringLoader.h>
 #include <AknIconUtils.h>
 #include <bautils.h>
--- a/meetingrequest/mrcommon/group/esmrcommon.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/meetingrequest/mrcommon/group/esmrcommon.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -17,6 +17,7 @@
 
 
 #include "../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../inc/emailtraceconfig.hrh"
 #include "../../inc/esmrinternaluid.h"
 #include <data_caging_paths.hrh>
 #include <platform_paths.hrh>
@@ -54,5 +55,9 @@
 LIBRARY                 PlatformEnv.lib
 LIBRARY cmaillogger.lib
 
+#ifdef TRACE_INTO_FILE
+LIBRARY                 flogger.lib
+#endif // TRACE_INTO_FILE
+
 // end of file
 
--- a/meetingrequest/mrdb/group/esmrdb.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/meetingrequest/mrdb/group/esmrdb.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -17,6 +17,7 @@
 
 
 #include "../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../inc/emailtraceconfig.hrh"
 #include "../../inc/esmrinternaluid.h"
 #include <data_caging_paths.hrh>
 #include <platform_paths.hrh>
@@ -53,4 +54,9 @@
 LIBRARY                 caleninterimutils2.lib
 LIBRARY                 cmaillogger.lib
 
+
+#ifdef TRACE_INTO_FILE
+LIBRARY                 flogger.lib
+#endif // TRACE_INTO_FILE
+
 // end of file
--- a/meetingrequest/mrentry/group/esmrentry.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/meetingrequest/mrentry/group/esmrentry.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -17,6 +17,7 @@
 
 
 #include "../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../inc/emailtraceconfig.hrh"
 #include "../../inc/esmrinternaluid.h"
 #include <data_caging_paths.hrh>
 #include <platform_paths.hrh>
@@ -43,8 +44,6 @@
 USERINCLUDE             ../../inc
 
 APP_LAYER_SYSTEMINCLUDE
-SYSTEMINCLUDE           /epoc32/include/ecom
-
 USERINCLUDE ../../../inc
 
 // ESMR libraries
@@ -67,4 +66,8 @@
 LIBRARY                 centralrepository.lib
 LIBRARY                 cmaillogger.lib
 
+#ifdef TRACE_INTO_FILE
+LIBRARY                 flogger.lib
+#endif // TRACE_INTO_FILE
+
 // EOF
--- a/meetingrequest/mrgui/group/esmrgui.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/meetingrequest/mrgui/group/esmrgui.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -17,6 +17,7 @@
 
 
 #include "../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../inc/emailtraceconfig.hrh"
 #include "../../inc/esmrinternaluid.h"
 #include <data_caging_paths.hrh>
 #include <platform_paths.hrh>
@@ -101,7 +102,6 @@
 END
 
 APP_LAYER_SYSTEMINCLUDE
-SYSTEMINCLUDE     /epoc32/include/ecom
 
 // Include paths
 USERINCLUDE     ../inc
@@ -170,4 +170,8 @@
 LIBRARY aknphysics.lib
 LIBRARY cmaillogger.lib
 
+#ifdef TRACE_INTO_FILE
+LIBRARY flogger.lib
+#endif // TRACE_INTO_FILE
+
 // End of File
--- a/meetingrequest/mrgui/inc/cesmrfieldbuilderinterface.h	Tue Jan 26 11:45:42 2010 +0200
+++ b/meetingrequest/mrgui/inc/cesmrfieldbuilderinterface.h	Tue Feb 02 00:02:40 2010 +0200
@@ -19,7 +19,7 @@
 #ifndef CESMRFIELDBUILDERINTERFACE
 #define CESMRFIELDBUILDERINTERFACE
 
-#include <ecom.h>
+#include <ecom/ecom.h>
 
 #include "esmrinternaluid.h"
 #include "mesmrfieldvalidator.h"
--- a/meetingrequest/mrgui/mrfieldbuildercommon/group/esmrfieldbuildercommon.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/meetingrequest/mrgui/mrfieldbuildercommon/group/esmrfieldbuildercommon.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -18,6 +18,7 @@
 
 
 #include "../../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../../inc/emailtraceconfig.hrh"
 #include "../../../inc/esmrinternaluid.h"
 #include <data_caging_paths.hrh>
 #include <platform_paths.hrh>
@@ -78,4 +79,7 @@
 LIBRARY ws32.lib
 LIBRARY cmaillogger.lib
 
+#ifdef TRACE_INTO_FILE
+LIBRARY                 flogger.lib
+#endif // TRACE_INTO_FILE
 // End of File
--- a/meetingrequest/mrgui/mrfieldbuildercommon/src/cesmrrichtextviewer.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/meetingrequest/mrgui/mrfieldbuildercommon/src/cesmrrichtextviewer.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -152,8 +152,11 @@
         else
             {
             const CESMRRichTextLink* link = GetSelectedLink ( );
-            HighlightLink( *link );
-            DrawDeferred();
+            if ( link )
+            	{
+            	HighlightLink( *link );
+            	DrawDeferred();
+            	}
             }
         }
 
--- a/meetingrequest/mrgui/mrfieldbuilderplugin/group/esmrfieldbuilderplugin.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/meetingrequest/mrgui/mrfieldbuilderplugin/group/esmrfieldbuilderplugin.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -21,6 +21,7 @@
 
 #include "../../../inc/esmrinternaluid.h"
 #include "../../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../../inc/emailtraceconfig.hrh"
 
 TARGET          esmrfieldbuilderplugin.dll
 TARGETTYPE      PLUGIN
@@ -34,16 +35,15 @@
 
 // Includes 
 APP_LAYER_SYSTEMINCLUDE
-SYSTEMINCLUDE /epoc32/include/ecom
 USERINCLUDE     ../inc
 USERINCLUDE     ../../inc
-USERINCLUDE 	../../../inc
+USERINCLUDE     ../../../inc
 USERINCLUDE     ../../../../inc
 
 //implementations
-SOURCEPATH 		../src 
-SOURCE 			CESMRFieldBuilderPluginProxy.cpp
-SOURCE 			CESMRFieldBuilderPlugin.cpp
+SOURCEPATH      ../src 
+SOURCE          CESMRFieldBuilderPluginProxy.cpp
+SOURCE          CESMRFieldBuilderPlugin.cpp
 
 SOURCEPATH      ../src
 
@@ -113,4 +113,8 @@
 LIBRARY cdlengine.lib
 LIBRARY cmaillogger.lib
 
+#ifdef TRACE_INTO_FILE
+LIBRARY flogger.lib
+#endif // TRACE_INTO_FILE
+
 // End of File
--- a/meetingrequest/mrgui/mrfieldbuilderplugin/src/cesmrviewerdescriptionfield.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/meetingrequest/mrgui/mrfieldbuilderplugin/src/cesmrviewerdescriptionfield.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -312,7 +312,10 @@
                 {
                 const CESMRRichTextLink* link =
                     iRichTextViewer->GetSelectedLink();
-                LocationPluginL().ShowOnMapL( *iLocation, link->Value() );
+                if ( link )
+                	{
+                	LocationPluginL().ShowOnMapL( *iLocation, link->Value() );
+                	}
                 }
             break;
             }
--- a/meetingrequest/mrgui/mrfieldbuilderpluginextension/group/esmrfieldbuilderpluginextension.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/meetingrequest/mrgui/mrfieldbuilderpluginextension/group/esmrfieldbuilderpluginextension.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -20,6 +20,7 @@
 #include <data_caging_paths.hrh>
 
 #include "../../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../../inc/emailtraceconfig.hrh"
 #include "../../../inc/esmrinternaluid.h"
 
 TARGET          esmrfieldbuilderpluginextension.dll
@@ -35,16 +36,14 @@
 // Includes
 APP_LAYER_SYSTEMINCLUDE
 
-SYSTEMINCLUDE /epoc32/include/ecom
-
 USERINCLUDE     ../inc
-USERINCLUDE 	../../inc
-USERINCLUDE 	../../../inc
+USERINCLUDE     ../../inc
+USERINCLUDE     ../../../inc
 USERINCLUDE     ../../../../inc
 
 //implementations
 
-SOURCEPATH 		../src 
+SOURCEPATH      ../src 
 
 SOURCE          CESMRFieldBuilderPluginExtensionProxy.cpp
 SOURCE          CESMRFieldBuilderPluginExtension.cpp
@@ -127,5 +126,8 @@
 LIBRARY aknlayout2scalable.lib
 LIBRARY aknlayout2.lib
 LIBRARY cmaillogger.lib
+#ifdef TRACE_INTO_FILE
+LIBRARY flogger.lib
+#endif // TRACE_INTO_FILE
 
 // End of File
--- a/meetingrequest/mrgui/mrfieldevent/group/esmrfieldevent.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/meetingrequest/mrgui/mrfieldevent/group/esmrfieldevent.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -16,6 +16,7 @@
 */
 
 #include "../../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../../inc/emailtraceconfig.hrh"
 #include "../../../inc/esmrinternaluid.h"
 #include <data_caging_paths.hrh>
 #include <platform_paths.hrh>
@@ -47,4 +48,8 @@
 LIBRARY euser.lib
 LIBRARY cmaillogger.lib
 
+#ifdef TRACE_INTO_FILE
+LIBRARY flogger.lib
+#endif // TRACE_INTO_FILE
+
 // End of File
--- a/meetingrequest/mrgui/mrlocationplugin/group/esmrlocationplugin.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/meetingrequest/mrgui/mrlocationplugin/group/esmrlocationplugin.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -19,6 +19,7 @@
 #include <platform_paths.hrh>
 #include <data_caging_paths.hrh>
 #include "../../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../../inc/emailtraceconfig.hrh"
 #include "../../../inc/esmrinternaluid.h"
 
 TARGET                  esmrlocationplugin.dll
@@ -59,3 +60,6 @@
 LIBRARY apparc.lib
 LIBRARY cmaillogger.lib
 
+#ifdef TRACE_INTO_FILE
+LIBRARY flogger.lib
+#endif // TRACE_INTO_FILE
--- a/meetingrequest/mricalviewer/group/esmricalviewer.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/meetingrequest/mricalviewer/group/esmricalviewer.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -17,6 +17,7 @@
 
 
 #include "../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../inc/emailtraceconfig.hrh"
 #include "../../inc/esmrinternaluid.h"
 #include <data_caging_paths.hrh>
 #include <platform_paths.hrh>
@@ -65,7 +66,6 @@
 APP_LAYER_SYSTEMINCLUDE
 
 USERINCLUDE             ../../../inc
-SYSTEMINCLUDE           /epoc32/include/ecom
 
 LIBRARY                 euser.lib
 LIBRARY                 fsmailframework.lib
@@ -84,4 +84,8 @@
 LIBRARY                 esmrcommon.lib             
 LIBRARY                 cmaillogger.lib
 
+#ifdef TRACE_INTO_FILE
+LIBRARY                 flogger.lib
+#endif // TRACE_INTO_FILE
+
 // end of file
--- a/meetingrequest/mrpolicy/group/esmrpolicy.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/meetingrequest/mrpolicy/group/esmrpolicy.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -17,6 +17,7 @@
 
 
 #include "../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../inc/emailtraceconfig.hrh"
 #include "../../inc/esmrinternaluid.h"
 #include <data_caging_paths.hrh>
 #include <platform_paths.hrh>
@@ -68,4 +69,8 @@
 LIBRARY                 charconv.lib
 LIBRARY                 cmaillogger.lib
 
+#ifdef TRACE_INTO_FILE
+LIBRARY                 flogger.lib
+#endif // TRACE_INTO_FILE
+
 // EOF
--- a/meetingrequest/mrservices/group/esmrservices.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/meetingrequest/mrservices/group/esmrservices.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -17,6 +17,7 @@
 
 
 #include "../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../inc/emailtraceconfig.hrh"
 #include "../../inc/esmrinternaluid.h"
 #include <data_caging_paths.hrh>
 #include <platform_paths.hrh>
@@ -72,4 +73,8 @@
 LIBRARY                 charconv.lib
 LIBRARY                 cmaillogger.lib
 
+#ifdef TRACE_INTO_FILE
+LIBRARY                 flogger.lib
+#endif // TRACE_INTO_FILE
+
 // EOF
--- a/meetingrequest/mrtasks/group/esmrtasks.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/meetingrequest/mrtasks/group/esmrtasks.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -20,6 +20,7 @@
 #include <platform_paths.hrh>
 
 #include "../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../inc/emailtraceconfig.hrh"
 #include "../../inc/esmrinternaluid.h"
 #include "../../inc/esmrconfig.hrh"
 
@@ -61,7 +62,6 @@
 APP_LAYER_SYSTEMINCLUDE
 
 USERINCLUDE             ../../../inc
-SYSTEMINCLUDE           /epoc32/include/ecom
 
 LIBRARY                 esmrcommon.lib
 LIBRARY                 esmrservices.lib
@@ -79,4 +79,8 @@
 LIBRARY                 fsfwcommonlib.lib
 LIBRARY                 cmaillogger.lib
 
+#ifdef TRACE_INTO_FILE
+LIBRARY                 flogger.lib
+#endif // TRACE_INTO_FILE
+
 //End of file
--- a/meetingrequest/mrtasks/src/cesmrfsemailmanager.cpp	Tue Jan 26 11:45:42 2010 +0200
+++ b/meetingrequest/mrtasks/src/cesmrfsemailmanager.cpp	Tue Feb 02 00:02:40 2010 +0200
@@ -15,11 +15,12 @@
 *
 */
 
+#include <cmrmailboxutils.h>
+#include <ecom/implementationinformation.h>
+
 #include "emailtrace.h"
 #include "cesmrfsemailmanager.h"
 
-#include <cmrmailboxutils.h>
-//<cmail>
 #include "CFSMailClient.h"
 #include "CFSMailBox.h"
 #include "CFSMailMessage.h"
@@ -27,13 +28,13 @@
 #include "mmrinfoprocessor.h"
 #include "CFSMailCommon.h"
 #include "CFSMailPlugin.h"
-//</cmail>
-#include <implementationinformation.h>
+
 #include "tesmrinputparams.h"
 #include "esmrconfig.hrh"
 #include "esmrhelper.h"
 #include "esmrinternaluid.h"
 
+
 // Unnamed namespace for local definitions
 namespace {
 
--- a/meetingrequest/mrurlparserplugin/group/esmrurlparserplugin.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/meetingrequest/mrurlparserplugin/group/esmrurlparserplugin.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -21,6 +21,7 @@
 #include <data_caging_paths.hrh>
 
 #include "../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../inc/emailtraceconfig.hrh"
 #include "../../inc/esmrinternaluid.h"
 
 TARGET                  esmrurlparserplugin.dll
@@ -51,6 +52,10 @@
 LIBRARY                 lbs.lib
 LIBRARY                 cmaillogger.lib
 
+#ifdef TRACE_INTO_FILE
+LIBRARY                 flogger.lib
+#endif // TRACE_INTO_FILE
+
 SOURCEPATH              .
 START RESOURCE          ../data/esmrurlparserplugindata.rss
 HEADER
--- a/meetingrequest/mrutils/group/esmrutils.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/meetingrequest/mrutils/group/esmrutils.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -17,6 +17,7 @@
 
 
 #include "../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../inc/emailtraceconfig.hrh"
 #include "../../inc/esmrinternaluid.h"
 #include <data_caging_paths.hrh>
 #include <platform_paths.hrh>
@@ -57,4 +58,9 @@
 LIBRARY         efsrv.lib
 LIBRARY         cmaillogger.lib
 
+#ifdef TRACE_INTO_FILE
+LIBRARY         flogger.lib
+#endif // TRACE_INTO_FILE
+
+
 // End of file
--- a/meetingrequest/mrutilscalplugin/group/esmrutilscalplugin.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/meetingrequest/mrutilscalplugin/group/esmrutilscalplugin.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -17,6 +17,7 @@
 
 
 #include "../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../inc/emailtraceconfig.hrh"
 #include "../../inc/esmrinternaluid.h"
 #include <data_caging_paths.hrh>
 #include <platform_paths.hrh>
@@ -59,4 +60,8 @@
 LIBRARY         ecom.lib
 LIBRARY         cmaillogger.lib
 
+#ifdef TRACE_INTO_FILE
+LIBRARY         flogger.lib
+#endif // TRACE_INTO_FILE
+
 // End of file
--- a/meetingrequest/mrversit2/group/esmrversit2.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/meetingrequest/mrversit2/group/esmrversit2.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -19,6 +19,7 @@
 #include <platform_paths.hrh>
 
 #include "../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../inc/emailtraceconfig.hrh"
 #include "../../inc/esmrinternaluid.h"
 
 TARGET          esmrversit2.dll
@@ -54,4 +55,8 @@
 LIBRARY charconv.lib    // Character conversion
 LIBRARY cmaillogger.lib
 
+#ifdef TRACE_INTO_FILE
+LIBRARY flogger.lib
+#endif // TRACE_INTO_FILE
+
 // End of File
--- a/meetingrequest/mrviewer/group/esmrviewer.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/meetingrequest/mrviewer/group/esmrviewer.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -17,6 +17,7 @@
 
 
 #include "../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../inc/emailtraceconfig.hrh"
 #include "../../inc/esmrinternaluid.h"
 #include <data_caging_paths.hrh>
 #include <platform_paths.hrh>
@@ -53,4 +54,8 @@
 LIBRARY cone.lib
 LIBRARY cmaillogger.lib
 
+#ifdef TRACE_INTO_FILE
+LIBRARY flogger.lib
+#endif // TRACE_INTO_FILE
+
 // End of file
--- a/meetingrequest/mrviewercalplugin/group/esmrviewercalplugin.mmp	Tue Jan 26 11:45:42 2010 +0200
+++ b/meetingrequest/mrviewercalplugin/group/esmrviewercalplugin.mmp	Tue Feb 02 00:02:40 2010 +0200
@@ -17,6 +17,7 @@
 
 
 #include "../../../inc/emailversionnumbers.hrh" // KEmailBinaryVersionNumber
+#include "../../../inc/emailtraceconfig.hrh"
 #include "../../inc/esmrinternaluid.h"
 #include <data_caging_paths.hrh>
 #include <platform_paths.hrh>
@@ -56,4 +57,7 @@
 LIBRARY calinterimapi.lib
 LIBRARY cmaillogger.lib
 
+#ifdef TRACE_INTO_FILE
+LIBRARY                 flogger.lib
+#endif // TRACE_INTO_FILE
 // End of file