201025_2
authorhgs
Fri, 02 Jul 2010 15:55:16 +0300
changeset 49 00c7ae862740
parent 48 10eaf342f539
child 51 d845db10c0d4
201025_2
email_plat/nmail_client_api/nmapiemailaddress.h
email_plat/nmail_client_api/nmapifolderlisting.h
emailservices/emailcommon/inc/CFSMailCommon.h
emailservices/emailcommon/inc/CFSMailMessageBase.h
emailservices/emailcommon/inc/CFSMailRequestHandler.h
emailservices/emailcommon/src/CFSMailBox.cpp
emailservices/emailcommon/src/CFSMailMessagePart.cpp
emailservices/nmclientapi/inc/nmapienvelopelisting_p.h
emailservices/nmclientapi/inc/nmapieventnotifier_p.h
emailservices/nmclientapi/inc/nmapifolderlisting_p.h
emailservices/nmclientapi/src/nmapienvelopelisting.cpp
emailservices/nmclientapi/src/nmapienvelopelisting_p.cpp
emailservices/nmclientapi/src/nmapieventnotifier.cpp
emailservices/nmclientapi/src/nmapieventnotifier_p.cpp
emailservices/nmclientapi/src/nmapifolderlisting.cpp
emailservices/nmclientapi/src/nmapifolderlisting_p.cpp
emailservices/nmregister/src/nmmailboxregisterinterface.cpp
emailuis/nmailui/conf/nmmessagesearchlistview.docml
emailuis/nmailui/src/main.cpp
emailuis/nmailui/src/nmapplication.cpp
emailuis/nmailui/src/nmeditorcontent.cpp
emailuis/nmailui/src/nmeditorview.cpp
emailuis/nmailui/src/nmmessagesearchlistview.cpp
emailuis/nmailui/translations/mail.qm
emailuis/nmailui/translations/mail.ts
emailuis/nmframeworkadapter/src/nmfwaremovedraftmessageoperation.cpp
emailuis/nmhswidget/conf/nmhswidget.docml
emailuis/nmhswidget/conf/nmhswidgetmail.docml
emailuis/nmhswidget/conf/nmhswidgettitle.docml
emailuis/nmhswidget/inc/nmhswidget.h
emailuis/nmhswidget/inc/nmhswidgetconsts.h
emailuis/nmhswidget/inc/nmhswidgetemailengine.h
emailuis/nmhswidget/inc/nmhswidgettitlerow.h
emailuis/nmhswidget/nmhswidget.qrc
emailuis/nmhswidget/src/nmhswidget.cpp
emailuis/nmhswidget/src/nmhswidgetemailengine.cpp
emailuis/nmhswidget/src/nmhswidgettitlerow.cpp
emailuis/nmindicatorplugin/src/nmsendingindicator.cpp
emailuis/nmindicatorplugin/src/nmsyncindicator.cpp
ipsservices/nmipssettings/translations/mailips.qm
ipsservices/nmipssettings/translations/mailips.ts
--- a/email_plat/nmail_client_api/nmapiemailaddress.h	Tue Jun 29 17:12:28 2010 +0300
+++ b/email_plat/nmail_client_api/nmapiemailaddress.h	Fri Jul 02 15:55:16 2010 +0300
@@ -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"
@@ -20,8 +20,9 @@
 
 #include <QExplicitlySharedDataPointer>
 #include <nmapidef.h>
+
 /*!
-   Email addres
+   Email address
  */
 
 class QString;
@@ -41,7 +42,7 @@
     virtual ~NmApiEmailAddress();
 
     /*!
-       copying constructor for nmmessageenvelope
+       copying constructor for NmApiEmailAddress
      */
     NmApiEmailAddress(const NmApiEmailAddress &addr);
 
--- a/email_plat/nmail_client_api/nmapifolderlisting.h	Tue Jun 29 17:12:28 2010 +0300
+++ b/email_plat/nmail_client_api/nmapifolderlisting.h	Fri Jul 02 15:55:16 2010 +0300
@@ -37,11 +37,11 @@
     Q_OBJECT
 public:
     /*!
-       Constructor of class. It set start values.
+       Constructor of class. 
      */
-    NmApiFolderListing(QObject *parent, const quint64 &nmMailboxId);
+    NmApiFolderListing(QObject *parent, const quint64 &mailboxId);
     /*!
-       Destructor of class. It release engine to be safe if manual releasing won't work.
+       Destructor of class. 
      */
     ~NmApiFolderListing();
 
--- a/emailservices/emailcommon/inc/CFSMailCommon.h	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailservices/emailcommon/inc/CFSMailCommon.h	Fri Jul 02 15:55:16 2010 +0300
@@ -52,6 +52,7 @@
     EFSMsgFlag_OnlyToMe = 2048,          // The message was sent only to this user
     EFSMsgFlag_RemoteDeleted = 4096,     // The message has been deleted on the server
     EFSMsgFlag_HasMsgSender = 8192,      // The message has one or more senders 
+	// <qmail> Not using EFSMsgFlag_BodyTruncated </qmail>
     };
 
 /** email list sorting options */  
--- a/emailservices/emailcommon/inc/CFSMailMessageBase.h	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailservices/emailcommon/inc/CFSMailMessageBase.h	Fri Jul 02 15:55:16 2010 +0300
@@ -299,6 +299,7 @@
      CFSMailMessageBase();
 
 // <qmail>
+     // iMessageId removed
     /**
      * ConstructL
      */
--- a/emailservices/emailcommon/inc/CFSMailRequestHandler.h	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailservices/emailcommon/inc/CFSMailRequestHandler.h	Fri Jul 02 15:55:16 2010 +0300
@@ -81,7 +81,7 @@
     /**
      * destructor.
      */
-      ~CFSMailRequestHandler();
+     virtual ~CFSMailRequestHandler();
 
     /**
      * two based constructor
--- a/emailservices/emailcommon/src/CFSMailBox.cpp	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailservices/emailcommon/src/CFSMailBox.cpp	Fri Jul 02 15:55:16 2010 +0300
@@ -77,7 +77,7 @@
 EXPORT_C CFSMailBox::~CFSMailBox()
 {
     NM_FUNCTION;
-    
+    // <qmail> Not using KMailboxExtMrCalInfo </qmail>
     iFolders.ResetAndDestroy();
 }
 
@@ -456,11 +456,7 @@
     
     if(CFSMailPlugin* plugin = iRequestHandler->GetPluginByUid(GetId()))
         {
-        // <qmail> Not activated yet.
-        //UpdateMrusL( aMessage.GetToRecipients(),
-        //         aMessage.GetCCRecipients(),
-        //       aMessage.GetBCCRecipients() );
-        // </qmail>
+        // <qmail> Removed UpdateMrusL. </qmail>
         plugin->SendMessageL( aMessage );
         }
 	}
@@ -481,11 +477,7 @@
 
     if ( plugin )
         {
-        // <qmail> Not activated yet.
-        //UpdateMrusL( aMessage.GetToRecipients(),
-        //         aMessage.GetCCRecipients(),
-        //       aMessage.GetBCCRecipients() );
-        // </qmail>
+        // <qmail> Removed UpdateMrusL. </qmail>
 
         // init asynchronous request
         request = iRequestHandler->InitAsyncRequestL( GetId().PluginId(),
@@ -555,6 +547,11 @@
 EXPORT_C TDesC& CFSMailBox::GetBrandingIdL( )
 {
     NM_FUNCTION;
+	if ( CFSMailPlugin* plugin = iRequestHandler->GetPluginByUid( GetId() ) )
+        {
+        TDesC& result = plugin->GetBrandingIdL( GetId() );
+        return result;
+        }
     
     return BrandingId();
 }
@@ -585,6 +582,7 @@
     NM_FUNCTION;
     
     TFSPendingRequest request;
+    request.iRequestId = 0;
     if( CFSMailPlugin* plugin = iRequestHandler->GetPluginByUid( GetId() ) )
         {
         // init asynchronous request
@@ -650,7 +648,7 @@
         
         // remove outbox, drafts folder from folder list
         RArray<TFSMailMsgId> folderIds;
-        folderIds.Reset();
+        CleanupClosePushL( folderIds );  
         for(TInt i=0;i<iFolders.Count();i++)
         {
             TFSMailMsgId id = iFolders[i]->GetFolderId();
@@ -662,7 +660,7 @@
         
         // start search
         plugin->SearchL( GetId(), folderIds, aSearchStrings, aSortCriteria, aSearchObserver );
-        folderIds.Reset();
+        CleanupStack::PopAndDestroy( &folderIds );
         }
     }
 
@@ -1067,9 +1065,11 @@
 EXPORT_C void CFSMailBox::ReleaseExtension( CEmailExtension* aExtension )
     {
     NM_FUNCTION;
+	// <qmail> Not using KMailboxExtMrCalInfo
     
     // no specialized behaviour, call base class
     CExtendableEmail::ReleaseExtension( aExtension );
+	// </qmail>
     }
     
 // -----------------------------------------------------------------------------
@@ -1094,6 +1094,7 @@
             }
         }    
     else if ( aInterfaceUid == KEmailMailboxStateExtensionUid )
+		// <qmail> Not using KEmailSettingExtensionUid or KEmailConnectionStatusQueryExtensionUid </qmail>
         {
         if ( !extension )
             {
--- a/emailservices/emailcommon/src/CFSMailMessagePart.cpp	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailservices/emailcommon/src/CFSMailMessagePart.cpp	Fri Jul 02 15:55:16 2010 +0300
@@ -529,16 +529,19 @@
 	if(plugin != NULL)
 		{
 		RPointerArray<CFSMailMessagePart> parts;
-		RArray<TFSMailMsgId> partIds;
-    	plugin->ChildPartsL(GetMailBoxId(),GetFolderId(),GetMessageId(),GetPartId(),parts);
+        CleanupResetAndDestroyPushL( parts );
+        plugin->ChildPartsL(GetMailBoxId(),GetFolderId(),GetMessageId(),GetPartId(),parts);
+        RArray<TFSMailMsgId> partIds;
+        CleanupClosePushL( partIds );
+        partIds.ReserveL( 1 + parts.Count() );
 		for(TInt i=0;i<parts.Count();i++)
 			{
-			partIds.Append(parts[i]->GetMessageId());
+			partIds.AppendL( parts[i]->GetMessageId() );
 			}
-        partIds.Append(GetPartId());
+        partIds.AppendL( GetPartId() );
 		plugin->RemovePartContentL(GetMailBoxId(), GetFolderId(), GetMessageId(), partIds);
-        parts.ResetAndDestroy();
-		partIds.Reset();
+        CleanupStack::PopAndDestroy( &partIds );
+        CleanupStack::PopAndDestroy( &parts );
 		}
 	}
 
@@ -559,12 +562,12 @@
         {
         // get attachment list
         RPointerArray<CFSMailMessagePart> attachments;
-        attachments.Reset();
+        CleanupResetAndDestroyPushL( attachments );
         DoAttachmentListL(attachments);
 
         // copy attachment part ids
         RArray<TFSMailMsgId> ids;
-        ids.Reset();
+        CleanupClosePushL( ids ); 
         for(TInt i=0;i<attachments.Count();i++)
             {
             ids.Append(attachments[i]->GetPartId());
@@ -577,8 +580,8 @@
             }
         
         // clean tables
-        attachments.ResetAndDestroy();
-        ids.Reset();
+        CleanupStack::PopAndDestroy( &ids );
+        CleanupStack::PopAndDestroy( &attachments );
         }
     }
 
--- a/emailservices/nmclientapi/inc/nmapienvelopelisting_p.h	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailservices/nmclientapi/inc/nmapienvelopelisting_p.h	Fri Jul 02 15:55:16 2010 +0300
@@ -29,20 +29,21 @@
 
 class NmApiEnvelopeListingPrivate : public QObject
 {
+    Q_OBJECT
+    
 public:
-
-    NmApiEnvelopeListingPrivate(QObject *parent = 0);
+    NmApiEnvelopeListingPrivate(const quint64 folderId, const quint64 mailboxId, QObject *parent = 0);
     virtual ~NmApiEnvelopeListingPrivate();
+    bool envelopes(QList<EmailClientApi::NmApiMessageEnvelope> &envelopes);
+    qint32 listEnvelopes();
+    bool isRunning() const;
+    void cancel();
 
-    bool initializeEngine();
-    void releaseEngine();
-    qint32 grabEnvelopes();
-
+private:
+    quint64 mFolderId;
+    quint64 mMailboxId;
     bool mIsRunning;
-    quint64 folderId;
-    quint64 mailboxId;
     NmApiEngine *mEngine;
-
     QList<EmailClientApi::NmApiMessageEnvelope> mEnvelopes;
 };
 }
--- a/emailservices/nmclientapi/inc/nmapieventnotifier_p.h	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailservices/nmclientapi/inc/nmapieventnotifier_p.h	Fri Jul 02 15:55:16 2010 +0300
@@ -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"
@@ -18,6 +18,7 @@
 #ifndef NMAPIEVENTNOTIFIERPRIVATE_H
 #define NMAPIEVENTNOTIFIERPRIVATE_H
 
+#include <QObject>
 #include "nmapiprivateclasses.h"
 #include <nmapicommon.h>
 
@@ -34,18 +35,22 @@
     NmApiEventNotifierPrivate(QObject *parent = 0);
     virtual ~NmApiEventNotifierPrivate();
 
-    bool initializeEngine();
-    void releaseEngine();
     void cancel();
-
+    bool isRunning() const;
+    bool start();
+    void stop();
+    void events(QList<NmApiMessage> &events);
 public slots:
     void emailStoreEvent(const NmApiMessage &events);
 
-public:
+signals:
+    void timedOut();
+
+private:
     QTimer *mEmitSignals;
     NmApiEngine *mEngine;
+    bool mIsRunning;
     QList<NmApiMessage> mBufferOfEvents;
-    bool mIsRunning;
 };
 
 }
--- a/emailservices/nmclientapi/inc/nmapifolderlisting_p.h	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailservices/nmclientapi/inc/nmapifolderlisting_p.h	Fri Jul 02 15:55:16 2010 +0300
@@ -17,6 +17,8 @@
 #ifndef NMAPIFOLDERLISTINGPRIVATE_H
 #define NMAPIFOLDERLISTINGPRIVATE_H
 
+#include <QObject>
+
 class NmApiEngine;
 
 namespace EmailClientApi
@@ -26,19 +28,21 @@
 
 class NmApiFolderListingPrivate : public QObject
 {
+    Q_OBJECT
+    
 public:
 
-    NmApiFolderListingPrivate(QObject *parent = 0);
+    NmApiFolderListingPrivate(quint64 mailboxId, QObject *parent = 0);
     virtual ~NmApiFolderListingPrivate();
-
-    bool initializeEngine();
-    void releaseEngine();
-    qint32 grabFolders();
-
-    QList<EmailClientApi::NmApiFolder> mFolders;//!<List of folders \sa getFolder \sa QSharedData \sa EmailClientApi::NmApiFolder
-    NmApiEngine *mEngine;//!<Pointer to engine instance \sa NmUiEngine
-    bool mIsRunning;//!<Keep info if folder listing is running \sa isRunning
-    quint64 mMailboxId;//!<Keep info about mailbox id for foler
+    qint32 listFolders();
+    bool folders(QList<EmailClientApi::NmApiFolder> &folders);
+    void cancel();
+    bool isRunning() const;
+private:
+	  quint64 mMailboxId;
+    NmApiEngine *mEngine;
+    bool mIsRunning;
+    QList<EmailClientApi::NmApiFolder> mFolders;
 };
 }
 #endif /* NMAPIFOLDERLISTINGPRIVATE_H */
--- a/emailservices/nmclientapi/src/nmapienvelopelisting.cpp	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailservices/nmclientapi/src/nmapienvelopelisting.cpp	Fri Jul 02 15:55:16 2010 +0300
@@ -29,30 +29,20 @@
     NmApiMessageTask(parent)
 {
     NM_FUNCTION;
-    
-    mListingPrivate = new NmApiEnvelopeListingPrivate(this);
-    mListingPrivate->mailboxId = mailboxId;
-    mListingPrivate->folderId = folderId;
-    mListingPrivate->mIsRunning = false;
+    mListingPrivate = new NmApiEnvelopeListingPrivate(folderId, mailboxId, this);
 }
 
 /*!
-   Destructor of class. It release engine to be safe if manual releasing won't work.
+   Destructor of class. 
  */
 NmApiEnvelopeListing::~NmApiEnvelopeListing()
 {
     NM_FUNCTION;
-    
-    if (mListingPrivate->mIsRunning) {
-        mListingPrivate->releaseEngine();
-    }
 }
 
 /*!
-   \brief Starts gathering envelopes list.
-   
-   In first turn it will get whole folderlist. 
-   If start works, it do nothing.
+   \brief Fetches envelope list. Emits envelopesListed signal when ready.
+   Results can be fetched with getEnvelopes.
    
    To asynchronous operation ce be used \sa QTimer::singleShot on this method.
    Example:
@@ -64,77 +54,37 @@
 bool NmApiEnvelopeListing::start()
 {
     NM_FUNCTION;
-    
-    bool result = false;
 
-    if (mListingPrivate->mIsRunning) {
-        result = true;
-    }
-    else {
-
-        bool started = mListingPrivate->initializeEngine();
-        if (!started) {
-            QMetaObject::invokeMethod(this, "envelopesListed", Qt::QueuedConnection, Q_ARG(qint32,
-                (qint32) EnvelopeListingFailed));
-            result = false;
-        }
-        else {
-            qint32 envelopesCount = mListingPrivate->grabEnvelopes();
-
-            mListingPrivate->mIsRunning = true;
-            QMetaObject::invokeMethod(this, "envelopesListed", Qt::QueuedConnection, Q_ARG(qint32,
+    qint32 envelopesCount = mListingPrivate->listEnvelopes();
+    QMetaObject::invokeMethod(this, "envelopesListed", Qt::QueuedConnection, Q_ARG(qint32,
                 envelopesCount));
-            result = true;
-        }
-    }
-    return result;
+    return true;
 }
 
 /*!
    \brief Stop gathering envelope list.
-   
-   In first it change state of listing.
-   Then it release engine.
-   On end it clears list of envelopes and emits \sa NmApiMessageTask::canceled() signal.
+
+   Clears list of envelopes and emits \sa NmApiMessageTask::canceled() signal.
  */
 void NmApiEnvelopeListing::cancel()
 {
     NM_FUNCTION;
-    
-    if (mListingPrivate->mIsRunning) {
-        mListingPrivate->mIsRunning = false;
-        mListingPrivate->releaseEngine();
-        mListingPrivate->mEnvelopes.clear();
+    mListingPrivate->cancel();
+    emit canceled();
 
-        emit canceled();
-    }
 }
 
 /*! 
    \brief Returns results after envelopesListed signal is received.
    
     Caller gets ownership of envelopes. Returns true if results were available.
-    Before calling cancel and start should be called,
-    because after second calling it return empty list.
-    It also at start clear inputlist of NmMessageEnvelope.
+    Before calling start should be called, otherwise will return empty list.
+    It also clears inputlist of NmMessageEnvelope.
  */
 bool NmApiEnvelopeListing::getEnvelopes(QList<EmailClientApi::NmApiMessageEnvelope> &envelopes)
 {
     NM_FUNCTION;
-    
-    envelopes.clear();
-
-    bool result = false;
-
-    if (!mListingPrivate->mIsRunning) {
-        result = false;
-    }
-    else {
-        envelopes = mListingPrivate->mEnvelopes;
-        mListingPrivate->mEnvelopes.clear();
-        result = true;
-    }
-    return result;
+    return mListingPrivate->envelopes(envelopes);
 }
 
 /*!
@@ -143,8 +93,7 @@
 bool NmApiEnvelopeListing::isRunning() const
 {
     NM_FUNCTION;
-    
-    return mListingPrivate->mIsRunning;
+    return mListingPrivate->isRunning();
 }
 
 }
--- a/emailservices/nmclientapi/src/nmapienvelopelisting_p.cpp	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailservices/nmclientapi/src/nmapienvelopelisting_p.cpp	Fri Jul 02 15:55:16 2010 +0300
@@ -21,65 +21,70 @@
 
 namespace EmailClientApi
 {
-NmApiEnvelopeListingPrivate::NmApiEnvelopeListingPrivate(QObject *parent) :
-    QObject(parent), mEngine(NULL)
+NmApiEnvelopeListingPrivate::NmApiEnvelopeListingPrivate(const quint64 folderId, const quint64 mailboxId, QObject *parent)
+:QObject(parent),
+mFolderId(folderId), 
+mMailboxId(mailboxId), 
+mIsRunning(false),
+mEngine(NULL)
 {
     NM_FUNCTION;
+    mEngine = NmApiEngine::instance();
+    Q_CHECK_PTR(mEngine);
 }
 
 NmApiEnvelopeListingPrivate::~NmApiEnvelopeListingPrivate()
 {
     NM_FUNCTION;
-    
-    releaseEngine();
+    NmApiEngine::releaseInstance(mEngine);
 }
 
-/*!
-   \brief It initialize engine for email operations. 
+/*! 
+   \brief Fills envelopes to the input parameter.
    
-   When use initializeEngine need to remember release it.
-   It return value if initialization go good.
-   \sa releaseEngine 
+    Caller gets ownership of envelopes. Returns true if results were available.
  */
-bool NmApiEnvelopeListingPrivate::initializeEngine()
+bool NmApiEnvelopeListingPrivate::envelopes(QList<EmailClientApi::NmApiMessageEnvelope> &envelopes)
 {
     NM_FUNCTION;
-    
-    mEngine = NmApiEngine::instance();
-    return mEngine ? true : false;
+    bool ret(mIsRunning);
+    envelopes.clear();
+    while (!mEnvelopes.isEmpty()) {
+        envelopes << mEnvelopes.takeFirst();
+    }
+    mIsRunning = false;
+    return ret;
 }
 
 /*!
-   \brief It release engine for email operations.
+   \brief It fetches envelopes from engine. 
+   
+   Because it uses NmApiMessageEnvelope with sharedData we don't need care about release memory.
    
-   \sa initializeEngine
+   \return Count of envelopes 
  */
-void NmApiEnvelopeListingPrivate::releaseEngine()
+qint32 NmApiEnvelopeListingPrivate::listEnvelopes()
 {
     NM_FUNCTION;
-    
-    NmApiEngine::releaseInstance(mEngine);
+    mIsRunning = true;
+    mEnvelopes.clear();
+    mEngine->listEnvelopes(mMailboxId, mFolderId, mEnvelopes);
+    return mEnvelopes.count();
 }
-
 /*!
-   \brief It grab envelopes from engine. 
-   
-   When it start grabing, it release all old.
-   Because it uses NmApiMessageEnvelope with sharedData we don't need care about release memory.
-   
-   \return Count of envelopes or "-1" if there is no engine initialised
+   \brief Return info if listing is running
  */
-qint32 NmApiEnvelopeListingPrivate::grabEnvelopes()
+bool NmApiEnvelopeListingPrivate::isRunning() const
 {
-    NM_FUNCTION;
-    
-    if(!mEngine){
-        return -1;
-    }
-    
+    return mIsRunning;
+}
+/*!
+   \brief Clears list of envelopes.
+ */
+void NmApiEnvelopeListingPrivate::cancel() 
+{
+    mIsRunning = false;
     mEnvelopes.clear();
-    mEngine->listEnvelopes(mailboxId, folderId, mEnvelopes);
-    return mEnvelopes.count();
 }
 }
 
--- a/emailservices/nmclientapi/src/nmapieventnotifier.cpp	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailservices/nmclientapi/src/nmapieventnotifier.cpp	Fri Jul 02 15:55:16 2010 +0300
@@ -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"
@@ -18,24 +18,19 @@
 #include "nmapiheaders.h"
 
 
-const quint32 IntervalEmitingSignals = 10000;
 
 namespace EmailClientApi
 {
 /*!
    Constructor
  */
-NmApiEventNotifier::NmApiEventNotifier(QObject *parent) :
-    NmApiMessageTask(parent)
-
+NmApiEventNotifier::NmApiEventNotifier(QObject *parent) 
+:NmApiMessageTask(parent)
 {
     NM_FUNCTION;
     
-    //set timer
     mNmApiEventNotifierPrivate = new NmApiEventNotifierPrivate(this);
-    mNmApiEventNotifierPrivate->mEmitSignals = new QTimer(this);
-    mNmApiEventNotifierPrivate->mEmitSignals->setInterval(IntervalEmitingSignals);
-    connect(mNmApiEventNotifierPrivate->mEmitSignals, SIGNAL(timeout()), this, SLOT(
+    connect(mNmApiEventNotifierPrivate, SIGNAL(timedOut()), this, SLOT(
         sendEventsFromBuffer()), Qt::QueuedConnection);
 
 }
@@ -46,9 +41,8 @@
 NmApiEventNotifier::~NmApiEventNotifier()
 {
     NM_FUNCTION;
-    
-    if (mNmApiEventNotifierPrivate->mIsRunning) {
-        mNmApiEventNotifierPrivate->releaseEngine();
+    if (mNmApiEventNotifierPrivate) {
+        mNmApiEventNotifierPrivate->stop();
     }
 }
 
@@ -61,39 +55,14 @@
 {
     NM_FUNCTION;
     
-    bool result = false;
-
-    if (mNmApiEventNotifierPrivate->mIsRunning) {
-        result = true;
-    }
-    else {
-        if (!mNmApiEventNotifierPrivate->initializeEngine()) {
-            mNmApiEventNotifierPrivate->mIsRunning = false;
-            result = false;
-        }
-        else {
-            qRegisterMetaType<QList<quint64> > ("QList<quint64>");
-            qRegisterMetaType<NmApiMessage> ("NmApiMessage");
-
-            connect(mNmApiEventNotifierPrivate->mEngine, SIGNAL(emailStoreEvent(NmApiMessage)), mNmApiEventNotifierPrivate,
-                SLOT(emailStoreEvent(NmApiMessage)), Qt::QueuedConnection);
-            
-            // initiate event listening
-            mNmApiEventNotifierPrivate->mEngine->startCollectingEvents();
-            
-            mNmApiEventNotifierPrivate->mEmitSignals->start();
-            mNmApiEventNotifierPrivate->mIsRunning = true;
-            result = true;
-        }
-    }
-    return result;
+    return mNmApiEventNotifierPrivate->start();
 }
 
 /*!
    Cancels monitoring.
    
    In user responsibility is to cancel monitoring.
-   On end it clear buffer events and emits \sa NmApiMessageTask::canceled() signal.
+   On end it clears buffer events and emits \sa NmApiMessageTask::canceled() signal.
  */
 void NmApiEventNotifier::cancel()
 {
@@ -110,14 +79,13 @@
 {
     NM_FUNCTION;
     
-    return mNmApiEventNotifierPrivate->mIsRunning;
+    return mNmApiEventNotifierPrivate->isRunning();
 }
 
 /*!
-   It check each object in buffer and emit signal with it.
-   
-   After end of work of this function buffer is empty.
-   It is called by timeout signal from timer.
+   Checks each object in buffer and emits corresponding signal.
+   Uses scheduled transmission. Can be called also directly to force the 
+   signal sending.
  */
 void NmApiEventNotifier::sendEventsFromBuffer()
 {
@@ -126,53 +94,41 @@
     qRegisterMetaType<EmailClientApi::NmApiMailboxEvent> ("EmailClientApi::NmApiMailboxEvent");
     qRegisterMetaType<EmailClientApi::NmApiMessageEvent> ("EmailClientApi::NmApiMessageEvent");
     
-    NmApiMessage events;
-    while (!mNmApiEventNotifierPrivate->mBufferOfEvents.isEmpty()) {
-        events = mNmApiEventNotifierPrivate->mBufferOfEvents.takeFirst();
-        switch (events.objectType) {
+    QList<NmApiMessage> events;
+    mNmApiEventNotifierPrivate->events(events);
+    while (!events.isEmpty()) {
+        NmApiMessage event = events.takeFirst();
+        switch (event.objectType) {
             case EMailbox:
-                switch (events.action) {
-                    case ENew:
-                        emit mailboxEvent(MailboxCreated, events.objectIds);
-                        break;
-                    case EChange:
-
-                        break;
-                    case EDeleted:
-                        emit mailboxEvent(MailboxDeleted, events.objectIds);
-                        break;
-                    default:
-                        break;
-                }
-                break;
-            case EFolder:
-                switch (events.action) {
-                    case ENew:
-
-                        break;
-                    case EChange:
-
-                        break;
-                    case EDeleted:
-
-                        break;
+                switch (event.action) {
+                    case ENew: {
+                        emit mailboxEvent(MailboxCreated, event.objectIds);
+                    } 
+                    break;
+                    case EDeleted: {
+                        emit mailboxEvent(MailboxDeleted, event.objectIds);
+                    }
+                    break;
                     default:
                         break;
                 }
                 break;
             case EMessage:
-                switch (events.action) {
-                    case ENew:
-                        emit messageEvent(MessageCreated, events.mailboxId, events.folderId,
-                            events.objectIds);
+                switch (event.action) {
+                    case ENew: {
+                        emit messageEvent(MessageCreated, event.mailboxId, event.folderId,
+                            event.objectIds);
+                        }
                         break;
-                    case EChange:
-                        emit messageEvent(MessageChanged, events.mailboxId, events.folderId,
-                            events.objectIds);
+                    case EChange: {
+                        emit messageEvent(MessageChanged, event.mailboxId, event.folderId,
+                            event.objectIds);
+                        }
                         break;
-                    case EDeleted:
-                        emit messageEvent(MessageDeleted, events.mailboxId, events.folderId,
-                            events.objectIds);
+                    case EDeleted: {
+                        emit messageEvent(MessageDeleted, event.mailboxId, event.folderId,
+                            event.objectIds);
+                        }
                         break;
                     default:
                         break;
@@ -182,6 +138,7 @@
                 break;
         }
     }
+    events.clear();
 }
 
 } //End of EmailClientApi
--- a/emailservices/nmclientapi/src/nmapieventnotifier_p.cpp	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailservices/nmclientapi/src/nmapieventnotifier_p.cpp	Fri Jul 02 15:55:16 2010 +0300
@@ -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"
@@ -19,6 +19,8 @@
 
 namespace EmailClientApi
 {
+const quint32 IntervalEmitingSignals = 10000;
+
 /*!
    Constructor
  */
@@ -26,6 +28,11 @@
     QObject(parent), mEmitSignals(NULL), mEngine(NULL), mIsRunning(false)
 {
     NM_FUNCTION;
+    mEmitSignals = new QTimer(this);
+    mEmitSignals->setInterval(IntervalEmitingSignals);
+    connect(mEmitSignals, SIGNAL(timeout()), this, SIGNAL(
+        timedOut()));
+    mEngine = NmApiEngine::instance();
 }
 
 /*!
@@ -34,41 +41,65 @@
 NmApiEventNotifierPrivate::~NmApiEventNotifierPrivate()
 {
     NM_FUNCTION;
+    mEmitSignals->stop();
+    NmApiEngine::releaseInstance(mEngine);
 }
 
 /*!
-   \brief It initialize engine for email operations. 
+   Returns true if the 
+ */
+bool NmApiEventNotifierPrivate::isRunning() const
+{
+    return mIsRunning;
+}
+
+/*!
+   Start monitoring email events
    
-   When use initializeEngine need to remember release it.
-   It return value if initialization go good.
-   \sa releaseEngine 
-   \return Return true if engine works.
+   \return Value tells about monitoring system running
  */
-bool NmApiEventNotifierPrivate::initializeEngine()
+bool NmApiEventNotifierPrivate::start()
 {
     NM_FUNCTION;
     
-    if (!mEngine) {
-        mEngine = NmApiEngine::instance();
+    bool result(false);
+
+    if (mIsRunning) {
+        result = true;
     }
+    else {
+        qRegisterMetaType<QList<quint64> > ("QList<quint64>");
+        qRegisterMetaType<NmApiMessage> ("NmApiMessage");
 
-    return mEngine ? true : false;
+        connect(mEngine, SIGNAL(emailStoreEvent(NmApiMessage)), this,
+                SLOT(emailStoreEvent(NmApiMessage)));
+            
+        mEngine->startCollectingEvents();
+            
+        mEmitSignals->start();
+        mIsRunning = true;
+        result = true;
+    }
+    return result;
+}
+/*!
+   \brief Stop listening events.
+ */
+void NmApiEventNotifierPrivate::stop()
+{
+    mIsRunning = false;
+    mEmitSignals->stop();
+    disconnect(mEngine, SIGNAL(emailStoreEvent(NmApiMessage)), this,
+            SLOT(emailStoreEvent(NmApiMessage)));
 }
 
 /*!
-   \brief It release engine for email operations.
-   
-   \sa initializeEngine
+    Returns event buffer, after function call the buffer is empty
  */
-void NmApiEventNotifierPrivate::releaseEngine()
+void NmApiEventNotifierPrivate::events(QList<NmApiMessage> &events)
 {
-    NM_FUNCTION;
-    
-    if (mIsRunning) {
-        cancel();
-    }
-    else {
-        NmApiEngine::releaseInstance(mEngine);
+    while (!mBufferOfEvents.isEmpty()) {
+        events << mBufferOfEvents.takeFirst();
     }
 }
 
@@ -82,7 +113,6 @@
 void NmApiEventNotifierPrivate::emailStoreEvent(const NmApiMessage &events)
 {
     NM_FUNCTION;
-    
     mBufferOfEvents << events;
 }
 
@@ -97,12 +127,8 @@
     mIsRunning = false;
     mEmitSignals->stop();
 
-    if (mEngine) {
-        disconnect(mEngine, SIGNAL(emailStoreEvent(NmApiMessage)), this,
+    disconnect(mEngine, SIGNAL(emailStoreEvent(NmApiMessage)), this,
             SLOT(emailStoreEvent(NmApiMessage)));
-    }
-
-    releaseEngine();
 
     mBufferOfEvents.clear();
 }
--- a/emailservices/nmclientapi/src/nmapifolderlisting.cpp	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailservices/nmclientapi/src/nmapifolderlisting.cpp	Fri Jul 02 15:55:16 2010 +0300
@@ -28,14 +28,11 @@
 /*!
    Constructor of class. It set start values.
  */
-NmApiFolderListing::NmApiFolderListing(QObject *parent, const quint64 &nmMailboxId) :
+NmApiFolderListing::NmApiFolderListing(QObject *parent, const quint64 &mailboxId) :
     NmApiMessageTask(parent)
 {
     NM_FUNCTION;
-    
-    mFolderListing = new NmApiFolderListingPrivate(this);
-    mFolderListing->mIsRunning = false;
-    mFolderListing->mMailboxId = nmMailboxId;
+    mFolderListing = new NmApiFolderListingPrivate(mailboxId, this);
 }
 
 /*!
@@ -44,10 +41,6 @@
 NmApiFolderListing::~NmApiFolderListing()
 {
     NM_FUNCTION;
-    
-    if (mFolderListing->mIsRunning) {
-        mFolderListing->releaseEngine();
-    }
 }
 
 /*! 
@@ -60,14 +53,7 @@
 bool NmApiFolderListing::getFolders(QList<EmailClientApi::NmApiFolder> &folders)
 {
     NM_FUNCTION;
-    
-    folders.clear();
-    if (!mFolderListing->mIsRunning || mFolderListing->mFolders.isEmpty()) {
-        return false;
-    }
-    folders = mFolderListing->mFolders;
-    mFolderListing->mFolders.clear();
-    return true;
+    return mFolderListing->folders(folders);
 }
 
 /*!
@@ -86,20 +72,7 @@
 bool NmApiFolderListing::start()
 {
     NM_FUNCTION;
-    
-    if (mFolderListing->mIsRunning) {
-        return true;
-    }
-
-    if (!mFolderListing->initializeEngine()) {
-        QMetaObject::invokeMethod(this, "foldersListed", Qt::QueuedConnection, Q_ARG(qint32,
-            (qint32) FolderListingFailed));
-        return false;
-    }
-
-    qint32 folderCount = mFolderListing->grabFolders();
-
-    mFolderListing->mIsRunning = true;
+    qint32 folderCount = mFolderListing->listFolders();
     QMetaObject::invokeMethod(this, "foldersListed", Qt::QueuedConnection,
         Q_ARG(qint32, folderCount));
 
@@ -117,14 +90,7 @@
 {
     NM_FUNCTION;
     
-    if (!mFolderListing->mIsRunning) {
-        return;
-    }
-
-    mFolderListing->mIsRunning = false;
-    mFolderListing->releaseEngine();
-    mFolderListing->mFolders.clear();
-
+    mFolderListing->cancel(); 
     emit canceled();
 }
 
@@ -134,8 +100,7 @@
 bool NmApiFolderListing::isRunning() const
 {
     NM_FUNCTION;
-    
-    return mFolderListing->mIsRunning;
+    return mFolderListing->isRunning();
 }
 
 }
--- a/emailservices/nmclientapi/src/nmapifolderlisting_p.cpp	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailservices/nmclientapi/src/nmapifolderlisting_p.cpp	Fri Jul 02 15:55:16 2010 +0300
@@ -24,10 +24,15 @@
 /*!
    Constructor form NmApiFolderListingPrivate
  */
-NmApiFolderListingPrivate::NmApiFolderListingPrivate(QObject *parent) :
-    QObject(parent), mEngine(NULL)
+NmApiFolderListingPrivate::NmApiFolderListingPrivate(quint64 mailboxId, QObject *parent) 
+:QObject(parent), 
+mMailboxId(mailboxId),
+mEngine(NULL),
+mIsRunning(false)
 {
     NM_FUNCTION;
+    mEngine = NmApiEngine::instance();
+    Q_CHECK_PTR(mEngine);
 }
 
 /*!
@@ -36,60 +41,59 @@
 NmApiFolderListingPrivate::~NmApiFolderListingPrivate()
 {
     NM_FUNCTION;
-    
-    releaseEngine();
-}
-
-/*!
-   \brief It initialize engine for email operations. 
-   
-   When use initializeEngine need to remember release it.
-   It return value if initialization go good.
-   \sa releaseEngine 
- */
-bool NmApiFolderListingPrivate::initializeEngine()
-{
-    NM_FUNCTION;
-    
-    if (!mEngine) {
-        mEngine = NmApiEngine::instance();
-    }
-
-    return mEngine ? true : false;
-}
-
-/*!
-   \brief It release engine for email operations.
-   
-   \sa initializeEngine
- */
-void NmApiFolderListingPrivate::releaseEngine()
-{
-    NM_FUNCTION;
-    
     NmApiEngine::releaseInstance(mEngine);
 }
 
 /*!
-   \brief It grab folders from engine. 
+   \brief Fetch folders from engine. 
    
-   When it start grabing, it release all old.
    Because it uses NmFolder with sharedData we don't need care about release memory.
    
-   \return Count of folders or "-1" if there is no engine initialised
+   \return Count of folders
  */
-qint32 NmApiFolderListingPrivate::grabFolders()
+qint32 NmApiFolderListingPrivate::listFolders()
 {
     NM_FUNCTION;
-    
-    if (!mEngine) {
-        return -1;
-    }
-    
+    mIsRunning = true;
     mFolders.clear();
     mEngine->listFolders(mMailboxId, mFolders);
     return mFolders.count();
 }
 
+/*! 
+   \brief Returns results after listFolders is called.
+   
+    Caller gets ownership of messages. Returns true if results were available.
+    It clears list of folders after be called.
+    It also at start clear inputlist of NmFolder.
+ */
+bool NmApiFolderListingPrivate::folders(QList<EmailClientApi::NmApiFolder> &folders)
+{
+    NM_FUNCTION;
+    bool ret(mIsRunning);
+    folders.clear();
+    while (!mFolders.isEmpty()) {
+        folders << mFolders.takeFirst();
+    }
+    mIsRunning = false;
+    return ret;
 }
 
+/*!
+   \brief Return info if listing is running
+ */
+bool NmApiFolderListingPrivate::isRunning() const
+{
+    NM_FUNCTION;
+    return mIsRunning;
+}
+/*!
+   \brief Clears list of folders.
+ */
+void NmApiFolderListingPrivate::cancel() 
+{
+    mIsRunning = false;
+    mFolders.clear();
+}
+}
+
--- a/emailservices/nmregister/src/nmmailboxregisterinterface.cpp	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailservices/nmregister/src/nmmailboxregisterinterface.cpp	Fri Jul 02 15:55:16 2010 +0300
@@ -199,7 +199,7 @@
     map[hsitemLaunchUri] = formLaunchUri(accountId);
     map[hsitemPublisherId] = NmPublisherName;
     map[hsItemWidgetUri] = NmHsWidget;
-    map[hsItemLocDescription] = "loc://KNmRegisterLocFileName/txt_mail_widget_dblist_preview_of_recent_mail";
+    map[hsItemLocDescription] = "loc://" + KNmRegisterLocFileName + "/txt_mail_widget_dblist_preview_of_recent_mail";
     map[hsIconFileName] = accountIconName;
     // to add widget params that are mapped to widgets properties
     map[NmHsWidgetParamAccountId] = QString::number(accountId);
--- a/emailuis/nmailui/conf/nmmessagesearchlistview.docml	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailuis/nmailui/conf/nmmessagesearchlistview.docml	Fri Jul 02 15:55:16 2010 +0300
@@ -1,55 +1,46 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <hbdocument version="1.1">
-    <widget name="NmMessageListView" type="HbView">
+    <widget name="NmMessageSearchListView" type="HbView">
         <widget name="content" role="HbView:widget" type="HbWidget">
-            <widget name="MessageTreeList" type="HbTreeView">
-                <real name="z" value="4"/>
-                <sizehint height="67.7612un" type="PREFERRED"/>
+            <widget name="LineEdit" type="HbLineEdit">
+                <fontspec name="fontSpec" role="Primary" textheight="26.8"/>
+                <sizehint height="8un" type="PREFERRED"/>
             </widget>
-            <widget name="SearchBarContainer" type="HbWidget">
-                <widget name="LineEdit" type="HbLineEdit">
-                    <fontspec name="fontSpec" role="Primary" textheight="26.8"/>
-                </widget>
-                <widget name="PushButton" type="HbPushButton">
-                    <sizehint type="MINIMUM" width="9un"/>
-                </widget>
-                <real name="z" value="8"/>
-                <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Expanding" verticalStretch="0"/>
-                <sizehint height="9.25un" type="PREFERRED" />
-                <sizehint height="9.25un" type="MINIMUM" />
-                <layout orientation="Horizontal" type="linear">
-                    <linearitem itemname="LineEdit"/>
-                    <linearitem itemname="PushButton"/>
-                </layout>
+            <widget name="PushButton" type="HbPushButton">
+                <sizehint height="8un" type="PREFERRED" width="9un"/>
+                <sizehint type="MAXIMUM" width="9un"/>
             </widget>
             <widget name="LabelGroupBox" type="HbGroupBox">
-                <real name="z" value="3"/>
-                <sizepolicy horizontalPolicy="MinimumExpanding" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
                 <sizehint height="6un" type="PREFERRED" width="52un"/>
                 <bool name="collapsable" value="FALSE"/>
+                <bool name="enabled" value="FALSE"/>
             </widget>
             <widget name="MessageListNoMessages" type="HbLabel">
                 <enums name="textWrapping" value="TextWordWrap"/>
                 <enums name="alignment" value="AlignLeft|AlignVCenter|AlignHCenter|AlignLeading"/>
-                <real name="z" value="10"/>
-                <sizehint height="15.22388un" type="PREFERRED" width="43.73134un"/>
-                <string locid="txt_mail_dblist_no_messages_matched_your_search" name="plainText" value="No messages matched your search. Try another search term. "/>
+                <string locid="txt_mail_dblist_no_messages_matched_your_search" name="plainText"/>
+                <fontspec name="fontSpec" role="Primary" textheight="var(hb-param-text-height-primary)"/>
+            </widget>
+            <widget name="MessageTreeList" type="HbTreeView">
+                <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
             </widget>
             <real name="z" value="0"/>
             <layout type="anchor">
-                <anchoritem dst="LabelGroupBox" dstEdge="LEFT" spacing="0" src="" srcEdge="LEFT"/>
-                <anchoritem dst="LabelGroupBox" dstEdge="TOP" spacing="0.5un" src="SearchBarContainer" srcEdge="BOTTOM"/>
-                <anchoritem dst="LabelGroupBox" dstEdge="RIGHT" spacing="0" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="MessageListNoMessages" dstEdge="LEFT" spacing="4.77612un" src="" srcEdge="LEFT"/>
+                <anchoritem dst="MessageListNoMessages" dstEdge="TOP" spacing="2.54478un" src="LabelGroupBox" srcEdge="BOTTOM"/>
+                <anchoritem dst="MessageListNoMessages" dstEdge="RIGHT" spacing="-5.22388un" src="" srcEdge="RIGHT"/>
                 <anchoritem dst="MessageTreeList" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
                 <anchoritem dst="MessageTreeList" dstEdge="TOP" spacing="0un" src="LabelGroupBox" srcEdge="BOTTOM"/>
                 <anchoritem dst="MessageTreeList" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
                 <anchoritem dst="MessageTreeList" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
-                <anchoritem dst="MessageListNoMessages" dstEdge="LEFT" spacing="4.77612un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="MessageListNoMessages" dstEdge="TOP" spacing="2.54478un" src="LabelGroupBox" srcEdge="BOTTOM"/>
-                <anchoritem dst="MessageListNoMessages" dstEdge="RIGHT" spacing="-5.22388un" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="SearchBarContainer" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="SearchBarContainer" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
-                <anchoritem dst="SearchBarContainer" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="LabelGroupBox" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                <anchoritem dst="LabelGroupBox" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-middle-vertical) )" src="LineEdit" srcEdge="BOTTOM"/>
+                <anchoritem dst="LabelGroupBox" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="LineEdit" dstEdge="LEFT" spacing="expr(var(hb-param-margin-gene-left) )" src="" srcEdge="LEFT"/>
+                <anchoritem dst="LineEdit" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-middle-vertical) )" src="" srcEdge="TOP"/>
+                <anchoritem dst="LineEdit" dstEdge="RIGHT" spacing="expr(-var(hb-param-margin-gene-middle-horizontal) )" src="PushButton" srcEdge="LEFT"/>
+                <anchoritem dst="PushButton" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-middle-vertical) )" src="" srcEdge="TOP"/>
+                <anchoritem dst="PushButton" dstEdge="RIGHT" spacing="expr(-var(hb-param-margin-gene-right) )" src="" srcEdge="RIGHT"/>
             </layout>
         </widget>
         <string name="title" value="Search"/>
--- a/emailuis/nmailui/src/main.cpp	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailuis/nmailui/src/main.cpp	Fri Jul 02 15:55:16 2010 +0300
@@ -1,35 +1,31 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
+ * 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"
+ * 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:
+ *
+ */
 
 #include "nmuiheaders.h"
 
-//parameter values
 const QString NmActivityName("EmailInboxView");
 
 /*!
-	int main
-*/
+    The main function.
+ */
 int main(int argc, char *argv[])
 {
-    NM_FUNCTION;
+    HbApplication app(argc,argv,Hb::NoSplash);
     
-    HbApplication app(argc, argv);
- 
     // Load the translation file.
     QTranslator translator;
     QString lang = QLocale::system().name();
@@ -37,24 +33,21 @@
     QString path = "Z:/resource/qt/translations/";
     translator.load(appName + lang, path);
     app.installTranslator(&translator);
-
+    
     app.setApplicationName(hbTrId("txt_mail_title_mail"));
-
+    
     NmApplication *nmApplication = NULL;
-    
     quint32 accountId = 0;
-    if (app.activateReason() == Hb::ActivationReasonActivity && app.activateId() == NmActivityName)
-        {
+    if (app.activateReason() == Hb::ActivationReasonActivity &&
+        app.activateId() == NmActivityName) {
         QVariant data = app.activateParams().take("accountId");
         QString accountIdString = data.toString();
         accountId = accountIdString.toULongLong();
         nmApplication = new NmApplication(&app,accountId);
-        }
-    else
-        {
+    } else {
         nmApplication = new NmApplication(&app);
-        }
-
+    }
+    
     int ret = app.exec();
     delete nmApplication;
     return ret;
--- a/emailuis/nmailui/src/nmapplication.cpp	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailuis/nmailui/src/nmapplication.cpp	Fri Jul 02 15:55:16 2010 +0300
@@ -1,19 +1,19 @@
 /*
-* 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"
-* 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:
-*
-*/
+ * 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"
+ * 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:
+ *
+ */
 
 #include "nmuiheaders.h"
 #include <email_services_api.h>
@@ -22,91 +22,102 @@
 static const QString NmSendServiceName = "nmail.com.nokia.symbian.IFileShare";
 
 /*!
-	\class NmApplication
-	\brief Application class, creates main window and handles view switching
+    \class NmApplication
+    \brief Application class, creates main window and handles view switching.
 */
 
 /*!
-    Constructor
+    Constructor.
 */
 NmApplication::NmApplication(QObject *parent, quint32 accountId)
-:QObject(parent),
-mMainWindow(NULL),
-mViewStack(NULL),
-mActiveViewId(NmUiViewNone),
-mUiEngine(NULL),
-mBackAction(NULL),
-mExtensionManager(NULL),
-mMbListModel(NULL),
-mServiceViewId(NmUiViewNone),
-mForegroundService(false),
-mEffects(NULL),
-mAttaManager(NULL),
-mSettingsViewLauncher(NULL),
-mViewReady(false),
-mQueryDialog(NULL),
-mBackButtonPressed(false)
+: QObject(parent),
+  mMainWindow(NULL),
+  mViewStack(NULL),
+  mActiveViewId(NmUiViewNone),
+  mUiEngine(NULL),
+  mBackAction(NULL),
+  mExtensionManager(NULL),
+  mMbListModel(NULL),
+  mServiceViewId(NmUiViewNone),
+  mForegroundService(false),
+  mEffects(NULL),
+  mAttaManager(NULL),
+  mSettingsViewLauncher(NULL),
+  mViewReady(false),
+  mQueryDialog(NULL),
+  mBackButtonPressed(false)
 {
-    NM_FUNCTION;
-
     TRAP_IGNORE(mUiEngine = NmUiEngine::instance());
-
+    
     // Create network access manager and cache for application use.
     mNetManager = new NmViewerViewNetManager(*mUiEngine);
     QNetworkDiskCache *cache = new QNetworkDiskCache();
-    cache->setCacheDirectory(QDesktopServices::storageLocation(QDesktopServices::CacheLocation));
+    cache->setCacheDirectory(
+        QDesktopServices::storageLocation(QDesktopServices::CacheLocation));
     mNetManager->setCache(cache);
-
+    
     createMainWindow();
-
-    // attachment manager can be shared between viewer and editor, ownership in application class
+    
+    // Attachment manager can be shared between viewer and editor.
+    // The application class has the ownership.
     mAttaManager = new NmAttachmentManager(*mUiEngine);
-
+    
     mSendServiceInterface =
-            new NmSendServiceInterface(NmSendServiceName, NULL, *mUiEngine, this);
+        new NmSendServiceInterface(NmSendServiceName, NULL, *mUiEngine, this);
     mSendServiceInterface2 =
-            new NmSendServiceInterface(emailFullServiceNameSend, NULL, *mUiEngine, this);
+        new NmSendServiceInterface(emailFullServiceNameSend, NULL, *mUiEngine, this);
     mUriServiceInterface =
         new NmUriServiceInterface(NULL, *mUiEngine, this);
     mMailboxServiceInterface =
-            new NmMailboxServiceInterface(NULL, *mUiEngine, this);
+        new NmMailboxServiceInterface(NULL, *mUiEngine, this);
     mViewerServiceInterface =
-            new NmViewerServiceInterface(NULL, this, *mUiEngine);
-
+        new NmViewerServiceInterface(NULL, this, *mUiEngine);
+    
     if(accountId != 0) {
         QVariant mailbox;
         mailbox.setValue(mUiEngine->getPluginIdByMailboxId(accountId).id());
         mMailboxServiceInterface->displayInboxByMailboxId(mailbox);
     }
-
+    
     mEffects = new NmUiEffects(*mMainWindow);
 }
 
 /*!
-    Destructor
+    Destructor.
 */
 NmApplication::~NmApplication()
 {
-    NM_FUNCTION;
-
     if (mQueryDialog) {
         delete mQueryDialog;
-        mQueryDialog=NULL;
+        mQueryDialog = NULL;
     }
-
-	delete mSendServiceInterface;
-	delete mSendServiceInterface2;
-	delete mUriServiceInterface;
-	delete mMailboxServiceInterface;
-	delete mViewerServiceInterface;
-
-	resetViewStack();
+    
+    delete mSendServiceInterface;
+    delete mSendServiceInterface2;
+    delete mUriServiceInterface;
+    delete mMailboxServiceInterface;
+    delete mViewerServiceInterface;
+    
+    resetViewStack();
     delete mViewStack;
+    
     NmIcons::freeIcons();
     NmUiEngine::releaseInstance(mUiEngine);
     mUiEngine = NULL;
+    
     delete mBackAction;
+    
+    // Workaround: the main window has to be closed (hidden) before deleting
+    // the extension manager in order to prevent the main window's title bar
+    // from showing when the application is closed.
+    if (mMainWindow) {
+        // Workaround: assert failure may happen if an open main window is
+        // deleted.
+        mMainWindow->close();
+    }
+    
     delete mExtensionManager;
+    
     if (mNetManager) {
         if (mNetManager->cache()) {
             mNetManager->cache()->clear();
@@ -114,92 +125,97 @@
     delete mNetManager;
     mNetManager = NULL;
     }
-    // Effects needs to be deleted before MainWindow.
+    
+    // Effects need to be deleted before MainWindow.
     delete mEffects;
-    if (mMainWindow) {
-        // workaround: assert failure may happen otherwise
-        mMainWindow->close();
-    }
     delete mMainWindow;
     delete mAttaManager;
     delete mSettingsViewLauncher;
 }
 
 /*!
-    Main application window creation
+    Main application window creation.
 */
 void NmApplication::createMainWindow()
 {
     NM_FUNCTION;
-
+    
     bool service = XQServiceUtil::isService();
-
-    // Register custom widget files
+    
+    // Register custom widget files.
     HbStyleLoader::registerFilePath(":nmmessagelistviewitem.widgetml");
     HbStyleLoader::registerFilePath(":nmmessagelistviewitem.css");
     HbStyleLoader::registerFilePath(":nmviewerheader.widgetml");
     HbStyleLoader::registerFilePath(":nmviewerheader.css");
-
-    // Create main window
+    
+    // Create main window.
     mMainWindow = new HbMainWindow();
-
-    // Connect to lazy loading signal
+    
+    // Connect to lazy loading signal.
     QObject::connect(mMainWindow, SIGNAL(viewReady ()),
                      this, SLOT(viewReady()));
-
-    // Create extension manager
+    
+    // Create extension manager.
     mExtensionManager = new NmUiExtensionManager();
-
-    // Create view stack
+    
+    // Create view stack.
     mViewStack = new QStack<NmBaseView*>;
-
-    // Create back action and connect it to prepareForPopView()
+    
+    // Create back action and connect it to prepareForPopView().
     if (mMainWindow) {
         mBackAction = new HbAction(Hb::BackNaviAction,this);
-        connect(mBackAction, SIGNAL(triggered()), this, SLOT(prepareForPopView()));
-
-        // Show mainwindow
-        // Services will active it when the view is ready
+        connect(mBackAction,
+                SIGNAL(triggered()),
+                this,
+                SLOT(prepareForPopView()));
+        
+        // Show mainwindow.
+        // Services will active it when the view is ready.
         if (!service) {
             mMainWindow->show();
         }
     }
-
-    // async operation completion related notifications
-    connect(
-        mUiEngine, SIGNAL(operationCompleted(const NmOperationCompletionEvent &)),
-        this, SLOT(handleOperationCompleted(const NmOperationCompletionEvent &)));
-
+    
+    // Asynchronous operation completion related notifications.
+    connect(mUiEngine,
+            SIGNAL(operationCompleted(const NmOperationCompletionEvent &)),
+            this,
+            SLOT(handleOperationCompleted(const NmOperationCompletionEvent &)));
+    
     mMbListModel = &mUiEngine->mailboxListModel();
-
-    // Start application to mailbox view
-    // If started as service, there is no need to create views
+    
+    // ----------------------------------------------------------------------
+    // TODO: Remove or comment out the following code block when the mail
+    //       wizard starts to work with Mfe.
+    // ----------------------------------------------------------------------
+    // Start application to mailbox view. If started as service, there is no
+    // need to create views.
     if (!service) {
         NmUiStartParam *startParam = new NmUiStartParam(NmUiViewMailboxList);
         enterNmUiView(startParam);
     }
-
+    // ----------------------------------------------------------------------
+    
     if (mMainWindow) {
-        // Start to filter main window events to get "end key" event in all possible situations. Using
-        // event() is not enough to catch the event as it is only called if the view widget has the
-        // focus. Note: if key capturing (xqkeycapture.h) is required it is probably best to implement
-        // an own QMainWindow class and do the capturing there, not in the views.
+        // Start to filter main window events to get "end key" event in all
+        // possible situations. Using event()is not enough to catch the event
+        // as it is only called if the view widget has the focus. Note: if
+        // key capturing (xqkeycapture.h) is required it is probably best to
+        // implement an own QMainWindow class and do the capturing there, not
+        // in the views.
         mMainWindow->installEventFilter(this);
-    
-        // Optimize the custom paint functions. 
-        // Currently effects to NmViewerHeader::paint & NmAttachmentListWidget::paint
+        // Optimize the custom paint functions.
+        // Currently effects to NmViewerHeader::paint() and
+        // NmAttachmentListWidget::paint().
         mMainWindow->setOptimizationFlag(QGraphicsView::DontSavePainterState);    
     }
 }
 
 /*!
-    Slot. React to view ready signal and call
-    current view method.
+    Slot. React to view ready signal and call current view method.
 */
 void NmApplication::viewReady()
 {
-    NM_FUNCTION;
-
     mViewReady = true;
     if (mViewStack && !mViewStack->isEmpty()) {
     	NmBaseView *currentView = mViewStack->top();
@@ -210,91 +226,84 @@
 }
 
 /*!
-    Event filter. End key is filtered from the main window and either the view takes case of the
-	or the app is exited by default.
+    Event filter. End key is filtered from the main window and either the
+    view takes case of the or the app is exited by default.
 */
 bool NmApplication::eventFilter(QObject *obj, QEvent *event)
 {
-    NM_FUNCTION;
-
     bool consumed(false);
-
+    
     if (obj && obj == mMainWindow && event && event->type() == QEvent::KeyPress) {
         QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
-
-        if (keyEvent->key() == Qt::Key_No) { // end key, the "red" key
-
-            // exit application if no pending operations are on-going
+        if (keyEvent->key() == Qt::Key_No) {
+            // End key, the "red" key.
+            // Exit application if no pending operations are on-going.
         }
     }
-
+    
     if (!consumed) {
         consumed = QObject::eventFilter(obj, event);
     }
-
+    
     return consumed;
 }
 
 /*!
-    Push view to view stack
+    Push view to view stack.
 */
 void NmApplication::pushView(NmBaseView *newView)
 {
-    NM_FUNCTION;
-
     if (newView && mViewStack) {
-        NM_COMMENT("nmailui: view exists");
+        NM_COMMENT("NmApplication::pushView() : view exists.");
         newView->setNavigationAction(mBackAction);
-
-        // Store view to be hidden
+        
+        // Store view to be hidden.
         NmBaseView *hideView(NULL);
         if (!mViewStack->isEmpty()) {
             hideView = mViewStack->top();
         }
 		else {
-			// viewReady should be informed immediatelly
+			// viewReady should be informed immediately.
 			if (mViewReady) {
 				newView->viewReady();
 			}
 		}
-
-        // activate new view
-    	NM_COMMENT("nmailui: addView");
+        
+        // Activate new view.
+    	NM_COMMENT("NmApplication::pushView() : add view.");
         mMainWindow->addView(newView);
         mViewStack->push(newView);
         mMainWindow->setCurrentView(newView);
         mActiveViewId=newView->nmailViewId();
-
-        // Set toolbars orientation
+        
+        // Set toolbars orientation.
         HbToolBar *tb = newView->toolBar();
         if (tb) {
             tb->setOrientation(Qt::Horizontal);
         }
-
-        // hide old view
-        NM_COMMENT("nmailui: removeView");
+        
+        // Hide old view.
+        NM_COMMENT("NmApplication::pushView() : remove view.");
         if (hideView) {
             mMainWindow->removeView(hideView);
         }
-
-        NM_COMMENT("nmailui: pushView done");
     }
 }
 
 /*!
-    Ask from view that is it ok to pop view. This kind of 2-phase popView is needed
-    because view may show query dialog for user response.
+    Ask from view that is it ok to pop view. This kind of 2-phase popView is
+    needed because view may show query dialog for user response.
  */
 void NmApplication::prepareForPopView()
 {
     if (mViewStack && mViewStack->size() > 0) {
-        // Get view pointer
+        // Get view pointer.
         NmBaseView *view = mViewStack->top();
         if (view){
 			NmUiViewId topViewId = view->nmailViewId();
 			
-			// We must know in popView, are we coming with back button from message view
-			// to prevent the send animation.
+			// We must know in popView, are we coming with back button from
+			// message view to prevent the send animation.
 			if (topViewId == NmUiViewMessageEditor) {
 				mBackButtonPressed = true;
 			}
@@ -303,8 +312,8 @@
             view->okToExitView();        
         }
     }
-    // If the view stack is now empty quit the app
-    // This happens also when the app has been started as a service
+    // If the view stack is now empty quit the app. This happens also when
+    // the app has been started as a service
     else if (mViewStack && mViewStack->size() == 0) {
         exitApplication();
     }
@@ -315,16 +324,16 @@
 */
 void NmApplication::popView()
 {
-    NM_FUNCTION;
     if (mViewStack && mViewStack->size() > 0) {
         NmBaseView *view = mViewStack->top();    
         if (view) {
-            // Get top view id
+            // Get top view id.
             NmUiViewId topViewId = view->nmailViewId();
-    
-            // Prepare for send animation if returing from editor and message has been sent.
+            
+            // Prepare for send animation if returing from editor and message
+            // has been sent.
             if (topViewId == NmUiViewMessageEditor && mUiEngine->isSendingMessage()) {
-				// If we are coming from message editor with back button
+				// If we are coming from message editor with back button.
 				// do not prepare the send animation.
 				if (!mBackButtonPressed) {
 					mEffects->prepareEffect(NmUiEffects::NmEditorSendMessageAnimation);
@@ -332,13 +341,13 @@
 	        }
             mBackButtonPressed = false;
             mViewStack->pop();
-            // Call custom exit function
+            // Call custom exit function.
             view->aboutToExitView();
             // Remove view from stack.
             mMainWindow->removeView(view);
-    
-            // if we were in editor and sent a message, pop viewer from stack first
-            // so we can go straight to mail list
+            
+            // If we were in editor and sent a message, pop viewer from stack
+            // first so we can go straight to mail list.
             if (!mViewStack->isEmpty() && topViewId == NmUiViewMessageEditor &&
                 mUiEngine->isSendingMessage() &&
                 mViewStack->top()->nmailViewId() == NmUiViewMessageViewer) {
@@ -347,30 +356,29 @@
                 delete tmpView;
                 tmpView = NULL;
             }
-    
+            
             if (!mViewStack->isEmpty()) {
-                // Activate next view in stack
+                // Activate next view in stack.
                 NmBaseView *showView = mViewStack->top();
                 mMainWindow->addView(showView);
                 mMainWindow->setCurrentView(showView);
-                // Store activated view id
+                // Store activated view id.
                 mActiveViewId=showView->nmailViewId();
                 // Perform send animation if requested.
                 mEffects->startEffect(NmUiEffects::NmEditorSendMessageAnimation);
             }
-    
+            
             delete view;
             view = NULL;
-    
-            // If view was started as service, move the app now
-            // to the background, unless it was started when the app
-            // was already in foreground..
+            
+            // If view was started as service, move the app now to the
+            // background, unless it was started when the app was already in
+            // foreground.
             if (mServiceViewId == topViewId) {
                 mServiceViewId = NmUiViewNone;
-                NM_COMMENT("Returned from service view");
-    
-                // if started as embedded or while the app was in foreground,
-                // do not hide the app
+                NM_COMMENT("NmApplication::popView() : returned from service view.");
+                // If started as embedded or while the app was in foreground,
+                // do not hide the app.
                 if (!XQServiceUtil::isEmbedded() &&
                     !mForegroundService) {
                     XQServiceUtil::toBackground(true);
@@ -378,9 +386,9 @@
             }
         }
     }
-
-    // If the view stack is now empty quit the app
-    // This happens also when the app has been started as a service
+    
+    // If the view stack is now empty quit the app. This happens also when
+    // the app has been started as a service.
     if (mViewStack && mViewStack->size() == 0) {
         exitApplication();
     }
@@ -391,8 +399,6 @@
 */
 void NmApplication::resetViewStack()
 {
-    NM_FUNCTION;
-
     if (mViewStack && !mViewStack->isEmpty()) {
 	    int viewCount = mViewStack->count();
         // Pop and destroy all views
@@ -406,28 +412,28 @@
 }
 
 /*!
-    Function activates view based on viewId parameter.
-    If requested view is already open, it is requested to reload.
-    Otherwise view object is created and pushed to view stack
+    Function activates view based on viewId parameter. If requested view is
+    already open, it is requested to reload. Otherwise view object is created
+    and pushed to view stack.
 */
 void NmApplication::enterNmUiView(NmUiStartParam *startParam)
 {
     NM_FUNCTION;
-
-    // Check the validity of start parameter object
+    
+    // Check the validity of start parameter object.
     if (startParam) {
-
+        
         if (startParam->service() && mMainWindow) {
-			// When the message list is started as a service previous views are removed
-			// from the stack. Open editors are not closed.
-			// Also if the view is same than the new one, keep it open (reload the content).
-
-
-		    // reset the foreground service flag while popping the views
+			// When the message list is started as a service previous views
+            // are removed from the stack. Open editors are not closed. Also
+            // if the view is same than the new one, keep it open (reload the
+            // content).
+            
+		    // Reset the foreground service flag while popping the views.
 		    bool previousForegroundService = mForegroundService;
 		    mForegroundService = true;
-
-		    // at least one view must remain in the stack
+		    
+		    // At least one view must remain in the stack.
 			while (mViewStack->count( )> 1) {
 			    NmUiViewId topId = mViewStack->top()->nmailViewId();
 			    if (topId != NmUiViewMessageEditor &&
@@ -442,10 +448,10 @@
 			}
 			mForegroundService = previousForegroundService;
         }
-
-        // Check whether requested view is already active
-        // and if so, ask it to reload contents with new start parameter data
-        // Do not reuse the view if started as service to editor view (ShareUI)
+        
+        // Check whether requested view is already active and if so, ask it
+        // to reload contents with new start parameter data. Do not reuse the
+        // view if started as service to editor view (ShareUI).
         if (mActiveViewId == startParam->viewId() &&
         	(!startParam->service() || mActiveViewId!=NmUiViewMessageEditor)) {
             mViewStack->top()->reloadViewContents(startParam);
@@ -463,7 +469,7 @@
                 case NmUiViewMessageList:
                 {
                     // Check the topmost view. If it is an editor, do not open
-                    // a new mail list view
+                    // a new mail list view.
                     if (startParam->service() && !mViewStack->isEmpty() &&
                         mViewStack->top()->nmailViewId()==NmUiViewMessageEditor) {
                         break;
@@ -484,14 +490,14 @@
                         mViewStack->top()->nmailViewId() == NmUiViewMessageEditor) {
                         break;
                     }
-
+                    
                     NmMessageListModel &model =
                         mUiEngine->messageListModelForSearch(startParam->mailboxId());
-
+                    
                     NmMessageSearchListView *searchListView = new NmMessageSearchListView(
                         *this, startParam, *mUiEngine, model,
                         new HbDocumentLoader(mMainWindow));
-
+                    
                     pushView(searchListView);
                 }
                 break;
@@ -503,30 +509,29 @@
                     pushView(new NmEditorView(*this, startParam, *mUiEngine, *mAttaManager));
                     break;
                 default:
-                    // Reset view stack and exit application
+                    // Reset view stack and exit application.
                     delete startParam;
                     startParam = NULL;
                     resetViewStack();
                     break;
             }
         }
-
+        
         if (startParam && startParam->service()) {
-            // Store the view id that was launched as service
+            // Store the view id that was launched as service.
             mServiceViewId = mActiveViewId;
 		}
     }
 }
 
 /*!
-    Function can be used from views to exit the application
-    View stack is cleared. Views can connect exit menu
-    selection to this slot.
+    Function can be used from views to exit the application. View stack is
+    cleared. Views can connect exit menu selection to this slot.
 */
 void NmApplication::exitApplication()
 {
     NM_FUNCTION;
-
+    
     delete mSendServiceInterface;
     mSendServiceInterface = NULL;
     delete mSendServiceInterface2;
@@ -542,13 +547,11 @@
 }
 
 /*!
-   Exit the application in the next event loop
+   Exit the application in the next event loop.
 */
 void NmApplication::delayedExitApplication()
 {
-    NM_FUNCTION;
-
-    // Exit the application in the next event loop
+    // Exit the application in the next event loop.
     QMetaObject::invokeMethod(this, "exitApplication", Qt::QueuedConnection);
 }
 
@@ -557,38 +560,30 @@
 */
 HbMainWindow *NmApplication::mainWindow()
 {
-    NM_FUNCTION;
-
     return mMainWindow;
 }
 
 /*!
-    Getter for main UI extension manager
+    Getter for main UI extension manager.
 */
 NmUiExtensionManager &NmApplication::extManager()
 {
-    NM_FUNCTION;
-
     return *mExtensionManager;
 }
 
 /*!
-    Getter for network access manager
+    Getter for network access manager.
 */
 NmViewerViewNetManager &NmApplication::networkAccessManager()
 {
-    NM_FUNCTION;
-
     return *mNetManager;
 }
 
 /*!
-    screen size. Function returns curtent screen size
+    Get the screen size. Function returns curtent screen size.
 */
 QSize NmApplication::screenSize()
 {
-    NM_FUNCTION;
-
     QSize ret(0,0);
     if (mMainWindow){
         HbDeviceProfile currentP = HbDeviceProfile::current();
@@ -596,7 +591,7 @@
         QSize curPSize = currentP.logicalSize();
         QSize altPSize = altP.logicalSize();
         if (mMainWindow->orientation() == Qt::Horizontal) {
-            // Get wide profile size in landscape
+            // Get wide profile size in landscape.
             if (curPSize.width() > altPSize.width()) {
                 ret = curPSize;
             }
@@ -605,7 +600,7 @@
             }
         }
         else {
-            // Get narrow profile size in portrait
+            // Get narrow profile size in portrait.
             if (curPSize.width() < altPSize.width()) {
                 ret = curPSize;
             }
@@ -618,12 +613,10 @@
 }
 
 /*!
-    handles all asynchronous operation's completions at UI level
+    Handles all asynchronous operation's completions at UI level.
 */
 void NmApplication::handleOperationCompleted(const NmOperationCompletionEvent &event)
 {
-    NM_FUNCTION;
-
     if (event.mCompletionCode != NmNoError && event.mCompletionCode != NmCancelError) {
         if (event.mOperationType == Synch && event.mCompletionCode == NmAuthenticationError) {
             mLastOperationMailbox = event.mMailboxId;
@@ -643,7 +636,7 @@
             mQueryDialog = NmUtilities::displayQuestionNote(hbTrId("txt_mail_dialog_server_settings_incorrect"),
                                                     this, SLOT(launchSettings(HbAction*)));
         }
-        // following applies to all operation/event types
+        // Following applies to all operation/event types.
         if (event.mCompletionCode == NmConnectionError) {
             NmUtilities::displayWarningNote(hbTrId("txt_mail_dialog_mail_connection_error"));
         }
@@ -651,22 +644,20 @@
 }
 
 /*!
-    launches settings view of the specified mailbox
+    Launches settings view of the specified mailbox.
 */
 void NmApplication::launchSettings(HbAction* action)
 {
-    NM_FUNCTION;
-
-    // Check whether yes button was pressed
+    // Check whether yes button was pressed.
     if (mQueryDialog&& action == mQueryDialog->actions().at(0)) {
-        // create settingslauncher if doesn't exist
+        // Create settingslauncher if doesn't exist.
         if(!mSettingsViewLauncher) {
             mSettingsViewLauncher = new NmSettingsViewLauncher();
             }
-        // mailboxname required
-        NmMailboxMetaData *mailboxMetaData = mUiEngine->mailboxById(mLastOperationMailbox); // no ownership
+        // Mailboxname required.
+        NmMailboxMetaData *mailboxMetaData = mUiEngine->mailboxById(mLastOperationMailbox); // No ownership.
         if( mailboxMetaData ) {
-            // launch
+            // Launch.
             mSettingsViewLauncher->launchSettingsView(mLastOperationMailbox, mailboxMetaData->name());
         }
     }
@@ -674,13 +665,13 @@
 
 /*!
 	Stores the visibility state, e.g. when the service was launched.
-	\return true if the app was visible
+	\return true if the app was visible.
 */
 bool NmApplication::updateVisibilityState()
 {
-    // At the moment there is no good way to check the foreground state
+    // At the moment there is no good way to check the foreground state.
     QWindowSurface *surface = mMainWindow->windowSurface();
 	mForegroundService = (surface != 0);
-	NM_COMMENT(QString("NmApplication::updateVisibilityState fg=%1").arg(mForegroundService));
+	NM_COMMENT(QString("NmApplication::updateVisibilityState() : mForegroundService == %1").arg(mForegroundService));
 	return mForegroundService;
 }
--- a/emailuis/nmailui/src/nmeditorcontent.cpp	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailuis/nmailui/src/nmeditorcontent.cpp	Fri Jul 02 15:55:16 2010 +0300
@@ -55,7 +55,7 @@
     textDocument->setParent(mEditorWidget); // ownership changes
 
     mScrollArea = qobject_cast<NmBaseViewScrollArea *>
-        (documentLoader->findObject(NMUI_EDITOR_SCROLL_AREA));
+        (documentLoader->findWidget(NMUI_EDITOR_SCROLL_AREA));
     mScrollArea->setScrollDirections(Qt::Vertical | Qt::Horizontal);
     
     // Enable style picker menu item.
--- a/emailuis/nmailui/src/nmeditorview.cpp	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailuis/nmailui/src/nmeditorview.cpp	Fri Jul 02 15:55:16 2010 +0300
@@ -118,15 +118,18 @@
 
     // Use document loader to load the view
     bool ok(false);
+
+    setObjectName(QString(NMUI_EDITOR_VIEW));
+    QObjectList objectList;
+    objectList.append(this);
+    // Pass the view to documentloader. Document loader uses this view
+    // when docml is parsed, instead of creating new view.
+    // documentloader is created in constructor
+    mDocumentLoader->setObjectTree(objectList);
+
     mWidgetList = mDocumentLoader->load(NMUI_EDITOR_VIEW_XML, &ok);
 
-    if (ok == true && mWidgetList.count()) {
-        // Set view
-        QGraphicsWidget *view = mDocumentLoader->findWidget(NMUI_EDITOR_VIEW);
-        if (view){
-            setWidget(view);
-        }
-
+   if (ok) {
         mContent = new NmEditorContent(this, mDocumentLoader, 
             mApplication.networkAccessManager(), mApplication);
 
@@ -1304,13 +1307,16 @@
         NmId mailboxId = mMessage->envelope().mailboxId();
         NmId folderId = mMessage->envelope().folderId();
         NmId msgId = mMessage->envelope().messageId();
-
+        NmMessagePriority messagePriority = mMessage->envelope().priority();        
+        
         delete mMessage;
         mMessage = NULL;
         
         mMessage = mUiEngine.message(mailboxId, folderId, msgId);
 
         if (mMessage) {
+            mMessage->envelope().setPriority(messagePriority);
+            mMessage->envelope().setHasAttachments(true);
             // Get attachment list from the message
             QList<NmMessagePart*> attachmentList;
             mMessage->attachmentList(attachmentList);
@@ -1468,11 +1474,24 @@
         NmId mailboxId = mMessage->envelope().mailboxId();
         NmId folderId = mMessage->envelope().folderId();
         NmId msgId = mMessage->envelope().messageId();
+        NmMessagePriority messagePriority = mMessage->envelope().priority();    
 
         delete mMessage;
         mMessage = NULL;
     
         mMessage = mUiEngine.message(mailboxId, folderId, msgId);
+        
+        if(mMessage) {
+            // Set the correct priority
+            mMessage->envelope().setPriority(messagePriority);    
+            
+            // If there is no more attachments in the message, set the correct value
+            QList<NmMessagePart*> attachmentList;
+            mMessage->attachmentList(attachmentList);
+            if(attachmentList.count() == 0) {
+                mMessage->envelope().setHasAttachments(false);
+            }
+        }
     }
 }
 
--- a/emailuis/nmailui/src/nmmessagesearchlistview.cpp	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailuis/nmailui/src/nmmessagesearchlistview.cpp	Fri Jul 02 15:55:16 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 static const char *NMUI_MESSAGE_SEARCH_LIST_VIEW_XML = ":/docml/nmmessagesearchlistview.docml";
-static const char *NMUI_MESSAGE_SEARCH_LIST_VIEW = "NmMessageListView";
+static const char *NMUI_MESSAGE_SEARCH_LIST_VIEW = "NmMessageSearchListView";
 static const char *NMUI_MESSAGE_SEARCH_LIST_TREE_LIST = "MessageTreeList";
 static const char *NMUI_MESSAGE_SEARCH_LIST_NO_MESSAGES = "MessageListNoMessages";
 static const char *NMUI_MESSAGE_SEARCH_LIST_INFO_LABEL = "LabelGroupBox";
@@ -188,6 +188,40 @@
     }
 
     if (ok) {
+        // Load the search panel (contains the line edit and the push button
+        // widgets.
+        mLineEdit = qobject_cast<HbLineEdit *>(
+            mDocumentLoader->findWidget(NMUI_MESSAGE_SEARCH_LIST_LINE_EDIT));
+
+        if (mLineEdit) {
+            connect(mLineEdit, SIGNAL(textChanged(QString)), 
+                    this, SLOT(criteriaChanged(QString)));
+        }
+    
+        mPushButton = qobject_cast<HbPushButton *>(
+        mDocumentLoader->findWidget(NMUI_MESSAGE_SEARCH_LIST_PUSH_BUTTON));
+
+        if (mPushButton) {
+            // button is disabled when line edit is empty
+            mPushButton->setEnabled(false);
+
+            // The push button both starts and stops the search.
+            connect(mPushButton, SIGNAL(clicked()), this, SLOT(toggleSearch()));
+            mPushButton->setIcon(HbIcon("qtg_mono_search"));
+        }
+
+        // Load the info label.
+        mInfoLabel = qobject_cast<HbGroupBox *>(
+            mDocumentLoader->findWidget(NMUI_MESSAGE_SEARCH_LIST_INFO_LABEL));
+
+        if (mInfoLabel) {
+            NM_COMMENT("NmMessageSearchListView: info label loaded");
+
+            // If the heading is empty, the widget will not be shown which in
+            // turn would ruin the layout.
+            mInfoLabel->setHeading(" ");
+        }
+
         // Get the message list widget.
         mMessageListWidget = qobject_cast<HbTreeView *>(
             mDocumentLoader->findWidget(NMUI_MESSAGE_SEARCH_LIST_TREE_LIST));
@@ -210,15 +244,6 @@
                                                      HbAbstractItemView::Expand);
         }
 
-        // Load the info label.
-        mInfoLabel = qobject_cast<HbGroupBox *>(
-            mDocumentLoader->findWidget(NMUI_MESSAGE_SEARCH_LIST_INFO_LABEL));
-
-        if (mInfoLabel) {
-            NM_COMMENT("NmMessageSearchListView: info label loaded");
-            mInfoLabel->hide();
-        }
-
         // Load the no messages label.
         mNoMessagesLabel = qobject_cast<HbLabel *>(
             mDocumentLoader->findWidget(NMUI_MESSAGE_SEARCH_LIST_NO_MESSAGES));
@@ -227,24 +252,6 @@
             NMLOG("NmMessageSearchListView: No messages label loaded.");
             mNoMessagesLabel->hide();
         }
-
-        // Load the search panel.
-        mLineEdit = qobject_cast<HbLineEdit *>(
-            mDocumentLoader->findWidget(NMUI_MESSAGE_SEARCH_LIST_LINE_EDIT));
-        if (mLineEdit) {
-            connect(mLineEdit, SIGNAL(textChanged(QString)), 
-                this, SLOT(criteriaChanged(QString)));
-        }
-        
-        mPushButton = qobject_cast<HbPushButton *>(
-            mDocumentLoader->findWidget(NMUI_MESSAGE_SEARCH_LIST_PUSH_BUTTON));
-        if (mPushButton) {
-			// button is disabled when line edit is empty
-			mPushButton->setEnabled(false);
-            // The push button both starts and stops the search.
-            connect(mPushButton, SIGNAL(clicked()), this, SLOT(toggleSearch()));
-            mPushButton->setIcon(HbIcon("qtg_mono_search"));
-        }
     }
     else {
         NM_ERROR(1, "NmMessageSearchListView: failed to load widgets from XML");
@@ -618,7 +625,13 @@
 
         connect(&mMsgListModel, SIGNAL(setNewParam(NmUiStartParam*)),
                 this, SLOT(reloadViewContents(NmUiStartParam*)), Qt::UniqueConnection);
+    }
 
+    // The info label cannot be hidden when constructed because doing so would
+    // ruin the layout (for example the line edit widget's width would be too
+    // short in lanscape).
+    if (mInfoLabel) {
+        mInfoLabel->hide();
     }
 }
 
Binary file emailuis/nmailui/translations/mail.qm has changed
--- a/emailuis/nmailui/translations/mail.ts	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailuis/nmailui/translations/mail.ts	Fri Jul 02 15:55:16 2010 +0300
@@ -7,7 +7,7 @@
     <source>(No Subject)</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_02</extra-loc-viewid>
+    <extra-loc-viewid>mail_002</extra-loc-viewid>
     <extra-loc-positionid>dblist_3_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -17,7 +17,7 @@
     <source>Delete</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_02</extra-loc-viewid>
+    <extra-loc-viewid>mail_002</extra-loc-viewid>
     <extra-loc-positionid>opt</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -32,12 +32,22 @@
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
+<message numerus="no" id="txt_mail_subhead_outbox">
+    <comment>Text for indicating the current folder in mail list view. Component is simple label</comment>        
+    <source>Outbox</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_mail_subhead_inbox</extra-loc-layout_id>    
+    <extra-loc-viewid>mail_001</extra-loc-viewid>
+    <extra-loc-positionid>subhead</extra-loc-positionid>
+    <extra-loc-feature>mail</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
 <message numerus="no" id="txt_mail_menu_remove_all">
     <comment>Item specific menu item for removing all attachments from the highlighted mail in mail editor</comment>        
     <source>Remove all</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04</extra-loc-viewid>
+    <extra-loc-viewid>mail_004</extra-loc-viewid>
     <extra-loc-positionid>menu</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -47,7 +57,7 @@
     <source>To:</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>none</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04_c</extra-loc-viewid>
+    <extra-loc-viewid>mail_004_c</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -63,11 +73,11 @@
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mail_dialog_save_message_to_drafts">
-    <comment>Dialog that is shown if the editor if the user tries to go back without sending the message.</comment>        
+    <comment>Dialog that is shown if the editor if the user tries to go back without sending the message. Drafts refers to the name of the folder where unsent messages are saved.</comment>        
     <source>Do you want to save this message to drafts?</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04</extra-loc-viewid>
+    <extra-loc-viewid>mail_004</extra-loc-viewid>
     <extra-loc-positionid>dialog</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -77,7 +87,7 @@
     <source>Normal</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_menu_sec_add</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04</extra-loc-viewid>
+    <extra-loc-viewid>mail_004</extra-loc-viewid>
     <extra-loc-positionid>opt_1_sub</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -87,17 +97,17 @@
     <source>Attach</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_toolbar_tiny_2</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04</extra-loc-viewid>
+    <extra-loc-viewid>mail_004</extra-loc-viewid>
     <extra-loc-positionid>button</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mail_list_photo">
-    <comment>Attach toolbar extension item in the viewer, opens images fetch for selecting image. Allows the user to attach an image to the message.</comment>        
+    <comment>Attach toolbar extension item in the editor, opens images fetch for selecting image. Allows the user to attach an image to the message. Note! The text is Image in the visio file but it is not consistent with other apps so it has been decided to change.</comment>        
     <source>Photo</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_004_b</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -117,7 +127,7 @@
     <source>Cc:</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>none</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_03</extra-loc-viewid>
+    <extra-loc-viewid>mail_003</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -127,7 +137,7 @@
     <source>Mark as read</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_01_c</extra-loc-viewid>
+    <extra-loc-viewid>mail_001_c</extra-loc-viewid>
     <extra-loc-positionid>menu</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -137,7 +147,7 @@
     <source>Hide cc / bcc</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04_a</extra-loc-viewid>
+    <extra-loc-viewid>mail_004_a</extra-loc-viewid>
     <extra-loc-positionid>opt</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -147,7 +157,7 @@
     <source>Send</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_toolbar_tiny_2</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04</extra-loc-viewid>
+    <extra-loc-viewid>mail_004</extra-loc-viewid>
     <extra-loc-positionid>button</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -167,7 +177,7 @@
     <source>Reply all</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_02</extra-loc-viewid>
+    <extra-loc-viewid>mail_002</extra-loc-viewid>
     <extra-loc-positionid>opt</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -177,13 +187,13 @@
     <source>Reply</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_02</extra-loc-viewid>
+    <extra-loc-viewid>mail_002</extra-loc-viewid>
     <extra-loc-positionid>opt</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mail_shareui_send_as_mail">
-    <comment>text for share ui component. By selecting this the selected content will be sent as mail</comment>        
+    <comment>text for share ui component. By selecting this the selected content will be sent as mail. For selecting content from another application to be sent as mail.</comment>        
     <source>Send as new mail</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_popup_pri_graphic</extra-loc-layout_id>    
@@ -197,7 +207,7 @@
     <source>High</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_menu_sec_add</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04</extra-loc-viewid>
+    <extra-loc-viewid>mail_004</extra-loc-viewid>
     <extra-loc-positionid>opt_1_sub</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -207,7 +217,7 @@
     <source>(No messages)</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_mail_dblist_val_no_subject</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_01</extra-loc-viewid>
+    <extra-loc-viewid>mail_001</extra-loc-viewid>
     <extra-loc-positionid>dblist_2</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -217,7 +227,7 @@
     <source>High</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>none</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04_c</extra-loc-viewid>
+    <extra-loc-viewid>mail_004_c</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -227,7 +237,7 @@
     <source>Settings</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_01_a</extra-loc-viewid>
+    <extra-loc-viewid>mail_001_a</extra-loc-viewid>
     <extra-loc-positionid>opt</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -237,7 +247,7 @@
     <source>New</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_toolbar_tiny_2</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_01</extra-loc-viewid>
+    <extra-loc-viewid>mail_001</extra-loc-viewid>
     <extra-loc-positionid>button</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -247,7 +257,7 @@
     <source>Sending mail %[]1 failed. Try to send it again or press back to cancel</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04</extra-loc-viewid>
+    <extra-loc-viewid>mail_004</extra-loc-viewid>
     <extra-loc-positionid>dialog</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -257,7 +267,7 @@
     <source>Not enough memory - downloading canceled</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_02_a</extra-loc-viewid>
+    <extra-loc-viewid>mail_002_a</extra-loc-viewid>
     <extra-loc-positionid>dialog</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -307,7 +317,7 @@
     <source>Delete</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_01_c</extra-loc-viewid>
+    <extra-loc-viewid>mail_001_c</extra-loc-viewid>
     <extra-loc-positionid>menu</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -317,7 +327,17 @@
     <source>Subject:</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>none</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04_c</extra-loc-viewid>
+    <extra-loc-viewid>mail_004_c</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>mail</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_mail_status_menu_sending">
+    <comment>Secondary text for status menu item: indicates the sending progress is ongoing.</comment>        
+    <source>Sending in progress</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>qtl_notifdialog_sec_medium_graphic</extra-loc-layout_id>    
+    <extra-loc-viewid>mail_001_d</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -327,7 +347,7 @@
     <source>(%L1 Mb)</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_02</extra-loc-viewid>
+    <extra-loc-viewid>mail_002</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -337,7 +357,7 @@
     <source>Sending, please wait</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_notifdialog_pri2</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04</extra-loc-viewid>
+    <extra-loc-viewid>mail_004</extra-loc-viewid>
     <extra-loc-positionid>dialog</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -347,27 +367,37 @@
     <source>Invalid mail address: %[]1. Send anyway?</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04</extra-loc-viewid>
+    <extra-loc-viewid>mail_004</extra-loc-viewid>
     <extra-loc-positionid>dialog</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
+<message numerus="no" id="txt_mail_opt_change_folder">
+    <comment>options menu item for changing the folder </comment>        
+    <source>Folders</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>    
+    <extra-loc-viewid>mail_001_a</extra-loc-viewid>
+    <extra-loc-positionid>opt_2</extra-loc-positionid>
+    <extra-loc-feature>mail</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
 <message numerus="no" id="txt_mail_list_searching">
     <comment>Text for indicating that the search is ongoing in mail list view. Component is simple label</comment>        
-    <source>Seaching</source>
+    <source>Searching</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_mail_subhead_inbox</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_08</extra-loc-viewid>
+    <extra-loc-viewid>mail_008</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mail_editor_subject">
-    <comment>Subject label in mail editor</comment>        
+    <comment>Subject label in mail editor. Label for a field in message editor in which the user enters the subject of the message.</comment>        
     <source>Subject:</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_mail_editor_to</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04</extra-loc-viewid>
+    <extra-loc-viewid>mail_004</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -377,7 +407,7 @@
     <source>From:</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>none</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_03</extra-loc-viewid>
+    <extra-loc-viewid>mail_003</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -387,7 +417,7 @@
     <source>Deleted items</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_menu_sec_add</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_01_a</extra-loc-viewid>
+    <extra-loc-viewid>mail_001_a</extra-loc-viewid>
     <extra-loc-positionid>opt_2_sub</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -397,7 +427,7 @@
     <source>Low</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>none</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04_c</extra-loc-viewid>
+    <extra-loc-viewid>mail_004_c</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -407,7 +437,7 @@
     <source>Cc:</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>none</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04_c</extra-loc-viewid>
+    <extra-loc-viewid>mail_004_c</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -417,7 +447,7 @@
     <source>Add priority</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04</extra-loc-viewid>
+    <extra-loc-viewid>mail_004</extra-loc-viewid>
     <extra-loc-positionid>opt_1</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -427,7 +457,7 @@
     <source>New Mail</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_notifdialog_sec_medium_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_01_d</extra-loc-viewid>
+    <extra-loc-viewid>mail_001_d</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -443,11 +473,11 @@
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mail_dialog_loading_mail_content">
-    <comment>Wait note shown until the mail content is loaded </comment>        
+    <comment>Wait note shown until the mail content is loaded. Dublicate. I need to check which one is used in implementation.</comment>        
     <source>Loading mail content</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri3</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_02</extra-loc-viewid>
+    <extra-loc-viewid>mail_002</extra-loc-viewid>
     <extra-loc-positionid>dialog</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -462,12 +492,22 @@
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
+<message numerus="no" id="txt_mail_status_menu_unset">
+    <comment>Primary text for status menu item: indicates that there are unsent messages in outbox. %[]1 is account name.</comment>        
+    <source>%[]1: Unsent</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>qtl_notifdialog_pri_medium_graphic</extra-loc-layout_id>    
+    <extra-loc-viewid>mail_001_d</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>mail</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
 <message numerus="no" id="txt_mail_viewer_opt_forward">
     <comment>Options menu item in mail viewer: opens editor for forwarding</comment>        
     <source>Forward</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_02</extra-loc-viewid>
+    <extra-loc-viewid>mail_002</extra-loc-viewid>
     <extra-loc-positionid>opt</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -482,6 +522,16 @@
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
+<message numerus="no" id="txt_mail_dialog_delete_message">
+    <comment>This conifrmation is shown if the user presses &quot;Back&quot; in the editor. Selecting yes deletes the composed message. &quot;No&quot; returns to the editor.</comment>        
+    <source>Delete message?</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
+    <extra-loc-viewid>mail_004</extra-loc-viewid>
+    <extra-loc-positionid>dialog</extra-loc-positionid>
+    <extra-loc-feature>mail</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
 <message numerus="no" id="txt_mail_dialog_invalid_mail_address">
     <comment>Note in editor when the user has typed incorrect mail address (e.g. without @-character). %[]1 is replaced with the name of the invalid mail address.</comment>        
     <source>Invalid mail address: %[]1</source>
@@ -493,11 +543,11 @@
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mail_list_new_video">
-    <comment>Attach toolbar extension item in the viewer, opens camera for taking a new video</comment>        
+    <comment>Attach toolbar extension item in the editor, opens camera for taking a new video</comment>        
     <source>New video</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_004_b</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -507,17 +557,17 @@
     <source>Re:</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_02</extra-loc-viewid>
+    <extra-loc-viewid>mail_002</extra-loc-viewid>
     <extra-loc-positionid>dblist_3_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mail_dialog_select_file">
-    <comment>Title text in file picker view. File picker view is opened when the user selects &quot;Other&quot; option from attachment list.</comment>        
+    <comment>Title text in file picker view. File picker view is opened when the user selects &quot;Other&quot; option from attachment list. For attaching files to mail messages. Underneath a list of selectable files is displayed.</comment>        
     <source>Select file</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_07</extra-loc-viewid>
+    <extra-loc-viewid>mail_007</extra-loc-viewid>
     <extra-loc-positionid>dpophead</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -527,7 +577,7 @@
     <source>Open</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_01_c</extra-loc-viewid>
+    <extra-loc-viewid>mail_001_c</extra-loc-viewid>
     <extra-loc-positionid>menu</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -537,9 +587,9 @@
     <source>Mail</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_pri_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>Mail</extra-loc-viewid>
+    <extra-loc-viewid>mail</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
-    <extra-loc-feature>Mail</extra-loc-feature>
+    <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mail_dblist_no_messages_matched_your_search">
@@ -547,17 +597,27 @@
     <source>No messages matched your search. Try another search term. </source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_mail_dblist_val_no_subject</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_08</extra-loc-viewid>
+    <extra-loc-viewid>mail_008</extra-loc-viewid>
     <extra-loc-positionid>dblist_4</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
+<message numerus="no" id="txt_mail_list_sound">
+    <comment>Attach toolbar extension item in the editor, opens music fetch for selecting sound file. Allows the user to attach a sound file to the message. Note! The text is Music in the visio file but it is not consistent with other apps so it has been decided to change.</comment>        
+    <source>Sound</source>
+    <translation variants="yes" type="unfinished"></translation>
+    <extra-loc-layout_id>qtl_list_pri</extra-loc-layout_id>    
+    <extra-loc-viewid>mail_004_b</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>mail</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
 <message numerus="no" id="txt_mail_editor_to">
-    <comment>Custom layout ID parent. To label in mail editor</comment>        
+    <comment>Custom layout ID parent. To label in mail editor. Label for a field in message editor in which the user enters the mail addresses of the main recipients  of the message.</comment>        
     <source>To:</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_mail_editor_to</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04</extra-loc-viewid>
+    <extra-loc-viewid>mail_004</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -577,7 +637,7 @@
     <source>Importance:</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>none</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04_c</extra-loc-viewid>
+    <extra-loc-viewid>mail_004_c</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -587,7 +647,7 @@
     <source>To:</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>none</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_03</extra-loc-viewid>
+    <extra-loc-viewid>mail_003</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -597,11 +657,21 @@
     <source>Sent:</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>none</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04_c</extra-loc-viewid>
+    <extra-loc-viewid>mail_004_c</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
+<message numerus="no" id="txt_mail_dialog_account_disabled_due_to_security_i">
+    <comment>Shown when the user tries to open the mailbox. </comment>        
+    <source>Account disabled due to security issues. Contact your system administrator.</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
+    <extra-loc-viewid>mail_dialog_7</extra-loc-viewid>
+    <extra-loc-positionid>dialog</extra-loc-positionid>
+    <extra-loc-feature>mail</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
 <message numerus="no" id="txt_mail_dialog_unable_to_open_attachment_file_ty">
     <comment>Error note. If the user tries to open an attachment which cannot be viewed</comment>        
     <source>Unable to open. Attachment file type not supported</source>
@@ -627,17 +697,27 @@
     <source>Refresh</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_01_a</extra-loc-viewid>
+    <extra-loc-viewid>mail_001_a</extra-loc-viewid>
     <extra-loc-positionid>opt</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
+<message numerus="no" id="txt_mail_subhead_sent_items">
+    <comment>Text for indicating the current folder in mail list view. Component is simple label</comment>        
+    <source>Sent items</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_mail_subhead_inbox</extra-loc-layout_id>    
+    <extra-loc-viewid>mail_001</extra-loc-viewid>
+    <extra-loc-positionid>subhead</extra-loc-positionid>
+    <extra-loc-feature>mail</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
 <message numerus="no" id="txt_mail_opt_add_priority_sub_low">
     <comment>Suboption for option &quot;Add priority&quot; to set mail as low priority</comment>        
     <source>Low</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_menu_sec_add</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04</extra-loc-viewid>
+    <extra-loc-viewid>mail_004</extra-loc-viewid>
     <extra-loc-positionid>opt_1_sub</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -647,7 +727,7 @@
     <source>Mailbox deleted. </source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_notifdialog_pri2</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06</extra-loc-viewid>
+    <extra-loc-viewid>mail_006</extra-loc-viewid>
     <extra-loc-positionid>dialog</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -657,7 +737,7 @@
     <source>---- Original message ----</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>none</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04_c</extra-loc-viewid>
+    <extra-loc-viewid>mail_004_c</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -667,7 +747,7 @@
     <source>Remove</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04</extra-loc-viewid>
+    <extra-loc-viewid>mail_004</extra-loc-viewid>
     <extra-loc-positionid>menu</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -677,7 +757,7 @@
     <source>Delete mail?</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_02</extra-loc-viewid>
+    <extra-loc-viewid>mail_002</extra-loc-viewid>
     <extra-loc-positionid>dialog</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -695,7 +775,7 @@
 <message numerus="no" id="txt_mail_dialog_no">
     <comment>Button for notes txt_mail_dialog_server_settings_incorrect and txt_mail_dialog_address_or_password_incorrect.</comment>        
     <source>No</source>
-    <translation variants="no" type="unfinished"></translation>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_softkey_2</extra-loc-layout_id>    
     <extra-loc-viewid>mail_dialog_14_15</extra-loc-viewid>
     <extra-loc-positionid>dialog</extra-loc-positionid>
@@ -727,17 +807,17 @@
     <source>(No Subject)</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_mail_dblist_val_no_subject</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_01</extra-loc-viewid>
+    <extra-loc-viewid>mail_001</extra-loc-viewid>
     <extra-loc-positionid>dblist_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mail_editor_bcc">
-    <comment>Bcc: label in mail editor</comment>        
+    <comment>Bcc: label in mail editor. Bcc = blind carbon copy. Label for a field in message editor in which the user enters the mail addresses of those recipients whose names s/he does not want to show to the rest of the recipients.</comment>        
     <source>Bcc:</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_mail_editor_to</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04</extra-loc-viewid>
+    <extra-loc-viewid>mail_004</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -747,17 +827,17 @@
     <source>Drafts</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_menu_sec_add</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_01_a</extra-loc-viewid>
+    <extra-loc-viewid>mail_001_a</extra-loc-viewid>
     <extra-loc-positionid>opt_2_sub</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mail_editor_cc">
-    <comment>Cc: label in mail editor</comment>        
+    <comment>Cc: label in mail editor. Cc = carbon copy. Label for a field in message editor in which the user enters the mail addresses of additional recipients  who are not the main recipients of the message.</comment>        
     <source>Cc:</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_mail_editor_to</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04</extra-loc-viewid>
+    <extra-loc-viewid>mail_004</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -767,7 +847,7 @@
     <source>Loading mail content</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_notifdialog_pri2_medium_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_02</extra-loc-viewid>
+    <extra-loc-viewid>mail_002</extra-loc-viewid>
     <extra-loc-positionid>dpophead</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -777,7 +857,7 @@
     <source>Inbox </source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_menu_sec_add</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_01_a</extra-loc-viewid>
+    <extra-loc-viewid>mail_001_a</extra-loc-viewid>
     <extra-loc-positionid>opt_2_sub</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -787,7 +867,7 @@
     <source>Sent</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_menu_sec_add</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_01_a</extra-loc-viewid>
+    <extra-loc-viewid>mail_001_a</extra-loc-viewid>
     <extra-loc-positionid>opt_2_sub</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -805,19 +885,29 @@
 <message numerus="no" id="txt_mail_dialog_yes">
     <comment>Button for notes txt_mail_dialog_server_settings_incorrect and txt_mail_dialog_address_or_password_incorrect.</comment>        
     <source>Yes</source>
-    <translation variants="no" type="unfinished"></translation>
+    <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_softkey_2</extra-loc-layout_id>    
     <extra-loc-viewid>mail_dialog_14_15</extra-loc-viewid>
     <extra-loc-positionid>dialog</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
+<message numerus="no" id="txt_mail_button_download_rest">
+    <comment>Button that is shown if all the message content is not downloaded while message is opened.</comment>        
+    <source>Download rest</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id></extra-loc-layout_id>    
+    <extra-loc-viewid>mail_002_b</extra-loc-viewid>
+    <extra-loc-positionid>button</extra-loc-positionid>
+    <extra-loc-feature>mail</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
 <message numerus="no" id="txt_mail_opt_folder_sub_outbox">
     <comment>Submenu item for Options menus item Folder (txt_mail_opt_change_folder)</comment>        
     <source>Outbox</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_menu_sec_add</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_01_a</extra-loc-viewid>
+    <extra-loc-viewid>mail_001_a</extra-loc-viewid>
     <extra-loc-positionid>opt_2_sub</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -827,7 +917,7 @@
     <source>From:</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>none</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04_c</extra-loc-viewid>
+    <extra-loc-viewid>mail_004_c</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -842,22 +932,32 @@
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
+<message numerus="no" id="txt_mail_dialog_mail_address_incorrect">
+    <comment>The information dialog that is shown if the user&apos;s own mail address is incorrect and the user tries to sync or send mail.</comment>        
+    <source>Your mail address is incorrect. Check the mail address settings?</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
+    <extra-loc-viewid>mail</extra-loc-viewid>
+    <extra-loc-positionid>dpopinfo</extra-loc-positionid>
+    <extra-loc-feature>mail</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
 <message numerus="no" id="txt_mail_text_attachment">
-    <comment>Text that is shown in POP mailboxes when there are attachments that are not downloaded yet.</comment>        
+    <comment>Text that is shown in POP mailboxes when there are attachments that are not downloaded yet. This text is preceded by an icon, therefore the lower-case initial letter.</comment>        
     <source>attachment</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_02_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_002_b</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mail_status_menu_waiting_to_send">
-    <comment>Text for status menu item: indicates that there are unsent messages in outbox. %L1 is the number of unsent mails in that mailbox.</comment>        
+    <comment>Text for status menu item: indicates that there are unsent messages in outbox. %L1 is the number of unsent mails in that mailbox. L1% is usually less than 10 but can be also more.</comment>        
     <source>Waiting to send (%L1)</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_notifdialog_sec_medium_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_01_d</extra-loc-viewid>
+    <extra-loc-viewid>mail_001_d</extra-loc-viewid>
     <extra-loc-positionid>dblist_5_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -877,7 +977,7 @@
     <source>Mail</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_titlebar</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_05</extra-loc-viewid>
+    <extra-loc-viewid>mail_005</extra-loc-viewid>
     <extra-loc-positionid>title</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -887,7 +987,7 @@
     <source>Show cc / bcc</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04_a</extra-loc-viewid>
+    <extra-loc-viewid>mail_004_a</extra-loc-viewid>
     <extra-loc-positionid>opt</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -902,12 +1002,12 @@
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_mail_list_search_results">
-    <comment>Text for indicating the search results in mail list view. Component is simple label</comment>        
-    <source>%L1 results</source>
+<message numerus="yes" id="txt_mail_list_search_results">
+    <comment>Text for indicating the search results in mail list view. Component is simple label. %Ln stands for the number of search results found in the search. The parameter can be even up to 9999.</comment>        
+    <source>%Ln results</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_mail_subhead_inbox</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_08</extra-loc-viewid>
+    <extra-loc-viewid>mail_008</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -917,17 +1017,17 @@
     <source>Mark as unread</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_01_c</extra-loc-viewid>
+    <extra-loc-viewid>mail_001_c</extra-loc-viewid>
     <extra-loc-positionid>menu</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mail_list_other">
-    <comment>Attach toolbar extension item in the viewer, opens file fetch for selecting any type of file</comment>        
+    <comment>Attach toolbar extension item in the editor, opens file fetch for selecting any type of file</comment>        
     <source>Other</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_004_b</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -937,14 +1037,24 @@
     <source>Fw:</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_02</extra-loc-viewid>
+    <extra-loc-viewid>mail_002</extra-loc-viewid>
     <extra-loc-positionid>dblist_3_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
+<message numerus="no" id="txt_mail_subhead_drafts">
+    <comment>Text for indicating the current folder in mail list view. Component is simple label</comment>        
+    <source>Drafts</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_mail_subhead_inbox</extra-loc-layout_id>    
+    <extra-loc-viewid>mail_001</extra-loc-viewid>
+    <extra-loc-positionid>subhead</extra-loc-positionid>
+    <extra-loc-feature>mail</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
 <message numerus="no" id="txt_mail_dialog_address_or_password_incorrect">
-    <comment>Notification shown when the connection fails (e.g. when syncing) due to mail address or password. </comment>        
-    <source>Mail address or password is incorrect. Do you want to check the settings?</source>
+    <comment>Notification shown when the connection fails (e.g. when syncing) due to username or password. </comment>        
+    <source>Username or password is incorrect. Do you want to check the settings?</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
     <extra-loc-viewid>mail_dialog_15</extra-loc-viewid>
@@ -952,23 +1062,23 @@
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_mail_list_music">
-    <comment>Attach toolbar extension item in the viewer, opens music fetch for selecting music file. Allows the user to attach a music file to the message.</comment>        
-    <source>Music</source>
+<message numerus="no" id="txt_mail_list_new_photo">
+    <comment>Attach toolbar extension item in the editor, opens camera for taking a new photo</comment>        
+    <source>New photo</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_004_b</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_mail_list_new_photo">
-    <comment>Attach toolbar extension item in the viewer, opens camera for taking a new photo</comment>        
-    <source>New photo</source>
-    <translation variants="yes" type="unfinished"></translation>
-    <extra-loc-layout_id>qtl_list_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04_b</extra-loc-viewid>
-    <extra-loc-positionid>list</extra-loc-positionid>
+<message numerus="no" id="txt_mail_subhead_deleted_items">
+    <comment>Text for indicating the current folder in mail list view. Component is simple label</comment>        
+    <source>Deleted items</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_mail_subhead_inbox</extra-loc-layout_id>    
+    <extra-loc-viewid>mail_001</extra-loc-viewid>
+    <extra-loc-positionid>subhead</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
@@ -983,11 +1093,11 @@
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mail_list_video">
-    <comment>Attach toolbar extension item in the viewer, opens video fetch for selecting video file. Allows the user to attach a video file to the message.</comment>        
+    <comment>Attach toolbar extension item in the editor, opens video fetch for selecting video file. Allows the user to attach a video file to the message.</comment>        
     <source>Video</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_04_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_004_b</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -997,10 +1107,20 @@
     <source>Inbox </source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_mail_subhead_inbox</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_01</extra-loc-viewid>
+    <extra-loc-viewid>mail_001</extra-loc-viewid>
     <extra-loc-positionid>subhead</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
+<message numerus="no" id="txt_mail_dialog_password_expired_new_security_cre">
+    <comment>Shown when the user tries to open the mailbox if her password has expired.</comment>        
+    <source>Password expired. New security credentials must be created on your computer.</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
+    <extra-loc-viewid>mail_dialog_6</extra-loc-viewid>
+    <extra-loc-positionid>dialog</extra-loc-positionid>
+    <extra-loc-feature>mail</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
 </context>
 </TS>
--- a/emailuis/nmframeworkadapter/src/nmfwaremovedraftmessageoperation.cpp	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailuis/nmframeworkadapter/src/nmfwaremovedraftmessageoperation.cpp	Fri Jul 02 15:55:16 2010 +0300
@@ -139,6 +139,8 @@
             // async version not supported, use sync version
             folder->RemoveMessageL( messageId );
             completeOperation(NmNoError);
+        } else if (KErrNone != err) {
+            completeOperation(NmGeneralError);
         }
     }
     else {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emailuis/nmhswidget/conf/nmhswidget.docml	Fri Jul 02 15:55:16 2010 +0300
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.1">
+    <widget name="nmhswidgetContainer" type="HbWidget">
+        <widget name="mailRowContainer" type="HbWidget">
+            <widget name="noMailsLabel" type="HbLabel">
+                <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+                <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-tiny)"/>
+                <string locid="txt_mail_widget_info_no_messages" name="plainText" value="No mails!!!"/>
+                <string name="textColor" value="#000000"/>
+                <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Expanding" verticalStretch="0"/>
+                <sizehint type="MAXIMUM" width="46un"/>
+                <sizehint height="0un" type="MINIMUM" width="0un"/>
+                <sizehint height="29.75un" type="PREFERRED" width="46un"/>
+            </widget>
+            <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Expanding" verticalStretch="0"/>
+            <sizehint height="expr(3*9.75un )" type="PREFERRED" width="46un"/>
+            <sizehint height="0un" type="MINIMUM" width="0un"/>
+            <sizehint height="2504062.01158un" type="MAXIMUM" width="2504062.01158un"/>
+            <layout orientation="Vertical" spacing="0un" type="linear">
+                <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+                <linearitem itemname="noMailsLabel"/>
+            </layout>
+        </widget>
+        <widget name="titleLayoutWidget" type="HbWidget">
+            <widget name="mailboxNameLabel" type="HbLabel">
+                <real name="z" value="1"/>
+                <sizepolicy horizontalPolicy="Ignored" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+                <sizehint height="expr(var(hb-param-text-height-secondary) )" type="PREFERRED" width="34.92537un"/>
+                <sizehint height="expr(var(hb-param-text-height-secondary) )" type="MINIMUM"/>
+                <sizehint height="expr(var(hb-param-text-height-secondary) )" type="MAXIMUM"/>
+                <string name="plainText" value="Mailbox gmail"/>
+                <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+            </widget>
+            <widget name="mailboxIcon" type="HbLabel">
+                <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+                <icon iconName="note_warning" name="icon"/>
+                <real name="z" value="2"/>
+                <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+                <sizehint height="11un" type="FIXED" width="11un"/>
+                <sizehint height="11un" type="MINIMUM" width="11un"/>
+                <sizehint height="11un" type="MAXIMUM" width="11un"/>
+            </widget>
+            <widget name="unreadCountLabel" type="HbLabel">
+                <enums name="alignment" value="AlignRight|AlignVCenter|AlignTrailing"/>
+                <real name="z" value="3"/>
+                <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+                <sizehint height="expr(var(hb-param-text-height-secondary) )" type="PREFERRED" width="6un"/>
+                <sizehint height="expr(var(hb-param-text-height-secondary) )" type="MINIMUM" width="3un"/>
+                <sizehint height="expr(var(hb-param-text-height-secondary) )" type="MAXIMUM" width="9un"/>
+                <string locid="txt_mail_widget_list_l1" name="plainText" value="(999)"/>
+                <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+            </widget>
+            <widget name="collapseExpandIcon" type="HbPushButton">
+                <icon iconName="note_warning" name="icon"/>
+                <real name="z" value="4"/>
+                <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+                <sizehint height="7un" type="FIXED" width="7un"/>
+                <sizehint height="7un" type="MINIMUM" width="7un"/>
+                <sizehint height="7un" type="MAXIMUM" width="7un"/>
+                <string name="alignment" value="AlignVCenter|AlignHCenter"/>
+            </widget>
+            <real name="z" value="1"/>
+            <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+            <sizehint height="expr(var(hb-param-margin-gene-bottom) + var(hb-param-text-height-secondary)  + var(hb-param-margin-gene-top) )" type="PREFERRED" width="46un"/>
+            <sizehint height="expr(var(hb-param-margin-gene-bottom) + var(hb-param-text-height-secondary)  + var(hb-param-margin-gene-top) )" type="MINIMUM" width="expr(5*var(hb-param-margin-gene-middle-horizontal) + 27un )"/>
+            <sizehint height="expr(var(hb-param-margin-gene-bottom) + var(hb-param-text-height-secondary)  + var(hb-param-margin-gene-top) )" type="MAXIMUM" width="2504062.01158un"/>
+            <layout type="anchor">
+                <anchoritem dst="mailboxIcon" dstEdge="LEFT" spacing="var(hb-param-margin-gene-middle-horizontal)" src="" srcEdge="LEFT"/>
+                <anchoritem dst="mailboxIcon" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+                <anchoritem dst="collapseExpandIcon" dstEdge="RIGHT" spacing="-0.25" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="collapseExpandIcon" dstEdge="CENTERV" spacing="0un" src="unreadCountLabel" srcEdge="CENTERV"/>
+                <anchoritem dst="unreadCountLabel" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-middle-horizontal)" src="collapseExpandIcon" srcEdge="LEFT"/>
+                <anchoritem dst="unreadCountLabel" dstEdge="CENTERV" spacing="0un" src="mailboxNameLabel" srcEdge="CENTERV"/>
+                <anchoritem dst="mailboxNameLabel" dstEdge="LEFT" spacing="var(hb-param-margin-gene-middle-horizontal)" src="mailboxIcon" srcEdge="RIGHT"/>
+                <anchoritem dst="mailboxNameLabel" dstEdge="TOP" spacing="var(hb-param-margin-gene-top)" src="" srcEdge="TOP"/>
+                <anchoritem dst="mailboxNameLabel" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-middle-horizontal)" src="unreadCountLabel" srcEdge="LEFT"/>
+            </layout>
+        </widget>
+        <real name="z" value="1"/>
+        <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Expanding" verticalStretch="0"/>
+        <sizehint height="expr(3*9.75un + 7.5un )" type="PREFERRED" width="46un"/>
+        <sizehint height="0un" type="MINIMUM" width="46un"/>
+        <sizehint height="42un" type="MAXIMUM" width="46un"/>
+        <layout type="anchor">
+            <anchoritem dst="titleLayoutWidget" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+            <anchoritem dst="titleLayoutWidget" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
+            <anchoritem dst="mailRowContainer" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+            <anchoritem dst="mailRowContainer" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-top) + var(hb-param-margin-gene-bottom)  + var(hb-param-text-height-secondary))" src="" srcEdge="TOP"/>
+            <anchoritem dst="mailRowContainer" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+            <anchoritem dst="mailRowContainer" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+        </layout>
+    </widget>
+    <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+    </metadata>
+</hbdocument>
--- a/emailuis/nmhswidget/conf/nmhswidgetmail.docml	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailuis/nmhswidget/conf/nmhswidgetmail.docml	Fri Jul 02 15:55:16 2010 +0300
@@ -60,10 +60,10 @@
             <sizehint height="var(hb-param-graphic-size-secondary)" type="FIXED" width="var(hb-param-graphic-size-secondary)"/>
         </widget>
         <real name="z" value="1"/>
-        <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
-        <sizehint height="9.75un" type="FIXED" width="46un"/>
-        <sizehint type="MINIMUM" width="46un"/>
-        <sizehint height="48.39un" type="MAXIMUM" width="46un"/>
+        <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+        <sizehint height="expr(1un + var(hb-param-text-height-secondary)  + var(hb-param-margin-gene-middle-vertical) + var(hb-param-text-height-secondary) + 1un )" type="PREFERRED" width="46un"/>
+        <sizehint height="expr(1un + var(hb-param-text-height-secondary)  + var(hb-param-margin-gene-middle-vertical) + var(hb-param-text-height-secondary) + 1un )" type="MINIMUM" width="expr(4*var(hb-param-margin-gene-middle-horizontal)  + 15un )"/>
+        <sizehint height="expr(1un + var(hb-param-text-height-secondary)  + var(hb-param-margin-gene-middle-vertical) + var(hb-param-text-height-secondary) + 1un )" type="MAXIMUM" width="2504062.01158un"/>
         <layout type="anchor">
             <anchoritem dst="iconSeparator" dstEdge="LEFT" spacing="2" src="" srcEdge="LEFT"/>
             <anchoritem dst="iconSeparator" dstEdge="TOP" spacing="0" src="" srcEdge="TOP"/>
@@ -79,11 +79,11 @@
             <anchoritem dst="labelSender" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-middle-horizontal)" src="labelTime" srcEdge="LEFT"/>
             <anchoritem dst="labelTime" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-middle-horizontal)" src="" srcEdge="RIGHT"/>
             <anchoritem dst="labelTime" dstEdge="CENTERV" spacing="0un" src="labelSender" srcEdge="CENTERV"/>
-            <anchoritem dst="iconOne" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-middle-horizontal)" src="iconTwo" srcEdge="LEFT"/>
+            <anchoritem dst="iconOne" dstEdge="RIGHT" spacing="-0.5un" src="iconTwo" srcEdge="LEFT"/>
             <anchoritem dst="iconOne" dstEdge="CENTERV" spacing="0un" src="labelSubject" srcEdge="CENTERV"/>
             <anchoritem dst="iconThree" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-middle-horizontal)" src="" srcEdge="RIGHT"/>
             <anchoritem dst="iconThree" dstEdge="CENTERV" spacing="0un" src="iconOne" srcEdge="CENTERV"/>
-            <anchoritem dst="iconTwo" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-middle-horizontal)" src="iconThree" srcEdge="LEFT"/>
+            <anchoritem dst="iconTwo" dstEdge="RIGHT" spacing="-0.5un" src="iconThree" srcEdge="LEFT"/>
             <anchoritem dst="iconTwo" dstEdge="CENTERV" spacing="0un" src="iconOne" srcEdge="CENTERV"/>
         </layout>
     </widget>
--- a/emailuis/nmhswidget/conf/nmhswidgettitle.docml	Tue Jun 29 17:12:28 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="1.1">
-    <widget name="titleLayoutWidget" type="HbWidget">
-        <widget name="mailboxNameLabel" type="HbLabel">
-            <real name="z" value="1"/>
-            <sizepolicy horizontalPolicy="Ignored" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
-            <sizehint height="var(hb-param-text-height-secondary)" type="PREFERRED" width="34.92537un"/>
-            <string name="plainText" value="Mailbox gmail"/>
-            <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
-        </widget>
-        <widget name="mailboxIcon" type="HbLabel">
-            <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
-            <icon iconName="note_warning" name="icon"/>
-            <real name="z" value="2"/>
-            <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
-            <sizehint height="11un" type="FIXED" width="11un"/>
-            <sizehint height="11un" type="MINIMUM" width="11un"/>
-            <sizehint height="11un" type="MAXIMUM" width="11un"/>
-        </widget>
-        <widget name="unreadCountLabel" type="HbLabel">
-            <enums name="alignment" value="AlignRight|AlignVCenter|AlignTrailing"/>
-            <real name="z" value="3"/>
-            <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
-            <sizehint height="var(hb-param-text-height-secondary)" type="FIXED" width="9un"/>
-            <string locid="txt_mail_widget_list_l1" name="plainText" value="(999)"/>
-            <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
-        </widget>
-        <widget name="collapseExpandIcon" type="HbPushButton">
-            <icon iconName="note_warning" name="icon"/>
-            <real name="z" value="4"/>
-            <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
-            <sizehint height="7un" type="FIXED" width="7un"/>
-            <sizehint height="7un" type="MINIMUM" width="7un"/>
-            <sizehint height="7un" type="MAXIMUM" width="7un"/>
-            <string name="alignment" value="AlignVCenter|AlignHCenter"/>
-        </widget>
-        <real name="z" value="1"/>
-        <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
-        <sizehint height="7.5un" type="FIXED" width="46un"/>
-        <layout type="anchor">
-            <anchoritem dst="mailboxIcon" dstEdge="LEFT" spacing="var(hb-param-margin-gene-middle-horizontal)" src="" srcEdge="LEFT"/>
-            <anchoritem dst="mailboxIcon" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
-            <anchoritem dst="mailboxNameLabel" dstEdge="LEFT" spacing="var(hb-param-margin-gene-middle-horizontal)" src="mailboxIcon" srcEdge="RIGHT"/>
-            <anchoritem dst="mailboxNameLabel" dstEdge="TOP" spacing="var(hb-param-margin-gene-top)" src="" srcEdge="TOP"/>
-            <anchoritem dst="mailboxNameLabel" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-middle-horizontal)" src="unreadCountLabel" srcEdge="LEFT"/>
-            <anchoritem dst="collapseExpandIcon" dstEdge="RIGHT" spacing="-0.25un" src="" srcEdge="RIGHT"/>
-            <anchoritem dst="collapseExpandIcon" dstEdge="CENTERV" spacing="0un" src="unreadCountLabel" srcEdge="CENTERV"/>
-            <anchoritem dst="unreadCountLabel" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-middle-horizontal)" src="collapseExpandIcon" srcEdge="LEFT"/>
-            <anchoritem dst="unreadCountLabel" dstEdge="CENTERV" spacing="0un" src="mailboxNameLabel" srcEdge="CENTERV"/>
-        </layout>
-    </widget>
-    <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
-        <uistate name="Common ui state" sections="#common"/>
-    </metadata>
-</hbdocument>
--- a/emailuis/nmhswidget/inc/nmhswidget.h	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailuis/nmhswidget/inc/nmhswidget.h	Fri Jul 02 15:55:16 2010 +0300
@@ -29,6 +29,7 @@
 class HbFrameDrawer;
 class NmHsWidgetDateTimeObserver;
 class HbLabel;
+class HbDocumentLoader;
 
 class NmHsWidget : public HbWidget
 {
@@ -69,6 +70,7 @@
 private:
     void setupLocalization();
     void setupUi();
+    bool loadDocML(HbDocumentLoader &loader);
     void updateMailRowsVisibility(const int visibleCount);
     void addNoMailsLabelToLayout();
     void removeNoMailsLabelFromLayout();
@@ -82,16 +84,18 @@
     
 private:
     NmHsWidgetEmailEngine* mEngine;
-    QGraphicsLinearLayout *mRowLayout;
-    NmHsWidgetTitleRow* mTitleRow;
-    QList<NmHsWidgetEmailRow*> mMailRows;
-    NmId mAccountId;
-    QString mAccountIconName;
-    QTranslator *mTranslator;
-    HbFrameDrawer* mBackgroundFrameDrawer;
-    bool mIsExpanded;
-    NmHsWidgetDateTimeObserver* mDateObserver;
-    HbLabel *mNoMailsLabel; 
+    NmHsWidgetTitleRow* mTitleRow;          
+    QList<NmHsWidgetEmailRow*> mMailRows;   //list including mail row instances
+    NmId mAccountId;                        //mail account id widget is monitoring
+    QString mAccountIconName;               //name of mailbox icon shown in titlerow
+    QTranslator* mTranslator;
+    HbFrameDrawer* mBackgroundFrameDrawer;  //drawer for widget backgound
+    bool mIsExpanded;                       //true when widget expanded, false when collapsed
+    NmHsWidgetDateTimeObserver* mDateObserver;  //observer for time/locale changes
+    HbLabel* mNoMailsLabel;                 //label shown in widget when no mails in inbox
+    HbWidget* mWidgetContainer;             //container including title row and content container
+    HbWidget* mContentContainer;            //container including mail rows and mNoMailsLabel
+    QGraphicsLinearLayout* mContentLayout;  //layout for mail rows
     
 public:    
     friend class TestNmHsWidget;     
--- a/emailuis/nmhswidget/inc/nmhswidgetconsts.h	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailuis/nmhswidget/inc/nmhswidgetconsts.h	Fri Jul 02 15:55:16 2010 +0300
@@ -30,6 +30,14 @@
 /**************************************************
  * nmhswidget
  *************************************************/
+/**  docml file including UI definitions */
+const QString KNmHsWidgetDocML = ":/docml/nmhswidget.docml";
+/** container widget including all UI components */
+const QString KNmHsWidgetContainer = "nmhswidgetContainer";
+/** container widget including content (mail rows / no mails label */
+const QString KNmHsWidgetContentContainer = "mailRowContainer";
+/** no mails label - shown when inbox is empty */
+const QString KNmHsWidgetNoMailsLabel = "noMailsLabel";
 /** contents margin/spacing in all layouts / container widgets */
 const int KNmHsWidgetContentsMargin = 0;
 /** Widget's background image*/
@@ -48,41 +56,41 @@
  * Title row widget
  *************************************************/
 /**  docml file including title row UI definitions */
-#define KNmHsWidgetTitleRowDocML ":/docml/nmhswidgettitle.docml"
+/**#define KNmHsWidgetTitleRowDocML ":/docml/nmhswidgettitle.docml" */
 /**  docml file including title row UI definitions */
-#define KNmHsWidgetTitleRowContainer  "titleLayoutWidget"
+const QString KNmHsWidgetTitleRowContainer = "titleLayoutWidget";
 /** mailbox icon */
-#define KNmHsWidgetTitleRowMailboxIcon  "mailboxIcon"
+const QString KNmHsWidgetTitleRowMailboxIcon = "mailboxIcon";
 /** mailbox name label */
-#define KNmHsWidgetTitleRowMailboxNameLabel "mailboxNameLabel"
+const QString KNmHsWidgetTitleRowMailboxNameLabel = "mailboxNameLabel";
 /** unread count label */
-#define KNmHsWidgetTitleRowUnreadCountLabel  "unreadCountLabel"
+const QString KNmHsWidgetTitleRowUnreadCountLabel = "unreadCountLabel";
 /** expand collapse icon */
-#define KNmHsWidgetTitleRowCollapseExpandIconLabel "collapseExpandIcon"
+const QString KNmHsWidgetTitleRowCollapseExpandIconLabel = "collapseExpandIcon";
 
 /**************************************************
  * Mail row widget
  *************************************************/
 /**  docml file including mail row UI definitions */
-#define KNmHsWidgetMailRowDocML   ":/docml/nmhswidgetmail.docml"
+const QString KNmHsWidgetMailRowDocML = ":/docml/nmhswidgetmail.docml";
 /** container widget name for mail row UI items */
-#define KNmHsWidgetMailRowContainer   "emailLayoutWidget"
+const QString KNmHsWidgetMailRowContainer  = "emailLayoutWidget";
 /** sender label */
-#define KNmHsWidgetMailRowSenderLabel   "labelSender"
+const QString KNmHsWidgetMailRowSenderLabel = "labelSender";
 /** time label */
-#define KNmHsWidgetMailRowTimeLabel   "labelTime"
+const QString KNmHsWidgetMailRowTimeLabel = "labelTime";
 /** subject label */
-#define KNmHsWidgetMailRowSubjectLabel   "labelSubject"
+const QString KNmHsWidgetMailRowSubjectLabel = "labelSubject";
 /** new mail icon */
-#define KNmHsWidgetMailRowNewMailIcon   "iconNewMail"
+const QString KNmHsWidgetMailRowNewMailIcon = "iconNewMail";
 /** left status icon */
-#define KNmHsWidgetMailRowLeftIcon   "iconOne"
+const QString KNmHsWidgetMailRowLeftIcon = "iconOne";
 /** middle status icon */
-#define KNmHsWidgetMailRowMiddleIcon   "iconTwo"
+const QString KNmHsWidgetMailRowMiddleIcon = "iconTwo";
 /** right status icon */
-#define KNmHsWidgetMailRowRightIcon   "iconThree"
+const QString KNmHsWidgetMailRowRightIcon = "iconThree";
 /** separator icon */
-#define KNmHsWidgetMailSeparatorIcon   "iconSeparator"
+const QString KNmHsWidgetMailSeparatorIcon = "iconSeparator";
 
 
 #endif  // NMHSWIDGETCONSTS_H
--- a/emailuis/nmhswidget/inc/nmhswidgetemailengine.h	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailuis/nmhswidget/inc/nmhswidgetemailengine.h	Fri Jul 02 15:55:16 2010 +0300
@@ -26,6 +26,7 @@
 class NmDataPluginInterface;
 class QPluginLoader;
 class QTimer;
+class XQAiwRequest;
 
 //Three seconds
 const int NmHsWidgetEmailEngineUpdateTimerValue = 3000;
@@ -48,6 +49,7 @@
     int getEnvelopes(QList<NmMessageEnvelope> &list, int maxEnvelopeAmount);
     int unreadCount();
     QString accountName();
+    void deleteAiwRequest();
         
 public slots:
     void handleMessageEvent( 
@@ -65,6 +67,9 @@
     void launchMailAppMailViewer(const NmId &messageId);
     void handleUpdateTimeout();
     
+    void aiwRequestOk(const QVariant& result);
+    void aiwRequestError(int errorCode, const QString& errorMessage);
+    
 signals:
     void mailDataChanged();    
     void accountNameChanged(const QString& accountName);
@@ -90,6 +95,7 @@
     bool mMessageEventReceivedWhenSuspended;
     bool mSuspended; 
     QTimer* mUpdateTimer;
+    XQAiwRequest* mAiwRequest;
     };
 
 #endif /* NMHSWIDGETEMAILENGINE_H_ */
--- a/emailuis/nmhswidget/inc/nmhswidgettitlerow.h	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailuis/nmhswidget/inc/nmhswidgettitlerow.h	Fri Jul 02 15:55:16 2010 +0300
@@ -24,6 +24,7 @@
 class HbLabel;
 class HbPushButton;
 class HbFrameItem;
+class HbDocumentLoader;
 
 class NmHsWidgetTitleRow : public HbWidget
 {
@@ -33,12 +34,12 @@
     NmHsWidgetTitleRow(QGraphicsItem *parent = 0, Qt::WindowFlags flags = 0);
     ~NmHsWidgetTitleRow();
     QPainterPath shape() const;
-    bool setupUI(); 
+    bool setupUI(HbDocumentLoader &loader); 
     void setAccountIcon(const QString& accountIconName );
     void setExpandCollapseIcon(const bool& expand);
     
 private:
-    bool loadDocML();
+    bool loadDocML(HbDocumentLoader &loader);
     bool setupGraphics();
     void updateData();
     void setHighlighedFontsColor( bool pressed );
--- a/emailuis/nmhswidget/nmhswidget.qrc	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailuis/nmhswidget/nmhswidget.qrc	Fri Jul 02 15:55:16 2010 +0300
@@ -1,6 +1,6 @@
 <RCC>
     <qresource prefix="/docml">
-        <file alias="nmhswidgettitle.docml">conf/nmhswidgettitle.docml</file>
         <file alias="nmhswidgetmail.docml">conf/nmhswidgetmail.docml</file>
+        <file alias="nmhswidget.docml">conf/nmhswidget.docml</file>
     </qresource>
 </RCC>
--- a/emailuis/nmhswidget/src/nmhswidget.cpp	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailuis/nmhswidget/src/nmhswidget.cpp	Fri Jul 02 15:55:16 2010 +0300
@@ -17,6 +17,7 @@
 #include <QtGui>
 #include <QGraphicsLinearLayout>
 #include <hbcolorscheme.h>
+#include <hbdocumentloader.h>
 #include <QTranslator>
 #include <hbframedrawer.h>
 #include <hbframeitem.h>
@@ -34,7 +35,6 @@
 NmHsWidget::NmHsWidget(QGraphicsItem *parent, Qt::WindowFlags flags)
     : HbWidget(parent, flags), 
       mEngine(0),
-      mRowLayout(0),
       mTitleRow(0),
       mAccountId(0),
       mAccountIconName(),
@@ -42,7 +42,10 @@
       mBackgroundFrameDrawer(0),
       mIsExpanded(false),
       mDateObserver(0),
-      mNoMailsLabel(0)
+      mNoMailsLabel(0),
+      mWidgetContainer(0),
+      mContentContainer(0),
+      mContentLayout(0)
 {
     NM_FUNCTION;
 }
@@ -116,6 +119,32 @@
 }
 
 /*!
+ \fn bool NmHsWidget::loadDocML(HbDocumentLoader &loader)
+ 
+ loads layout data and child items from docml file. Must be called after constructor.
+ /return true if loading succeeded, otherwise false. False indicates that object is unusable
+ */
+bool NmHsWidget::loadDocML(HbDocumentLoader &loader)
+{
+    NM_FUNCTION;
+    
+    bool ok(false);
+    loader.load(KNmHsWidgetDocML, &ok);
+    
+    if(ok) {
+        mWidgetContainer = static_cast<HbWidget*> (loader.findWidget(KNmHsWidgetContainer));        
+        mContentContainer = static_cast<HbWidget*> (loader.findWidget(KNmHsWidgetContentContainer));
+        mNoMailsLabel = static_cast<HbLabel*> (loader.findWidget(KNmHsWidgetNoMailsLabel));
+        if (!mWidgetContainer || !mContentContainer || !mNoMailsLabel) {
+            //something failed in documentloader, no point to continue
+            NM_ERROR(1,"NmHsWidget::loadDocML fail @ containers or label");
+            ok = false;
+        }
+    }
+    return ok;
+}
+
+/*!
  Initializes Localization.
  /post mTranslator constructed & localization file loaded
  */
@@ -138,43 +167,35 @@
 {
     NM_FUNCTION;
 
-    setContentsMargins(KNmHsWidgetContentsMargin, KNmHsWidgetContentsMargin,
-        KNmHsWidgetContentsMargin, KNmHsWidgetContentsMargin);
-
-    //Setup layout
-    mRowLayout = new QGraphicsLinearLayout(Qt::Vertical);
+    //main level layout needed to control docml objects
+    QGraphicsLinearLayout *widgetLayout = new QGraphicsLinearLayout(Qt::Vertical);
+    widgetLayout->setContentsMargins(KNmHsWidgetContentsMargin, KNmHsWidgetContentsMargin,
+            KNmHsWidgetContentsMargin, KNmHsWidgetContentsMargin);
+    widgetLayout->setSpacing(KNmHsWidgetContentsMargin);
+    widgetLayout->addItem(mWidgetContainer);
+    this->setLayout(widgetLayout);
 
-    mRowLayout->setContentsMargins(KNmHsWidgetContentsMargin, KNmHsWidgetContentsMargin,
-        KNmHsWidgetContentsMargin, KNmHsWidgetContentsMargin);
-    mRowLayout->setSpacing(KNmHsWidgetContentsMargin);
-    setLayout(mRowLayout);
-
-    //background
+    //fetch pointer to content container layout
+    //to be able to add/remove email rows and no mails label
+    mContentLayout = (QGraphicsLinearLayout*) mContentContainer->layout();
+    
+    //set noMailsLabel properties not supported by doc loader 
+    QColor newFontColor;
+    newFontColor = HbColorScheme::color("qtc_hs_list_item_content_normal");
+    mNoMailsLabel->setTextColor(newFontColor);
+    mNoMailsLabel->setVisible(true);   
+    
+    mContentLayout->removeItem(mNoMailsLabel);
+    
+    //widget background
     mBackgroundFrameDrawer = new HbFrameDrawer(KNmHsWidgetBackgroundImage,
         HbFrameDrawer::NinePieces);
     HbFrameItem* backgroundLayoutItem = new HbFrameItem(mBackgroundFrameDrawer);
     //set to NULL to indicate that ownership transferred
     mBackgroundFrameDrawer = NULL;
-    setBackgroundItem(backgroundLayoutItem);
-    
-    //Create NoMails Label.
-    mNoMailsLabel = new HbLabel(this);
-    mNoMailsLabel->setPlainText(hbTrId("txt_mail_widget_info_no_messages"));
-    HbFontSpec fontSpec(HbFontSpec::Secondary);
-    HbStyle style;
-    qreal size;
-    bool found = style.parameter(QString("hb-param-text-height-tiny"), size);
-    if (found) {
-        fontSpec.setTextHeight(size);
-    }
-    mNoMailsLabel->setFontSpec(fontSpec);
-    QColor newFontColor;
-    newFontColor = HbColorScheme::color("qtc_hs_list_item_content_normal");
-    mNoMailsLabel->setTextColor(newFontColor);
-    mNoMailsLabel->setAlignment(Qt::AlignCenter);
-    mNoMailsLabel->setVisible(false);
+    setBackgroundItem(backgroundLayoutItem);   
+}
 
-}
 
 /*!
  Initializes the widget.
@@ -186,6 +207,26 @@
     NM_FUNCTION;
 
     QT_TRY {
+        
+	    // Use document loader to load the contents
+	    HbDocumentLoader loader;
+		
+	    //load containers and mNoMailsLabel
+        if (!loadDocML(loader)) {
+            NM_ERROR(1,"NmHsWidget::onInitialize Fail @ loader");
+            emit error(); //failure, no point to continue
+            return;
+        }
+
+        //construct title row
+        mTitleRow = new NmHsWidgetTitleRow(this);
+        if (!mTitleRow->setupUI(loader)) {
+            //title row creation failed
+            NM_ERROR(1,"NmHsWidget::onInitialize fail @ titlerow");
+            emit error(); //failure, no point to continue
+            return;            
+        }
+				
         setupUi();
         setupLocalization();
 
@@ -197,18 +238,12 @@
             SLOT( onEngineException(const int&) ));
         if (!mEngine->initialize()) {
             //engine construction failed. Give up.
+            NM_ERROR(1,"NmHsWidget::onInitialize fail @ engine");
             emit error();
             return;
         }
 
-        //construct and load docml for title row
-        mTitleRow = new NmHsWidgetTitleRow(this);
-        if (!mTitleRow->setupUI()) {
-            //if docml loading fails no point to proceed
-            emit error();
-            return;
-        }
-        mRowLayout->addItem(mTitleRow);
+
         mTitleRow->updateAccountName(mEngine->accountName());
 
         //create observer for date/time change events
@@ -238,12 +273,13 @@
 	            ,mEngine, SLOT( launchMailAppInboxView() ) );
 	    connect(mTitleRow, SIGNAL( expandCollapseButtonPressed() )
 	            ,this, SLOT( handleExpandCollapseEvent() ) );
-
+	    
+	    setMinimumSize(mTitleRow->minimumSize());
     }
     QT_CATCH(...) {
+        NM_ERROR(1,"NmHsWidget::onInitialize fail @ catch");
         emit error();
     }
-
 }
 
 
@@ -411,7 +447,13 @@
 void NmHsWidget::updateLayout(const int mailCount)
 {
     NM_FUNCTION;
+
     if (mIsExpanded) {
+        //set container height to content height 
+        qreal contentHeight = KMaxNumberOfMailsShown
+                * mMailRows.first()->maximumHeight();
+        mContentContainer->setMaximumHeight(contentHeight);
+        mContentContainer->setVisible(true);
         if (mailCount == 0) {
             addNoMailsLabelToLayout();
             removeEmailRowsFromLayout();
@@ -424,10 +466,16 @@
     else {
         removeNoMailsLabelFromLayout();
         removeEmailRowsFromLayout();
+        mContentContainer->setVisible(false);
+        mContentContainer->setMaximumHeight(0);        
     }
 
     //resize the widget to new layout size
-    setPreferredSize(mRowLayout->preferredSize());
+    qreal totalHeight = mTitleRow->preferredHeight() + mContentContainer->maximumHeight();
+    //set maximum size, otherwise widget will stay huge also when collapsed
+    this->setMaximumHeight(totalHeight);
+    //resize here or widget cannot draw mail rows when expanding
+    this->resize(mTitleRow->preferredWidth(), totalHeight);
 
     updateMailRowsVisibility(mailCount);
 }
@@ -436,61 +484,56 @@
  Updates mNoMailsLabel visibility based on widget state
  /param mailCount defines how many mail rows is needed
  /post if mail count is 0 and mIsExpanded equals true, then
- the mNoMailLabel is added to the mRowLayout. 
+ the mNoMailLabel is added to the mContentLayout. 
  */
 void NmHsWidget::addNoMailsLabelToLayout()
 {
     NM_FUNCTION;
-    //Use sizes defined for titlerow and mailrow docml to indentify the correct size
-    //for the mNoMailslabel
+
     if (mNoMailsLabel->isVisible() || mMailRows.isEmpty()) {
         return;
     }
-    QSizeF mailLabelSize(mTitleRow->maximumWidth(), KMaxNumberOfMailsShown
-        * mMailRows.first()->maximumHeight());
-    mNoMailsLabel->setPreferredSize(mailLabelSize);
-    mNoMailsLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
     //Add mNoMailsLabel to layout if not yet there and show it
-    mRowLayout->addItem(mNoMailsLabel);
+    mContentLayout->addItem(mNoMailsLabel);
     //resize the widget to new layout size
     mNoMailsLabel->show();
 }
 
 /*!
  removeNoMailsLabelFromLayout removes mNoMailsLabel from the layout
- /post mNoMailsLabel is not in mRowLayout
+ /post mNoMailsLabel is not in mContentLayout
  */
 void NmHsWidget::removeNoMailsLabelFromLayout()
 {
     NM_FUNCTION;
     //remove mNoMailsLabel from Layout and hide it
-    mRowLayout->removeItem(mNoMailsLabel);
+    mContentLayout->removeItem(mNoMailsLabel);
     mNoMailsLabel->hide();
 }
 
 /*!
  addEmailRowsToLayout adds every emailrow to the layout
- /post all elements in mMailRows are added to mRowLayout
+ /post all elements in mMailRows are added to mContentLayout
  */
 void NmHsWidget::addEmailRowsToLayout()
 {
     NM_FUNCTION;
     foreach(NmHsWidgetEmailRow *row, mMailRows)
         {
-            mRowLayout->addItem(row);
+            mContentLayout->addItem(row);
         }
 }
 
 /*!
  removeEmailRowsFromLayout removes every emailrow from the layout
- /post none of the elements in mMailRows are in mRowLayout
+ /post none of the elements in mMailRows are in mContentLayout
  */
 void NmHsWidget::removeEmailRowsFromLayout()
 {
     NM_FUNCTION;
     foreach(NmHsWidgetEmailRow *row, mMailRows)
         {
-            mRowLayout->removeItem(row);
+            mContentLayout->removeItem(row);
         }
 }
 
--- a/emailuis/nmhswidget/src/nmhswidgetemailengine.cpp	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailuis/nmhswidget/src/nmhswidgetemailengine.cpp	Fri Jul 02 15:55:16 2010 +0300
@@ -43,7 +43,8 @@
     mAccountEventReceivedWhenSuspended(false),
     mMessageEventReceivedWhenSuspended(false), 
     mSuspended(false),
-    mUpdateTimer(0)
+    mUpdateTimer(0),
+    mAiwRequest(0)
 {
     NM_FUNCTION;
 }
@@ -409,19 +410,24 @@
     NM_FUNCTION;
     
     QT_TRY{ 
-        XQApplicationManager appManager;
-        XQAiwRequest* request = appManager.create(
-                XQI_EMAIL_INBOX_VIEW, XQOP_EMAIL_INBOX_VIEW,
-                false);
-        
-        if (request) {
-            QList<QVariant> list;
-            list.append(QVariant(mMailboxId.id()));
-        
-            request->setSynchronous(true);
-            request->setArguments(list);
-            request->send();
-            delete request;
+        if (!mAiwRequest) {
+            XQApplicationManager appManager;
+            mAiwRequest = appManager.create(
+                    XQI_EMAIL_INBOX_VIEW, XQOP_EMAIL_INBOX_VIEW,
+                    false);
+            
+            if (mAiwRequest) {
+                connect(mAiwRequest, SIGNAL( requestError(int, const QString&) ), 
+                        this, SLOT( aiwRequestError(int, const QString&) ));
+                connect(mAiwRequest, SIGNAL( requestOk(const QVariant&) ), 
+                        this, SLOT( aiwRequestOk(const QVariant&) ));
+                QList<QVariant> list;
+                list.append(QVariant(mMailboxId.id()));
+            
+                mAiwRequest->setSynchronous(false);
+                mAiwRequest->setArguments(list);
+                mAiwRequest->send();
+            }
         }
     }
     QT_CATCH(...){
@@ -441,21 +447,26 @@
     NM_FUNCTION;
 
     QT_TRY{
-        XQApplicationManager appManager;
-        XQAiwRequest* request = appManager.create(
-                XQI_EMAIL_MESSAGE_VIEW, XQOP_EMAIL_MESSAGE_VIEW,
-                false);
-        
-        if (request) {
-            QList<QVariant> list;
-            list.append(QVariant(mMailboxId.id()));
-            list.append(QVariant(mFolderId.id()));
-            list.append(QVariant(messageId.id()));
-        
-            request->setSynchronous(true);
-            request->setArguments(list);
-            request->send();
-            delete request;
+        if (!mAiwRequest) {
+            XQApplicationManager appManager;
+            mAiwRequest = appManager.create(
+                    XQI_EMAIL_MESSAGE_VIEW, XQOP_EMAIL_MESSAGE_VIEW,
+                    false);
+            
+            if (mAiwRequest) {
+                connect(mAiwRequest, SIGNAL( requestError(int, const QString&) ), 
+                        this, SLOT( aiwRequestError(int, const QString&) ));
+                connect(mAiwRequest, SIGNAL( requestOk(const QVariant&) ), 
+                        this, SLOT( aiwRequestOk(const QVariant&) ));
+                QList<QVariant> list;
+                list.append(QVariant(mMailboxId.id()));
+                list.append(QVariant(mFolderId.id()));
+                list.append(QVariant(messageId.id()));
+            
+                mAiwRequest->setSynchronous(false);
+                mAiwRequest->setArguments(list);
+                mAiwRequest->send();
+            }
         }
     }
     QT_CATCH(...){
@@ -464,3 +475,40 @@
         // creation raise exception.
     }
 }
+
+/*!
+ aiwRequestOk slot.
+ */
+void NmHsWidgetEmailEngine::aiwRequestOk(const QVariant& result)
+{
+    NM_FUNCTION;
+
+    Q_UNUSED(result);
+    
+    deleteAiwRequest();
+}
+
+/*!
+ aiwRequestError slot.
+ */
+void NmHsWidgetEmailEngine::aiwRequestError(int errorCode, const QString& errorMessage)
+{
+    NM_FUNCTION;
+
+    Q_UNUSED(errorCode);
+    Q_UNUSED(errorMessage);
+    
+    deleteAiwRequest();
+}
+
+/*!
+ deleteAiwRequest function.
+ */
+void NmHsWidgetEmailEngine::deleteAiwRequest()
+{
+    NM_FUNCTION;
+
+    delete mAiwRequest;
+    mAiwRequest = NULL;    
+}
+
--- a/emailuis/nmhswidget/src/nmhswidgettitlerow.cpp	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailuis/nmhswidget/src/nmhswidgettitlerow.cpp	Fri Jul 02 15:55:16 2010 +0300
@@ -15,13 +15,13 @@
  *
  */
 
+#include <qgraphicslinearlayout.h>
 #include <QtGui>
-#include <QGraphicsLinearLayout>
 #include <hbdocumentloader.h>
 #include <hblabel.h>
-#include <HbPushButton>
-#include <HbColorScheme>
-#include <HbEvent>
+#include <hbpushbutton.h>
+#include <hbcolorscheme.h>
+#include <hbevent.h>
 #include <hbframedrawer.h>
 #include <hbframeitem.h>
 #include "nmicons.h"
@@ -77,11 +77,11 @@
   Must be called after constructor.
    /return true if loading succeeded, otherwise false. False indicates that object is unusable.
  */
-bool NmHsWidgetTitleRow::setupUI()
+bool NmHsWidgetTitleRow::setupUI(HbDocumentLoader &loader)
     {
     NM_FUNCTION;
 
-    if(!loadDocML() || !setupGraphics()){
+    if(!loadDocML(loader) || !setupGraphics()){
         return false;
     }
     return true;
@@ -91,19 +91,10 @@
  Loads layout data and child items from docml file. Must be called after constructor.
  /return true if loading succeeded, otherwise false. False indicates that object is unusable
  */
-bool NmHsWidgetTitleRow::loadDocML()
+bool NmHsWidgetTitleRow::loadDocML(HbDocumentLoader &loader)
 {
     NM_FUNCTION;
     QT_TRY{
-        // Use document loader to load the contents
-        HbDocumentLoader loader;
-        bool ok(false);
-        loader.load(KNmHsWidgetTitleRowDocML, &ok);
-        if (!ok) {
-            NM_ERROR(1,"NmHsWidgetTitleRow::loadDocML Fail @ loader");
-            return false; //failure
-        }
-    
         //Create layout
         QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(Qt::Vertical);
     
@@ -148,7 +139,7 @@
   /return true if loading succeeded, otherwise false. False indicates that object is unusable.
  */
 bool NmHsWidgetTitleRow::setupGraphics()
-    {
+{
     NM_FUNCTION;
     
     HbFrameDrawer* backgroundFrameDrawer = 0;
@@ -173,7 +164,7 @@
         return false;
     }
     
-    }
+}
 
 
 /*!
@@ -231,13 +222,15 @@
     mMailboxInfo->setPlainText(mAccountName);
     //If unread count is -1, hide the unread count label completely.
     //This indicates that there are no mails at all (or the initial sync is not done)
-    if (mUnreadCount != -1) {
+    if (mUnreadCount >= 0) {
         QString unreadCount(hbTrId("txt_mail_widget_list_l1").arg(mUnreadCount));
         mUnreadCountLabel->setPlainText(unreadCount);
-        mUnreadCountLabel->setVisible(true);
+        QFontMetrics fm(mUnreadCountLabel->font());
+        qreal textWidth = fm.width(unreadCount);
+        mUnreadCountLabel->setMaximumWidth(textWidth);
     }
     else {
-        mUnreadCountLabel->setVisible(false);
+        mUnreadCountLabel->setMaximumWidth(0);
     }
 }
 
--- a/emailuis/nmindicatorplugin/src/nmsendingindicator.cpp	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailuis/nmindicatorplugin/src/nmsendingindicator.cpp	Fri Jul 02 15:55:16 2010 +0300
@@ -49,7 +49,7 @@
 */
 QVariant NmSendingIndicator::indicatorData(int role) const
 {
-    if (role==MonoDecorationNameRole) {
+    if (role==DecorationNameRole) {
 		// Must return non-empty to make the indicator visible
 		return " ";
 	}
--- a/emailuis/nmindicatorplugin/src/nmsyncindicator.cpp	Tue Jun 29 17:12:28 2010 +0300
+++ b/emailuis/nmindicatorplugin/src/nmsyncindicator.cpp	Fri Jul 02 15:55:16 2010 +0300
@@ -30,7 +30,7 @@
 
 QVariant NmSyncIndicator::indicatorData(int role) const
 {
-    if (role == MonoDecorationNameRole ) {
+    if (role == DecorationNameRole ) {
         // Must return non-empty to make the indicator visible
         return " ";
     }
Binary file ipsservices/nmipssettings/translations/mailips.qm has changed
--- a/ipsservices/nmipssettings/translations/mailips.ts	Tue Jun 29 17:12:28 2010 +0300
+++ b/ipsservices/nmipssettings/translations/mailips.ts	Fri Jul 02 15:55:16 2010 +0300
@@ -7,27 +7,27 @@
     <source>On (StartTLS)</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_d</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_d</extra-loc-viewid>
     <extra-loc-positionid>setlabel_11_12_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mailips_list_popup_sec_off">
-    <comment>Option item for txt_mailips_dialog_heading_incoming_connection and txt_mailips_dialog_heading_outgoing_connection.</comment>        
+    <comment>Option item for txt_mailips_dialog_heading_incoming_connection and txt_mailips_dialog_heading_outgoing_connection. For defining that the setting for securing incoming/outgoing mail is off. Example flow in settings.ppt, slide 18</comment>        
     <source>Off</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_popup_sec_add</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_12_13</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_d_a, mail_006_d_b</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mailips_dialog_heading_refresh_mail">
-    <comment>Title text in setting dialog opened from txt_mailips_setlabel_refresh_mail</comment>        
+    <comment>Option item in txt_mailips_dialog_heading_refresh_mail setting dialog. Option for defining that the mailbox gets refreshed from server according to a default refreshing schedule.</comment>        
     <source>Refresh mail</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_11</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_f</extra-loc-viewid>
     <extra-loc-positionid>title</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -37,7 +37,7 @@
     <source>Outgoing mail authentication</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_d</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_d_c</extra-loc-viewid>
     <extra-loc-positionid>setlabel_10</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -47,37 +47,37 @@
     <source>Reply to address</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_c</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_c</extra-loc-viewid>
     <extra-loc-positionid>setlabel_4</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mailips_setlabel_folder_path_val_default">
-    <comment>Value for txt_mailips_setlabel_folder_path. Default folder path will be used.</comment>        
+    <comment>Value for txt_mailips_setlabel_folder_path. Default folder path will be used. Refers to all folders. </comment>        
     <source>Default</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_d</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_d_d</extra-loc-viewid>
     <extra-loc-positionid>setlabel_9_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mailips_dialog_heading_connection">
-    <comment>Title text in setting dialog opened from txt_mailips_setlabel_connection</comment>        
+    <comment>Title text in setting radio button dialog opened from txt_mailips_setlabel_connection. Example of the dialog can be found from settings.ppt, slide 18</comment>        
     <source>Connection</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_15</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_a_a</extra-loc-viewid>
     <extra-loc-positionid>title</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mailips_dialog_heading_show_in_inbox">
-    <comment>Title text in setting dialog opened from txt_mailips_setlabel_show_mail_in_inbox</comment>        
+    <comment>Title text in setting dialog opened from txt_mailips_setlabel_show_mail_in_inbox. Example flow can be found from 10.2settings.ptt, slide 16</comment>        
     <source>Show mail in inbox</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_16</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_a</extra-loc-viewid>
     <extra-loc-positionid>title</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -87,7 +87,7 @@
     <source>Every day</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_c</extra-loc-viewid>
     <extra-loc-positionid>setlabel_3_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -97,7 +97,7 @@
     <source>Tue</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_c</extra-loc-viewid>
     <extra-loc-positionid>setlabel_3_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -107,7 +107,7 @@
     <source>Outgoing port</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_d</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_d</extra-loc-viewid>
     <extra-loc-positionid>setlabel_14</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -117,7 +117,7 @@
     <source>Every 1 hour</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_f</extra-loc-viewid>
     <extra-loc-positionid>setlabel_6_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -127,7 +127,7 @@
     <source>Thu</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_popup_sec_add</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_10</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_c</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -137,7 +137,7 @@
     <source>Outgoing mail server</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_d</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_d</extra-loc-viewid>
     <extra-loc-positionid>setlabel_3</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -147,17 +147,27 @@
     <source>The mailbox is refreshed as defined by the user</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_description_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mailips_list_popup_sec_on_ssltls">
-    <comment>Option item for txt_mailips_dialog_heading_incoming_connection and txt_mailips_dialog_heading_outgoing_connection.</comment>        
+    <comment>Option item for txt_mailips_dialog_heading_incoming_connection and txt_mailips_dialog_heading_outgoing_connection. For defining that the setting for securing incoming/outgoing mail is on with SSL/TLS protocol. Example flow in settings.ppt, slide 18</comment>        
     <source>On (SSL/TLS)</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_popup_sec_add</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_12_13</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_d_a, mail_006_d_b</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>mail</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_mailips_list_the_mailbox_is_refreshed_every_hour">
+    <comment>info text to explain the profile (txt_mailmfe_setlabel_selected_mode_val_save_energy)</comment>        
+    <source>The mailbox is refreshed every hour during daytime</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>qtl_dataform_description_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>mail_006_b</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -167,7 +177,7 @@
     <source>Sun</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_c</extra-loc-viewid>
     <extra-loc-positionid>setlabel_3_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -177,7 +187,7 @@
     <source>User defined</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_d</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_d_d</extra-loc-viewid>
     <extra-loc-positionid>setlabel_9_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -187,27 +197,17 @@
     <source>Folder path</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_d</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_d_d</extra-loc-viewid>
     <extra-loc-positionid>setlabel_9</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_mailips_dialog_heading_signature">
-    <comment>Title text in setting dialog opened from txt_mailnips_setlabel_signature</comment>        
-    <source>Signature</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_g</extra-loc-viewid>
-    <extra-loc-positionid>title</extra-loc-positionid>
-    <extra-loc-feature>mail</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
 <message numerus="no" id="txt_mailips_list_popup_sec_every_4_hours">
-    <comment>Option item in txt_mailips_dialog_heading_refresh_mail setting dialog.</comment>        
+    <comment>Option item in txt_mailips_dialog_heading_refresh_mail setting dialog. Option for defining that the mailbox gets refreshed from server every 4 hours.</comment>        
     <source>Every 4 hours</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_popup_sec_add</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_11</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_f</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -217,7 +217,7 @@
     <source>Username</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_c</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_c</extra-loc-viewid>
     <extra-loc-positionid>setlabel_2</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -227,7 +227,7 @@
     <source>Receiving days</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_c</extra-loc-viewid>
     <extra-loc-positionid>setlabel_3</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -237,17 +237,17 @@
     <source>Mailbox name</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_a</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_a_e</extra-loc-viewid>
     <extra-loc-positionid>setlabel_2</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mailips_list_popup_sec_every_15_minutes">
-    <comment>Option item in txt_mailips_dialog_heading_refresh_mail setting dialog.</comment>        
+    <comment>Option item in txt_mailips_dialog_heading_refresh_mail setting dialog. Option for defining that the mailbox gets refreshed from server every 15 minutes.</comment>        
     <source>Every 15 minutes</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_popup_sec_add</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_11</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_f</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -257,47 +257,27 @@
     <source>Wed</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_popup_sec_add</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_10</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_c</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_mailips_setlabel_signature">
-    <comment>Setting item in preferences.</comment>        
-    <source>Signature</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_a</extra-loc-viewid>
-    <extra-loc-positionid>setlabel_10</extra-loc-positionid>
-    <extra-loc-feature>mail</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
 <message numerus="no" id="txt_mailips_setlabel_download_images_val_mon">
     <comment>One of the values for txt_mailips_setlabel_receiving_weekdays. Monday setting item</comment>        
     <source>Mon</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_c</extra-loc-viewid>
     <extra-loc-positionid>setlabel_3_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_mailips_list_popup_sec_signature_on">
-    <comment>Radio button value in the txt_mailips_dialog_heading_signature dialog.</comment>        
-    <source>On</source>
-    <translation variants="yes" type="unfinished"></translation>
-    <extra-loc-layout_id>qtl_list_popup_sec_add</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_g</extra-loc-viewid>
-    <extra-loc-positionid>list</extra-loc-positionid>
-    <extra-loc-feature>mail</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
 <message numerus="no" id="txt_mailips_setlabel_outgoing_authentication_same">
     <comment>Value for txt_mailips_setlabel_outgoing_mail_authentication. Same authentication as for incoming mail</comment>        
     <source>Same as for incoming</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_d</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_d</extra-loc-viewid>
     <extra-loc-positionid>setlabel_10_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -307,7 +287,7 @@
     <source>Incoming secure connection</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_d</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_d_a</extra-loc-viewid>
     <extra-loc-positionid>setlabel_11</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -317,7 +297,7 @@
     <source>The mailbox is refreshed every 15 minutes during daytime</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_description_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -327,7 +307,7 @@
     <source>All</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_popup_sec_add</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -337,7 +317,7 @@
     <source>Sat</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_popup_sec_add</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_10</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_c</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -347,7 +327,7 @@
     <source>Keep up-to-date</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_f</extra-loc-viewid>
     <extra-loc-positionid>setlabel_6_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -357,17 +337,17 @@
     <source>The mailbox is up-to-date during daytime</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_description_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mailips_dialog_heading_outgoing_authentication">
-    <comment>Title text in setting dialog opened from txt_mailips_setlabel_refresh_mail</comment>        
+    <comment>Title text in setting dialog opened from txt_mailips_setlabel_refresh_mail. For defining the settings for outgoing mail authentication. Radio button list. Example flow in settings.ppt, slide 18</comment>        
     <source>Outgoing mail authentication</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_14</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_d_c</extra-loc-viewid>
     <extra-loc-positionid>title</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -377,7 +357,7 @@
     <source>On (SLL/TLS)</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_d</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_d</extra-loc-viewid>
     <extra-loc-positionid>setlabel_11_12_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -387,27 +367,27 @@
     <source>Outgoing secure connection</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_d</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_d_b</extra-loc-viewid>
     <extra-loc-positionid>setlabel_12</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mailips_setlabel_selected_mode_val_fetch_manua">
-    <comment>Under Receiving schedule &gt; Selected mode. Mode drop down: fetch manually mode. The mailbox is refreshed only by user request.</comment>        
+    <comment>Under Receiving schedule &gt; Selected mode. Mode drop down: fetch manually mode. The mailbox is refreshed only by user request. Example flow in settings.ppt, slide 14.</comment>        
     <source>Fetch manually</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_combobox_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b</extra-loc-viewid>
     <extra-loc-positionid>setlabel_20_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mailips_list_popup_sec_no_authentication">
-    <comment>Option item in txt_mailips_dialog_heading_refresh_mail setting dialog.</comment>        
+    <comment>Option item in txt_mailips_dialog_heading_refresh_mail setting dialog. Radio button list. Example flow in settings.ppt, slide 18</comment>        
     <source>No authentication</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_popup_sec_add</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_14</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_d_c</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -417,17 +397,17 @@
     <source>Day start time</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_d</extra-loc-viewid>
     <extra-loc-positionid>setlabel_4</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mailips_list_popup_sec_keep_up_to_date">
-    <comment>Option item in txt_mailips_dialog_heading_refresh_mail setting dialog.</comment>        
+    <comment>Option item in txt_mailips_dialog_heading_refresh_mail setting dialog. Option for defining that the mailbox gets refreshed from server according to a default refreshing schedule.</comment>        
     <source>Keep up-to-date</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_popup_sec_add</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_11</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_f</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -437,7 +417,7 @@
     <source>All</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b</extra-loc-viewid>
     <extra-loc-positionid>setlabel_1_2_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -447,17 +427,17 @@
     <source>Version: %[]1</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06</extra-loc-viewid>
+    <extra-loc-viewid>mail_006</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mailips_list_popup_sec_user_authentication">
-    <comment>Option item in txt_mailips_dialog_heading_refresh_mail setting dialog.</comment>        
+    <comment>Option item in txt_mailips_dialog_heading_refresh_mail setting dialog. Radio button list. Example flow in settings.ppt, slide 18</comment>        
     <source>User authentication</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_popup_sec_add</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_14</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_d_c</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -467,7 +447,7 @@
     <source>None</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_d</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_d</extra-loc-viewid>
     <extra-loc-positionid>setlabel_10_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -487,17 +467,17 @@
     <source>Incoming port</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_d</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_d</extra-loc-viewid>
     <extra-loc-positionid>setlabel_13</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mailips_dialog_heading_end_time">
-    <comment>Title text in setting dialog opened from txt_mailips_setlabel_day_end_time</comment>        
+    <comment>Title text in setting dialog opened from txt_mailips_setlabel_day_end_time. Day here refers to the peak time for synchronization within one day ie. during which hours wihtin one day the user wants the mailbox refreshed from the server most often. Typically for example during business hours but not in the evening in which case the day start time could be 9 am when the user comes to office and the day end time could be 5 pm when the user leaves office. Example flow can be found from 10.2settings.ptt, slide 17</comment>        
     <source>Day end time</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_13</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_e</extra-loc-viewid>
     <extra-loc-positionid>title</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -507,27 +487,27 @@
     <source>Default</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_d</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_d</extra-loc-viewid>
     <extra-loc-positionid>setlabel_13_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mailips_dialog_heading_outgoing_connection">
-    <comment>Title text in setting dialog opened from txt_mailips_setlabel_outgoing_security</comment>        
+    <comment>Title text in setting dialog opened from txt_mailips_setlabel_outgoing_security. Radio button list. Example flow in settings.ppt, slide 18</comment>        
     <source>Outgoing secure connection</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_13</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_d_b</extra-loc-viewid>
     <extra-loc-positionid>title</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mailips_list_popup_sec_every_hour">
-    <comment>Option item in txt_mailips_dialog_heading_refresh_mail setting dialog.</comment>        
+    <comment>Option item in txt_mailips_dialog_heading_refresh_mail setting dialog. Option for defining that the mailbox gets refreshed from server every hour.</comment>        
     <source>Every hour</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_popup_sec_add</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_11</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_f</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -537,7 +517,7 @@
     <source>Fri</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_popup_sec_add</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_10</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_c</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -547,17 +527,17 @@
     <source>Incoming mail server</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_d</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_d</extra-loc-viewid>
     <extra-loc-positionid>setlabel_2</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mailips_list_popup_sec_on_starttls">
-    <comment>Option item for txt_mailips_dialog_heading_incoming_connection and txt_mailips_dialog_heading_outgoing_connection.</comment>        
+    <comment>Option item for txt_mailips_dialog_heading_incoming_connection and txt_mailips_dialog_heading_outgoing_connection. For defining that the setting for securing incoming/outgoing mail is on with StartTLS protocol. Example flow in settings.ppt, slide 18</comment>        
     <source>On (StartTLS)</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_popup_sec_add</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_12_13</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_d_a, mail_006_d_b</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -567,7 +547,7 @@
     <source>My name</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_a</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_a_d</extra-loc-viewid>
     <extra-loc-positionid>setlabel_1</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -577,37 +557,37 @@
     <source>Preferences</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_a</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_a</extra-loc-viewid>
     <extra-loc-positionid>subhead</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mailips_setlabel_day_end_time">
-    <comment>Setting label under Receiving schedule &gt; Selected mode &gt; Save energy  (txt_mailips_setlabel_selected_mode_val_save_energy). Label for selecting the end time of of the day</comment>        
+    <comment>Setting label under Receiving schedule &gt; Selected mode &gt; Save energy  (txt_mailips_setlabel_selected_mode_val_save_energy). Label for selecting the end time of of the day. Day here refers to the peak time for synchronization within one day ie. during which hours wihtin one day the user wants the mailbox refreshed from the server most often. Typically for example during business hours but not in the evening in which case the day start time could be 9 am when the user comes to office and the day end time could be 5 pm when the user leaves office.</comment>        
     <source>Day end time</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_e</extra-loc-viewid>
     <extra-loc-positionid>setlabel_5</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_mailips_list_popup_sec_signature_off">
-    <comment>Radio button value in the txt_mailips_dialog_heading_signature dialog.</comment>        
-    <source>Off</source>
+<message numerus="no" id="txt_mailips_list_popup_sec_folder_path_val_default">
+    <comment>Option item in txt_mailips_setlabel_folder_path. Default folder path will be used. See example image from settings.ppt, slide 19</comment>        
+    <source>Default</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_popup_sec_add</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_g</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_d_d</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mailips_setlabel_selected_mode_val_save_energy">
-    <comment>Under Receiving schedule &gt; Selected mode. Mode drop down:Save energy mode. The mailbox is refreshed every 15 minutes during daytime</comment>        
+    <comment>Under Receiving schedule &gt; Selected mode. Mode drop down:Save energy mode. The mailbox is refreshed every 15 minutes during daytime. Example flow in settings.ppt, slide 14.</comment>        
     <source>Save energy</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_combobox_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b</extra-loc-viewid>
     <extra-loc-positionid>setlabel_20_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -617,7 +597,7 @@
     <source>Wed</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_c</extra-loc-viewid>
     <extra-loc-positionid>setlabel_3_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -627,7 +607,7 @@
     <source>Sat</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_c</extra-loc-viewid>
     <extra-loc-positionid>setlabel_3_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -637,7 +617,7 @@
     <source>Sun</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_popup_sec_add</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_10</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_c</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -647,7 +627,7 @@
     <source>Off</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_d</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_d</extra-loc-viewid>
     <extra-loc-positionid>setlabel_11_12_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -657,17 +637,27 @@
     <source>Show mail in other folders</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_b</extra-loc-viewid>
     <extra-loc-positionid>setlabel_2</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
+<message numerus="no" id="txt_mailips_list_popup_sec_folder_path_user_defined">
+    <comment>Option item in txt_mailips_setlabel_folder_path. User is able to define the folder path. See example image from settings.ppt, slide 19</comment>        
+    <source>User defined</source>
+    <translation variants="yes" type="unfinished"></translation>
+    <extra-loc-layout_id>qtl_list_popup_sec_add</extra-loc-layout_id>    
+    <extra-loc-viewid>mail_006_d_d</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>mail</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
 <message numerus="no" id="txt_mailips_setlabel_download_images_val_none">
     <comment>One of the values for txt_mailips_setlabel_receiving_weekdays. Shown if none of the days are selected.</comment>        
     <source>None</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b</extra-loc-viewid>
     <extra-loc-positionid>setlabel_3_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -677,7 +667,7 @@
     <source>Tue</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_popup_sec_add</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_10</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_c</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -687,7 +677,7 @@
     <source>Refresh mail</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_f</extra-loc-viewid>
     <extra-loc-positionid>setlabel_6</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -697,27 +687,27 @@
     <source>Mail address</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_c</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_c</extra-loc-viewid>
     <extra-loc-positionid>setlabel_1</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mailips_setlabel_connection">
-    <comment>Setting label under Server info txt_mailips_subhead_server_info for defining the type of connection used for fetching mail. Setting item in server info</comment>        
+    <comment>Setting label under Preferences for defining the type of connection used for fetching mail. Opens a radio button dialog, see example from settings.ppt, slide 18</comment>        
     <source>Connection</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_d</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_a_a</extra-loc-viewid>
     <extra-loc-positionid>setlabel_8</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mailips_list_popup_sec_same_as_for_incoming">
-    <comment>Option item in txt_mailips_dialog_heading_refresh_mail setting dialog.</comment>        
+    <comment>Option item in txt_mailips_dialog_heading_refresh_mail setting dialog. Radio button list. Example flow in settings.ppt, slide 18</comment>        
     <source>Same as for incoming</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_popup_sec_add</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_14</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_d_c</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -727,7 +717,7 @@
     <source>Thu</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_c</extra-loc-viewid>
     <extra-loc-positionid>setlabel_3_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -737,7 +727,7 @@
     <source>Receiving Schedule</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b</extra-loc-viewid>
     <extra-loc-positionid>subhead</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -747,7 +737,7 @@
     <source>Server info</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_d</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_d</extra-loc-viewid>
     <extra-loc-positionid>subhead</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -757,37 +747,47 @@
     <source>Mon</source>
     <translation variants="yes" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_list_popup_sec_add</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_10</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_c</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
+<message numerus="no" id="txt_mailips_dialog_heading_folder_path">
+    <comment>Title text in setting dialog opened from Server info txt_mailips_subhead_server_info for defining the folder path. See example image from settings.ppt, slide 19</comment>        
+    <source>Folder path</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
+    <extra-loc-viewid>mail_006_d_d</extra-loc-viewid>
+    <extra-loc-positionid>title</extra-loc-positionid>
+    <extra-loc-feature>mail</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
 <message numerus="no" id="txt_mailips_setlabel_val_when_i_open_mailbox">
     <comment>Value for txt_mailips_setlabel_refresh_mail. The mailbox is refreshed only and always when the user opens the mailbox</comment>        
     <source>When I open mailbox</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_f</extra-loc-viewid>
     <extra-loc-positionid>setlabel_6_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mailips_setlabel_selected_mode_val_user_define">
-    <comment>Under Receiving schedule &gt; Selected mode. Mode drop down:User defined mode. The mailbox is refreshed as defined by the user.</comment>        
+    <comment>Under Receiving schedule &gt; Selected mode. Mode drop down:User defined mode. The mailbox is refreshed as defined by the user. Example flow in settings.ppt, slide 14.</comment>        
     <source>User defined</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_combobox_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b</extra-loc-viewid>
     <extra-loc-positionid>setlabel_20_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mailips_dialog_heading_show_in_folders">
-    <comment>Title text in setting dialog opened from txt_mailips_setlabel_show_mail_in_other_folders</comment>        
+    <comment>Title text in setting dialog opened from txt_mailips_setlabel_show_mail_in_other_folders. Example flow can be found from 10.2settings.ptt, slide 16</comment>        
     <source>Show mail in other folders</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_17</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_b</extra-loc-viewid>
     <extra-loc-positionid>title</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -797,7 +797,7 @@
     <source>Fri</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_c</extra-loc-viewid>
     <extra-loc-positionid>setlabel_3_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -807,7 +807,7 @@
     <source>Every 4 hours</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_f</extra-loc-viewid>
     <extra-loc-positionid>setlabel_6_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -817,27 +817,27 @@
     <source>User defined</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_d</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_d</extra-loc-viewid>
     <extra-loc-positionid>setlabel_13_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mailips_setlabel_selected_mode_val_keep_upto">
-    <comment>Under Receiving schedule &gt; Selected mode. Mode drop down: keep up to date mode. The mailbox is up-to-date during daytime</comment>        
+    <comment>Under Receiving schedule &gt; Selected mode. Mode drop down: keep up to date mode. The mailbox is up-to-date during daytime. Example flow in settings.ppt, slide 14.</comment>        
     <source>Keep up-to-date</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_combobox_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b</extra-loc-viewid>
     <extra-loc-positionid>setlabel_20_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mailips_dialog_heading_incoming_connection">
-    <comment>Title text in setting dialog opened from txt_mailips_setlabel_incoming_security</comment>        
+    <comment>Title text in setting dialog opened from txt_mailips_setlabel_incoming_security for defining the secure connection usage for incoming mail. Radio button list. Example flow in settings.ppt, slide 18</comment>        
     <source>Incoming secure connection</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_12</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_d_a</extra-loc-viewid>
     <extra-loc-positionid>title</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -847,17 +847,17 @@
     <source>User authentication</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_d</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_d</extra-loc-viewid>
     <extra-loc-positionid>setlabel_10_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mailips_dialog_heading_receiving_days">
-    <comment>Title text in setting dialog opened from txt_mailips_setlabel_receiving_weekdays</comment>        
+    <comment>Title text in setting dialog opened from txt_mailips_setlabel_receiving_weekdays. Allows the user to define the weekdays when mail is refreshed to mailbox from server. Example flow can be found from 10.2settings.ptt, slide 19</comment>        
     <source>Receiving days</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_10</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_c</extra-loc-viewid>
     <extra-loc-positionid>title</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -867,7 +867,7 @@
     <source>Password</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_c</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_c</extra-loc-viewid>
     <extra-loc-positionid>setlabel_3</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -877,7 +877,7 @@
     <source>Every 15 minutes</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_f</extra-loc-viewid>
     <extra-loc-positionid>setlabel_6_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -887,7 +887,7 @@
     <source>The mailbox is refreshed only by user request</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_description_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -897,47 +897,47 @@
     <source>User info</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_c</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_c</extra-loc-viewid>
     <extra-loc-positionid>subhead</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_mailips_dialog_heading_start_time">
-    <comment>Title text in setting dialog opened from txt_mailips_setlabel_day_start_time</comment>        
+    <comment>Title text in setting dialog opened from txt_mailips_setlabel_day_start_time. Day here refers to the peak time for synchronization within one day ie. during which hours wihtin one day the user wants the mailbox refreshed from the server most often. Typically for example during business hours but not in the evening in which case the day start time could be 9 am when the user comes to office and the day end time could be 5 pm when the user leaves office. Example flow can be found from 10.2settings.ptt, slide 17</comment>        
     <source>Day start time</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_12</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_d</extra-loc-viewid>
     <extra-loc-positionid>title</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
+<message numerus="no" id="txt_mailips_setlabel_selected_mode">
+    <comment>Under Receiving schedule. Label text for mode drop down. User can define how often the mailbox is refreshed with the server content. Options Keep-up-to-date, Save energy, Fetch manually.</comment>        
+    <source>Selected mode</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>    
+    <extra-loc-viewid>mail_006_b</extra-loc-viewid>
+    <extra-loc-positionid>setlabel_20</extra-loc-positionid>
+    <extra-loc-feature>mail</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
 <message numerus="no" id="txt_mailips_setlabel_show_mail_in_inbox">
     <comment>Setting label under Receiving schedule &gt; Selected mode &gt; Save energy  (txt_mailips_setlabel_selected_mode_val_save_energy). Allows the user to define how many mails are synchronized to Inbox from server (50, 100, 200 or All).</comment>        
     <source>Show mail in inbox</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_b</extra-loc-viewid>
+    <extra-loc-viewid>mail_006_b_a</extra-loc-viewid>
     <extra-loc-positionid>setlabel_1</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_mailips_setlabel_selected_mode">
-    <comment>Under Receiving schedule. Label text for mode drop down. User can define how often the mailbox is refreshed with the server content. Options Keep-up-to-date, Save energy, Fetch manually.</comment>        
-    <source>Selected mode</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_b</extra-loc-viewid>
-    <extra-loc-positionid>setlabel_20</extra-loc-positionid>
-    <extra-loc-feature>mail</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
 <message numerus="no" id="txt_mailips_button_delete_mailbox">
     <comment>Button for deleting the mailbox. </comment>        
     <source>Delete mailbox</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06</extra-loc-viewid>
+    <extra-loc-viewid>mail_006</extra-loc-viewid>
     <extra-loc-positionid>Button</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>