Revision: 201023
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 23 Jun 2010 18:00:21 +0300
changeset 53 bf7eb7911fc5
parent 30 759dc5235cdb
child 54 997a02608b3a
Revision: 201023 Kit: 2010125
emailservices/emailcommon/emailcommon.pro
emailservices/emaildebug/inc/emailtrace.h
emailservices/emailframework/inc/CFSMailPlugin.h
emailservices/emailstore/base_plugin/BWINS/basepluginU.DEF
emailservices/emailstore/base_plugin/EABI/basepluginU.DEF
emailservices/emailstore/base_plugin/base_plugin.pro
emailservices/emailstore/base_plugin/inc/BasePlugin.h
emailservices/emailstore/base_plugin/src/basepluginmisc.cpp
emailservices/nmailagent/conf/2002C326.txt
emailservices/nmailagent/inc/nmmailagent.h
emailservices/nmailagent/inc/nmmailagentheaders.h
emailservices/nmailagent/nmailagent.pro
emailservices/nmailagent/rom/nmailagent.iby
emailservices/nmailagent/src/nmmailagent.cpp
emailservices/nmclientapi/src/nmapiengine.cpp
emailservices/nmclientapi/src/nmapieventnotifier.cpp
emailuis/nmailui/conf/nmeditorview.docml
emailuis/nmailui/conf/nmmailboxlistview.docml
emailuis/nmailui/conf/nmmailviewer.docml
emailuis/nmailui/conf/nmmessagelistview.docml
emailuis/nmailui/inc/nmattachmentlist.h
emailuis/nmailui/inc/nmeditorcontent.h
emailuis/nmailui/inc/nmeditorheader.h
emailuis/nmailui/inc/nmeditorview.h
emailuis/nmailui/inc/nmmessagelistview.h
emailuis/nmailui/inc/nmuiheaders.h
emailuis/nmailui/inc/nmutilities.h
emailuis/nmailui/inc/nmviewerview.h
emailuis/nmailui/inc/nmviewerwebview.h
emailuis/nmailui/src/nmapplication.cpp
emailuis/nmailui/src/nmattachmentlist.cpp
emailuis/nmailui/src/nmattachmentmanager.cpp
emailuis/nmailui/src/nmeditorcontent.cpp
emailuis/nmailui/src/nmeditorheader.cpp
emailuis/nmailui/src/nmeditorview.cpp
emailuis/nmailui/src/nmmessagelistview.cpp
emailuis/nmailui/src/nmmessagelistviewitem.cpp
emailuis/nmailui/src/nmrecipientfield.cpp
emailuis/nmailui/src/nmutilities.cpp
emailuis/nmailui/src/nmviewerheader.cpp
emailuis/nmailui/src/nmviewerserviceinterface.cpp
emailuis/nmailui/src/nmviewerview.cpp
emailuis/nmailui/src/nmviewerwebview.cpp
emailuis/nmailui/translations/mail.qm
emailuis/nmailui/translations/mail.ts
emailuis/nmailuiengine/inc/nmuiengine.h
emailuis/nmailuiengine/src/nmmessagelistmodel.cpp
emailuis/nmailuiengine/src/nmuiengine.cpp
emailuis/nmailuiwidgets/bwins/nmailuiwidgetsu.def
emailuis/nmailuiwidgets/eabi/nmailuiwidgetsu.def
emailuis/nmailuiwidgets/inc/nmattachmentlistitem.h
emailuis/nmailuiwidgets/src/nmattachmentlistitem.cpp
emailuis/nmailuiwidgets/src/nmattachmentlistwidget.cpp
emailuis/nmhswidget/nmhswidget.pro
emailuis/nmhswidget/src/nmhswidgetemailengine.cpp
emailuis/nmindicatorplugin/src/nmsyncindicator.cpp
ipsservices/ipssosplugin/inc/ipsplgimap4plugin.h
ipsservices/ipssosplugin/inc/ipsplgpop3plugin.h
ipsservices/ipssosplugin/inc/ipsplgsosbaseplugin.h
ipsservices/ipssosplugin/inc/ipssosextendedsettingsmanager.h
ipsservices/ipssosplugin/inc/ipsstateextension.h
ipsservices/ipssosplugin/ipssosplugin.pro
ipsservices/ipssosplugin/src/ipsplgeventhandler.cpp
ipsservices/ipssosplugin/src/ipsplgimap4plugin.cpp
ipsservices/ipssosplugin/src/ipsplgmsgmapper.cpp
ipsservices/ipssosplugin/src/ipsplgpop3plugin.cpp
ipsservices/ipssosplugin/src/ipsplgsosbaseplugin.cpp
ipsservices/ipssosplugin/src/ipssosextendedsettingsmanager.cpp
ipsservices/ipssosplugin/src/ipsstateextension.cpp
ipsservices/nmipssettings/inc/nmipssettingshelper.h
ipsservices/nmipssettings/inc/nmipssettingsplugin.h
ipsservices/nmipssettings/nmipssettings.pro
ipsservices/nmipssettings/src/nmipssettingshelper.cpp
ipsservices/nmipssettings/src/nmipssettingsmultiselectionitem.cpp
ipsservices/nmipssettings/src/nmipssettingsplugin.cpp
ipsservices/nmipssettings/translations/mailips.qm
ipsservices/nmipssettings/translations/mailips.ts
--- a/emailservices/emailcommon/emailcommon.pro	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailservices/emailcommon/emailcommon.pro	Wed Jun 23 18:00:21 2010 +0300
@@ -23,8 +23,9 @@
 DEFINES += BUILD_DLL 
 
 INCLUDEPATH += ../../inc \
-../inc \
-/epoc32/include/ecom 
+               ../inc \
+               /epoc32/include/ecom \
+               $$APP_LAYER_SYSTEMINCLUDE
 
 HEADERS   += inc/cemailextensionbase.h \ 
     inc/CFSMailBox.h \
--- a/emailservices/emaildebug/inc/emailtrace.h	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailservices/emaildebug/inc/emailtrace.h	Wed Jun 23 18:00:21 2010 +0300
@@ -23,33 +23,44 @@
 #include <qfile.h>
 
 /*
- * The macros COMMENT_TRACES, ERROR_TRACES, and FUNCTION_TRACES control which
- * trace messages are printed. The trace message logging is controlled with
- * the LOG_TO_FILE macro, whereas the LOG_FILE macro defines which file is to
- * be used in logging. The print_trace() helper function implements printing.
- * If LOG_TO_FILE is zero or the LOG_FILE cannot be opened, the messages are
- * printed to qDebug().
+ * The NM_TRACING_SYSTEM macro can be used to enable and disable the tracing
+ * system in debug mode. The tracing system can be disabled in a specific
+ * source file by defining the macro "NM_TRACING_SYSTEM 0" before this file
+ * is included.
  */
-#if defined(DEBUG) || defined(_DEBUG)
+#ifndef NM_TRACING_SYSTEM
+#define NM_TRACING_SYSTEM 1
+#endif
 
-#define COMMENT_TRACES  1
-#define ERROR_TRACES    1
-#define FUNCTION_TRACES 1
+/*
+ * The macros NM_COMMENT_TRACES, NM_ERROR_TRACES, and NM_FUNCTION_TRACES
+ * control which debug messages are printed. The trace logging is controlled
+ * with the NM_LOG_TO_FILE macro, whereas the NM_LOG_FILE macro defines which
+ * file is to be used in logging. The print_trace() helper function implements
+ * printing. If NM_LOG_TO_FILE is zero or the NM_LOG_FILE cannot be opened,
+ * the messages are printed to qDebug().
+ */
+#if NM_TRACING_SYSTEM && (defined(DEBUG) || defined(_DEBUG))
 
-#if COMMENT_TRACES || ERROR_TRACES || FUNCTION_TRACES
+#define NM_COMMENT_TRACES  1
+#define NM_ERROR_TRACES    1
+#define NM_FUNCTION_TRACES 1
 
-#define LOG_TO_FILE     0
-#define LOG_FILE        "c:/logs/nmail_trace.log"
+#if NM_COMMENT_TRACES || NM_ERROR_TRACES || NM_FUNCTION_TRACES
+
+#define NM_LOG_TO_FILE 0
+#define NM_LOG_FILE    "c:/data/logs/nmail_trace.log"
 
 inline void print_trace(const QString& msg)
 {
-    QFile out(LOG_FILE);
-    if (LOG_TO_FILE && out.open(QIODevice::Append | QIODevice::Text)) {
-        QDebug(&out) << "[Nmail]" << msg;
-        out.putChar('\n');
-        out.close();
+    static QFile file(NM_LOG_FILE);
+    if (NM_LOG_TO_FILE && !file.isOpen()) {
+        file.open(QIODevice::Append | QIODevice::Text);
+    }
+    if (file.isWritable()) {
+        QDebug(&file).nospace() << "[Nmail] " << msg << '\n';
     } else {
-        qDebug() << "[Nmail]" << msg;
+        qDebug().nospace() << "[Nmail] " << msg;
     }
 }
 
@@ -58,12 +69,12 @@
 #endif /* DEBUG */
 
 /*
- * The function NM_COMMENT() prints a trace message. The INFO macros and the
+ * The function NM_COMMENT() prints a debug message. The INFO macros and the
  * NMLOG macro are provided for legacy compatibility. They are deprecated and
  * should not be used. If sprintf() type of formatting is desired, consider
  * using QString::arg() or QTextStream.
  */
-#if COMMENT_TRACES
+#if NM_COMMENT_TRACES
 
 inline void NM_COMMENT(const QString& msg)
 {
@@ -99,7 +110,7 @@
 #define INFO_3(msg,arg1,arg2,arg3)
 #define NMLOG(msg)
 
-#endif /* COMMENT_TRACES */
+#endif /* NM_COMMENT_TRACES */
 
 /*
  * The function NM_ERROR() prints its second argument if the first argument
@@ -107,7 +118,7 @@
  * are deprecated and should not be used. If sprintf() type of formatting is
  * desired, consider using QString::arg() or QTextStream.
  */
-#if ERROR_TRACES
+#if NM_ERROR_TRACES
 
 inline void NM_ERROR(int err, const QString& msg)
 {
@@ -147,17 +158,16 @@
 #define ERROR_GEN(msg)
 #define ERROR_GEN_1(msg,arg1)
 
-#endif /* ERROR_TRACES */
+#endif /* NM_ERROR_TRACES */
 
 /*
  * The macro NM_FUNCTION, when used inside a function body, enables tracing
- * for a function. Trace messages with labels ENTER and RETURN are printed
- * when entering into and returning from a function, respectively. In case of
- * an exception or a Symbian leave, a message with label UNWIND is printed
- * (UNWIND stands for stack unwinding). The FUNC_LOG macro is provided for
- * legacy compatibility. It is deprecated and should not be used.
+ * for a function. ENTER and RETURN messages are printed when entering into
+ * and returning from a function, respectively. In case of an exception,
+ * UNWIND (for stack unwinding) is printed. The FUNC_LOG macro is provided
+ * for legacy compatibility. It is deprecated and should not be used.
  */
-#if FUNCTION_TRACES
+#if NM_FUNCTION_TRACES
 
 class __ftracer
 {
@@ -187,6 +197,6 @@
 #define NM_FUNCTION
 #define FUNC_LOG
 
-#endif /* FUNCTION TRACES */
+#endif /* NM_FUNCTION_TRACES */
 
 #endif /* EMAILTRACE_H */
--- a/emailservices/emailframework/inc/CFSMailPlugin.h	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailservices/emailframework/inc/CFSMailPlugin.h	Wed Jun 23 18:00:21 2010 +0300
@@ -133,10 +133,13 @@
      *        will receive progress notifications during the operation.
      * @param aRequestId identifies asynchronous request if parallel
      * requests exist
+     * @param aSilentConnection defines if connection is needed to be 
+     *        silent connection or non-silent one (default).
      */
      virtual void RefreshNowL( const TFSMailMsgId& aMailBoxId,
                                MFSMailRequestObserver& aOperationObserver,
-                               TInt aRequestId ) = 0;
+                               TInt aRequestId,
+                               const TBool aSilentConnection=EFalse ) = 0;
 
     /**
      * Returns last synchronization operation status.
--- a/emailservices/emailstore/base_plugin/BWINS/basepluginU.DEF	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailservices/emailstore/base_plugin/BWINS/basepluginU.DEF	Wed Jun 23 18:00:21 2010 +0300
@@ -192,8 +192,8 @@
 	?AttachmentsL@CBaseMrInfoObject@@UBEABV?$RPointerArray@VMMRAttachment@@@@XZ @ 191 NONAME ; class RPointerArray<class MMRAttachment> const & CBaseMrInfoObject::AttachmentsL(void) const
 	?RecurrenceStartTime@CBaseMrRecurrenceRule@@UBE?AVTTime@@XZ @ 192 NONAME ; class TTime CBaseMrRecurrenceRule::RecurrenceStartTime(void) const
 	?CreationTimeInUtcL@CBaseMrInfoObject@@UBE?AVTTime@@XZ @ 193 NONAME ; class TTime CBaseMrInfoObject::CreationTimeInUtcL(void) const
-	?SetReplyOrForwardToFieldL@CBasePlugin@@IAEXAAVCMsgStoreMessage@@@Z @ 194 NONAME ; void CBasePlugin::SetReplyOrForwardToFieldL(class CMsgStoreMessage &)
-	?RefreshNowL@CBasePlugin@@UAEXABVTFSMailMsgId@@AAVMFSMailRequestObserver@@H@Z @ 195 NONAME ; void CBasePlugin::RefreshNowL(class TFSMailMsgId const &, class MFSMailRequestObserver &, int)
+	?SetReplyOrForwardToFieldL@CBasePlugin@@IAEXAAVCMsgStoreMessage@@@Z @ 194 NONAME ; void CBasePlugin::SetReplyOrForwardToFieldL(class CMsgStoreMessage &)	
+	?RefreshNowL@CBasePlugin@@UAEXABVTFSMailMsgId@@AAVMFSMailRequestObserver@@HH@Z @ 195 NONAME ; void CBasePlugin::RefreshNowL(class TFSMailMsgId const &, class MFSMailRequestObserver &, int, int)
 	?CreateResourceReaderLC@CResourceLoader@@QBEPAVHBufC8@@AAVTResourceReader@@H@Z @ 196 NONAME ; class HBufC8 * CResourceLoader::CreateResourceReaderLC(class TResourceReader &, int) const
 	?ModificationNotify@CBasePlugin@@UAEXIW4TMsgStoreOperation@@W4TMsgStoreContainerType@@KIII@Z @ 197 NONAME ; void CBasePlugin::ModificationNotify(unsigned int, enum TMsgStoreOperation, enum TMsgStoreContainerType, unsigned long, unsigned int, unsigned int, unsigned int)
 	?SystemEventNotify@CBasePlugin@@UAEXW4TMsgStoreSystemEvent@@@Z @ 198 NONAME ; void CBasePlugin::SystemEventNotify(enum TMsgStoreSystemEvent)
--- a/emailservices/emailstore/base_plugin/EABI/basepluginU.DEF	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailservices/emailstore/base_plugin/EABI/basepluginU.DEF	Wed Jun 23 18:00:21 2010 +0300
@@ -13,7 +13,7 @@
 	_ZN11CBasePlugin11CancelSyncLERK12TFSMailMsgId @ 12 NONAME
 	_ZN11CBasePlugin11ChildPartsLERK12TFSMailMsgIdS2_S2_S2_R13RPointerArrayI18CFSMailMessagePartE @ 13 NONAME
 	_ZN11CBasePlugin11GetPluginIdEv @ 14 NONAME
-	_ZN11CBasePlugin11RefreshNowLERK12TFSMailMsgIdR22MFSMailRequestObserveri @ 15 NONAME
+	_ZN11CBasePlugin11RefreshNowLERK12TFSMailMsgIdR22MFSMailRequestObserverii @ 15 NONAME
 	_ZN11CBasePlugin11SetContentLERK7TDesC16RK12TFSMailMsgIdS5_S5_S5_ @ 16 NONAME
 	_ZN11CBasePlugin12AddObserverLER20MFSMailEventObserver @ 17 NONAME
 	_ZN11CBasePlugin12CancelSearchERK12TFSMailMsgId @ 18 NONAME
--- a/emailservices/emailstore/base_plugin/base_plugin.pro	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailservices/emailstore/base_plugin/base_plugin.pro	Wed Jun 23 18:00:21 2010 +0300
@@ -21,7 +21,8 @@
 DEPENDPATH += . inc src
 DEFINES += BUILD_BASEPLUGIN_DLL
 INCLUDEPATH += . \
-			../../../inc
+               ../../../inc \
+               $$APP_LAYER_SYSTEMINCLUDE
 			
 
 HEADERS += inc/BaseMrInfoObject.h \
@@ -57,7 +58,9 @@
 		-lmessagestoreclient \
 		-lfsfwcommonlib \
 		-ldebuglog \
-		-lcalinterimapi
+		-lcalinterimapi \
+        -lefsrv \
+        -lgdi
 		
 symbian*: { 
     
--- a/emailservices/emailstore/base_plugin/inc/BasePlugin.h	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailservices/emailstore/base_plugin/inc/BasePlugin.h	Wed Jun 23 18:00:21 2010 +0300
@@ -153,7 +153,8 @@
          void RefreshNowL(
             const TFSMailMsgId& aMailBoxId,
          	MFSMailRequestObserver& aOperationObserver,
-         	TInt aRequestId );
+         	TInt aRequestId,
+         	const TBool aSilentConnection=EFalse );
 
          virtual CFSMailFolder* GetFolderByUidL(
             const TFSMailMsgId& aMailBoxId,
--- a/emailservices/emailstore/base_plugin/src/basepluginmisc.cpp	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailservices/emailstore/base_plugin/src/basepluginmisc.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -266,7 +266,8 @@
 void CBasePlugin::RefreshNowL(
     const TFSMailMsgId& /*aMailBoxId*/,
  	MFSMailRequestObserver& /*aOperationObserver*/,
- 	TInt /*aRequestId*/ )
+ 	TInt /*aRequestId*/,
+ 	const TBool /*aSilentConnection=EFalse*/ )
     {
 
     }
Binary file emailservices/nmailagent/conf/2002C326.txt has changed
--- a/emailservices/nmailagent/inc/nmmailagent.h	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailservices/nmailagent/inc/nmmailagent.h	Wed Jun 23 18:00:21 2010 +0300
@@ -20,12 +20,14 @@
 
 #include <nmcommon.h>
 
+class CHWRMVibra;
 class NmMailbox;
 class NmDataPluginFactory;
 class NmDataPluginInterface;
 class HbIndicator;
 class XQSystemToneService;
 
+
 class NmMailboxInfo
 {
 public:
@@ -43,11 +45,12 @@
     QList<NmId> mUnreadMailIdList;
     int mOutboxMails;
     bool mActive;
-    QDateTime mLastSeenTime;
+    bool mInboxActive;
 
     NmMailboxInfo();
 };
 
+
 class NmMailAgent : public QObject
 {
     Q_OBJECT
@@ -80,7 +83,7 @@
     void delayedStart();
 
     void enableAlertTone();
-    
+
     void indicatorActivated(const QString &type, const QVariantMap &data);
 
 private:
@@ -94,21 +97,21 @@
     NmMailboxInfo *getMailboxByType(const QString &type);
 
     int getFreeIndicatorIndex();
-    
+
     int getTotalUnreadCount() const;
 
     bool updateUnreadIndicator();
-    
+
     bool updateUnreadIndicator(bool active);
-    
+
     bool updateIndicator(bool active,
         const NmMailboxInfo& mailboxInfo);
 
-    NmMailboxInfo* getMailboxInfo(const NmId &id);
+    NmMailboxInfo *getMailboxInfo(const NmId &id);
 
-    NmMailboxInfo* createMailboxInfo(const NmId &id);
+    NmMailboxInfo *createMailboxInfo(const NmId &id);
 
-    NmMailboxInfo* createMailboxInfo(const NmMailbox &mailbox,
+    NmMailboxInfo *createMailboxInfo(const NmMailbox &mailbox,
         NmDataPluginInterface *plugin);
 
     bool removeMailboxInfo(const NmId &id);
@@ -125,6 +128,12 @@
 
     void updateSendIndicator();
     
+    void storeMailboxActive(const NmId &mailboxId, bool active);
+    
+    bool isMailboxActive(const NmId &mailboxId);
+    
+    void deleteStoredMailboxActivity(const NmId &mailboxId);
+
     bool launchMailbox(quint64 mailboxId);
 
 private: // data
@@ -133,6 +142,7 @@
     XQSystemToneService *mSystemTone;
     NmDataPluginFactory *mPluginFactory;
     QList<NmMailboxInfo*> mMailboxes;
+    CHWRMVibra *mVibra; // Owned
     bool mAlertToneAllowed;
     int mLastOutboxCount;
     bool mUnreadIndicatorActive;
--- a/emailservices/nmailagent/inc/nmmailagentheaders.h	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailservices/nmailagent/inc/nmmailagentheaders.h	Wed Jun 23 18:00:21 2010 +0300
@@ -17,13 +17,19 @@
 #ifndef NMAILAGENTHEADERS_H
 #define NMAILAGENTHEADERS_H
 
+// Qt
 #include <QDir>
 #include <QPluginLoader>
 #include <QCoreApplication>
 #include <QTimer>
 
+// Hb
 #include <hbindicator.h>
 
+// Symbian
+#include <hwrmvibra.h>
+
+// Nmail
 #include <nmcommon.h>
 #include <nmdatapluginfactory.h>
 #include <nmdataplugininterface.h>
--- a/emailservices/nmailagent/nmailagent.pro	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailservices/nmailagent/nmailagent.pro	Wed Jun 23 18:00:21 2010 +0300
@@ -46,10 +46,19 @@
     INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
     BLD_INF_RULES.prj_exports += "rom/nmailagent.iby $$CORE_APP_LAYER_IBY_EXPORT_PATH(nmailagent.iby)"
 
+    BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include <platform_paths.hrh>" \
+                             "conf/2002C326.txt                  /epoc32/release/winscw/udeb/z/private/10202BE9/2002C326.txt" \
+                             "conf/2002C326.txt                  /epoc32/release/winscw/urel/z/private/10202BE9/2002C326.txt" \
+                             "conf/2002C326.txt                  /epoc32/data/z/private/10202BE9/2002C326.txt"
+
+
     TARGET.EPOCHEAPSIZE = 0x1000 0x100000 // MAX 1MB
 
     LIBS += -ldomaincli
     LIBS += -lxqservice
+    LIBS += -lxqsettingsmanager
+    #LIBS += -lxqsystemtoneservice
+    LIBS += -lhwrmvibraclient
 
     TARGET.UID2 = 0x100039CE
     TARGET.UID3 = 0x2002C326
--- a/emailservices/nmailagent/rom/nmailagent.iby	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailservices/nmailagent/rom/nmailagent.iby	Wed Jun 23 18:00:21 2010 +0300
@@ -19,6 +19,7 @@
 
 #include <bldvariant.hrh>
 
-file=ABI_DIR\BUILD_DIR\nmailagent.exe SHARED_LIB_DIR\nmailagent.exe
+file=ABI_DIR\BUILD_DIR\nmailagent.exe      SHARED_LIB_DIR\nmailagent.exe
+data=DATAZ_\private\10202be9\2002C326.txt  private\10202be9\2002C326.txt
 
 #endif // __NMAILAGENT_IBY__
--- a/emailservices/nmailagent/src/nmmailagent.cpp	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailservices/nmailagent/src/nmmailagent.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -15,18 +15,23 @@
 *
 */
 
-#include <xqservicerequest.h>
-#include <email_services_api.h>
-
 #include "emailtrace.h"
 #include "nmmailagentheaders.h"
 #include "nmmailagent.h"
 
+#include <xqaiwdeclplat.h>
+#include <xqapplicationmanager.h>
+#include <xqaiwrequest.h>
+
+#include <xqsettingsmanager.h>
+#include <xqcentralrepositoryutils.h>
 #include <xqsystemtoneservice.h>
 
 // CONSTS
 const int NmAgentIndicatorNotSet = -1;
 const int NmAgentAlertToneTimer = 60000; // 60s
+const int NmAgentDefaultVibraDuration = 1000; // 1 second
+static const quint32 NmRepositoryId = 0x2002C326; 
 static const QString NmMailboxIndicatorType = "com.nokia.nmail.indicatorplugin_%1/1.0";
 static const QString NmSendIndicatorName = "com.nokia.nmail.indicatorplugin.send/1.0";
 static const QString NmUnreadIndicatorName = "com.nokia.nmail.indicatorplugin.unread/1.0";
@@ -53,12 +58,14 @@
     mInboxChangedMessages = 0;
     mInboxDeletedMessages = 0;
     mActive = false;
+    mInboxActive = false;
 }
 
 NmMailAgent::NmMailAgent() :
  mIndicator(NULL),
  mSystemTone(NULL),
  mPluginFactory(NULL),
+ mVibra(NULL),
  mAlertToneAllowed(true),
  mLastOutboxCount(0),
  mUnreadIndicatorActive(false)
@@ -123,6 +130,9 @@
     	}
     }
 
+    // Construct the vibra interface instance.
+    TRAP_IGNORE(mVibra = CHWRMVibra::NewL());
+
     // load all current mailboxes
     initMailboxStatus();
 
@@ -133,7 +143,11 @@
 {
     NM_FUNCTION;
 
+    delete mVibra;
+    //delete mSystemTone;
+
     qDeleteAll(mMailboxes);
+
     //delete mSystemTone;
     NmDataPluginFactory::releaseInstance(mPluginFactory);
 }
@@ -166,19 +180,31 @@
                 NmMailboxInfo *mailboxInfo = createMailboxInfo(*mailbox,plugin);
                 if (mailboxInfo) {
                     bool activate = updateUnreadCount(mailbox->id(), *mailboxInfo);
+                    bool wasActive = isMailboxActive(mailbox->id());
+                    if (activate) {
+                        if(!wasActive) {
+                            // do not activate the mailbox if it was left as hidden last time
+                            activate = false;
+                        }
+                        else {
+                            // otherwise, activate the mailbox and show inbox state
+                            mailboxInfo->mInboxActive = true;
+                        }
+                    }
+
                     mailboxInfo->mOutboxMails = getOutboxCount(mailbox->id());
-                    if (mailboxInfo->mOutboxMails > 0) {
+                    if (mailboxInfo->mOutboxMails > 0 && wasActive) {
                         activate = true;
                     }
 
-                    // Create indicator for visible mailboxes
-                    updateMailboxState(mailbox->id(),
-                        activate, false);
+	                // Create indicator for visible mailboxes
+    	            updateMailboxState(mailbox->id(), activate, false);
                 }
             }
         }
         qDeleteAll(mailboxes);
     }
+    updateUnreadIndicator();
     updateSendIndicator();
 }
 
@@ -273,7 +299,7 @@
 {
     int unreads = 0;
     foreach (const NmMailboxInfo *mailbox, mMailboxes) {
-        if (mailbox->mActive) {
+        if (mailbox->mActive && mailbox->mInboxActive) {
             unreads += mailbox->mUnreadMailIdList.count();
         }
     }
@@ -306,6 +332,10 @@
     bool changed = false;
     if (mailboxInfo->mActive != active ||
         refreshAlways) {
+        
+		// store the new state to permanent storage
+        storeMailboxActive(mailboxId, active);
+        
         mailboxInfo->mActive = active;
         changed = true;
         if (active) {
@@ -376,17 +406,17 @@
     NM_FUNCTION;
     bool activated = false;
 
-    if (active) {
-        mIndicator->activate(NmUnreadIndicatorName);
-        if (!mUnreadIndicatorActive) {
+    if (active != mUnreadIndicatorActive) {
+        if (active) {
+            mIndicator->activate(NmUnreadIndicatorName);
             activated = true;
         }
+        else {
+            mIndicator->deactivate(NmUnreadIndicatorName);
+        }
+        mUnreadIndicatorActive = active;
     }
-    else {
-        mIndicator->deactivate(NmUnreadIndicatorName);
-    }
-    mUnreadIndicatorActive = active;
-    
+
     return activated;
 }
 
@@ -398,17 +428,17 @@
 {
     NM_FUNCTION;
 
-    XQServiceRequest request(
-        emailFullServiceNameMailbox,
-        emailOperationViewInbox,
-        true);
-
+    XQApplicationManager appManager;
+    XQAiwRequest *request = appManager.create(
+        XQI_EMAIL_INBOX_VIEW, XQOP_EMAIL_INBOX_VIEW, false);
+    
     QList<QVariant> list;
     list.append(QVariant(mailboxId));
-
-    request.setArguments(list);
-    bool ok = request.send();
-    NM_COMMENT(QString("Launch ok=%1 error=%2").arg(ok).arg(request.latestError()));
+    request->setArguments(list);
+    
+    bool ok = request->send();
+    NM_COMMENT(QString("Launch ok=%1 error=%2").arg(ok).arg(request->lastError()));
+    delete request;
     return ok;
 }
 
@@ -449,6 +479,9 @@
         case NmMailboxCreated:
             foreach (NmId mailboxId, mailboxIds) {
                 getMailboxInfo(mailboxId); // create a new mailbox if needed
+                
+                // make sure the mailbox activity data is reseted
+                deleteStoredMailboxActivity(mailboxId);
             }
             break;
         case NmMailboxChanged:
@@ -478,6 +511,9 @@
             foreach (NmId mailboxId, mailboxIds) {
                 // Will hide also the indicator
                 removeMailboxInfo(mailboxId);
+                
+                // make sure the mailbox activity data is deleted
+                deleteStoredMailboxActivity(mailboxId);
             }
             updateUnreadIndicator();
             break;
@@ -519,8 +555,9 @@
     // map the indicator type to mailbox
     NmMailboxInfo *info = getMailboxByType(type);
     if (info) {
-        info->mLastSeenTime = QDateTime::currentDateTime();
         info->mActive = false; // indicator is no longer active
+        info->mInboxActive = false; // also inbox does not activate the indicator
+        storeMailboxActive(info->mId, false);
         updateUnreadIndicator();
 
         launchMailbox(info->mId.id());
@@ -549,9 +586,8 @@
             NmMailboxInfo *mailboxInfo = getMailboxInfo(mailboxId);
 
             // Check the new messages to make the indicator appear earlier
-            if (mailboxInfo->mSyncState == Synchronizing &&
-                mailboxInfo->mUnreadMailIdList.count()==0) {
-
+            if (mailboxInfo->mSyncState == Synchronizing) {
+                
                 // Inbox folder ID may be still unknown
                 if (mailboxInfo->mInboxFolderId.id()==0) {
                     NmDataPluginInterface *plugin = mPluginFactory->interfaceInstance(mailboxId);
@@ -560,27 +596,34 @@
                             plugin->getStandardFolderId(mailboxId, NmFolderInbox);
                     }
                 }
-
+                
                 if (folderId == mailboxInfo->mInboxFolderId) {
-                    bool messageUnread = false;
                     foreach (NmId messageId, messageIds) {
-                        if (getMessageUnreadInfo(folderId, messageId, mailboxId, messageUnread)) {
-                            if (messageUnread) {
-                                mailboxInfo->mUnreadMailIdList.append(messageId);
-                                updateMailboxState(mailboxId, true, false);
+                        bool messageUnread = false;
 
-                                // make the "@" appear immediatelly
-                                updateUnreadIndicator(true);
-								
-                                // Play the tone as well
-                                playAlertTone();
+                        // Check the message if we can either play a tone or if the "@" is 
+                        // not visible at the moment
+                        if (mAlertToneAllowed || !mUnreadIndicatorActive) {
+                            if (getMessageUnreadInfo(folderId, messageId, mailboxId, messageUnread)) {
+                                if (messageUnread) {
+                                    mailboxInfo->mUnreadMailIdList.append(messageId);
+                                    mailboxInfo->mInboxActive = true;
+                                    updateMailboxState(mailboxId, true, false);
+
+                                    // make the "@" appear immediatelly
+                                    updateUnreadIndicator(true);
+
+                                    // Play the tone as well
+                                    playAlertTone();
+                                }
                             }
                         }
                     }
                 }
             }
+            
             if (folderId==mailboxInfo->mInboxFolderId) {
-                mailboxInfo->mInboxCreatedMessages++;
+                mailboxInfo->mInboxCreatedMessages += messageIds.count();
             }
 
             // When created a new mail in the outbox, we are in sending state
@@ -588,9 +631,11 @@
                 // The first mail created in the outbox
                 if (mailboxInfo->mOutboxMails <= 0) {
 					NM_COMMENT("NmMailAgent: first mail in outbox");
-					activate = true;
-                    updateNeeded = true;
                 }
+                // Always activate the indicator
+                activate = true;
+                updateNeeded = true;
+                
                 mailboxInfo->mOutboxMails += messageIds.count();
 				updateSendIndicator();
             }
@@ -636,8 +681,11 @@
                 // The last mail was now deleted
                 if (mailboxInfo->mOutboxMails == 0) {
 					NM_COMMENT("NmMailAgent: last mail deleted from outbox");
-                    // Keep it active if there is unread mails
-                    activate = mailboxInfo->mUnreadMailIdList.count() > 0;
+                    // Keep it active if there is unread mails and inbox is still active
+					if (mailboxInfo->mInboxActive &&
+					    mailboxInfo->mUnreadMailIdList.count() > 0) {
+					    activate = true;
+                    }
                     updateNeeded = true;
                 }
 				updateSendIndicator();
@@ -867,11 +915,17 @@
     if (mAlertToneAllowed) {
         //mSystemTone->playTone(XQSystemToneService::EmailAlertTone);
         
+        // Execute the vibra effect.
+        if (mVibra) {
+            TRAP_IGNORE(mVibra->StartVibraL(NmAgentDefaultVibraDuration));
+        }
+        
         // play alert only once per minute
         mAlertToneAllowed = false;
         QTimer::singleShot(NmAgentAlertToneTimer, this, SLOT(enableAlertTone()));
 		played = true;
     }
+
 	return played;
 }
 
@@ -909,5 +963,54 @@
 	mLastOutboxCount = outboxMails;
 }
 
+/*!
+    Store the mailbox active information to permanent storage
+    \param mailboxId id of the mailbox
+    \param active true if the mailbox is active
+*/
+void NmMailAgent::storeMailboxActive(const NmId &mailboxId, bool active)
+{
+    XQCentralRepositorySettingsKey key(NmRepositoryId, mailboxId.id());
+    XQSettingsManager mgr;
+    XQCentralRepositoryUtils utils(mgr);
+    
+    if (active) {
+        // when mailbox is active, key can be deleted
+        utils.deleteKey(key);
+    }
+    else {
+        utils.createKey(key,(int)active);
+    }
+}
+
+/*!
+    Get the mailbox activity state. 
+    \param mailboxId id of the mailbox
+    \return true if the mailbox is active or no information was stored earlier
+*/
+bool NmMailAgent::isMailboxActive(const NmId &mailboxId)
+{
+    XQCentralRepositorySettingsKey key(NmRepositoryId, mailboxId.id());
+    XQSettingsManager mgr;
+    QVariant value = mgr.readItemValue(key,XQSettingsManager::TypeInt);
+    if (!value.isValid()) {
+        // no valid value found, key missing?
+        NM_COMMENT("NmMailAgent::isMailboxActive - value not valid");
+        return true;
+    }
+    NM_COMMENT(QString("NmMailAgent::isMailboxActive - value=%1").arg(value.toInt()));
+    return value.toInt();
+}
+
+/*!
+    Delete all stored activity information for the mailbox id
+    \param mailboxId id of the mailbox
+*/
+void NmMailAgent::deleteStoredMailboxActivity(const NmId &mailboxId)
+{
+    // deactivation delete the key too
+    storeMailboxActive(mailboxId,false);
+}
+
 // End of file
 
--- a/emailservices/nmclientapi/src/nmapiengine.cpp	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailservices/nmclientapi/src/nmapiengine.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -110,10 +110,18 @@
     switch (mailboxEvent) {
         case NmMailboxCreated: {
             message.action = ENew;
+            // subscribe all events also for these new mailboxes
+            for(int i=0; i<mailboxIds.count(); i++) {
+                mFactory->interfaceInstance()->subscribeMailboxEvents(mailboxIds[i]);
+            }
         }
             break;
         case NmMailboxDeleted: {
             message.action = EDeleted;
+            // unsubscribe all events from deleted mailboxes
+            for(int i=0; i<mailboxIds.count(); i++) {
+                mFactory->interfaceInstance()->unsubscribeMailboxEvents(mailboxIds[i]);
+            }
         }
             break;
         case NmMailboxChanged: {
@@ -222,7 +230,13 @@
 
     while (mailboxFromPlugin.isEmpty() == false) {
         NmMailbox* tempNmMailbox = mailboxFromPlugin.takeLast();
+
+        // subscribe all events also for these new mailboxes
+        instance->subscribeMailboxEvents(tempNmMailbox->id());
+
+        // construct mailboxlist to platform api
         mailboxList << NmToApiConverter::NmMailbox2NmApiMailbox(*tempNmMailbox);
+
         delete tempNmMailbox;
     }
 }
@@ -333,7 +347,6 @@
             envelope.setTotalSize(message->size());
 
             found = true;
-            delete plainTextPart;
         }
         delete message;
     }
--- a/emailservices/nmclientapi/src/nmapieventnotifier.cpp	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailservices/nmclientapi/src/nmapieventnotifier.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -74,7 +74,7 @@
     if (mNmApiEventNotifierPrivate->mIsRunning) {
         result = true;
     }
-    else
+    else {
         if (!mNmApiEventNotifierPrivate->initializeEngine()) {
             mNmApiEventNotifierPrivate->mIsRunning = false;
             result = false;
@@ -85,11 +85,15 @@
 
             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;
 }
 
@@ -129,6 +133,7 @@
     
     qRegisterMetaType<EmailClientApi::NmApiMailboxEvent> ("EmailClientApi::NmApiMailboxEvent");
     qRegisterMetaType<EmailClientApi::NmApiMessageEvent> ("EmailClientApi::NmApiMessageEvent");
+    
     NmApiMessage events;
     while (!mNmApiEventNotifierPrivate->mBufferOfEvents.isEmpty()) {
         events = mNmApiEventNotifierPrivate->mBufferOfEvents.takeFirst();
--- a/emailuis/nmailui/conf/nmeditorview.docml	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailui/conf/nmeditorview.docml	Wed Jun 23 18:00:21 2010 +0300
@@ -19,7 +19,7 @@
                                     <sizehint height="7.46un" type="FIXED" width="9.5un"/>
                                 </widget>
                                 <layout orientation="Horizontal" spacing="var(hb-param-margin-gene-middle-horizontal)" type="linear">
-                                    <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+                                    <contentsmargins bottom="0un" left="var(hb-param-margin-gene-left)" right="var(hb-param-margin-gene-right)" top="0un"/>
                                     <linearitem itemname="editorToLabel"/>
                                     <linearitem itemname="editorToEdit"/>
                                     <linearitem itemname="editorToButton"/>
@@ -38,7 +38,7 @@
                                     <sizehint height="7.46un" type="FIXED" width="9.5un"/>
                                 </widget>
                                 <layout orientation="Horizontal" spacing="var(hb-param-margin-gene-middle-horizontal)" type="linear">
-                                    <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+                                    <contentsmargins bottom="0un" left="var(hb-param-margin-gene-left)" right="var(hb-param-margin-gene-right)" top="0un"/>
                                     <linearitem itemname="editorCcLabel"/>
                                     <linearitem itemname="editorCcEdit"/>
                                     <linearitem itemname="editorCcButton"/>
@@ -57,7 +57,7 @@
                                     <sizehint height="7.46un" type="FIXED" width="9.5un"/>
                                 </widget>
                                 <layout orientation="Horizontal" spacing="var(hb-param-margin-gene-middle-horizontal)" type="linear">
-                                    <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+                                    <contentsmargins bottom="0un" left="var(hb-param-margin-gene-left)" right="var(hb-param-margin-gene-right)" top="0un"/>
                                     <linearitem itemname="editorBccLabel"/>
                                     <linearitem itemname="editorBccEdit"/>
                                     <linearitem itemname="editorBccButton"/>
@@ -70,7 +70,7 @@
                                     <string locid="txt_mail_editor_subject" name="plainText"/>
                                     <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
                                 </widget>
-                                <widget name="editorSubjectEdit" plugin="nmailuiwidgetsplugin" type="NmRecipientLineEdit"/>
+                                <widget name="editorSubjectEdit" plugin="nmailuiwidgetsplugin" type="NmHtmlLineEdit"/>
                                 <widget name="editPriorityIcon" type="HbLabel">
                                     <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
                                     <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
@@ -82,7 +82,7 @@
                                     <sizehint height="var(hb-param-graphic-size-secondary)" type="FIXED" width="var(hb-param-graphic-size-secondary)"/>
                                 </widget>
                                 <layout orientation="Horizontal" spacing="var(hb-param-margin-gene-middle-horizontal)" type="linear">
-                                    <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+                                    <contentsmargins bottom="0un" left="var(hb-param-margin-gene-left)" right="var(hb-param-margin-gene-right)" top="0un"/>
                                     <linearitem itemname="editorSubjectLabel"/>
                                     <linearitem itemname="editorSubjectEdit"/>
                                     <linearitem itemname="editPriorityIcon" spacing="0.5un"/>
@@ -90,22 +90,31 @@
                                 </layout>
                             </widget>
                             <widget name="attachmentListWidget" plugin="nmailuiwidgetsplugin" type="NmAttachmentListWidget">
-                                <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
                             </widget>
-                            <widget name="BodyTextEdit" plugin="nmailuiwidgetsplugin" type="NmEditorTextEdit">
+                            <widget name="BodyTextEditContainer" type="HbWidget">
+                                <widget name="BodyTextEdit" plugin="nmailuiwidgetsplugin" type="NmEditorTextEdit">
+                                    <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Expanding" verticalStretch="0"/>
+                                    <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+                                    <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+                                    <string name="plainText"/>
+                                </widget>
                                 <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Expanding" verticalStretch="0"/>
-                                <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
-                                <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
-                                <string name="plainText"/>
+                                <layout type="anchor">
+                                    <anchoritem dst="BodyTextEdit" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="" srcEdge="LEFT"/>
+                                    <anchoritem dst="BodyTextEdit" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+                                    <anchoritem dst="BodyTextEdit" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-right)" src="" srcEdge="RIGHT"/>
+                                    <anchoritem dst="BodyTextEdit" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
+                                </layout>
                             </widget>
                             <layout orientation="Vertical" spacing="var(hb-param-margin-gene-middle-vertical)" type="linear">
-                                <contentsmargins bottom="0un" left="var(hb-param-margin-gene-left)" right="var(hb-param-margin-gene-right)" top="var(hb-param-margin-gene-top)"/>
+                                <!-- Widget may have different left and right margins so they are not defined here -->
+                                <contentsmargins bottom="0un" left="0un" right="0un" top="var(hb-param-margin-gene-top)"/>
                                 <linearitem itemname="editorToField"/>
                                 <linearitem itemname="editorCcField"/>
                                 <linearitem itemname="editorBccField"/>
                                 <linearitem itemname="editorSubjectField"/>
                                 <linearitem itemname="attachmentListWidget"/>
-                                <linearitem itemname="BodyTextEdit"/>
+                                <linearitem itemname="BodyTextEditContainer"/>
                             </layout>
                         </widget>
                         <real name="z" value="0"/>
--- a/emailuis/nmailui/conf/nmmailboxlistview.docml	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailui/conf/nmmailboxlistview.docml	Wed Jun 23 18:00:21 2010 +0300
@@ -1,19 +1,22 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="0.4">
+<hbdocument version="1.1">
     <widget name="NmMailboxListView" type="HbView">
         <widget name="content" role="HbView:widget" type="HbWidget">
             <widget name="MailboxListWidget" type="HbListView">
-                <sizehint height="85.67164422993572un" type="PREFERRED" width="53.7313448132001un"/>
-                <zvalue value="1.0E-4"/>
+                <real name="z" value="0.0001"/>
+                <sizehint height="85.67164un" type="PREFERRED" width="53.73134un"/>
             </widget>
-            <layout type="anchor" widget="content">
-                <anchoritem dst="MailboxListWidget" dstEdge="TOP" spacing="0.0un" src="" srcEdge="TOP"/>
-                <anchoritem dst="MailboxListWidget" dstEdge="LEFT" spacing="0.0un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="MailboxListWidget" dstEdge="BOTTOM" spacing="0.0un" src="" srcEdge="BOTTOM"/>
-                <anchoritem dst="MailboxListWidget" dstEdge="RIGHT" spacing="0.0un" src="" srcEdge="RIGHT"/>
+            <layout type="anchor">
+                <anchoritem dst="MailboxListWidget" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
+                <anchoritem dst="MailboxListWidget" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                <anchoritem dst="MailboxListWidget" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+                <anchoritem dst="MailboxListWidget" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
             </layout>
         </widget>
         <string name="title" value="View"/>
     </widget>
-    <metadata display="QHD portrait" unit="un"/>
+    <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+        <dummydata objectName="MailboxListWidget" section="#common" value="app_list_template5"/>
+    </metadata>
 </hbdocument>
--- a/emailuis/nmailui/conf/nmmailviewer.docml	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailui/conf/nmmailviewer.docml	Wed Jun 23 18:00:21 2010 +0300
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="1.0">
+<hbdocument version="1.1">
     <widget name="nmailViewerView" type="HbView">
         <widget name="content" role="HbView:widget" type="HbWidget">
-            <widget name="viewerScrollArea" type="NmBaseViewScrollArea">
+            <widget name="viewerScrollArea" type="HbScrollArea">
                 <widget name="viewerScrollAreaContents" role="HbScrollArea:contents" type="HbWidget">
                     <widget name="viewerHeader" type="NmViewerHeader">
                         <bool name="visible" value="TRUE"/>
@@ -30,9 +30,9 @@
                 <anchoritem dst="viewerScrollArea" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
             </layout>
         </widget>
-        <string name="title" value=""/>
+        <string name="title"/>
     </widget>
-    <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
+    <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
         <uistate name="Common ui state" sections="#common"/>
     </metadata>
 </hbdocument>
--- a/emailuis/nmailui/conf/nmmessagelistview.docml	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailui/conf/nmmessagelistview.docml	Wed Jun 23 18:00:21 2010 +0300
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="1.0">
+<hbdocument version="1.1">
     <widget name="NmMessageListView" type="HbView">
         <widget name="content" role="HbView:widget" type="HbWidget">
             <widget name="MessageTreeList" type="HbTreeView">
@@ -23,9 +23,9 @@
             <widget name="syncIcon" type="HbLabel">
                 <enums name="alignment" value="AlignAbsolute|AlignLeft|AlignVCenter|AlignJustify|AlignHCenter|AlignLeading"/>
                 <real name="z" value="7"/>
+                <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
                 <sizehint height="expr(var(hb-param-graphic-size-primary-small) )" type="PREFERRED" width="expr(var(hb-param-graphic-size-primary-small) )"/>
                 <sizehint height="expr(var(hb-param-graphic-size-primary-small) )" type="MINIMUM" width="expr(var(hb-param-graphic-size-primary-small) )"/>
-                <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
             </widget>
             <real name="z" value="0"/>
             <layout type="anchor">
@@ -46,7 +46,7 @@
         </widget>
         <string name="title" value="View"/>
     </widget>
-    <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
+    <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
         <uistate name="Common ui state" sections="#common"/>
         <dummydata objectName="MessageTreeList" section="#common" value="0"/>
     </metadata>
--- a/emailuis/nmailui/inc/nmattachmentlist.h	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailui/inc/nmattachmentlist.h	Wed Jun 23 18:00:21 2010 +0300
@@ -47,11 +47,7 @@
 
 private:
     QString fullNameToDisplayName(const QString &fullName);
-    void updateLayout();
     
-private slots:
-    void delayedLayoutChangeInfo();
-
 signals:
     void attachmentListLayoutChanged();
     
--- a/emailuis/nmailui/inc/nmeditorcontent.h	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailui/inc/nmeditorcontent.h	Wed Jun 23 18:00:21 2010 +0300
@@ -45,7 +45,8 @@
                     QNetworkAccessManager &manager);
     virtual ~NmEditorContent();
 
-    void setMessageData(const NmMessage &originalMessage);
+    void setMessageData(const NmMessage &originalMessage,
+                        bool createReplyHeader = true);
     NmEditorTextEdit* editor() const;
     NmEditorHeader* header() const;
 
--- a/emailuis/nmailui/inc/nmeditorheader.h	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailui/inc/nmeditorheader.h	Wed Jun 23 18:00:21 2010 +0300
@@ -56,7 +56,6 @@
     void addAttachment(const QString &fileName, const QString &fileSize, const NmId &nmid);
     void removeAttachment(const QString &fileName);
     void removeAttachment(const NmId &nmid);
-    void launchAttachment(const NmId &nmid);
     void setAttachmentParameters(
         const QString &fileName,
         const NmId &msgPartId,
@@ -72,6 +71,7 @@
     void headerHeightChanged(int);
     void recipientFieldsHaveContent(bool recipientFieldsHaveContent);
     void attachmentLongPressed(NmId attachmentPartId, QPointF point);
+    void attachmentShortPressed(NmId attachmentId);
 
 public slots:
 	void sendDelayedHeaderHeightChanged();
--- a/emailuis/nmailui/inc/nmeditorview.h	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailui/inc/nmeditorview.h	Wed Jun 23 18:00:21 2010 +0300
@@ -101,7 +101,7 @@
     void attachmentRemoved(int result);
     void removeAttachmentTriggered();
     void handleSendOperationCompleted();
-    void openAttachmentTriggered();  
+    void openAttachmentTriggered( NmId attachmentId );  
     void onAttachmentReqCompleted(const QVariant &value);
     void onAttachmentsFetchError(int errorCode, const QString& errorMessage);
     void switchCcBccFieldVisibility();
@@ -112,8 +112,8 @@
     void loadViewLayout();
     void setMailboxName();
     void fetchProgressDialogShow();
-    void fetchMessageIfNeeded();
-    void startMessageCreation(NmUiEditorStartMode startMode);
+    void fetchMessageIfNeeded(NmUiStartParam &startParam);
+    void startMessageCreation(NmUiStartParam &startParam);
     void startSending();
     void finalizeSending();
     void createToolBar();
--- a/emailuis/nmailui/inc/nmmessagelistview.h	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailui/inc/nmmessagelistview.h	Wed Jun 23 18:00:21 2010 +0300
@@ -101,6 +101,7 @@
     bool mSettingsLaunched;
     NmId mSelectedFolderId;
     NmId mSelectedMailboxId;
+    int mPreviousModelCount;
 };
 
 #endif /* NMMESSAGELISTVIEW_H_ */
--- a/emailuis/nmailui/inc/nmuiheaders.h	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailui/inc/nmuiheaders.h	Wed Jun 23 18:00:21 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:
+ *
+ */
 
 #ifndef NMUIHEADERS_H_
 #define NMUIHEADERS_H_
@@ -42,6 +42,8 @@
 #include <QNetworkDiskCache>
 #include <QWebSettings>
 #include <QPointer>
+#include <QPinchGesture>
+#include <QInputContext>
 
 // Orbit
 #include <hbapplication.h>
@@ -84,6 +86,7 @@
 #include <hbinstance.h>
 #include <hbeffect.h>
 #include <hbmodeliterator.h>
+#include <hbscrollarea.h>
 
 #ifdef Q_OS_SYMBIAN
 #include <cntservicescontact.h>
--- a/emailuis/nmailui/inc/nmutilities.h	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailui/inc/nmutilities.h	Wed Jun 23 18:00:21 2010 +0300
@@ -54,8 +54,6 @@
     
     static QString cleanupDisplayName( const QString &displayName );     
 
-    static int openFile(QFile &file);
-    
     static int openFile(XQSharableFile &file);
     
     static QString truncate( const QString &string, int length );
@@ -68,7 +66,9 @@
                                              QObject* receiver = 0,
                                              const char* member = 0);
     
-    static void displayWarningNote(QString noteText);
+    static HbMessageBox* displayWarningNote(QString noteText,
+                                            QObject* receiver = 0,
+                                            const char* member = 0);
 
     static QString createReplyHeader(const NmMessageEnvelope &env);
 };
--- a/emailuis/nmailui/inc/nmviewerview.h	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailui/inc/nmviewerview.h	Wed Jun 23 18:00:21 2010 +0300
@@ -1,19 +1,19 @@
 /*
-* 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:
+ *
+ */
 
 #ifndef NMVIEWERVIEW_H_
 #define NMVIEWERVIEW_H_
@@ -29,13 +29,13 @@
 
 class HbWidget;
 class HbMainWindow;
+class HbScrollArea;
 
 class NmApplication;
 class NmUiEngine;
 class NmUiStartParam;
 class NmMailViewerWK;
 class NmMessage;
-class NmBaseViewScrollArea;
 class NmViewerViewNetManager;
 class NmViewerHeader;
 class NmMailViewerWK;
@@ -44,6 +44,7 @@
 class HbProgressDialog;
 class NmAttachmentListWidget;
 class NmAttachmentManager;
+class HbMessageBox;
 
 class NmViewerView : public NmBaseView, public NmActionObserver, public NmAttachmentFetchObserver
 {
@@ -73,8 +74,6 @@
     void adjustViewDimensions();
     void linkClicked(const QUrl& link);
     void contentScrollPositionChanged(const QPointF &newPosition);
-    void handleMouseReleaseEvent(QGraphicsSceneMouseEvent *event);
-    void handleMousePressEvent(QGraphicsSceneMouseEvent *event);
     void fetchMessage();
     void openAttachment(int index);
 	void createOptionsMenu();
@@ -108,23 +107,21 @@
     void createAndShowWaitDialog();
     void setWebViewWidth(int width);
     void setWebViewHeighth(int height);
-    void handleMouseEvent(QGraphicsSceneMouseEvent *event, bool pressed);
 
 private:
     NmApplication &mApplication;
     NmUiEngine &mUiEngine;
-    HbMainWindow *mMainWindow;               // Not owned
+    HbMainWindow *mMainWindow;                       // Not owned
     NmAttachmentManager  &mAttaManager;
-    bool mToolbarEnabled;					 // is toolbar or options menu in use
-    NmMessage* mMessage;                     // Owned
-    NmBaseViewScrollArea *mScrollArea;       // Not owned
-    HbWidget *mViewerContent;                // Not owned
-    NmMailViewerWK *mWebView;                // Not owned
-    NmViewerHeader *mHeaderWidget;           // Not owned
-    NmAttachmentListWidget *mAttaListWidget;  // Not owned
+    bool mToolbarEnabled;					         // is toolbar or options menu in use
+    NmMessage* mMessage;                             // Owned
+    HbScrollArea *mScrollArea;                       // Not owned
+    HbWidget *mViewerContent;                        // Not owned
+    NmMailViewerWK *mWebView;                        // Not owned
+    NmViewerHeader *mHeaderWidget;                   // Not owned
+    NmAttachmentListWidget *mAttaListWidget;         // Not owned
     QPointF mHeaderStartScenePos;
-    QGraphicsLinearLayout *mViewerContentLayout; // Not owned
-    QPointer<NmOperation> mMessageFetchingOperation;   // Not owned 
+    QPointer<NmOperation> mMessageFetchingOperation; // Not owned 
     QPointF mLatestScrollPos;
     bool mDisplayingPlainText;
     QObjectList mWidgetList;
@@ -132,14 +129,15 @@
     HbWidget *mScrollAreaContents;
     HbWidget *mViewerHeaderContainer;
     QSize mScreenSize;
-    HbProgressDialog *mWaitDialog;            // owned
+    HbProgressDialog *mWaitDialog;                   // Owned
     bool webFrameloadingCompleted;
     QSize mLatestLoadingSize;
     QList<NmId> mAttaIdList;
     int mAttaIndexUnderFetch;
-    NmAttachmentListWidget *mAttaWidget;      // Not owned
+    NmAttachmentListWidget *mAttaWidget;             // Not owned
     bool mViewReady;
     bool mWaitNoteCancelled;
+    HbMessageBox *mErrorNote;                       // Owned
 };
 
 #endif /* NMVIEWERVIEW_H_ */
--- a/emailuis/nmailui/inc/nmviewerwebview.h	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailui/inc/nmviewerwebview.h	Wed Jun 23 18:00:21 2010 +0300
@@ -1,19 +1,19 @@
 /*
-* 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:
+ *
+ */
 
 #ifndef NMVIEWERWEBVIEW_H_
 #define NMVIEWERWEBVIEW_H_
@@ -24,8 +24,7 @@
 
 class NmViewerView;
 class NmMessage;
-
-class QMouseEvent;
+class QGestureEvent;
 
 class NmMailViewerWkContentItem
 {
@@ -48,12 +47,22 @@
     virtual QVariant loadResource (int type, const QUrl &name, NmId &partId, bool &isFetched);
     void setParentView(NmViewerView *parentView);
     void addContent(QString key, QVariant val, NmId partId, bool isFetched);
-    void sendMousePressEvent(QGraphicsSceneMouseEvent *event);
-    void sendMouseReleaseEvent(QGraphicsSceneMouseEvent *event);
 
 private:
     QMap<QString,NmMailViewerWkContentItem> mContent;
-    NmViewerView *mParentView;      // Not owned
+    NmViewerView *mParentView;                        // Not owned
+};
+
+class NmEventFilterWK : public QObject
+{
+    Q_OBJECT
+public:
+    NmEventFilterWK(QObject* parent = 0);
+protected:
+    bool eventFilter(QObject* object, QEvent* event);
+    bool gestureEvent(QGestureEvent* event);
+private:
+    Q_DISABLE_COPY(NmEventFilterWK)
 };
 
 #endif /* NMVIEWERWEBVIEW_H_*/
--- a/emailuis/nmailui/src/nmapplication.cpp	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailui/src/nmapplication.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -98,7 +98,7 @@
         delete mQueryDialog;
         mQueryDialog=NULL;
     }
-    
+
 #ifndef NM_WINS_ENV
 	delete mSendServiceInterface;
 	delete mSendServiceInterface2;
@@ -123,6 +123,10 @@
     }
     // Effects needs to be deleted before MainWindow.
     delete mEffects;
+    if (mMainWindow) {
+        // workaround: assert failure may happen otherwise
+        mMainWindow->close();
+    }
     delete mMainWindow;
     delete mAttaManager;
     delete mSettingsViewLauncher;
@@ -357,8 +361,10 @@
         // was already in foreground..
         if (mServiceViewId == topViewId) {
             mServiceViewId = NmUiViewNone;
+            NM_COMMENT("Returned from service view");
 
-            // if started as embedded, do not hide the app
+            // if started as embedded or while the app was in foreground,
+            // do not hide the app
             if (!XQServiceUtil::isEmbedded() &&
                 !mForegroundService) {
                 XQServiceUtil::toBackground(true);
@@ -410,6 +416,11 @@
 			// 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
 			while (mViewStack->count()>1) {
 			    NmUiViewId topId = mViewStack->top()->nmailViewId();
@@ -423,6 +434,7 @@
 			        break;
 			    }
 			}
+			mForegroundService = previousForegroundService;
         }
 
         // Check whether requested view is already active
@@ -491,12 +503,12 @@
                     resetViewStack();
                     break;
             }
+        }
 
-            if (startParam && startParam->service()) {
-				// Store the view id that was launched as service
-        		mServiceViewId = mActiveViewId;
-			}
-        }
+        if (startParam && startParam->service()) {
+            // Store the view id that was launched as service
+            mServiceViewId = mActiveViewId;
+		}
     }
 }
 
@@ -617,7 +629,7 @@
                 mQueryDialog=NULL;
             }
             mQueryDialog = NmUtilities::displayQuestionNote(hbTrId("txt_mail_dialog_address_or_password_incorrect"),
-                                                    this, SLOT(launchSettings(HbAction*)));                        
+                                                    this, SLOT(launchSettings(HbAction*)));
         }
         if(event.mOperationType == Synch && event.mCompletionCode == NmServerConnectionError) {
             mLastOperationMailbox=event.mMailboxId;
@@ -626,7 +638,7 @@
                 mQueryDialog=NULL;
             }
             mQueryDialog = NmUtilities::displayQuestionNote(hbTrId("txt_mail_dialog_server_settings_incorrect"),
-                                                    this, SLOT(launchSettings(HbAction*)));                
+                                                    this, SLOT(launchSettings(HbAction*)));
         }
         // following applies to all operation/event types
         if(event.mCompletionCode == NmConnectionError) {
@@ -641,14 +653,14 @@
 void NmApplication::launchSettings(HbAction* action)
 {
     NM_FUNCTION;
-    
+
     // Check whether yes button was pressed
     if (mQueryDialog&& action == mQueryDialog->actions().at(0)) {
         // create settingslauncher if doesn't exist
         if(!mSettingsViewLauncher) {
             mSettingsViewLauncher = new NmSettingsViewLauncher();
             }
-    
+
         if(mSettingsViewLauncher) {
             // mailboxname required
             NmMailboxMetaData *mailboxMetaData = mUiEngine->mailboxById(mLastOperationMailbox); // no ownership
@@ -656,8 +668,8 @@
                 // launch
                 mSettingsViewLauncher->launchSettingsView(mLastOperationMailbox, mailboxMetaData->name());
             }
-        }     
-    }    
+        }
+    }
 }
 
 /*!
--- a/emailuis/nmailui/src/nmattachmentlist.cpp	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailui/src/nmattachmentlist.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -29,8 +29,6 @@
 : mListWidget(listWidget)
 {
     NM_FUNCTION;
-    
-    updateLayout();
 }
 
 /*!
@@ -62,7 +60,6 @@
         count() - 1,
         displayName, 
         NmUtilities::attachmentSizeString(fileSize.toDouble()));  
-    updateLayout();
     return count() - 1;
 }
 
@@ -111,7 +108,6 @@
         mFullFileName.removeAt(arrayIndex);
         mDisplayFileName.removeAt(arrayIndex);
         mAttachmentPartId.removeAt(arrayIndex);
-        updateLayout();
     }
 }
 
@@ -172,7 +168,6 @@
         mFullFileName.removeAt(i);
         mDisplayFileName.removeAt(i);
         mAttachmentPartId.removeAt(i);
-        updateLayout();
     }
 }
 
@@ -230,26 +225,3 @@
     
     return fullName.section('\\', -1);
 }
-
-/*!
-    Update the list layout height
-*/
-void NmAttachmentList::updateLayout()
-{
-    NM_FUNCTION;
-    
-    // Fix this when progress bar is used
-    mListWidget.setMaximumHeight(count() * 56); 
-    QTimer::singleShot(1, this, SLOT(delayedLayoutChangeInfo()));
-}
-
-/*!
-    Send delayed signal about attachment list layout change
-*/
-void NmAttachmentList::delayedLayoutChangeInfo()
-{
-    NM_FUNCTION;
-    
-    emit attachmentListLayoutChanged();
-}
-
--- a/emailuis/nmailui/src/nmattachmentmanager.cpp	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailui/src/nmattachmentmanager.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -155,6 +155,9 @@
                     this,
                     SLOT(completeMessageFetch(int)));
         }
+        else {
+            completeMessageFetch(NmGeneralError);
+        }
         
     }
     else {
@@ -257,18 +260,6 @@
                     mFetchMsg->envelope().folderId(),
                     mFetchMsg->envelope().messageId(),
                     partIds);
-                
-                if (mFetchOperation) {
-                    mAttaId = 0;
-                    mIsFetching = true;
-                    QObject::connect(mFetchOperation, SIGNAL(operationCompleted(int)),
-                            this, SLOT(completeAttachmentFetch(int)));
-                    
-                    QObject::connect(mFetchOperation, SIGNAL(operationProgressChanged(int)),
-                            this, SLOT(changeProgress(int)));
-                
-                    result = true;
-                }
             }
             else {
                 mFetchObserver->fetchCompleted(NmNoError);
--- a/emailuis/nmailui/src/nmeditorcontent.cpp	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailui/src/nmeditorcontent.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -75,30 +75,37 @@
     present, reply header is generated and set to editor. Reply
     envelope ownership is not transferred here.
  */
-void NmEditorContent::setMessageData(const NmMessage &originalMessage)
+void NmEditorContent::setMessageData(const NmMessage &originalMessage,
+                                     bool createReplyHeader)
 {
     NM_FUNCTION;
+    
+    QString bodyContent;
+    
+    // We create the "reply" header (also for forward message), but not to draft message.
+    if (mEditorWidget && createReplyHeader) {          
+        QTextCursor cursor = mEditorWidget->textCursor();
+        cursor.setPosition(0);
+        cursor.insertHtml(NmUtilities::createReplyHeader(originalMessage.envelope()));
+    }
+    // Take reply header as html format.
+    bodyContent.append(mEditorWidget->toHtml());
+    
     // Check which part is present. Html or plain text part. We use the original message parts.
     const NmMessagePart *htmlPart = originalMessage.htmlBodyPart();
-
     const NmMessagePart *plainPart = originalMessage.plainTextBodyPart();
-
-    if (htmlPart) {
-        emit setHtml(htmlPart->textContent());    
+ 
+    if (htmlPart && mEditorWidget) {
+        bodyContent.append(htmlPart->textContent());
+        emit setHtml(bodyContent);
         mMessageBodyType = HTMLText;
     }
     else if (plainPart) {
         // Plain text part was present, set it to HbTextEdit
-        emit setPlainText(plainPart->textContent());
+        bodyContent.append(plainPart->textContent());
+        emit setPlainText(bodyContent);
         mMessageBodyType = PlainText;
     }
-    
-    // We create the "reply" header (also for forward message)
-    if (mEditorWidget) {          
-        QTextCursor cursor = mEditorWidget->textCursor();
-        cursor.setPosition(0);
-        cursor.insertHtml(NmUtilities::createReplyHeader(originalMessage.envelope()));
-    }
 }  
 
 /*!
@@ -137,10 +144,10 @@
             mEditorWidget, SLOT(updateScrollPosition(QPointF)));
     // Signal for setting HbTextEdit widgets html content
     connect(this, SIGNAL(setHtml(QString)),
-            mEditorWidget, SLOT(setHtml(QString)));
+            mEditorWidget, SLOT(setHtml(QString)), Qt::QueuedConnection);
     // Signal for setting HbTextEdit widgets plain text content
     connect(this, SIGNAL(setPlainText(QString)),
-            mEditorWidget, SLOT(setPlainText(QString)));
+            mEditorWidget, SLOT(setPlainText(QString)), Qt::QueuedConnection);
     // Inform text edit widget that header height has been changed
     connect(mHeaderWidget, SIGNAL(headerHeightChanged(int)),
             mEditorWidget, SLOT(setHeaderHeight(int)));
--- a/emailuis/nmailui/src/nmeditorheader.cpp	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailui/src/nmeditorheader.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -33,7 +33,8 @@
 
 static const int MaxRows = 10000;
 
-static const int nmLayoutSystemWaitTimer = 10;
+// this timeout seems to be long enough for all cases. see sendDelayedHeaderHeightChanged
+static const int LayoutSystemWaitTimer = 500; // 0.5 sec
 
 /*!
     Constructor
@@ -152,8 +153,6 @@
             this, SLOT(attachmentActivated(int)));
     connect(&mAttachmentList->listWidget(), SIGNAL(longPressed(int, QPointF)),
             this, SLOT(attachmentLongPressed(int, QPointF)));
-    connect(mAttachmentList ,SIGNAL(attachmentListLayoutChanged()),
-            this, SLOT(sendHeaderHeightChanged()));
 }
 
 /*!
@@ -175,9 +174,7 @@
 			mLayout->removeItem(mCcWidget);
 			mLayout->removeItem(mBccWidget);
 		}
-
-		QTimer::singleShot(
-		    nmLayoutSystemWaitTimer * 2, this, SLOT(sendDelayedHeaderHeightChanged()));
+        sendDelayedHeaderHeightChanged();
 	}
 }
 
@@ -218,16 +215,22 @@
 }
 
 /*!
-    Send signal to inform that one of the recipient fields height has been changed.
+    This is called when the contents of some of the header widgets have been changed. When the
+    contents change the widget's actual size may also change. The header area height is needed to
+    calculate the size hints of the body and the scroll area widgets. We need to use a timer to let 
+    the Orbit FW adjust the heights eg. if the subject and recipient fields are expanded by the FW.
+    It would be best to find a solution which doesn't depend on the header area's actual height size
+    information.
  */
 void NmEditorHeader::sendDelayedHeaderHeightChanged()
 {
     NM_FUNCTION;
-	QTimer::singleShot(nmLayoutSystemWaitTimer * 5, this, SLOT(sendHeaderHeightChanged()));
+	QTimer::singleShot(LayoutSystemWaitTimer, this, SLOT(sendHeaderHeightChanged()));
 }
 
 /*!
-    Send signal to inform that one of the recipient fields height has been changed.
+    Send a signal that the header area height has been changed if necessary. This is needed for the
+    body and scroll area widgets. See NmEditorTextEdit::setHeaderHeight for more info.
  */
 void NmEditorHeader::sendHeaderHeightChanged()
 {
@@ -360,8 +363,7 @@
         }
         break;
     }
-    // Update subject field height because row amount might have been changed.
-    QTimer::singleShot(nmLayoutSystemWaitTimer * 3, this, SLOT(sendDelayedHeaderHeightChanged()));
+    sendDelayedHeaderHeightChanged();
 }
 
 /*!
@@ -378,7 +380,7 @@
         mLayout->insertItem(mLayout->count() - 1, &mAttachmentList->listWidget());
         mAttachmentList->listWidget().show();
     }
-    sendHeaderHeightChanged();
+    sendDelayedHeaderHeightChanged();
 }
 
 /*!
@@ -394,7 +396,7 @@
         mAttachmentList->listWidget().hide();
         mLayout->removeItem(&mAttachmentList->listWidget());
     }
-    sendHeaderHeightChanged();
+    sendDelayedHeaderHeightChanged();
 }
 
 /*!
@@ -406,7 +408,11 @@
     NM_FUNCTION;
     
     mAttachmentList->removeAttachment(nmid);
-    sendHeaderHeightChanged();
+    if (mAttachmentList->count() == 0) {
+        mAttachmentList->listWidget().hide();
+        mLayout->removeItem(&mAttachmentList->listWidget());
+    }
+    sendDelayedHeaderHeightChanged();
 }
 
 /*!
@@ -428,26 +434,14 @@
 }
 
 /*!
-   Attachment launched from attachment list by "open" menu item.
- */
-void NmEditorHeader::launchAttachment(const NmId &itemId)
-{
-    NM_FUNCTION;
-    
-    attachmentActivated(mAttachmentList->indexByNmId(itemId));
-}
-
-/*!
    Slot attachment activated from attachment list by short tap.
  */
 void NmEditorHeader::attachmentActivated(int arrayIndex)
 {
     NM_FUNCTION;
     
-    QFile launchFile(mAttachmentList->getFullFileNameByIndex(arrayIndex));
-    if (NmUtilities::openFile( launchFile ) == NmNotFoundError) {
-        NmUtilities::displayErrorNote(hbTrId("txt_mail_dialog_unable_to_open_attachment_file_ty")); 
-    }
+    //
+    emit attachmentShortPressed(mAttachmentList->nmIdByIndex(arrayIndex));    
 }
 
 /*!
--- a/emailuis/nmailui/src/nmeditorview.cpp	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailui/src/nmeditorview.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -67,6 +67,8 @@
     setObjectName("NmEditorView");
     // Set mailbox name to title pane
     setMailboxName();
+    // call the createToolBar on load view layout
+    createToolBar();
     // Load view layout
     loadViewLayout();
 }
@@ -102,6 +104,14 @@
     delete mAttachmentPicker;    
     mAttaManager.clearObserver();
     mAttaManager.cancelFetch();
+    
+    // make sure virtual keyboard is closed
+    QInputContext *ic = qApp->inputContext();
+    if (ic) {
+        QEvent *closeEvent = new QEvent(QEvent::CloseSoftwareInputPanel);
+        ic->filterEvent(closeEvent);
+        delete closeEvent;
+    }
 }
 
 /*!
@@ -135,9 +145,13 @@
         mHeaderWidget = mContentWidget->header();
 
         // Set default color for user - entered text if editor is in re/reAll/fw mode
-        NmUiEditorStartMode mode = mStartParam->editorStartMode();
-        if (mode == NmUiEditorReply || mode == NmUiEditorReplyAll || mode == NmUiEditorForward) {
-            mEditWidget->setCustomTextColor(true, Qt::blue);
+        if (mStartParam) {
+            NmUiEditorStartMode mode = mStartParam->editorStartMode();
+            if (mode == NmUiEditorReply
+                || mode == NmUiEditorReplyAll 
+                || mode == NmUiEditorForward) {
+                mEditWidget->setCustomTextColor(true, Qt::blue);
+            }
         }
 
         // the rest of the view initialization is done in viewReady()
@@ -164,7 +178,7 @@
         // editor with new start parameters.
         // ..
         // Reload editor with new message data
-        fetchMessageIfNeeded();
+        fetchMessageIfNeeded(*mStartParam);
     }
     else {
         NM_ERROR(1,"nmailui: Invalid editor start parameter");
@@ -280,6 +294,9 @@
     // The first action in dialogs action list is for the "Yes"-button.
     if (action == dlg->actions().at(0)) {
         
+        // Update draft message with content.
+        updateMessageWithEditorContents();
+
         // Save message to drafts
         QList<NmOperation *> preliminaryOperations;
         if (mAddAttachmentOperation && mAddAttachmentOperation->isRunning()) {
@@ -318,7 +335,7 @@
         mRemoveAttachmentOperation->cancelOperation();
     }
 
-    if (mMessage) { // this is NULL if sending is started
+    if (mMessage) { // this is NULL if sending or saving is started
         // Delete message from drafts
         mUiEngine.removeDraftMessage(mMessage);
         mMessage = NULL;
@@ -342,9 +359,6 @@
     connect(mContentWidget->header(), SIGNAL(recipientFieldsHaveContent(bool)),
             this, SLOT(setButtonsDimming(bool)) );
 
-    // call the createToolBar on load view layout
-    createToolBar();
-
     // Set dimensions
     adjustViewDimensions();
 	
@@ -352,11 +366,17 @@
     connect(mApplication.mainWindow(), SIGNAL(orientationChanged(Qt::Orientation)),
             this, SLOT(orientationChanged(Qt::Orientation)));
     // Signal for handling the attachment list selection
+    connect(mHeaderWidget, SIGNAL(attachmentShortPressed(NmId)),
+            this, SLOT(openAttachmentTriggered(NmId)));
     connect(mHeaderWidget, SIGNAL(attachmentLongPressed(NmId, QPointF)),
             this, SLOT(attachmentLongPressed(NmId, QPointF)));
     
-    // Set message data
-    fetchMessageIfNeeded();
+    if (mStartParam) {
+        fetchMessageIfNeeded(*mStartParam);
+    }
+    else { // execution cannot proceed without start param 
+        QMetaObject::invokeMethod(&mApplication, "popView", Qt::QueuedConnection);
+    }
 }
 
 /*!
@@ -364,24 +384,24 @@
     to check that we have all message parts fetched. Also show dialog for
     fetching progress.
 */
-void NmEditorView::fetchMessageIfNeeded()
+void NmEditorView::fetchMessageIfNeeded(NmUiStartParam &startParam)
 {
     NM_FUNCTION;
     
-    if (mStartParam->editorStartMode() == NmUiEditorForward ||
-        mStartParam->editorStartMode() == NmUiEditorReply ||
-        mStartParam->editorStartMode() == NmUiEditorReplyAll) {
+    if (startParam.editorStartMode() == NmUiEditorForward
+        || startParam.editorStartMode()== NmUiEditorReply
+        || startParam.editorStartMode() == NmUiEditorReplyAll) {
         
         fetchProgressDialogShow();
         mAttaManager.clearObserver();
         mAttaManager.setObserver(this);
         mAttaManager.fetchAllMessageParts(
-            mStartParam->mailboxId(),
-            mStartParam->folderId(),
-            mStartParam->messageId());
+            startParam.mailboxId(),
+            startParam.folderId(),
+            startParam.messageId());
     }
     else {
-        startMessageCreation(mStartParam->editorStartMode());
+        startMessageCreation(startParam);
     }
 }
 
@@ -403,11 +423,23 @@
 {
     NM_FUNCTION;
     
-    if (result == NmNoError) {
-        startMessageCreation(mStartParam->editorStartMode());
+    if (result == NmNoError && mStartParam) {
+        startMessageCreation(*mStartParam);
     }
     else {
         mWaitDialog->close();
+		
+        // Show fetching failed note         
+        HbNotificationDialog *note = new HbNotificationDialog(); 
+        note->setIcon(HbIcon(QLatin1String("note_warning")));
+        QString noteText = hbTrId("txt_mail_dpopinfo_loading_failed");
+        note->setTitle(noteText);
+        note->setTitleTextWrapping(Hb::TextWordWrap);
+        note->setDismissPolicy(HbPopup::TapAnywhere);
+        note->setAttribute(Qt::WA_DeleteOnClose);
+        note->setSequentialShow(true);
+        note->show();
+        
         QMetaObject::invokeMethod(&mApplication, "popView", Qt::QueuedConnection);
     }
 }
@@ -442,13 +474,14 @@
     QMetaObject::invokeMethod(&mApplication, "popView", Qt::QueuedConnection);
 }
 
-void NmEditorView::startMessageCreation(NmUiEditorStartMode startMode)
+void NmEditorView::startMessageCreation(NmUiStartParam &startParam)
 {
     NM_FUNCTION;
     
-    NmId mailboxId = mStartParam->mailboxId();
-    NmId folderId = mStartParam->folderId();
-    NmId msgId = mStartParam->messageId();
+    NmUiEditorStartMode startMode = startParam.editorStartMode();
+    NmId mailboxId = startParam.mailboxId();
+    NmId folderId = startParam.folderId();
+    NmId msgId = startParam.messageId();
     
     if (mMessageCreationOperation && mMessageCreationOperation->isRunning()) {
         mMessageCreationOperation->cancelOperation();
@@ -463,6 +496,14 @@
             msgId, 
             startMode == NmUiEditorReplyAll);
     }
+    else if (startMode == NmUiEditorFromDrafts) {
+        // Draft opened, so reload message and fill editor with message data.
+        mMessage = mUiEngine.message(
+            mStartParam->mailboxId(), 
+            mStartParam->folderId(), 
+            mStartParam->messageId());
+        fillEditorWithMessageContents();
+    }
     else {
         mMessageCreationOperation = mUiEngine.createNewMessage(mailboxId);
     }
@@ -542,7 +583,8 @@
 
     // If sending is started as a service, progress dialog needs to be shown
     // so long that sending is finished otherwise we can close pop current view.
-    if (service && mUiEngine.isSendingMessage()) {
+    if (service && mStartParam && mStartParam->service() && 
+        mUiEngine.isSendingMessage()) {
         connect(&mUiEngine, SIGNAL(sendOperationCompleted()),
             this, SLOT(handleSendOperationCompleted()), Qt::UniqueConnection);
 
@@ -599,7 +641,7 @@
         mWaitDialog->close();
     }
     
-    if (result == NmNoError && mMessageCreationOperation) {
+    if (result == NmNoError && mStartParam && mMessageCreationOperation) {
         NmUiEditorStartMode startMode = mStartParam->editorStartMode();
         
         // get message "again" from engine to update the message contents 
@@ -674,21 +716,18 @@
 {
     NM_FUNCTION;
     
-    if (!mMessage || !mContentWidget) {
+    if (!mStartParam || !mMessage || !mContentWidget) {
         return;
     }
 
     NmMessageEnvelope messageEnvelope(mMessage->envelope());
-    NmUiEditorStartMode editorStartMode = NmUiEditorCreateNew;
     bool useStartParam(false);
 
-    if (mStartParam) {
-        editorStartMode = mStartParam->editorStartMode();
+    NmUiEditorStartMode editorStartMode = mStartParam->editorStartMode();
 
-        if (editorStartMode == NmUiEditorMailto) {
-            // Retrieve the message header data e.g. recipients from mStartParam.
-            useStartParam = true;        
-        }
+    if (editorStartMode == NmUiEditorMailto) {
+        // Retrieve the message header data e.g. recipients from mStartParam.
+        useStartParam = true;        
     }
     
     // Set recipients (to, cc and bcc).
@@ -737,7 +776,8 @@
     // Set the message body.
     if (editorStartMode==NmUiEditorReply||
         editorStartMode==NmUiEditorReplyAll||
-        editorStartMode==NmUiEditorForward){
+        editorStartMode==NmUiEditorForward||
+        editorStartMode==NmUiEditorFromDrafts){
 
         // Use the body from the original message.
         NmMessage *originalMessage = mUiEngine.message(mStartParam->mailboxId(), 
@@ -763,7 +803,12 @@
                                                *htmlPart);
             }
 
-            mContentWidget->setMessageData(*originalMessage);
+            if (editorStartMode==NmUiEditorFromDrafts) {
+                mContentWidget->setMessageData(*originalMessage, false);
+            }
+            else {
+                mContentWidget->setMessageData(*originalMessage);
+            }
         }
 
         delete originalMessage;
@@ -781,18 +826,13 @@
             attachments[i]->partId());
     }
 
-    if (mStartParam) {
-        // Attach passed files to the message.
-        QStringList *fileList = mStartParam->attachmentList();
+    // Attach passed files to the message.
+    QStringList *fileList = mStartParam->attachmentList();
 
-        if (fileList) {
-            addAttachments(*fileList);
-        }
+    if (fileList) {
+        addAttachments(*fileList);
     }
 
-    // TODO Switch the following arbitrary (magic number) timeout to a
-    // meaningful constant, please!
-    QTimer::singleShot(200, mHeaderWidget, SLOT(sendHeaderHeightChanged()));
 }
 
 
@@ -909,8 +949,6 @@
     	mCcBccFieldVisible = true;
     }
     mHeaderWidget->setFieldVisibility( mCcBccFieldVisible );
-
-    QTimer::singleShot(NmOrientationTimer, this, SLOT(sendHeaderHeightChanged()));
 }
 
 /*!
@@ -948,7 +986,7 @@
             break;
         }
         case NmActionResponseCommandOpenAttachment: {
-            openAttachmentTriggered();
+            openAttachmentTriggered(mSelectedAttachment);
             break;
         }
         default:
@@ -962,13 +1000,6 @@
 */
 void NmEditorView::sendProgressDialogCancelled()
 {
-    // Needs to be called before closing the application otherwise nmail panics
-    // in destruction.
-    QGraphicsScene *graphicsScene = scene();
-    if (graphicsScene) {
-        graphicsScene->clearFocus();
-    }
-
     // Must use delayed editor view destruction so that dialog
     // gets time to complete, closes also nmail.
     QMetaObject::invokeMethod(&mApplication, "popView", Qt::QueuedConnection);
@@ -1017,6 +1048,10 @@
 {
     NM_FUNCTION;
     
+    if (!mStartParam) {
+        return;
+    }
+    
     NmActionRequest request(this, NmActionVKB, NmActionContextViewEditor,
          NmActionContextDataNone, mStartParam->mailboxId(), mStartParam->folderId() );
     NmUiExtensionManager &extMngr = mApplication.extManager();
@@ -1137,6 +1172,8 @@
 void NmEditorView::onAttachmentsFetchError(int errorCode, const QString& errorMessage)
 {
     NM_FUNCTION;
+    Q_UNUSED(errorCode);
+    Q_UNUSED(errorMessage);
     NM_COMMENT(QString("Error code: %1").arg(errorCode));
     NM_COMMENT(QString("Error message: %1").arg(errorMessage));
 }
@@ -1155,14 +1192,6 @@
     if (mServiceSendingDialog) {
         mServiceSendingDialog->close();
     }
-
-    // Needs to be called before closing the application otherwise nmail panics
-    // in destruction.
-    QGraphicsScene *graphicsScene = scene();
-    if (graphicsScene) {
-        graphicsScene->clearFocus();
-    }
-
     // Must use delayed editor view destruction so that dialog
     // gets time to complete, closes also nmail.
     QMetaObject::invokeMethod(&mApplication, "popView", Qt::QueuedConnection);
@@ -1429,11 +1458,20 @@
 /*!
     This slot is called when 'open' is selected from attachment list context menu.
 */
-void NmEditorView::openAttachmentTriggered()
+void NmEditorView::openAttachmentTriggered(NmId attachmentId)
 {
     NM_FUNCTION;
-    
-    mHeaderWidget->launchAttachment(mSelectedAttachment);
+    NmId mailboxId = mMessage->envelope().mailboxId();
+    NmId folderId = mMessage->envelope().folderId();
+    NmId msgId = mMessage->envelope().messageId();
+
+    XQSharableFile file = mUiEngine.messagePartFile(mailboxId, folderId,
+    		msgId, attachmentId);
+    int error = NmUtilities::openFile(file);
+    file.close();
+    if ( error == NmNotFoundError ) {
+        NmUtilities::displayErrorNote(hbTrId("txt_mail_dialog_unable_to_open_attachment_file_ty")); 
+    }
 }
 
 /*!
--- a/emailuis/nmailui/src/nmmessagelistview.cpp	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailui/src/nmmessagelistview.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -55,12 +55,15 @@
 mSyncIcon(NULL),
 mViewReady(false),
 mCurrentFolderType(NmFolderInbox),
-mSettingsLaunched(false)
+mSettingsLaunched(false),
+mPreviousModelCount(0)
 {
     NM_FUNCTION;
 
     // Load view layout
     loadViewLayout();
+    //create toolbar
+    createToolBar();
     // Init tree view
     initTreeView();
     // set title
@@ -172,10 +175,6 @@
     NM_FUNCTION;
 
     if (!mViewReady){
-        // Set mailbox name to title pane
-        setMailboxName();
-        //create toolbar
-        createToolBar();
         // Refresh list
         QMetaObject::invokeMethod(this, "refreshList", Qt::QueuedConnection);
         mViewReady=true;
@@ -229,7 +228,6 @@
                 SIGNAL(longPressed(HbAbstractViewItem*, QPointF)), this,
                 SLOT(showItemContextMenu(HbAbstractViewItem*, QPointF)));
         mMessageListWidget->setFocus();
-        mItemContextMenu = new HbMenu();
     }
 }
 
@@ -314,7 +312,8 @@
         QObject::connect(mMessageListModel, SIGNAL(setNewParam(NmUiStartParam*)),
                 this, SLOT(reloadViewContents(NmUiStartParam*)));
 
-        if (mMessageListModel->rowCount()==0){
+        mPreviousModelCount=mMessageListModel->rowCount();
+        if (mPreviousModelCount==0){
             showNoMessagesText();
         }
         else{
@@ -402,8 +401,15 @@
 void NmMessageListView::showItemContextMenu(HbAbstractViewItem *listViewItem, const QPointF &coords)
 {
     NM_FUNCTION;
-
+   
     if (listViewItem) {
+        // Recreate item context menu each time it is called
+        if (mItemContextMenu){
+            mItemContextMenu->clearActions();
+            delete mItemContextMenu;    
+            mItemContextMenu=NULL;
+        }
+        mItemContextMenu = new HbMenu();
         // Store long press item for later use with response
         mLongPressedItem = mMessageListModel->data(
                 listViewItem->modelIndex(), Qt::DisplayRole).value<NmMessageListModelItem*>();
@@ -574,51 +580,22 @@
         if ( actionResponse.responseCommand() == NmActionResponseCommandNewMail ) {
             // Check that given start response has mailbox and folder id's
             if (actionResponse.mailboxId()!=0){
-                if (mUiEngine.isSendingMessage()) {
-                    // sending is ongoing so just show a note
-                    QString noteText = hbTrId("txt_mail_dialog_still_sending");
-
-                    // get message subject from the message being sent
-                    const NmMessage *message = mUiEngine.messageBeingSent();
-                    if (message) {
-                        noteText = noteText.arg(NmUtilities::truncate(message->envelope().subject(), 20));
-                    }
-                    HbMessageBox::warning(noteText);
-                }
-                else {
-                    NmUiStartParam *startParam = new NmUiStartParam(NmUiViewMessageEditor,
-                            actionResponse.mailboxId(), mStartParam->folderId());
-                    // startParam ownerhips transfers
-                    mApplication.enterNmUiView(startParam);
-                }
+                NmUiStartParam *startParam = new NmUiStartParam(NmUiViewMessageEditor,
+                        actionResponse.mailboxId(), mStartParam->folderId());
+                // startParam ownerhips transfers
+                mApplication.enterNmUiView(startParam);
             }
         }
         if (actionResponse.responseCommand() == NmActionResponseCommandSearch) {
             // Check that the given start response has mailbox and folder IDs.
             if (actionResponse.mailboxId() != 0) {
-                if (mUiEngine.isSendingMessage()) {
-                    // Sending is ongoing so just show a note.
-                    QString noteText = hbTrId("txt_mail_dialog_still_sending");
-
-                    // Get the message subject from the message being sent.
-                    const NmMessage *message = mUiEngine.messageBeingSent();
-
-                    if (message) {
-                        noteText = noteText.arg(
-                            NmUtilities::truncate(message->envelope().subject(), 20));
-                    }
+                NmUiStartParam *startParam =
+                    new NmUiStartParam(NmUiViewMessageSearchList,
+                                       actionResponse.mailboxId(),
+                                       mStartParam->folderId());
 
-                    HbMessageBox::warning(noteText);
-                }
-                else {
-                    NmUiStartParam *startParam =
-                        new NmUiStartParam(NmUiViewMessageSearchList,
-                                           actionResponse.mailboxId(),
-                                           mStartParam->folderId());
-
-                    // startParam ownership transfers.
-                    mApplication.enterNmUiView(startParam);
-                }
+                // startParam ownership transfers.
+                mApplication.enterNmUiView(startParam);
             }
         }
     }
@@ -722,11 +699,10 @@
     Q_UNUSED(parent);
     Q_UNUSED(end);
 
-    // If "no messages" label is shown, hide it and display the message list
-    // widget.
-    if (mNoMessagesLabel && mNoMessagesLabel->isVisible()) {
-        mNoMessagesLabel->hide();
-        mMessageListWidget->show();
+    // Hide no messages if previous model count has been zero
+    // and new items have been added to the list
+    if (mPreviousModelCount==0) {
+        hideNoMessagesText();
     }
 
     // Make sure the top of the list is kept visible by scrolling back to the
@@ -749,6 +725,10 @@
             }
         }
     }
+    // Store model count
+    if (mMessageListModel){
+        mPreviousModelCount=mMessageListModel->rowCount();    
+    }
 }
 
 
@@ -758,8 +738,11 @@
 void NmMessageListView::itemsRemoved()
 {
     NM_FUNCTION;
-
-    if (mMessageListModel && mMessageListModel->rowCount() == 0){
+    // Store model count
+    if (mMessageListModel){
+        mPreviousModelCount=mMessageListModel->rowCount();    
+    }
+    if (mPreviousModelCount == 0){
         showNoMessagesText();
     }
 }
--- a/emailuis/nmailui/src/nmmessagelistviewitem.cpp	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailui/src/nmmessagelistviewitem.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -162,11 +162,12 @@
     mSender->setText(senderFieldText(envelope));
     // time
     HbExtendedLocale locale = HbExtendedLocale::system();
-    QDate sentLocalDate = envelope.sentTime().toLocalTime().date();
+    QDateTime localTime = envelope.sentTime().addSecs(locale.universalTimeOffset());
+    QDate sentLocalDate = localTime.date();
     QDate currentdate = QDate::currentDate();
     if (dividersActive || sentLocalDate == currentdate) {
         QString shortTimeSpec = r_qtn_time_usual;
-        QTime time = envelope.sentTime().toLocalTime().time();
+        QTime time = localTime.time();
         mTime->setText(locale.format(time, shortTimeSpec));
     } else {
         QString shortDateSpec = r_qtn_date_without_year;
--- a/emailuis/nmailui/src/nmrecipientfield.cpp	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailui/src/nmrecipientfield.cpp	Wed Jun 23 18:00:21 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"
@@ -160,8 +160,8 @@
     }
 
     QVariantList args; 
-    args << "Non-filtered multi-fetch";
-    args << KCntActionAll; 
+    args << hbTrId("txt_mail_select_contacts");
+    args << KCntActionEmail; 
     args << KCntFilterDisplayAll; 
     launchContactsPickerRequest->setArguments(args); 
     
--- a/emailuis/nmailui/src/nmutilities.cpp	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailui/src/nmutilities.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -18,7 +18,6 @@
 #include "nmuiheaders.h"
 
 static const int NmMegabyte = 1048576;
-static const int NmShortInterval = 1000; // 1 sec
 
 // taken from http://www.regular-expressions.info/email.html
 static const QRegExp EmailAddressPattern("[A-Za-z\\d!#$%&'*+/=?^_`{|}~-]+"
@@ -48,7 +47,7 @@
     NmAddressValidationType type )
 {
     NM_FUNCTION;
-    
+
     // validate TO addresses
     QList<NmAddress> toRecipients = message.envelope().toRecipients();
     int recipientCount = toRecipients.count();
@@ -98,7 +97,7 @@
 bool NmUtilities::isValidEmailAddress( const QString &emailAddress )
 {
     NM_FUNCTION;
-    
+
     return EmailAddressPattern.exactMatch(emailAddress);
 }
 
@@ -108,7 +107,7 @@
 QString NmUtilities::addressToDisplayName( const NmAddress &address )
 {
     NM_FUNCTION;
-    
+
     QString emailAddress = address.address();
     QString displayName = address.displayName();
 
@@ -128,7 +127,7 @@
 bool NmUtilities::parseEmailAddress( const QString &emailAddress, NmAddress &address )
 {
     NM_FUNCTION;
-    
+
     bool foundAddress = false;
 
     QRegExp rx(EmailAddressPattern);
@@ -156,7 +155,7 @@
 QString NmUtilities::cleanupDisplayName( const QString &displayName )
 {
     NM_FUNCTION;
-    
+
     // find the first and last position that is NOT one of the characters below
     QRegExp rx("[^\\s\"<>]");
     int firstPos = std::max(rx.indexIn(displayName), 0);
@@ -170,53 +169,23 @@
 }
 
 /*!
-  Opens file specified by QFile handle. Usually used by editor
-  for opening added attachments
-*/
-int NmUtilities::openFile(QFile &file)
-{
-    NM_FUNCTION;
-    
-    int ret(NmNotFoundError);
-    XQApplicationManager aiwMgr;
-    XQAiwRequest *request(NULL);
-    request = aiwMgr.create(file);
-    // If request is created then there is a handler for that file
-    if (request) {
-         // Set request arguments
-         QList<QVariant> args;
-         args << file.fileName();
-         request->setArguments(args);
-         // Send the request, ownership of request is transferred
-         bool res = request->send();
-         if (res) {
-             // Request ok, set error status.
-             ret = NmNoError;
-         }
-    }
-    delete request;
-    return ret;
-}
-
-
-/*!
   Opens file specified by RFile handle. Usually used by viewer
   for opening attachments from message store as RFiles
 */
 int NmUtilities::openFile(XQSharableFile &file)
 {
     NM_FUNCTION;
-    
+
     int ret(NmNotFoundError);
     XQApplicationManager aiwMgr;
     XQAiwRequest *request(NULL);
-    request = aiwMgr.create(file);  
+    request = aiwMgr.create(file);
     // Create request for the sharable file
     if (request)
     {
         // Set request arguments
         QList<QVariant> args;
-        args << qVariantFromValue(file);  
+        args << qVariantFromValue(file);
         request->setArguments(args);
         // Send the request, ownership of request is transferred
         bool res = request->send();
@@ -235,7 +204,7 @@
 QString NmUtilities::truncate( const QString &string, int length )
 {
     NM_FUNCTION;
-    
+
     if (string.length() <= length) {
         return string;
     }
@@ -247,14 +216,14 @@
 
 /*!
  * Shows an error note. Used by at least editor and viewer classes.
- * 
+ *
  */
 void NmUtilities::displayErrorNote(QString noteText)
 {
     NM_FUNCTION;
-    
+
 	HbNotificationDialog *note = new HbNotificationDialog();
-	
+
 	note->setIcon(HbIcon(QLatin1String("note_warning")));
 	note->setTitle(noteText);
 	note->setTitleTextWrapping(Hb::TextWordWrap);
@@ -272,25 +241,25 @@
 QString NmUtilities::attachmentSizeString(const int sizeInBytes)
 {
     NM_FUNCTION;
-    
+
     qreal sizeMb = (qreal)sizeInBytes / (qreal)NmMegabyte;
     if (sizeMb < 0.1) {
         // 0.1 Mb is the minimum size shown for attachment
         sizeMb = 0.1;
     }
-    return QString().sprintf("(%.1f Mb)", sizeMb); // Use loc string when available    
+    return QString().sprintf("(%.1f Mb)", sizeMb); // Use loc string when available
 }
 
 /*!
     Displays a note with Yes/No buttons. Note has no timeout, i.e. it has to be dismissed manually.
     Returns pointer to dialog so that caller can take ownership and handle deletion.
-    Parameter 'receiver' is the object and 'member' is the slot where user selection is passed. 
+    Parameter 'receiver' is the object and 'member' is the slot where user selection is passed.
 */
 HbMessageBox* NmUtilities::displayQuestionNote(
     QString noteText, QObject* receiver, const char* member)
 {
     NM_FUNCTION;
-    
+
     HbMessageBox *messageBox = new HbMessageBox(HbMessageBox::MessageTypeQuestion);
     messageBox->setText(noteText);
     messageBox->setTimeout(HbMessageBox::NoTimeout); // Note has to be dismissed manually
@@ -299,21 +268,17 @@
 }
 
 /*!
- * displays an error note with no buttons. Note dismisses itself after NmShortInterval.
+ * displays an warning note.
  */
-void NmUtilities::displayWarningNote(QString noteText)
+HbMessageBox* NmUtilities::displayWarningNote(QString noteText, QObject* receiver, const char* member)
 {
     NM_FUNCTION;
-    
+
     HbMessageBox *messageBox = new HbMessageBox(HbMessageBox::MessageTypeWarning);
     messageBox->setText(noteText);
-    messageBox->setTimeout(NmShortInterval);
-    messageBox->clearActions(); // gets rid of buttons from the note
-    messageBox->setModal(false);
-    messageBox->setBackgroundFaded(false);
-    messageBox->show();
-
-    delete messageBox;
+    messageBox->setTimeout(HbMessageBox::NoTimeout); // Note has to be dismissed manually
+    messageBox->open(receiver, member);
+    return messageBox;
 }
 
 /*!
@@ -323,33 +288,34 @@
 QString NmUtilities::createReplyHeader(const NmMessageEnvelope &env)
 {
     NM_FUNCTION;
-    
+
     QString ret = "<html><body><br><br>";
     // Append "----- Original message ----" text
-    ret+=hbTrId("txt_mail_editor_reply_original_msg");                  
+    ret+=hbTrId("txt_mail_editor_reply_original_msg");
     // Append sender
     ret+="<br>";
-    ret+=hbTrId("txt_mail_editor_reply_from");               
-    ret+=" ";        
+    ret+=hbTrId("txt_mail_editor_reply_from");
+    ret+=" ";
     if (env.sender().displayName().length()){
         ret+=env.sender().displayName();
     }
     else{
         ret+=env.sender().address();
-    }   
+    }
     // Append sent time
     ret+="<br>";
-    ret+=hbTrId("txt_mail_editor_reply_sent");   
-    ret+=" ";  
+    ret+=hbTrId("txt_mail_editor_reply_sent");
+    ret+=" ";
     HbExtendedLocale locale = HbExtendedLocale::system();
-    QDate sentLocalDate = env.sentTime().toLocalTime().date();
-    ret+=locale.format(sentLocalDate, r_qtn_date_usual);   
+    QDateTime localTime = env.sentTime().addSecs(locale.universalTimeOffset());
+    QDate sentLocalDate = localTime.date();
+    ret+=locale.format(sentLocalDate, r_qtn_date_usual);
     // Append to recipients
     const QList<NmAddress> &toList = env.toRecipients();
     if (toList.count()){
         ret+="<br>";
-        ret+=hbTrId("txt_mail_editor_reply_to"); 
-        ret+=" ";    
+        ret+=hbTrId("txt_mail_editor_reply_to");
+        ret+=" ";
         for (int i=0;i<toList.count();i++){
             if (toList[i].displayName().length()){
                 ret+=toList[i].displayName();
@@ -358,16 +324,16 @@
                 ret+=toList[i].address();
             }
             if (i!=toList.count()-1){
-                ret+=";";          
+                ret+=";";
             }
-        }    
+        }
     }
     // Append cc recipients
     const QList<NmAddress> &ccList = env.ccRecipients();
     if (ccList.count()){
         ret+="<br>";
-        ret+=hbTrId("txt_mail_editor_reply_cc"); 
-        ret+=" ";         
+        ret+=hbTrId("txt_mail_editor_reply_cc");
+        ret+=" ";
         for (int i=0;i<ccList.count();i++){
             if (ccList[i].displayName().length()){
                 ret+=ccList[i].displayName();
@@ -376,29 +342,29 @@
                 ret+=ccList[i].address();
             }
             if (i!=toList.count()-1){
-                ret+=";";          
+                ret+=";";
             }
-        }    
+        }
     }
     // Append subject if there is subject to display
     if (env.subject().length()){
         ret+="<br>";
-        ret+=hbTrId("txt_mail_editor_reply_subject"); 
-        ret+=" ";    
-        ret+=env.subject();    
+        ret+=hbTrId("txt_mail_editor_reply_subject");
+        ret+=" ";
+        ret+=env.subject();
     }
-    // Append priority if it is other than normal  
-    if (env.priority()!=NmMessagePriorityNormal){   
+    // Append priority if it is other than normal
+    if (env.priority()!=NmMessagePriorityNormal){
         ret+="<br>";
-        ret+=hbTrId("txt_mail_editor_reply_importance"); 
-        ret+=" ";    
+        ret+=hbTrId("txt_mail_editor_reply_importance");
+        ret+=" ";
         if (env.priority()==NmMessagePriorityLow){
-            ret+=hbTrId("txt_mail_editor_reply_importance_low");         
+            ret+=hbTrId("txt_mail_editor_reply_importance_low");
         }
         else {
-            ret+=hbTrId("txt_mail_editor_reply_importance_high"); 
+            ret+=hbTrId("txt_mail_editor_reply_importance_high");
         }
-    }    
+    }
     ret+="<br></body></html>";
     return ret;
 }
--- a/emailuis/nmailui/src/nmviewerheader.cpp	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailui/src/nmviewerheader.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -41,6 +41,7 @@
     NM_FUNCTION;
     
     loadWidgets();
+    setFlag(QGraphicsItem::ItemHasNoContents, false);
 }
 
 /*!
@@ -117,6 +118,7 @@
     Q_UNUSED(option);
     Q_UNUSED(widget);
     if (painter) {
+        painter->save();
         painter->setOpacity(nmHeaderLineOpacity);
         QLineF line1( rect().topLeft().x(), rect().bottomRight().y(),
                      rect().bottomRight().x(), rect().bottomRight().y());
@@ -126,7 +128,8 @@
             QLineF line2( headerBoxGeometry.topLeft().x(), headerBoxGeometry.bottomRight().y(),
                           headerBoxGeometry.bottomRight().x(), headerBoxGeometry.bottomRight().y());
             painter->drawLine(line2);        
-        }       
+        } 
+        painter->restore();      
     }
 }
 
@@ -198,8 +201,9 @@
         }
         if (mSent){
             HbExtendedLocale locale = HbExtendedLocale::system();
-            QTime time = envelope.sentTime().toLocalTime().time();
-            QDate sentLocalDate = envelope.sentTime().toLocalTime().date();
+            QDateTime localTime = envelope.sentTime().addSecs(locale.universalTimeOffset());
+            QTime time = localTime.time();
+            QDate sentLocalDate = localTime.date();
             QString shortDateSpec = r_qtn_date_without_year;
             QString shortTimeSpec = r_qtn_time_usual;
             QString text = locale.format(sentLocalDate, shortDateSpec);
--- a/emailuis/nmailui/src/nmviewerserviceinterface.cpp	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailui/src/nmviewerserviceinterface.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -80,6 +80,18 @@
         mainWindow->show();
 
         // Launch the message list view.
+        NmUiStartParam *startParam1 = 
+            new NmUiStartParam(NmUiViewMessageList,
+                               mailboxNmId,
+                               folderNmId, // folder id
+                               messageNmId, // message id
+                               NmUiEditorCreateNew, // editor start mode
+                               NULL, // address list
+                               NULL, // attachment list
+                               true); // start as service
+        mApplication->enterNmUiView(startParam1);
+        
+        // Launch the message view.
         NmUiStartParam *startParam =
             new NmUiStartParam(NmUiViewMessageViewer,
                                mailboxNmId,
@@ -88,7 +100,7 @@
                                NmUiEditorCreateNew, // editor start mode
                                NULL, // address list
                                NULL, // attachment list
-                               true); // start as service
+                               false); // not started as service
         mApplication->enterNmUiView(startParam);
 
         completeRequest(mAsyncReqId,0);
--- a/emailuis/nmailui/src/nmviewerview.cpp	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailui/src/nmviewerview.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -1,19 +1,19 @@
 /*
-* 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"
 
@@ -58,7 +58,6 @@
 mViewerContent(NULL),
 mWebView(NULL),
 mHeaderWidget(NULL),
-mViewerContentLayout(NULL),
 mMessageFetchingOperation(NULL),
 mDisplayingPlainText(false),
 mDocumentLoader(NULL),
@@ -71,10 +70,9 @@
 mAttaIndexUnderFetch(NmNotFoundError),
 mAttaWidget(NULL),
 mViewReady(false),
-mWaitNoteCancelled(false)
+mWaitNoteCancelled(false),
+mErrorNote(NULL)
     {
-    NM_FUNCTION;
-    
     // Create documentloader
     mDocumentLoader = new NmUiDocumentLoader(mMainWindow);
     // Get screensize
@@ -95,8 +93,8 @@
 */
 NmViewerView::~NmViewerView()
 {
-    NM_FUNCTION;
-    
+    delete mErrorNote;
+    mErrorNote=NULL;
     delete mWebView;
     mWebView = NULL;
     delete mMessage;
@@ -116,8 +114,6 @@
 */
 void NmViewerView::aboutToExitView()
 {
-    NM_FUNCTION;
-    
     // View is about to exit, for safety, stop 
     // loading of content before closing the view
     if (mWebView){
@@ -153,17 +149,13 @@
         mViewerContent = reinterpret_cast<HbWidget *>(
                 mDocumentLoader->findObject(NMUI_MESSAGE_VIEWER_CONTENT));
         // Find scroll area
-        mScrollArea = reinterpret_cast<NmBaseViewScrollArea *>(
+        mScrollArea = reinterpret_cast<HbScrollArea *>(
                 mDocumentLoader->findObject(NMUI_MESSAGE_VIEWER_SCROLL_AREA));
         if (mScrollArea) {
             mScrollArea->setParentItem(this);
             mScrollArea->setScrollDirections(Qt::Vertical | Qt::Horizontal);
             connect(mScrollArea, SIGNAL(scrollPositionChanged(QPointF)),
                 this, SLOT(contentScrollPositionChanged(QPointF)));
-            connect(mScrollArea, SIGNAL(handleMousePressEvent(QGraphicsSceneMouseEvent*)),
-                this, SLOT(handleMousePressEvent(QGraphicsSceneMouseEvent*)));
-            connect(mScrollArea, SIGNAL(handleMouseReleaseEvent(QGraphicsSceneMouseEvent*)),
-                this, SLOT(handleMouseReleaseEvent(QGraphicsSceneMouseEvent*)));
 
             // Get scroll area contents and set layout margins
             mScrollAreaContents = qobject_cast<HbWidget *>(
@@ -200,10 +192,7 @@
                 if (settings) {
                     settings->setAttribute(QWebSettings::AutoLoadImages, true);
                     settings->setAttribute(QWebSettings::PrivateBrowsingEnabled, true);   
-                }                             
-                HbEditorInterface editorInterface(mWebView);
-                editorInterface.setInputConstraints(HbEditorConstraintIgnoreFocus);
-                mWebView->setAcceptedMouseButtons(Qt::NoButton);
+                }
                 QWebPage *page = mWebView->page();
                 if (page) {
                     QWebFrame *frame = page->mainFrame();
@@ -225,8 +214,6 @@
 */
 void NmViewerView::viewReady()
 {
-    NM_FUNCTION;
-    
     if (!mViewReady){
         // Set mailbox name to title
         setMailboxName();
@@ -323,10 +310,10 @@
  */
 void NmViewerView::messageFetched(int result)
 {
-    NM_FUNCTION;
+    mWaitDialog->close();
+    disconnect(mWaitDialog->mainWindow(), SIGNAL(orientationChanged(Qt::Orientation)),
+                this, SLOT(orientationChanged(Qt::Orientation)));
     
-    mWaitDialog->close();
-
     if (result == NmNoError && mMessageFetchingOperation) {
         if (mMessage) {
             delete mMessage;
@@ -353,8 +340,6 @@
  */
 void NmViewerView::waitNoteCancelled()
 {
-    NM_FUNCTION;
-    
     if (!mWaitNoteCancelled) {
         if (mMessageFetchingOperation && mMessageFetchingOperation->isRunning()) { 
 	        mMessageFetchingOperation->cancelOperation();
@@ -386,6 +371,10 @@
         NmViewerViewNetManager &netMngr = mApplication.networkAccessManager();
         netMngr.setView(this);
         page->setNetworkAccessManager(&netMngr);
+        QWebSettings *webSettings = page->settings();
+        if (webSettings) {
+            webSettings->setObjectCacheCapacities(0,0,0);
+        }
 
         connect(page, SIGNAL(loadFinished(bool)),
                     this, SLOT(webFrameLoaded(bool)));
@@ -494,8 +483,13 @@
         else if (messageParts[i]->partId() == attaId) {
             XQSharableFile file = mUiEngine.messagePartFile(mailboxId, folderId,
                                                             messageId, attaId);
-            NmUtilities::openFile(file);
+            int error = NmUtilities::openFile(file);
             file.close();
+            if (error==NmNotFoundError){
+                delete mErrorNote;
+                mErrorNote=NULL;
+                mErrorNote = NmUtilities::displayWarningNote(hbTrId("txt_mail_dialog_unable_to_open_attachment_file_ty"));
+            }
         }
     }
 }
@@ -592,8 +586,6 @@
 */
 void NmViewerView::reloadViewContents(NmUiStartParam* startParam)
 {
-    NM_FUNCTION;
-    
     // Check start parameter validity, message view cannot
     // be updated if given parameter is zero.
     if (startParam && startParam->viewId() == NmUiViewMessageViewer &&
@@ -618,8 +610,6 @@
 */
 NmUiViewId NmViewerView::nmailViewId() const
 {
-    NM_FUNCTION;
-    
     return NmUiViewMessageViewer;
 }
 
@@ -628,8 +618,6 @@
 */
 void NmViewerView::webFrameLoaded(bool loaded)
 {
-    NM_FUNCTION;
-    
     if (loaded){
         webFrameloadingCompleted = true;
         // Scale web view after loading the
@@ -643,8 +631,6 @@
 */
 void NmViewerView::scaleWebViewWhenLoading(const QSize &size)
 {
-    NM_FUNCTION;
-    
     // Try to scale web view while mainframe is being loaded.
     // So that screen is scrollable even before images are fully loaded
     // First check that new size is different than previous, no need to react if
@@ -673,8 +659,6 @@
 */
 void NmViewerView::scaleWebViewWhenLoaded()
 {
-    NM_FUNCTION;
-    
     if (mWebView&&mWebView->page()) {
         QSizeF contentSize = mWebView->page()->mainFrame()->contentsSize();
         int width = (int)contentSize.width();
@@ -707,8 +691,6 @@
 */
 void NmViewerView::adjustViewDimensions()
 {
-    NM_FUNCTION;
-    
     // Update current screensize
     mScreenSize = mApplication.screenSize();
     // Scale header to screen width
@@ -759,8 +741,6 @@
 */
 void NmViewerView::orientationChanged(Qt::Orientation orientation)
 {
-    NM_FUNCTION;
-    
     Q_UNUSED(orientation);
     QTimer::singleShot(NmOrientationTimer, this, SLOT(adjustViewDimensions()));
 }
@@ -794,32 +774,11 @@
 }
 
 /*!
-   Send mouse release event to web view
-*/
-void NmViewerView::handleMouseReleaseEvent(QGraphicsSceneMouseEvent *event)
-{
-    NM_FUNCTION;
-    handleMouseEvent(event, false);
-
-}
-
-/*!
-   Send mouse press event
-*/
-void NmViewerView::handleMousePressEvent(QGraphicsSceneMouseEvent *event)
-{
-    NM_FUNCTION;
-    handleMouseEvent(event, true);
-}
-
-/*!
    Function can be used to check whether mouse event has
    occured on top of header area.
 */
 bool NmViewerView::eventOnTopOfHeaderArea(QGraphicsSceneMouseEvent *event)
 {
-    NM_FUNCTION;
-    
     bool ret(false);
     if (event && mHeaderWidget) {
         QPointF lastReleasePoint = event->lastPos();
@@ -837,8 +796,6 @@
 */
 NmMailViewerWK* NmViewerView::webView()
 {
-    NM_FUNCTION;
-    
     return mWebView;
 }
 
@@ -889,8 +846,6 @@
 */
 void NmViewerView::setMailboxName()
 {
-    NM_FUNCTION;
-    
     if (mStartParam){
         NmMailboxMetaData *meta = mUiEngine.mailboxById(mStartParam->mailboxId());
         if (meta) {
@@ -906,8 +861,6 @@
 */
 void NmViewerView::contentScrollPositionChanged(const QPointF &newPosition)
 {
-    NM_FUNCTION;
-    
     if (mWebView&&mHeaderWidget){
         QRectF webViewRect = mWebView->geometry();
         QTransform tr;
@@ -935,8 +888,6 @@
 */
 void NmViewerView::createToolBar()
 {
-    NM_FUNCTION;
-    
     HbToolBar *tb = toolBar();
     NmUiExtensionManager &extMngr = mApplication.extManager();
     if (tb && &extMngr && mStartParam) {
@@ -957,8 +908,6 @@
 */
 void NmViewerView::createOptionsMenu()
 {
-    NM_FUNCTION;
-    
 	HbMenu *optionsMenu = menu();
 	NmUiExtensionManager &extMngr = mApplication.extManager();
 	if (optionsMenu && &extMngr && mStartParam) {
@@ -980,19 +929,11 @@
 */
 void NmViewerView::handleActionCommand(NmActionResponse &actionResponse)
 {
-    NM_FUNCTION;
-    
-    bool showSendInProgressNote = false;
-
     // Handle options menu or toolbar
     if (actionResponse.menuType() == NmActionOptionsMenu ||
     	actionResponse.menuType() == NmActionToolbar) {
         switch (actionResponse.responseCommand()) {
             case NmActionResponseCommandReply: {
-                if (mUiEngine.isSendingMessage()) {
-                    showSendInProgressNote = true;
-                    break;
-                }
                 NmUiStartParam *startParam = new NmUiStartParam(NmUiViewMessageEditor,
                     mStartParam->mailboxId(), mStartParam->folderId(),
                     mStartParam->messageId(), NmUiEditorReply);
@@ -1000,10 +941,6 @@
             }
             break;
             case NmActionResponseCommandReplyAll: {
-                if (mUiEngine.isSendingMessage()) {
-                    showSendInProgressNote = true;
-                    break;
-                }
                 NmUiStartParam *startParam = new NmUiStartParam(NmUiViewMessageEditor,
                     mStartParam->mailboxId(), mStartParam->folderId(),
                     mStartParam->messageId(), NmUiEditorReplyAll);
@@ -1011,10 +948,6 @@
             }
             break;
             case NmActionResponseCommandForward: {
-                if (mUiEngine.isSendingMessage()) {
-                    showSendInProgressNote = true;
-                    break;
-                }
                 NmUiStartParam *startParam = new NmUiStartParam(NmUiViewMessageEditor,
                     mStartParam->mailboxId(), mStartParam->folderId(),
                     mStartParam->messageId(), NmUiEditorForward);
@@ -1029,17 +962,6 @@
                 break;
         }
     }
-
-    if (showSendInProgressNote) {
-        QString noteText = hbTrId("txt_mail_dialog_still_sending");
-
-        // get message subject from the message being sent
-        const NmMessage *message = mUiEngine.messageBeingSent();
-        if (message) {
-            noteText = noteText.arg(NmUtilities::truncate(message->envelope().subject(), 20));
-        }
-        HbMessageBox::warning(noteText);
-    }
 }
 
 /*!
@@ -1069,8 +991,6 @@
 */
 void NmViewerView::progressChanged(int value)
 {
-    NM_FUNCTION;
-    
     if (mAttaIndexUnderFetch != NmNotFoundError) {
         // emit signal
         if (mAttaWidget && mAttaWidget->progressValue(mAttaIndexUnderFetch) < value) {
@@ -1084,8 +1004,6 @@
 */
 void NmViewerView::fetchCompleted(int result)
 {
-    NM_FUNCTION;
-    
     if (mAttaWidget && mAttaIndexUnderFetch != NmNotFoundError) {
         if (result == NmNoError) {
             progressValueChanged(mAttaIndexUnderFetch, 100);
@@ -1102,8 +1020,6 @@
 */
 void NmViewerView::messageDeleted(const NmId &mailboxId, const NmId &folderId, const NmId &messageId)
 {
-    NM_FUNCTION;
-    
     if ((mStartParam->viewId() == NmUiViewMessageViewer)
         && (mStartParam->mailboxId()== mailboxId)
         && (mStartParam->folderId()== folderId)
@@ -1117,12 +1033,13 @@
 */
 void NmViewerView::createAndShowWaitDialog()
 {
-    NM_FUNCTION;
-    
     delete mWaitDialog;
     mWaitDialog = NULL;
     // Create new wait dialog and set it to me modal with dimmed background
     mWaitDialog = new HbProgressDialog(HbProgressDialog::WaitDialog);
+    // Connect to observe orientation change events
+    connect(mWaitDialog->mainWindow(), SIGNAL(orientationChanged(Qt::Orientation)),
+                this, SLOT(orientationChanged(Qt::Orientation)));
     mWaitDialog->setModal(true);
     mWaitDialog->setBackgroundFaded(true);
     connect(mWaitDialog, SIGNAL(cancelled()), this, SLOT(waitNoteCancelled()));
@@ -1136,8 +1053,6 @@
 */
 void NmViewerView::setWebViewWidth(int width)
 {
-    NM_FUNCTION;
-    
     // null pointer check for mWebView in calling function
     mWebView->setMinimumWidth(width);
     mWebView->setMaximumWidth(width);
@@ -1149,35 +1064,8 @@
 */
 void NmViewerView::setWebViewHeighth(int height)
 {
-    NM_FUNCTION;
-    
     // null pointer check for mWebView in calling function
     mWebView->setMinimumHeight(height);
     mWebView->setMaximumHeight(height);
     mWebView->setPreferredHeight(height);
 }
-
-/*!
-    Helper function for mouse events.
-*/
-void NmViewerView::handleMouseEvent(QGraphicsSceneMouseEvent *event, bool pressed)
-{
-    NM_FUNCTION;
-    NmMailViewerWK* view = webView();
-    if (event && view && mHeaderWidget && mScrollAreaContents) {
-        QPointF lastReleasePoint = event->pos();
-        QPointF contentWidgetPos = mScrollAreaContents->pos();
-        qreal headerHeight = mHeaderWidget->geometry().height();
-        qreal y = lastReleasePoint.y()-headerHeight;
-        y -= contentWidgetPos.y();
-        qreal x = lastReleasePoint.x()-contentWidgetPos.x();
-        const QPointF pointToWebView(x, y);
-        event->setPos(pointToWebView);
-        event->setAccepted(true);
-        if (pressed) {
-            view->sendMousePressEvent(event);
-        } else {
-            view->sendMouseReleaseEvent(event);
-        }
-    }
-}
--- a/emailuis/nmailui/src/nmviewerwebview.cpp	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailui/src/nmviewerwebview.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -1,64 +1,60 @@
 /*
-* 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"
 
 /*!
-    Constructor
+    Constructor.
 */
 NmMailViewerWK::NmMailViewerWK()
-	:QGraphicsWebView()
+: QGraphicsWebView()
 {
-    NM_FUNCTION;
+    grabGesture(Qt::PinchGesture);
+    installEventFilter(new NmEventFilterWK(this));
+    setFlag(QGraphicsItem::ItemIsFocusable,false);
 }
 
 /*!
-    Destructor
-*/
+    Destructor.
+ */
 NmMailViewerWK::~NmMailViewerWK()
 {
-    NM_FUNCTION;
-    
     mContent.clear();
 }
 
 /*!
-
-*/
+    Sets the parent view.
+ */
 void NmMailViewerWK::setParentView(NmViewerView *parentView)
 {
-    NM_FUNCTION;
-    
     mParentView = parentView;
 }
 
 /*!
-    addContent. Function adds content into web view.
-*/
+    Adds content into web view.
+ */
 void NmMailViewerWK::addContent(QString key, QVariant val, NmId partId, bool isFetched) 
 {
-    NM_FUNCTION;
-    
     mContent[key] = NmMailViewerWkContentItem(val, partId, isFetched);
 }
 
 /*!
-    loadResource. Function returns resource from added content (added with addContent)
-*/
+    Returns resource from added content.
+ */
 QVariant NmMailViewerWK::loadResource(int type, const QUrl &name, NmId &partId, bool &isFetched)
 {
     NM_FUNCTION;
@@ -79,28 +75,55 @@
 }
 
 /*!
-    sendMousePressEvent. Function is used to relay mouse event to base class
-*/
-void NmMailViewerWK::sendMousePressEvent(QGraphicsSceneMouseEvent *event)
+    Filter class' constructor.
+ */
+NmEventFilterWK::NmEventFilterWK(QObject* parent)
+: QObject(parent)
 {
-    NM_FUNCTION;
-    
-    if (event){
-        QGraphicsWebView::mousePressEvent(event);
+}
+
+/*
+    Filters events if this object has been installed as an event filter.
+ */
+bool NmEventFilterWK::eventFilter(QObject* object, QEvent* event) {
+    Q_UNUSED(object);
+    bool consumed = false;
+    if (event) {
+        switch (event->type()) {
+        case QEvent::Gesture:
+            consumed = gestureEvent(static_cast<QGestureEvent*>(event));
+            break;
+        case QEvent::GraphicsSceneMouseDoubleClick:
+            // Handle double click (instant zoom).
+            // At the moment we simply consume the event.
+            event->accept();
+            consumed = true;
+            break;
+        case QEvent::GraphicsSceneContextMenu:
+        case QEvent::GraphicsSceneMouseMove:
+            event->accept();
+            consumed = true;
+            break;
+        default:
+            break;
+        }
     }
+    return consumed;
 }
 
 /*!
-    sendMouseReleaseEvent. Function is used to relay mouse event to base class
-*/
-void NmMailViewerWK::sendMouseReleaseEvent(QGraphicsSceneMouseEvent *event)
-{
-    NM_FUNCTION;
-    
+    Handles gesture events. This function is invoked by the eventFilter()
+    function in case of gesture events.
+ */
+bool NmEventFilterWK::gestureEvent(QGestureEvent* event) {
+    bool consumed = false;
     if (event) {
-        QGraphicsWebView::mouseReleaseEvent(event);
+        if (QPinchGesture* pinch = static_cast<QPinchGesture*>(event->gesture(Qt::PinchGesture))) {
+            // Handle pinch (zoom).
+            // At the moment we simply consume the event.
+            event->accept();
+            consumed = true;
+        }
     }
+    return consumed;
 }
-
-
-
Binary file emailuis/nmailui/translations/mail.qm has changed
--- a/emailuis/nmailui/translations/mail.ts	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailui/translations/mail.ts	Wed Jun 23 18:00:21 2010 +0300
@@ -62,6 +62,16 @@
     <extra-loc-feature>mail</extra-loc-feature>
     <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>        
+    <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-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_add_priority_sub_normal">
     <comment>Suboption for option &quot;Add priority&quot; to set mail as normal priority</comment>        
     <source>Normal</source>
@@ -196,7 +206,7 @@
     <comment>Empty list text for Mail list view. Displayed in the Mail list view if there are no mails.</comment>        
     <source>(No messages)</source>
     <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>qtl_view_empty_title_pri</extra-loc-layout_id>    
+    <extra-loc-layout_id>txt_mail_dblist_val_no_subject</extra-loc-layout_id>    
     <extra-loc-viewid>mail_01</extra-loc-viewid>
     <extra-loc-positionid>dblist_2</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
@@ -247,7 +257,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</extra-loc-viewid>
+    <extra-loc-viewid>mail_02_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>
@@ -257,7 +267,7 @@
     <source>%[]1 deleted.</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-viewid>mail_dialog_11</extra-loc-viewid>
     <extra-loc-positionid>dialog</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -267,14 +277,14 @@
     <source>Still sending mail %[]1. Please wait operation to complete</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-viewid>mail_dialog_13</extra-loc-viewid>
     <extra-loc-positionid>dialog</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_dialog_you_can_not_send_more_than_l1_att">
-    <comment>Information note. %L1 is the maximum amount of attachments the server allows to be sent at once.  If the adds  attachments, which overall count exceeds the limit and presses send this note is shown and the mail is not sent. Maximum number of digits replacing the parameter is 3.</comment>        
-    <source>You can not send more than %L1 attachments at a time </source>
+<message numerus="yes" id="txt_mail_dialog_you_can_not_send_more_than_l1_att">
+    <comment>Information note. %Ln is the maximum amount of attachments the server allows to be sent at once.  If the adds  attachments, which overall count exceeds the limit and presses send this note is shown and the mail is not sent. Maximum number of digits replacing the parameter is 3.</comment>        
+    <source>You can not send more than %Ln attachments at a time </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>
@@ -347,7 +357,7 @@
     <source>Seaching</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_mail_subhead_inbox</extra-loc-layout_id>    
-    <extra-loc-viewid>mail</extra-loc-viewid>
+    <extra-loc-viewid>mail_08</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -372,16 +382,6 @@
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_nmailui_forward_subject_prefix">
-    <comment>Text for subject field if the message is forwarded.</comment>        
-    <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-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_opt_folder_sub_deleted">
     <comment>Submenu item for Options menus item Folder (txt_mail_opt_change_folder)</comment>        
     <source>Deleted items</source>
@@ -427,7 +427,7 @@
     <source>New Mail</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id></extra-loc-layout_id>    
-    <extra-loc-viewid>mail</extra-loc-viewid>
+    <extra-loc-viewid>mail_01_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>
@@ -437,7 +437,7 @@
     <source>Server settings are 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</extra-loc-viewid>
+    <extra-loc-viewid>mail_dialog_14 </extra-loc-viewid>
     <extra-loc-positionid>dialog</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -502,6 +502,26 @@
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
+<message numerus="no" id="txt_mail_reply_subject_prefix">
+    <comment>Text for subject field if the message is replyed.</comment>        
+    <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-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>        
+    <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-positionid>dpophead</extra-loc-positionid>
+    <extra-loc-feature>mail</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
 <message numerus="no" id="txt_common_menu_open">
     <comment>Item specific option for opening the highlighted mail. </comment>        
     <source>Open</source>
@@ -526,8 +546,8 @@
     <comment>A text shown in mail list view, if there are no matches to a search.</comment>        
     <source>No messages matched your search. Try another search term. </source>
     <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>qtl_view_empty_title_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>mail</extra-loc-viewid>
+    <extra-loc-layout_id>txt_mail_dblist_val_no_subject</extra-loc-layout_id>    
+    <extra-loc-viewid>mail_08</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>
@@ -547,7 +567,7 @@
     <source>Deleting mailbox</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri3</extra-loc-layout_id>    
-    <extra-loc-viewid>mail</extra-loc-viewid>
+    <extra-loc-viewid>mail_dialog_11</extra-loc-viewid>
     <extra-loc-positionid>dialog</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -595,23 +615,13 @@
 <message numerus="no" id="txt_mail_dialog_send_via">
     <comment>Title for send via dialog. This dialog lists all mailboxes the user has. Underneath the title, a list of mailboxes is displayed. </comment>        
     <source>Send via</source>
-    <translation variants="yes" type="unfinished"></translation>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
     <extra-loc-viewid>mail</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_nmailui_reply_subject_prefix">
-    <comment>Text for subject field if the message is replyed.</comment>        
-    <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-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_opt_send_and_receive_now">
     <comment>Options menu item for synchronize mail folders with the mail server content (sending and receiving mail)</comment>        
     <source>Refresh</source>
@@ -675,9 +685,9 @@
 <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="yes" type="unfinished"></translation>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_softkey_2</extra-loc-layout_id>    
-    <extra-loc-viewid>mail</extra-loc-viewid>
+    <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>
@@ -687,7 +697,7 @@
     <source>No mailboxes have been defined. Would you like to create a new mailbox?</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-viewid>mail_dialog_8</extra-loc-viewid>
     <extra-loc-positionid>dialog</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -697,16 +707,16 @@
     <source>Do you want to delete the mailbox and all mail messages?</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-viewid>mail_dialog_9</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_dblist_val_no_subject">
-    <comment>No subject text for mail iten in Mail list view. Displayed in the Mail list view under the name of the sender if there is no subject in the received mail.</comment>        
+    <comment>No subject text for mail iten in Mail list view. Displayed in the Mail list view under the name of the sender if there is no subject in the received mail. Custom layout ID parent.</comment>        
     <source>(No Subject)</source>
     <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>qtl_view_empty_title_pri</extra-loc-layout_id>    
+    <extra-loc-layout_id>txt_mail_dblist_val_no_subject</extra-loc-layout_id>    
     <extra-loc-viewid>mail_01</extra-loc-viewid>
     <extra-loc-positionid>dblist_val</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
@@ -785,9 +795,9 @@
 <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="yes" type="unfinished"></translation>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_dialog_softkey_2</extra-loc-layout_id>    
-    <extra-loc-viewid>mail</extra-loc-viewid>
+    <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>
@@ -822,13 +832,23 @@
     <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>        
+    <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-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>        
     <source>Waiting to send (%L1)</source>
     <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id></extra-loc-layout_id>    
-    <extra-loc-viewid>mail</extra-loc-viewid>
-    <extra-loc-positionid></extra-loc-positionid>
+    <extra-loc-layout_id>qtl_notifdialog_sec_medium_graphic</extra-loc-layout_id>    
+    <extra-loc-viewid>mail_01_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>
 </message>
@@ -837,7 +857,7 @@
     <source>Do you want to delete all mail, calendar, contacts and tasks data related to this account?</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-viewid>mail_dialog_10</extra-loc-viewid>
     <extra-loc-positionid>dialog</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -877,7 +897,7 @@
     <source>%L1 results</source>
     <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_mail_subhead_inbox</extra-loc-layout_id>    
-    <extra-loc-viewid>mail</extra-loc-viewid>
+    <extra-loc-viewid>mail_08</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -902,12 +922,22 @@
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
+<message numerus="no" id="txt_mail_forward_subject_prefix">
+    <comment>Text for subject field if the message is forwarded.</comment>        
+    <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-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_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>
     <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-viewid>mail_dialog_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>
--- a/emailuis/nmailuiengine/inc/nmuiengine.h	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailuiengine/inc/nmuiengine.h	Wed Jun 23 18:00:21 2010 +0300
@@ -234,6 +234,7 @@
     QPointer<NmMessageSendingOperation> mSendOperation;  // Not owned
     QPointer<NmOperation> mRemoveDraftOperation; // not owned
     QPointer<NmOperation> mSaveDraftOperation;   // not owned
+    NmMessage *mDraftMessage; // owned
 };
 
 
--- a/emailuis/nmailuiengine/src/nmmessagelistmodel.cpp	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailuiengine/src/nmmessagelistmodel.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -255,7 +255,18 @@
                 updateMessageEnvelope(mailboxId, folderId, messageIds[i]);
                 break;
             }
-            case NmMessageCreated:
+            case NmMessageCreated: {
+                // mIgnoreFolderIds is true if (and only if) this model is used
+                // for mail search purposes and thus, we do not want the model
+                // to handle "message created" events. Issue to consider:
+                // renaming mIgonreFolderIds => mModelUsedForSearch or something
+                // similar.
+                if (!mIgnoreFolderIds && !itemFromModel(messageIds[i])) {
+                    insertNewMessageIntoModel(mailboxId, folderId, messageIds[i]);
+                }
+                
+                break;
+            }
             case NmMessageFound: {
                 if (!itemFromModel(messageIds[i])) {
                     insertNewMessageIntoModel(mailboxId, folderId, messageIds[i]);
--- a/emailuis/nmailuiengine/src/nmuiengine.cpp	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailuiengine/src/nmuiengine.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -27,7 +27,7 @@
 NmUiEngine *NmUiEngine::mInstance;
 int NmUiEngine::mReferenceCount;
 
-const QString syncIndicatorName = "com.nokia.hb.nmsyncindicator/1.0";
+const QString syncIndicatorName = "com.nokia.nmail.indicatorplugin.sync/1.0";
 
 /*!
     Constructor
@@ -39,7 +39,8 @@
   mMessageSearchListModel(NULL),
   mSendOperation(NULL),
   mRemoveDraftOperation(NULL),
-  mSaveDraftOperation(NULL)
+  mSaveDraftOperation(NULL),
+  mDraftMessage(NULL)
 {
     NM_FUNCTION;
     
@@ -87,6 +88,9 @@
 {
     NM_FUNCTION;
     
+    HbIndicator indicator;
+    indicator.deactivate(syncIndicatorName, QVariant());
+    
     if (mMessageSearchListModel) {
         delete mMessageSearchListModel;
         mMessageSearchListModel = NULL;
@@ -125,6 +129,10 @@
     if(mSaveDraftOperation && mSaveDraftOperation->isRunning()) {
         mSaveDraftOperation->cancelOperation();
     }
+    if(mDraftMessage) {
+        delete mDraftMessage;
+        mDraftMessage = NULL;
+    }
 }
 
 /*!
@@ -787,11 +795,20 @@
             if (mSaveDraftOperation && mSaveDraftOperation->isRunning()) {
                 mSaveDraftOperation->cancelOperation();
             }
-            // ownership of message changes
+            
             mSaveDraftOperation = plugin->saveMessageWithSubparts(*message);
-            // don't put this to mOperations as we need to handle this
-            // operation separately
+            
             if (mSaveDraftOperation) {
+                // Ownership of message changes but saveMessageWithSubparts operation only makes a 
+                // copy so we handle the msg object deletion in engine. mDraftMessage is deleted
+                // in handleCompletedSaveDraftOperation once operation finishes. 
+                if(mDraftMessage) {
+                    delete mDraftMessage;
+                    mDraftMessage = NULL;
+                }
+                mDraftMessage = message;
+                message = NULL;
+                
                 for (int i(0); i < preliminaryOperations.count(); i++ ) {
                     QPointer<NmOperation> op = preliminaryOperations[i];
                     mSaveDraftOperation->addPreliminaryOperation(op);
@@ -802,9 +819,6 @@
                         this, 
                         SLOT(handleCompletedSaveDraftOperation()));
                 
-                // message object is not needed any more, so delete it
-                delete message;
-                message = NULL;
             }
         }
     }
@@ -1079,7 +1093,11 @@
 {
     NM_FUNCTION;
     
-    // draft message saving observing not yet implemented...
+    // delete message object since it's not needed anymore
+    if(mDraftMessage) {
+        delete mDraftMessage;
+        mDraftMessage = NULL;
+    }
 }
 
 /*!
--- a/emailuis/nmailuiwidgets/bwins/nmailuiwidgetsu.def	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailuiwidgets/bwins/nmailuiwidgetsu.def	Wed Jun 23 18:00:21 2010 +0300
@@ -1,140 +1,138 @@
 EXPORTS
 	?trUtf8@NmAttachmentListItem@@SA?AVQString@@PBD0H@Z @ 1 NONAME ; class QString NmAttachmentListItem::trUtf8(char const *, char const *, int)
-	?handleLongPressGesture@NmBaseViewScrollArea@@IAEXABVQPointF@@@Z @ 2 NONAME ; void NmBaseViewScrollArea::handleLongPressGesture(class QPointF const &)
-	?updateScrollPosition@NmEditorTextEdit@@QAEXABVQPointF@@@Z @ 3 NONAME ; void NmEditorTextEdit::updateScrollPosition(class QPointF const &)
-	?screenSize@NmAttachmentListItem@@AAE?AVQSize@@W4Orientation@Qt@@@Z @ 4 NONAME ; class QSize NmAttachmentListItem::screenSize(enum Qt::Orientation)
-	?qt_metacast@NmEditorTextEdit@@UAEPAXPBD@Z @ 5 NONAME ; void * NmEditorTextEdit::qt_metacast(char const *)
-	?itemActivated@NmAttachmentListWidget@@IAEXH@Z @ 6 NONAME ; void NmAttachmentListWidget::itemActivated(int)
-	?contentHeight@NmEditorTextEdit@@QBEMXZ @ 7 NONAME ; float NmEditorTextEdit::contentHeight(void) const
-	?mouseMoveEvent@NmBaseViewScrollArea@@UAEXPAVQGraphicsSceneMouseEvent@@@Z @ 8 NONAME ; void NmBaseViewScrollArea::mouseMoveEvent(class QGraphicsSceneMouseEvent *)
-	?textCursor@NmHtmlLineEdit@@QBE?AVQTextCursor@@XZ @ 9 NONAME ; class QTextCursor NmHtmlLineEdit::textCursor(void) const
-	?qt_metacall@NmAttachmentListItem@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 10 NONAME ; int NmAttachmentListItem::qt_metacall(enum QMetaObject::Call, int, void * *)
-	?keyPressEvent@NmRecipientLineEdit@@MAEXPAVQKeyEvent@@@Z @ 11 NONAME ; void NmRecipientLineEdit::keyPressEvent(class QKeyEvent *)
-	?handleLongPressed@NmAttachmentListWidget@@AAEXVQPointF@@@Z @ 12 NONAME ; void NmAttachmentListWidget::handleLongPressed(class QPointF)
-	?staticMetaObject@NmBaseViewScrollArea@@2UQMetaObject@@B @ 13 NONAME ; struct QMetaObject const NmBaseViewScrollArea::staticMetaObject
-	?setHeaderHeight@NmEditorTextEdit@@QAEXH@Z @ 14 NONAME ; void NmEditorTextEdit::setHeaderHeight(int)
-	?paint@NmAttachmentListWidget@@UAEXPAVQPainter@@PBVQStyleOptionGraphicsItem@@PAVQWidget@@@Z @ 15 NONAME ; void NmAttachmentListWidget::paint(class QPainter *, class QStyleOptionGraphicsItem const *, class QWidget *)
-	?tr@NmEditorTextEdit@@SA?AVQString@@PBD0H@Z @ 16 NONAME ; class QString NmEditorTextEdit::tr(char const *, char const *, int)
-	?init@NmAttachmentListWidget@@AAEXXZ @ 17 NONAME ; void NmAttachmentListWidget::init(void)
-	?rearrangeLayout@NmAttachmentListWidget@@AAEXXZ @ 18 NONAME ; void NmAttachmentListWidget::rearrangeLayout(void)
-	?trUtf8@NmRecipientLineEdit@@SA?AVQString@@PBD0@Z @ 19 NONAME ; class QString NmRecipientLineEdit::trUtf8(char const *, char const *)
-	?toHtml@NmHtmlLineEdit@@QBE?AVQString@@XZ @ 20 NONAME ; class QString NmHtmlLineEdit::toHtml(void) const
-	?resetFileNameLength@NmAttachmentListItem@@QAEXW4Orientation@Qt@@@Z @ 21 NONAME ; void NmAttachmentListItem::resetFileNameLength(enum Qt::Orientation)
-	?trUtf8@NmAttachmentListItem@@SA?AVQString@@PBD0@Z @ 22 NONAME ; class QString NmAttachmentListItem::trUtf8(char const *, char const *)
-	?tr@NmAttachmentListItem@@SA?AVQString@@PBD0@Z @ 23 NONAME ; class QString NmAttachmentListItem::tr(char const *, char const *)
-	?metaObject@NmRecipientLineEdit@@UBEPBUQMetaObject@@XZ @ 24 NONAME ; struct QMetaObject const * NmRecipientLineEdit::metaObject(void) const
-	?metaObject@NmBaseViewScrollArea@@UBEPBUQMetaObject@@XZ @ 25 NONAME ; struct QMetaObject const * NmBaseViewScrollArea::metaObject(void) const
-	?init@NmEditorTextEdit@@QAEXPAVNmBaseViewScrollArea@@@Z @ 26 NONAME ; void NmEditorTextEdit::init(class NmBaseViewScrollArea *)
-	?emailAddressList@NmRecipientLineEdit@@QAE?AV?$QList@VNmAddress@@@@XZ @ 27 NONAME ; class QList<class NmAddress> NmRecipientLineEdit::emailAddressList(void)
-	?trUtf8@NmBaseViewScrollArea@@SA?AVQString@@PBD0@Z @ 28 NONAME ; class QString NmBaseViewScrollArea::trUtf8(char const *, char const *)
-	?tr@NmBaseViewScrollArea@@SA?AVQString@@PBD0@Z @ 29 NONAME ; class QString NmBaseViewScrollArea::tr(char const *, char const *)
-	?getStaticMetaObject@NmAttachmentListItem@@SAABUQMetaObject@@XZ @ 30 NONAME ; struct QMetaObject const & NmAttachmentListItem::getStaticMetaObject(void)
-	?getStaticMetaObject@NmBaseViewScrollArea@@SAABUQMetaObject@@XZ @ 31 NONAME ; struct QMetaObject const & NmBaseViewScrollArea::getStaticMetaObject(void)
-	?getStaticMetaObject@NmAttachmentListWidget@@SAABUQMetaObject@@XZ @ 32 NONAME ; struct QMetaObject const & NmAttachmentListWidget::getStaticMetaObject(void)
-	??_ENmAttachmentListItem@@UAE@I@Z @ 33 NONAME ; NmAttachmentListItem::~NmAttachmentListItem(unsigned int)
-	?updateEditorHeight@NmEditorTextEdit@@QAEXXZ @ 34 NONAME ; void NmEditorTextEdit::updateEditorHeight(void)
-	?setFileSizeText@NmAttachmentListItem@@QAEXABVQString@@@Z @ 35 NONAME ; void NmAttachmentListItem::setFileSizeText(class QString const &)
-	?qt_metacast@NmHtmlLineEdit@@UAEPAXPBD@Z @ 36 NONAME ; void * NmHtmlLineEdit::qt_metacast(char const *)
-	?metaObject@NmEditorTextEdit@@UBEPBUQMetaObject@@XZ @ 37 NONAME ; struct QMetaObject const * NmEditorTextEdit::metaObject(void) const
-	?staticMetaObject@NmHtmlLineEdit@@2UQMetaObject@@B @ 38 NONAME ; struct QMetaObject const NmHtmlLineEdit::staticMetaObject
-	?setFileNameText@NmAttachmentListItem@@QAEXABVQString@@@Z @ 39 NONAME ; void NmAttachmentListItem::setFileNameText(class QString const &)
-	?customTextColor@NmEditorTextEdit@@QBE?AU?$QPair@_NVQColor@@@@XZ @ 40 NONAME ; struct QPair<bool, class QColor> NmEditorTextEdit::customTextColor(void) const
-	?qt_metacast@NmBaseViewScrollArea@@UAEPAXPBD@Z @ 41 NONAME ; void * NmBaseViewScrollArea::qt_metacast(char const *)
-	?inputMethodEvent@NmRecipientLineEdit@@MAEXPAVQInputMethodEvent@@@Z @ 42 NONAME ; void NmRecipientLineEdit::inputMethodEvent(class QInputMethodEvent *)
-	?mouseReleaseEvent@NmBaseViewScrollArea@@UAEXPAVQGraphicsSceneMouseEvent@@@Z @ 43 NONAME ; void NmBaseViewScrollArea::mouseReleaseEvent(class QGraphicsSceneMouseEvent *)
-	?tr@NmBaseViewScrollArea@@SA?AVQString@@PBD0H@Z @ 44 NONAME ; class QString NmBaseViewScrollArea::tr(char const *, char const *, int)
-	?qt_metacall@NmAttachmentListWidget@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 45 NONAME ; int NmAttachmentListWidget::qt_metacall(enum QMetaObject::Call, int, void * *)
-	?trUtf8@NmAttachmentListWidget@@SA?AVQString@@PBD0H@Z @ 46 NONAME ; class QString NmAttachmentListWidget::trUtf8(char const *, char const *, int)
-	?constructUi@NmAttachmentListWidget@@AAEXXZ @ 47 NONAME ; void NmAttachmentListWidget::constructUi(void)
-	?qt_metacall@NmRecipientLineEdit@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 48 NONAME ; int NmRecipientLineEdit::qt_metacall(enum QMetaObject::Call, int, void * *)
-	??0NmAttachmentListItem@@QAE@PAVQGraphicsItem@@@Z @ 49 NONAME ; NmAttachmentListItem::NmAttachmentListItem(class QGraphicsItem *)
-	?toPlainText@NmHtmlLineEdit@@QBE?AVQString@@XZ @ 50 NONAME ; class QString NmHtmlLineEdit::toPlainText(void) const
-	?trUtf8@NmBaseViewScrollArea@@SA?AVQString@@PBD0H@Z @ 51 NONAME ; class QString NmBaseViewScrollArea::trUtf8(char const *, char const *, int)
-	?tr@NmEditorTextEdit@@SA?AVQString@@PBD0@Z @ 52 NONAME ; class QString NmEditorTextEdit::tr(char const *, char const *)
-	?setScrollPosition@NmEditorTextEdit@@QAEXHH@Z @ 53 NONAME ; void NmEditorTextEdit::setScrollPosition(int, int)
-	?getStaticMetaObject@NmEditorTextEdit@@SAABUQMetaObject@@XZ @ 54 NONAME ; struct QMetaObject const & NmEditorTextEdit::getStaticMetaObject(void)
-	?staticMetaObject@NmAttachmentListItem@@2UQMetaObject@@B @ 55 NONAME ; struct QMetaObject const NmAttachmentListItem::staticMetaObject
-	??1NmHtmlLineEdit@@UAE@XZ @ 56 NONAME ; NmHtmlLineEdit::~NmHtmlLineEdit(void)
-	?setProgressBarValue@NmAttachmentListItem@@QAEXH@Z @ 57 NONAME ; void NmAttachmentListItem::setProgressBarValue(int)
-	?trUtf8@NmHtmlLineEdit@@SA?AVQString@@PBD0@Z @ 58 NONAME ; class QString NmHtmlLineEdit::trUtf8(char const *, char const *)
-	??_ENmBaseViewScrollArea@@UAE@I@Z @ 59 NONAME ; NmBaseViewScrollArea::~NmBaseViewScrollArea(unsigned int)
-	?progressBarValue@NmAttachmentListItem@@QBEHXZ @ 60 NONAME ; int NmAttachmentListItem::progressBarValue(void) const
-	?itemLongPressed@NmAttachmentListItem@@IAEXVQPointF@@@Z @ 61 NONAME ; void NmAttachmentListItem::itemLongPressed(class QPointF)
-	?gestureEvent@NmAttachmentListItem@@MAEXPAVQGestureEvent@@@Z @ 62 NONAME ; void NmAttachmentListItem::gestureEvent(class QGestureEvent *)
-	?setCustomTextColor@NmEditorTextEdit@@QAEX_NABVQColor@@@Z @ 63 NONAME ; void NmEditorTextEdit::setCustomTextColor(bool, class QColor const &)
-	?init@NmAttachmentListItem@@AAEXXZ @ 64 NONAME ; void NmAttachmentListItem::init(void)
-	??0NmRecipientLineEdit@@QAE@PAVQGraphicsItem@@@Z @ 65 NONAME ; NmRecipientLineEdit::NmRecipientLineEdit(class QGraphicsItem *)
-	??0NmHtmlLineEdit@@QAE@PAVQGraphicsItem@@@Z @ 66 NONAME ; NmHtmlLineEdit::NmHtmlLineEdit(class QGraphicsItem *)
-	?tr@NmRecipientLineEdit@@SA?AVQString@@PBD0@Z @ 67 NONAME ; class QString NmRecipientLineEdit::tr(char const *, char const *)
-	?setAttachmentSize@NmAttachmentListWidget@@QAEXHABVQString@@@Z @ 68 NONAME ; void NmAttachmentListWidget::setAttachmentSize(int, class QString const &)
-	?trUtf8@NmEditorTextEdit@@SA?AVQString@@PBD0H@Z @ 69 NONAME ; class QString NmEditorTextEdit::trUtf8(char const *, char const *, int)
-	?setPlainText@NmHtmlLineEdit@@QAEXABVQString@@@Z @ 70 NONAME ; void NmHtmlLineEdit::setPlainText(class QString const &)
-	?longPressGesture@NmBaseViewScrollArea@@MAEXABVQPointF@@@Z @ 71 NONAME ; void NmBaseViewScrollArea::longPressGesture(class QPointF const &)
-	?updateCustomTextColor@NmEditorTextEdit@@QAEXXZ @ 72 NONAME ; void NmEditorTextEdit::updateCustomTextColor(void)
-	?orientationChanged@NmAttachmentListWidget@@AAEXW4Orientation@Qt@@@Z @ 73 NONAME ; void NmAttachmentListWidget::orientationChanged(enum Qt::Orientation)
-	?insertSelectedContacts@NmRecipientLineEdit@@QAEXABVQVariant@@@Z @ 74 NONAME ; void NmRecipientLineEdit::insertSelectedContacts(class QVariant const &)
-	?qt_metacast@NmAttachmentListWidget@@UAEPAXPBD@Z @ 75 NONAME ; void * NmAttachmentListWidget::qt_metacast(char const *)
-	?getStaticMetaObject@NmHtmlLineEdit@@SAABUQMetaObject@@XZ @ 76 NONAME ; struct QMetaObject const & NmHtmlLineEdit::getStaticMetaObject(void)
-	?qt_metacall@NmEditorTextEdit@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 77 NONAME ; int NmEditorTextEdit::qt_metacall(enum QMetaObject::Call, int, void * *)
-	??1NmEditorTextEdit@@UAE@XZ @ 78 NONAME ; NmEditorTextEdit::~NmEditorTextEdit(void)
-	?generateEmailAddressList@NmRecipientLineEdit@@AAEXXZ @ 79 NONAME ; void NmRecipientLineEdit::generateEmailAddressList(void)
-	?trUtf8@NmAttachmentListWidget@@SA?AVQString@@PBD0@Z @ 80 NONAME ; class QString NmAttachmentListWidget::trUtf8(char const *, char const *)
-	??1NmAttachmentListWidget@@UAE@XZ @ 81 NONAME ; NmAttachmentListWidget::~NmAttachmentListWidget(void)
-	??_ENmRecipientLineEdit@@UAE@I@Z @ 82 NONAME ; NmRecipientLineEdit::~NmRecipientLineEdit(unsigned int)
-	?mousePressEvent@NmBaseViewScrollArea@@UAEXPAVQGraphicsSceneMouseEvent@@@Z @ 83 NONAME ; void NmBaseViewScrollArea::mousePressEvent(class QGraphicsSceneMouseEvent *)
-	?qt_metacast@NmRecipientLineEdit@@UAEPAXPBD@Z @ 84 NONAME ; void * NmRecipientLineEdit::qt_metacast(char const *)
-	?setCustomTextColor@NmEditorTextEdit@@QAEXABU?$QPair@_NVQColor@@@@@Z @ 85 NONAME ; void NmEditorTextEdit::setCustomTextColor(struct QPair<bool, class QColor> const &)
-	?setDocument@NmHtmlLineEdit@@QAEXPAVQTextDocument@@@Z @ 86 NONAME ; void NmHtmlLineEdit::setDocument(class QTextDocument *)
-	?handleItemActivated@NmAttachmentListWidget@@AAEXXZ @ 87 NONAME ; void NmAttachmentListWidget::handleItemActivated(void)
-	?trUtf8@NmEditorTextEdit@@SA?AVQString@@PBD0@Z @ 88 NONAME ; class QString NmEditorTextEdit::trUtf8(char const *, char const *)
-	??0NmBaseViewScrollArea@@QAE@PAVQGraphicsItem@@@Z @ 89 NONAME ; NmBaseViewScrollArea::NmBaseViewScrollArea(class QGraphicsItem *)
-	?metaObject@NmAttachmentListWidget@@UBEPBUQMetaObject@@XZ @ 90 NONAME ; struct QMetaObject const * NmAttachmentListWidget::metaObject(void) const
-	?constructUi@NmAttachmentListItem@@AAEXXZ @ 91 NONAME ; void NmAttachmentListItem::constructUi(void)
-	?longPressed@NmAttachmentListWidget@@IAEXHVQPointF@@@Z @ 92 NONAME ; void NmAttachmentListWidget::longPressed(int, class QPointF)
-	?trUtf8@NmHtmlLineEdit@@SA?AVQString@@PBD0H@Z @ 93 NONAME ; class QString NmHtmlLineEdit::trUtf8(char const *, char const *, int)
-	?staticMetaObject@NmEditorTextEdit@@2UQMetaObject@@B @ 94 NONAME ; struct QMetaObject const NmEditorTextEdit::staticMetaObject
-	??0NmEditorTextEdit@@QAE@PAVQGraphicsItem@@@Z @ 95 NONAME ; NmEditorTextEdit::NmEditorTextEdit(class QGraphicsItem *)
-	?tr@NmHtmlLineEdit@@SA?AVQString@@PBD0H@Z @ 96 NONAME ; class QString NmHtmlLineEdit::tr(char const *, char const *, int)
-	?setHtml@NmHtmlLineEdit@@QAEXABVQString@@@Z @ 97 NONAME ; void NmHtmlLineEdit::setHtml(class QString const &)
-	??_ENmEditorTextEdit@@UAE@I@Z @ 98 NONAME ; NmEditorTextEdit::~NmEditorTextEdit(unsigned int)
-	?tr@NmAttachmentListWidget@@SA?AVQString@@PBD0@Z @ 99 NONAME ; class QString NmAttachmentListWidget::tr(char const *, char const *)
-	?itemActivated@NmAttachmentListItem@@IAEXXZ @ 100 NONAME ; void NmAttachmentListItem::itemActivated(void)
-	?hideProgressBar@NmAttachmentListItem@@QAEXXZ @ 101 NONAME ; void NmAttachmentListItem::hideProgressBar(void)
-	?qt_metacast@NmAttachmentListItem@@UAEPAXPBD@Z @ 102 NONAME ; void * NmAttachmentListItem::qt_metacast(char const *)
-	?getStaticMetaObject@NmRecipientLineEdit@@SAABUQMetaObject@@XZ @ 103 NONAME ; struct QMetaObject const & NmRecipientLineEdit::getStaticMetaObject(void)
-	?findItem@NmAttachmentListWidget@@AAEHPBVQObject@@@Z @ 104 NONAME ; int NmAttachmentListWidget::findItem(class QObject const *)
-	?removeAttachment@NmAttachmentListWidget@@QAEXH@Z @ 105 NONAME ; void NmAttachmentListWidget::removeAttachment(int)
-	??1NmRecipientLineEdit@@UAE@XZ @ 106 NONAME ; NmRecipientLineEdit::~NmRecipientLineEdit(void)
-	?trUtf8@NmRecipientLineEdit@@SA?AVQString@@PBD0H@Z @ 107 NONAME ; class QString NmRecipientLineEdit::trUtf8(char const *, char const *, int)
-	?tr@NmRecipientLineEdit@@SA?AVQString@@PBD0H@Z @ 108 NONAME ; class QString NmRecipientLineEdit::tr(char const *, char const *, int)
-	?progressValue@NmAttachmentListWidget@@QBEHH@Z @ 109 NONAME ; int NmAttachmentListWidget::progressValue(int) const
-	?staticMetaObject@NmAttachmentListWidget@@2UQMetaObject@@B @ 110 NONAME ; struct QMetaObject const NmAttachmentListWidget::staticMetaObject
-	??_ENmAttachmentListWidget@@UAE@I@Z @ 111 NONAME ; NmAttachmentListWidget::~NmAttachmentListWidget(unsigned int)
-	?setTextCursor@NmHtmlLineEdit@@QAEXABVQTextCursor@@@Z @ 112 NONAME ; void NmHtmlLineEdit::setTextCursor(class QTextCursor const &)
-	?setTextColor@NmAttachmentListWidget@@QAEXVQColor@@@Z @ 113 NONAME ; void NmAttachmentListWidget::setTextColor(class QColor)
-	?handleMouseMoveEvent@NmBaseViewScrollArea@@IAEXPAVQGraphicsSceneMouseEvent@@@Z @ 114 NONAME ; void NmBaseViewScrollArea::handleMouseMoveEvent(class QGraphicsSceneMouseEvent *)
-	?staticMetaObject@NmRecipientLineEdit@@2UQMetaObject@@B @ 115 NONAME ; struct QMetaObject const NmRecipientLineEdit::staticMetaObject
-	?setProgressBarValue@NmAttachmentListWidget@@QAEXHH@Z @ 116 NONAME ; void NmAttachmentListWidget::setProgressBarValue(int, int)
-	?handleMouseReleaseEvent@NmBaseViewScrollArea@@IAEXPAVQGraphicsSceneMouseEvent@@@Z @ 117 NONAME ; void NmBaseViewScrollArea::handleMouseReleaseEvent(class QGraphicsSceneMouseEvent *)
-	?insertAttachment@NmAttachmentListWidget@@QAEXHABVQString@@0@Z @ 118 NONAME ; void NmAttachmentListWidget::insertAttachment(int, class QString const &, class QString const &)
-	?metaObject@NmAttachmentListItem@@UBEPBUQMetaObject@@XZ @ 119 NONAME ; struct QMetaObject const * NmAttachmentListItem::metaObject(void) const
-	?removeProgressBar@NmAttachmentListItem@@AAEXXZ @ 120 NONAME ; void NmAttachmentListItem::removeProgressBar(void)
-	??1NmBaseViewScrollArea@@UAE@XZ @ 121 NONAME ; NmBaseViewScrollArea::~NmBaseViewScrollArea(void)
-	?hideProgressBar@NmAttachmentListWidget@@QAEXH@Z @ 122 NONAME ; void NmAttachmentListWidget::hideProgressBar(int)
-	??0NmAttachmentListWidget@@QAE@PAVQGraphicsItem@@@Z @ 123 NONAME ; NmAttachmentListWidget::NmAttachmentListWidget(class QGraphicsItem *)
-	??_ENmHtmlLineEdit@@UAE@I@Z @ 124 NONAME ; NmHtmlLineEdit::~NmHtmlLineEdit(unsigned int)
-	?tr@NmAttachmentListWidget@@SA?AVQString@@PBD0H@Z @ 125 NONAME ; class QString NmAttachmentListWidget::tr(char const *, char const *, int)
-	?handleMousePressEvent@NmBaseViewScrollArea@@IAEXPAVQGraphicsSceneMouseEvent@@@Z @ 126 NONAME ; void NmBaseViewScrollArea::handleMousePressEvent(class QGraphicsSceneMouseEvent *)
-	?insertItemToLayout@NmAttachmentListWidget@@AAEXPAVNmAttachmentListItem@@@Z @ 127 NONAME ; void NmAttachmentListWidget::insertItemToLayout(class NmAttachmentListItem *)
-	?metaObject@NmHtmlLineEdit@@UBEPBUQMetaObject@@XZ @ 128 NONAME ; struct QMetaObject const * NmHtmlLineEdit::metaObject(void) const
-	?editorContentHeightChanged@NmEditorTextEdit@@IAEXXZ @ 129 NONAME ; void NmEditorTextEdit::editorContentHeightChanged(void)
-	?setTextColor@NmAttachmentListItem@@QAEXVQColor@@@Z @ 130 NONAME ; void NmAttachmentListItem::setTextColor(class QColor)
-	??1NmAttachmentListItem@@UAE@XZ @ 131 NONAME ; NmAttachmentListItem::~NmAttachmentListItem(void)
-	?count@NmAttachmentListWidget@@QBEHXZ @ 132 NONAME ; int NmAttachmentListWidget::count(void) const
-	?tr@NmAttachmentListItem@@SA?AVQString@@PBD0H@Z @ 133 NONAME ; class QString NmAttachmentListItem::tr(char const *, char const *, int)
-	?handleTextChanged@NmRecipientLineEdit@@AAEXABVQString@@@Z @ 134 NONAME ; void NmRecipientLineEdit::handleTextChanged(class QString const &)
-	?document@NmHtmlLineEdit@@QBEPAVQTextDocument@@XZ @ 135 NONAME ; class QTextDocument * NmHtmlLineEdit::document(void) const
+	?itemActivated@NmAttachmentListWidget@@IAEXH@Z @ 2 NONAME ; void NmAttachmentListWidget::itemActivated(int)
+	?textCursor@NmHtmlLineEdit@@QBE?AVQTextCursor@@XZ @ 3 NONAME ; class QTextCursor NmHtmlLineEdit::textCursor(void) const
+	?keyPressEvent@NmRecipientLineEdit@@MAEXPAVQKeyEvent@@@Z @ 4 NONAME ; void NmRecipientLineEdit::keyPressEvent(class QKeyEvent *)
+	?paint@NmAttachmentListWidget@@UAEXPAVQPainter@@PBVQStyleOptionGraphicsItem@@PAVQWidget@@@Z @ 5 NONAME ; void NmAttachmentListWidget::paint(class QPainter *, class QStyleOptionGraphicsItem const *, class QWidget *)
+	?tr@NmEditorTextEdit@@SA?AVQString@@PBD0H@Z @ 6 NONAME ; class QString NmEditorTextEdit::tr(char const *, char const *, int)
+	?toHtml@NmHtmlLineEdit@@QBE?AVQString@@XZ @ 7 NONAME ; class QString NmHtmlLineEdit::toHtml(void) const
+	?metaObject@NmBaseViewScrollArea@@UBEPBUQMetaObject@@XZ @ 8 NONAME ; struct QMetaObject const * NmBaseViewScrollArea::metaObject(void) const
+	?init@NmEditorTextEdit@@QAEXPAVNmBaseViewScrollArea@@@Z @ 9 NONAME ; void NmEditorTextEdit::init(class NmBaseViewScrollArea *)
+	?emailAddressList@NmRecipientLineEdit@@QAE?AV?$QList@VNmAddress@@@@XZ @ 10 NONAME ; class QList<class NmAddress> NmRecipientLineEdit::emailAddressList(void)
+	?getStaticMetaObject@NmAttachmentListItem@@SAABUQMetaObject@@XZ @ 11 NONAME ; struct QMetaObject const & NmAttachmentListItem::getStaticMetaObject(void)
+	?getStaticMetaObject@NmBaseViewScrollArea@@SAABUQMetaObject@@XZ @ 12 NONAME ; struct QMetaObject const & NmBaseViewScrollArea::getStaticMetaObject(void)
+	?getStaticMetaObject@NmAttachmentListWidget@@SAABUQMetaObject@@XZ @ 13 NONAME ; struct QMetaObject const & NmAttachmentListWidget::getStaticMetaObject(void)
+	??_ENmAttachmentListItem@@UAE@I@Z @ 14 NONAME ; NmAttachmentListItem::~NmAttachmentListItem(unsigned int)
+	?updateEditorHeight@NmEditorTextEdit@@QAEXXZ @ 15 NONAME ; void NmEditorTextEdit::updateEditorHeight(void)
+	?qt_metacast@NmHtmlLineEdit@@UAEPAXPBD@Z @ 16 NONAME ; void * NmHtmlLineEdit::qt_metacast(char const *)
+	?metaObject@NmEditorTextEdit@@UBEPBUQMetaObject@@XZ @ 17 NONAME ; struct QMetaObject const * NmEditorTextEdit::metaObject(void) const
+	?setFileNameText@NmAttachmentListItem@@QAEXABVQString@@@Z @ 18 NONAME ; void NmAttachmentListItem::setFileNameText(class QString const &)
+	?qt_metacast@NmBaseViewScrollArea@@UAEPAXPBD@Z @ 19 NONAME ; void * NmBaseViewScrollArea::qt_metacast(char const *)
+	?tr@NmBaseViewScrollArea@@SA?AVQString@@PBD0H@Z @ 20 NONAME ; class QString NmBaseViewScrollArea::tr(char const *, char const *, int)
+	?qt_metacall@NmAttachmentListWidget@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 21 NONAME ; int NmAttachmentListWidget::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?trUtf8@NmAttachmentListWidget@@SA?AVQString@@PBD0H@Z @ 22 NONAME ; class QString NmAttachmentListWidget::trUtf8(char const *, char const *, int)
+	?qt_metacall@NmRecipientLineEdit@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 23 NONAME ; int NmRecipientLineEdit::qt_metacall(enum QMetaObject::Call, int, void * *)
+	??0NmAttachmentListItem@@QAE@PAVQGraphicsItem@@@Z @ 24 NONAME ; NmAttachmentListItem::NmAttachmentListItem(class QGraphicsItem *)
+	?trUtf8@NmBaseViewScrollArea@@SA?AVQString@@PBD0H@Z @ 25 NONAME ; class QString NmBaseViewScrollArea::trUtf8(char const *, char const *, int)
+	??1NmHtmlLineEdit@@UAE@XZ @ 26 NONAME ; NmHtmlLineEdit::~NmHtmlLineEdit(void)
+	?setProgressBarValue@NmAttachmentListItem@@QAEXH@Z @ 27 NONAME ; void NmAttachmentListItem::setProgressBarValue(int)
+	?trUtf8@NmHtmlLineEdit@@SA?AVQString@@PBD0@Z @ 28 NONAME ; class QString NmHtmlLineEdit::trUtf8(char const *, char const *)
+	?gestureEvent@NmAttachmentListItem@@MAEXPAVQGestureEvent@@@Z @ 29 NONAME ; void NmAttachmentListItem::gestureEvent(class QGestureEvent *)
+	??0NmRecipientLineEdit@@QAE@PAVQGraphicsItem@@@Z @ 30 NONAME ; NmRecipientLineEdit::NmRecipientLineEdit(class QGraphicsItem *)
+	?setAttachmentSize@NmAttachmentListWidget@@QAEXHABVQString@@@Z @ 31 NONAME ; void NmAttachmentListWidget::setAttachmentSize(int, class QString const &)
+	?trUtf8@NmEditorTextEdit@@SA?AVQString@@PBD0H@Z @ 32 NONAME ; class QString NmEditorTextEdit::trUtf8(char const *, char const *, int)
+	?setPlainText@NmHtmlLineEdit@@QAEXABVQString@@@Z @ 33 NONAME ; void NmHtmlLineEdit::setPlainText(class QString const &)
+	?longPressGesture@NmBaseViewScrollArea@@MAEXABVQPointF@@@Z @ 34 NONAME ; void NmBaseViewScrollArea::longPressGesture(class QPointF const &)
+	?updateCustomTextColor@NmEditorTextEdit@@QAEXXZ @ 35 NONAME ; void NmEditorTextEdit::updateCustomTextColor(void)
+	?orientationChanged@NmAttachmentListWidget@@AAEXW4Orientation@Qt@@@Z @ 36 NONAME ; void NmAttachmentListWidget::orientationChanged(enum Qt::Orientation)
+	?insertSelectedContacts@NmRecipientLineEdit@@QAEXABVQVariant@@@Z @ 37 NONAME ; void NmRecipientLineEdit::insertSelectedContacts(class QVariant const &)
+	?qt_metacast@NmAttachmentListWidget@@UAEPAXPBD@Z @ 38 NONAME ; void * NmAttachmentListWidget::qt_metacast(char const *)
+	?getStaticMetaObject@NmHtmlLineEdit@@SAABUQMetaObject@@XZ @ 39 NONAME ; struct QMetaObject const & NmHtmlLineEdit::getStaticMetaObject(void)
+	?qt_metacall@NmEditorTextEdit@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 40 NONAME ; int NmEditorTextEdit::qt_metacall(enum QMetaObject::Call, int, void * *)
+	??1NmAttachmentListWidget@@UAE@XZ @ 41 NONAME ; NmAttachmentListWidget::~NmAttachmentListWidget(void)
+	??_ENmRecipientLineEdit@@UAE@I@Z @ 42 NONAME ; NmRecipientLineEdit::~NmRecipientLineEdit(unsigned int)
+	?qt_metacast@NmRecipientLineEdit@@UAEPAXPBD@Z @ 43 NONAME ; void * NmRecipientLineEdit::qt_metacast(char const *)
+	?setCustomTextColor@NmEditorTextEdit@@QAEXABU?$QPair@_NVQColor@@@@@Z @ 44 NONAME ; void NmEditorTextEdit::setCustomTextColor(struct QPair<bool, class QColor> const &)
+	?setDocument@NmHtmlLineEdit@@QAEXPAVQTextDocument@@@Z @ 45 NONAME ; void NmHtmlLineEdit::setDocument(class QTextDocument *)
+	?trUtf8@NmEditorTextEdit@@SA?AVQString@@PBD0@Z @ 46 NONAME ; class QString NmEditorTextEdit::trUtf8(char const *, char const *)
+	??0NmBaseViewScrollArea@@QAE@PAVQGraphicsItem@@@Z @ 47 NONAME ; NmBaseViewScrollArea::NmBaseViewScrollArea(class QGraphicsItem *)
+	?longPressed@NmAttachmentListWidget@@IAEXHVQPointF@@@Z @ 48 NONAME ; void NmAttachmentListWidget::longPressed(int, class QPointF)
+	?staticMetaObject@NmEditorTextEdit@@2UQMetaObject@@B @ 49 NONAME ; struct QMetaObject const NmEditorTextEdit::staticMetaObject
+	??0NmEditorTextEdit@@QAE@PAVQGraphicsItem@@@Z @ 50 NONAME ; NmEditorTextEdit::NmEditorTextEdit(class QGraphicsItem *)
+	??_ENmEditorTextEdit@@UAE@I@Z @ 51 NONAME ; NmEditorTextEdit::~NmEditorTextEdit(unsigned int)
+	?hideProgressBar@NmAttachmentListItem@@QAEXXZ @ 52 NONAME ; void NmAttachmentListItem::hideProgressBar(void)
+	?qt_metacast@NmAttachmentListItem@@UAEPAXPBD@Z @ 53 NONAME ; void * NmAttachmentListItem::qt_metacast(char const *)
+	?handleMouseReleaseEvent@NmBaseViewScrollArea@@IAEXPAVQGraphicsSceneMouseEvent@@@Z @ 54 NONAME ; void NmBaseViewScrollArea::handleMouseReleaseEvent(class QGraphicsSceneMouseEvent *)
+	?removeProgressBar@NmAttachmentListItem@@AAEXXZ @ 55 NONAME ; void NmAttachmentListItem::removeProgressBar(void)
+	??1NmBaseViewScrollArea@@UAE@XZ @ 56 NONAME ; NmBaseViewScrollArea::~NmBaseViewScrollArea(void)
+	??_ENmHtmlLineEdit@@UAE@I@Z @ 57 NONAME ; NmHtmlLineEdit::~NmHtmlLineEdit(unsigned int)
+	?tr@NmAttachmentListWidget@@SA?AVQString@@PBD0H@Z @ 58 NONAME ; class QString NmAttachmentListWidget::tr(char const *, char const *, int)
+	?handleMousePressEvent@NmBaseViewScrollArea@@IAEXPAVQGraphicsSceneMouseEvent@@@Z @ 59 NONAME ; void NmBaseViewScrollArea::handleMousePressEvent(class QGraphicsSceneMouseEvent *)
+	?insertItemToLayout@NmAttachmentListWidget@@AAEXPAVNmAttachmentListItem@@@Z @ 60 NONAME ; void NmAttachmentListWidget::insertItemToLayout(class NmAttachmentListItem *)
+	?metaObject@NmHtmlLineEdit@@UBEPBUQMetaObject@@XZ @ 61 NONAME ; struct QMetaObject const * NmHtmlLineEdit::metaObject(void) const
+	?editorContentHeightChanged@NmEditorTextEdit@@IAEXXZ @ 62 NONAME ; void NmEditorTextEdit::editorContentHeightChanged(void)
+	?setTextColor@NmAttachmentListItem@@QAEXVQColor@@@Z @ 63 NONAME ; void NmAttachmentListItem::setTextColor(class QColor)
+	??1NmAttachmentListItem@@UAE@XZ @ 64 NONAME ; NmAttachmentListItem::~NmAttachmentListItem(void)
+	?count@NmAttachmentListWidget@@QBEHXZ @ 65 NONAME ; int NmAttachmentListWidget::count(void) const
+	?handleTextChanged@NmRecipientLineEdit@@AAEXABVQString@@@Z @ 66 NONAME ; void NmRecipientLineEdit::handleTextChanged(class QString const &)
+	?handleLongPressGesture@NmBaseViewScrollArea@@IAEXABVQPointF@@@Z @ 67 NONAME ; void NmBaseViewScrollArea::handleLongPressGesture(class QPointF const &)
+	?updateScrollPosition@NmEditorTextEdit@@QAEXABVQPointF@@@Z @ 68 NONAME ; void NmEditorTextEdit::updateScrollPosition(class QPointF const &)
+	?contentHeight@NmEditorTextEdit@@QBEMXZ @ 69 NONAME ; float NmEditorTextEdit::contentHeight(void) const
+	?qt_metacast@NmEditorTextEdit@@UAEPAXPBD@Z @ 70 NONAME ; void * NmEditorTextEdit::qt_metacast(char const *)
+	?mouseMoveEvent@NmBaseViewScrollArea@@UAEXPAVQGraphicsSceneMouseEvent@@@Z @ 71 NONAME ; void NmBaseViewScrollArea::mouseMoveEvent(class QGraphicsSceneMouseEvent *)
+	?qt_metacall@NmAttachmentListItem@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 72 NONAME ; int NmAttachmentListItem::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?handleLongPressed@NmAttachmentListWidget@@AAEXVQPointF@@@Z @ 73 NONAME ; void NmAttachmentListWidget::handleLongPressed(class QPointF)
+	?staticMetaObject@NmBaseViewScrollArea@@2UQMetaObject@@B @ 74 NONAME ; struct QMetaObject const NmBaseViewScrollArea::staticMetaObject
+	?setHeaderHeight@NmEditorTextEdit@@QAEXH@Z @ 75 NONAME ; void NmEditorTextEdit::setHeaderHeight(int)
+	?init@NmAttachmentListWidget@@AAEXXZ @ 76 NONAME ; void NmAttachmentListWidget::init(void)
+	?rearrangeLayout@NmAttachmentListWidget@@AAEXXZ @ 77 NONAME ; void NmAttachmentListWidget::rearrangeLayout(void)
+	?trUtf8@NmRecipientLineEdit@@SA?AVQString@@PBD0@Z @ 78 NONAME ; class QString NmRecipientLineEdit::trUtf8(char const *, char const *)
+	?metaObject@NmRecipientLineEdit@@UBEPBUQMetaObject@@XZ @ 79 NONAME ; struct QMetaObject const * NmRecipientLineEdit::metaObject(void) const
+	?tr@NmAttachmentListItem@@SA?AVQString@@PBD0@Z @ 80 NONAME ; class QString NmAttachmentListItem::tr(char const *, char const *)
+	?trUtf8@NmAttachmentListItem@@SA?AVQString@@PBD0@Z @ 81 NONAME ; class QString NmAttachmentListItem::trUtf8(char const *, char const *)
+	?tr@NmBaseViewScrollArea@@SA?AVQString@@PBD0@Z @ 82 NONAME ; class QString NmBaseViewScrollArea::tr(char const *, char const *)
+	?trUtf8@NmBaseViewScrollArea@@SA?AVQString@@PBD0@Z @ 83 NONAME ; class QString NmBaseViewScrollArea::trUtf8(char const *, char const *)
+	?setFileSizeText@NmAttachmentListItem@@QAEXABVQString@@@Z @ 84 NONAME ; void NmAttachmentListItem::setFileSizeText(class QString const &)
+	?customTextColor@NmEditorTextEdit@@QBE?AU?$QPair@_NVQColor@@@@XZ @ 85 NONAME ; struct QPair<bool, class QColor> NmEditorTextEdit::customTextColor(void) const
+	?staticMetaObject@NmHtmlLineEdit@@2UQMetaObject@@B @ 86 NONAME ; struct QMetaObject const NmHtmlLineEdit::staticMetaObject
+	?inputMethodEvent@NmRecipientLineEdit@@MAEXPAVQInputMethodEvent@@@Z @ 87 NONAME ; void NmRecipientLineEdit::inputMethodEvent(class QInputMethodEvent *)
+	?mouseReleaseEvent@NmBaseViewScrollArea@@UAEXPAVQGraphicsSceneMouseEvent@@@Z @ 88 NONAME ; void NmBaseViewScrollArea::mouseReleaseEvent(class QGraphicsSceneMouseEvent *)
+	?constructUi@NmAttachmentListWidget@@AAEXXZ @ 89 NONAME ; void NmAttachmentListWidget::constructUi(void)
+	?toPlainText@NmHtmlLineEdit@@QBE?AVQString@@XZ @ 90 NONAME ; class QString NmHtmlLineEdit::toPlainText(void) const
+	?getStaticMetaObject@NmEditorTextEdit@@SAABUQMetaObject@@XZ @ 91 NONAME ; struct QMetaObject const & NmEditorTextEdit::getStaticMetaObject(void)
+	?setScrollPosition@NmEditorTextEdit@@QAEXHH@Z @ 92 NONAME ; void NmEditorTextEdit::setScrollPosition(int, int)
+	?tr@NmEditorTextEdit@@SA?AVQString@@PBD0@Z @ 93 NONAME ; class QString NmEditorTextEdit::tr(char const *, char const *)
+	?staticMetaObject@NmAttachmentListItem@@2UQMetaObject@@B @ 94 NONAME ; struct QMetaObject const NmAttachmentListItem::staticMetaObject
+	??_ENmBaseViewScrollArea@@UAE@I@Z @ 95 NONAME ; NmBaseViewScrollArea::~NmBaseViewScrollArea(unsigned int)
+	?itemLongPressed@NmAttachmentListItem@@IAEXVQPointF@@@Z @ 96 NONAME ; void NmAttachmentListItem::itemLongPressed(class QPointF)
+	?progressBarValue@NmAttachmentListItem@@QBEHXZ @ 97 NONAME ; int NmAttachmentListItem::progressBarValue(void) const
+	?setCustomTextColor@NmEditorTextEdit@@QAEX_NABVQColor@@@Z @ 98 NONAME ; void NmEditorTextEdit::setCustomTextColor(bool, class QColor const &)
+	??0NmHtmlLineEdit@@QAE@PAVQGraphicsItem@@@Z @ 99 NONAME ; NmHtmlLineEdit::NmHtmlLineEdit(class QGraphicsItem *)
+	?init@NmAttachmentListItem@@AAEXXZ @ 100 NONAME ; void NmAttachmentListItem::init(void)
+	?tr@NmRecipientLineEdit@@SA?AVQString@@PBD0@Z @ 101 NONAME ; class QString NmRecipientLineEdit::tr(char const *, char const *)
+	??1NmEditorTextEdit@@UAE@XZ @ 102 NONAME ; NmEditorTextEdit::~NmEditorTextEdit(void)
+	?generateEmailAddressList@NmRecipientLineEdit@@AAEXXZ @ 103 NONAME ; void NmRecipientLineEdit::generateEmailAddressList(void)
+	?trUtf8@NmAttachmentListWidget@@SA?AVQString@@PBD0@Z @ 104 NONAME ; class QString NmAttachmentListWidget::trUtf8(char const *, char const *)
+	?mousePressEvent@NmBaseViewScrollArea@@UAEXPAVQGraphicsSceneMouseEvent@@@Z @ 105 NONAME ; void NmBaseViewScrollArea::mousePressEvent(class QGraphicsSceneMouseEvent *)
+	?handleItemActivated@NmAttachmentListWidget@@AAEXXZ @ 106 NONAME ; void NmAttachmentListWidget::handleItemActivated(void)
+	?metaObject@NmAttachmentListWidget@@UBEPBUQMetaObject@@XZ @ 107 NONAME ; struct QMetaObject const * NmAttachmentListWidget::metaObject(void) const
+	?constructUi@NmAttachmentListItem@@AAEXXZ @ 108 NONAME ; void NmAttachmentListItem::constructUi(void)
+	?trUtf8@NmHtmlLineEdit@@SA?AVQString@@PBD0H@Z @ 109 NONAME ; class QString NmHtmlLineEdit::trUtf8(char const *, char const *, int)
+	?setHtml@NmHtmlLineEdit@@QAEXABVQString@@@Z @ 110 NONAME ; void NmHtmlLineEdit::setHtml(class QString const &)
+	?tr@NmHtmlLineEdit@@SA?AVQString@@PBD0H@Z @ 111 NONAME ; class QString NmHtmlLineEdit::tr(char const *, char const *, int)
+	?itemActivated@NmAttachmentListItem@@IAEXXZ @ 112 NONAME ; void NmAttachmentListItem::itemActivated(void)
+	?tr@NmAttachmentListWidget@@SA?AVQString@@PBD0@Z @ 113 NONAME ; class QString NmAttachmentListWidget::tr(char const *, char const *)
+	?getStaticMetaObject@NmRecipientLineEdit@@SAABUQMetaObject@@XZ @ 114 NONAME ; struct QMetaObject const & NmRecipientLineEdit::getStaticMetaObject(void)
+	?findItem@NmAttachmentListWidget@@AAEHPBVQObject@@@Z @ 115 NONAME ; int NmAttachmentListWidget::findItem(class QObject const *)
+	??1NmRecipientLineEdit@@UAE@XZ @ 116 NONAME ; NmRecipientLineEdit::~NmRecipientLineEdit(void)
+	?removeAttachment@NmAttachmentListWidget@@QAEXH@Z @ 117 NONAME ; void NmAttachmentListWidget::removeAttachment(int)
+	?tr@NmRecipientLineEdit@@SA?AVQString@@PBD0H@Z @ 118 NONAME ; class QString NmRecipientLineEdit::tr(char const *, char const *, int)
+	?trUtf8@NmRecipientLineEdit@@SA?AVQString@@PBD0H@Z @ 119 NONAME ; class QString NmRecipientLineEdit::trUtf8(char const *, char const *, int)
+	?progressValue@NmAttachmentListWidget@@QBEHH@Z @ 120 NONAME ; int NmAttachmentListWidget::progressValue(int) const
+	?staticMetaObject@NmAttachmentListWidget@@2UQMetaObject@@B @ 121 NONAME ; struct QMetaObject const NmAttachmentListWidget::staticMetaObject
+	??_ENmAttachmentListWidget@@UAE@I@Z @ 122 NONAME ; NmAttachmentListWidget::~NmAttachmentListWidget(unsigned int)
+	?setTextColor@NmAttachmentListWidget@@QAEXVQColor@@@Z @ 123 NONAME ; void NmAttachmentListWidget::setTextColor(class QColor)
+	?setTextCursor@NmHtmlLineEdit@@QAEXABVQTextCursor@@@Z @ 124 NONAME ; void NmHtmlLineEdit::setTextCursor(class QTextCursor const &)
+	?handleMouseMoveEvent@NmBaseViewScrollArea@@IAEXPAVQGraphicsSceneMouseEvent@@@Z @ 125 NONAME ; void NmBaseViewScrollArea::handleMouseMoveEvent(class QGraphicsSceneMouseEvent *)
+	?staticMetaObject@NmRecipientLineEdit@@2UQMetaObject@@B @ 126 NONAME ; struct QMetaObject const NmRecipientLineEdit::staticMetaObject
+	?setProgressBarValue@NmAttachmentListWidget@@QAEXHH@Z @ 127 NONAME ; void NmAttachmentListWidget::setProgressBarValue(int, int)
+	?metaObject@NmAttachmentListItem@@UBEPBUQMetaObject@@XZ @ 128 NONAME ; struct QMetaObject const * NmAttachmentListItem::metaObject(void) const
+	?insertAttachment@NmAttachmentListWidget@@QAEXHABVQString@@0@Z @ 129 NONAME ; void NmAttachmentListWidget::insertAttachment(int, class QString const &, class QString const &)
+	?hideProgressBar@NmAttachmentListWidget@@QAEXH@Z @ 130 NONAME ; void NmAttachmentListWidget::hideProgressBar(int)
+	??0NmAttachmentListWidget@@QAE@PAVQGraphicsItem@@@Z @ 131 NONAME ; NmAttachmentListWidget::NmAttachmentListWidget(class QGraphicsItem *)
+	?tr@NmAttachmentListItem@@SA?AVQString@@PBD0H@Z @ 132 NONAME ; class QString NmAttachmentListItem::tr(char const *, char const *, int)
+	?document@NmHtmlLineEdit@@QBEPAVQTextDocument@@XZ @ 133 NONAME ; class QTextDocument * NmHtmlLineEdit::document(void) const
+	?qt_metacall@NmBaseViewScrollArea@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 134 NONAME ; int NmBaseViewScrollArea::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?qt_metacall@NmHtmlLineEdit@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 135 NONAME ; int NmHtmlLineEdit::qt_metacall(enum QMetaObject::Call, int, void * *)
 	?tr@NmHtmlLineEdit@@SA?AVQString@@PBD0@Z @ 136 NONAME ; class QString NmHtmlLineEdit::tr(char const *, char const *)
-	?qt_metacall@NmHtmlLineEdit@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 137 NONAME ; int NmHtmlLineEdit::qt_metacall(enum QMetaObject::Call, int, void * *)
-	?qt_metacall@NmBaseViewScrollArea@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 138 NONAME ; int NmBaseViewScrollArea::qt_metacall(enum QMetaObject::Call, int, void * *)
 
--- a/emailuis/nmailuiwidgets/eabi/nmailuiwidgetsu.def	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailuiwidgets/eabi/nmailuiwidgetsu.def	Wed Jun 23 18:00:21 2010 +0300
@@ -45,126 +45,124 @@
 	_ZN19NmRecipientLineEditD0Ev @ 44 NONAME
 	_ZN19NmRecipientLineEditD1Ev @ 45 NONAME
 	_ZN19NmRecipientLineEditD2Ev @ 46 NONAME
-	_ZN20NmAttachmentListItem10screenSizeEN2Qt11OrientationE @ 47 NONAME
-	_ZN20NmAttachmentListItem11constructUiEv @ 48 NONAME
-	_ZN20NmAttachmentListItem11qt_metacallEN11QMetaObject4CallEiPPv @ 49 NONAME
-	_ZN20NmAttachmentListItem11qt_metacastEPKc @ 50 NONAME
-	_ZN20NmAttachmentListItem12gestureEventEP13QGestureEvent @ 51 NONAME
-	_ZN20NmAttachmentListItem12setTextColorE6QColor @ 52 NONAME
-	_ZN20NmAttachmentListItem13itemActivatedEv @ 53 NONAME
-	_ZN20NmAttachmentListItem15hideProgressBarEv @ 54 NONAME
-	_ZN20NmAttachmentListItem15itemLongPressedE7QPointF @ 55 NONAME
-	_ZN20NmAttachmentListItem15setFileNameTextERK7QString @ 56 NONAME
-	_ZN20NmAttachmentListItem15setFileSizeTextERK7QString @ 57 NONAME
-	_ZN20NmAttachmentListItem16staticMetaObjectE @ 58 NONAME DATA 16
-	_ZN20NmAttachmentListItem17removeProgressBarEv @ 59 NONAME
-	_ZN20NmAttachmentListItem19getStaticMetaObjectEv @ 60 NONAME
-	_ZN20NmAttachmentListItem19resetFileNameLengthEN2Qt11OrientationE @ 61 NONAME
-	_ZN20NmAttachmentListItem19setProgressBarValueEi @ 62 NONAME
-	_ZN20NmAttachmentListItem4initEv @ 63 NONAME
-	_ZN20NmAttachmentListItemC1EP13QGraphicsItem @ 64 NONAME
-	_ZN20NmAttachmentListItemC2EP13QGraphicsItem @ 65 NONAME
-	_ZN20NmAttachmentListItemD0Ev @ 66 NONAME
-	_ZN20NmAttachmentListItemD1Ev @ 67 NONAME
-	_ZN20NmAttachmentListItemD2Ev @ 68 NONAME
-	_ZN20NmBaseViewScrollArea11qt_metacallEN11QMetaObject4CallEiPPv @ 69 NONAME
-	_ZN20NmBaseViewScrollArea11qt_metacastEPKc @ 70 NONAME
-	_ZN20NmBaseViewScrollArea14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 71 NONAME
-	_ZN20NmBaseViewScrollArea15mousePressEventEP24QGraphicsSceneMouseEvent @ 72 NONAME
-	_ZN20NmBaseViewScrollArea16longPressGestureERK7QPointF @ 73 NONAME
-	_ZN20NmBaseViewScrollArea16staticMetaObjectE @ 74 NONAME DATA 16
-	_ZN20NmBaseViewScrollArea17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 75 NONAME
-	_ZN20NmBaseViewScrollArea19getStaticMetaObjectEv @ 76 NONAME
-	_ZN20NmBaseViewScrollArea20handleMouseMoveEventEP24QGraphicsSceneMouseEvent @ 77 NONAME
-	_ZN20NmBaseViewScrollArea21handleMousePressEventEP24QGraphicsSceneMouseEvent @ 78 NONAME
-	_ZN20NmBaseViewScrollArea22handleLongPressGestureERK7QPointF @ 79 NONAME
-	_ZN20NmBaseViewScrollArea23handleMouseReleaseEventEP24QGraphicsSceneMouseEvent @ 80 NONAME
-	_ZN20NmBaseViewScrollAreaC1EP13QGraphicsItem @ 81 NONAME
-	_ZN20NmBaseViewScrollAreaC2EP13QGraphicsItem @ 82 NONAME
-	_ZN20NmBaseViewScrollAreaD0Ev @ 83 NONAME
-	_ZN20NmBaseViewScrollAreaD1Ev @ 84 NONAME
-	_ZN20NmBaseViewScrollAreaD2Ev @ 85 NONAME
-	_ZN22NmAttachmentListWidget11constructUiEv @ 86 NONAME
-	_ZN22NmAttachmentListWidget11longPressedEi7QPointF @ 87 NONAME
-	_ZN22NmAttachmentListWidget11qt_metacallEN11QMetaObject4CallEiPPv @ 88 NONAME
-	_ZN22NmAttachmentListWidget11qt_metacastEPKc @ 89 NONAME
-	_ZN22NmAttachmentListWidget12setTextColorE6QColor @ 90 NONAME
-	_ZN22NmAttachmentListWidget13itemActivatedEi @ 91 NONAME
-	_ZN22NmAttachmentListWidget15hideProgressBarEi @ 92 NONAME
-	_ZN22NmAttachmentListWidget15rearrangeLayoutEv @ 93 NONAME
-	_ZN22NmAttachmentListWidget16insertAttachmentEiRK7QStringS2_ @ 94 NONAME
-	_ZN22NmAttachmentListWidget16removeAttachmentEi @ 95 NONAME
-	_ZN22NmAttachmentListWidget16staticMetaObjectE @ 96 NONAME DATA 16
-	_ZN22NmAttachmentListWidget17handleLongPressedE7QPointF @ 97 NONAME
-	_ZN22NmAttachmentListWidget17setAttachmentSizeEiRK7QString @ 98 NONAME
-	_ZN22NmAttachmentListWidget18insertItemToLayoutEP20NmAttachmentListItem @ 99 NONAME
-	_ZN22NmAttachmentListWidget18orientationChangedEN2Qt11OrientationE @ 100 NONAME
-	_ZN22NmAttachmentListWidget19getStaticMetaObjectEv @ 101 NONAME
-	_ZN22NmAttachmentListWidget19handleItemActivatedEv @ 102 NONAME
-	_ZN22NmAttachmentListWidget19setProgressBarValueEii @ 103 NONAME
-	_ZN22NmAttachmentListWidget4initEv @ 104 NONAME
-	_ZN22NmAttachmentListWidget5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 105 NONAME
-	_ZN22NmAttachmentListWidget8findItemEPK7QObject @ 106 NONAME
-	_ZN22NmAttachmentListWidgetC1EP13QGraphicsItem @ 107 NONAME
-	_ZN22NmAttachmentListWidgetC2EP13QGraphicsItem @ 108 NONAME
-	_ZN22NmAttachmentListWidgetD0Ev @ 109 NONAME
-	_ZN22NmAttachmentListWidgetD1Ev @ 110 NONAME
-	_ZN22NmAttachmentListWidgetD2Ev @ 111 NONAME
-	_ZNK14NmHtmlLineEdit10metaObjectEv @ 112 NONAME
-	_ZNK14NmHtmlLineEdit10textCursorEv @ 113 NONAME
-	_ZNK14NmHtmlLineEdit11toPlainTextEv @ 114 NONAME
-	_ZNK14NmHtmlLineEdit6toHtmlEv @ 115 NONAME
-	_ZNK14NmHtmlLineEdit8documentEv @ 116 NONAME
-	_ZNK16NmEditorTextEdit10metaObjectEv @ 117 NONAME
-	_ZNK16NmEditorTextEdit13contentHeightEv @ 118 NONAME
-	_ZNK16NmEditorTextEdit15customTextColorEv @ 119 NONAME
-	_ZNK19NmRecipientLineEdit10metaObjectEv @ 120 NONAME
-	_ZNK20NmAttachmentListItem10metaObjectEv @ 121 NONAME
-	_ZNK20NmAttachmentListItem16progressBarValueEv @ 122 NONAME
-	_ZNK20NmBaseViewScrollArea10metaObjectEv @ 123 NONAME
-	_ZNK22NmAttachmentListWidget10metaObjectEv @ 124 NONAME
-	_ZNK22NmAttachmentListWidget13progressValueEi @ 125 NONAME
-	_ZNK22NmAttachmentListWidget5countEv @ 126 NONAME
-	_ZTI14NmHtmlLineEdit @ 127 NONAME
-	_ZTI16NmEditorTextEdit @ 128 NONAME
-	_ZTI19NmRecipientLineEdit @ 129 NONAME
-	_ZTI20NmAttachmentListItem @ 130 NONAME
-	_ZTI20NmBaseViewScrollArea @ 131 NONAME
-	_ZTI22NmAttachmentListWidget @ 132 NONAME
-	_ZTV14NmHtmlLineEdit @ 133 NONAME
-	_ZTV16NmEditorTextEdit @ 134 NONAME
-	_ZTV19NmRecipientLineEdit @ 135 NONAME
-	_ZTV20NmAttachmentListItem @ 136 NONAME
-	_ZTV20NmBaseViewScrollArea @ 137 NONAME
-	_ZTV22NmAttachmentListWidget @ 138 NONAME
-	_ZThn16_N14NmHtmlLineEditD0Ev @ 139 NONAME
-	_ZThn16_N14NmHtmlLineEditD1Ev @ 140 NONAME
-	_ZThn16_N16NmEditorTextEditD0Ev @ 141 NONAME
-	_ZThn16_N16NmEditorTextEditD1Ev @ 142 NONAME
-	_ZThn16_N19NmRecipientLineEditD0Ev @ 143 NONAME
-	_ZThn16_N19NmRecipientLineEditD1Ev @ 144 NONAME
-	_ZThn16_N20NmAttachmentListItemD0Ev @ 145 NONAME
-	_ZThn16_N20NmAttachmentListItemD1Ev @ 146 NONAME
-	_ZThn16_N20NmBaseViewScrollAreaD0Ev @ 147 NONAME
-	_ZThn16_N20NmBaseViewScrollAreaD1Ev @ 148 NONAME
-	_ZThn16_N22NmAttachmentListWidgetD0Ev @ 149 NONAME
-	_ZThn16_N22NmAttachmentListWidgetD1Ev @ 150 NONAME
-	_ZThn8_N14NmHtmlLineEditD0Ev @ 151 NONAME
-	_ZThn8_N14NmHtmlLineEditD1Ev @ 152 NONAME
-	_ZThn8_N16NmEditorTextEditD0Ev @ 153 NONAME
-	_ZThn8_N16NmEditorTextEditD1Ev @ 154 NONAME
-	_ZThn8_N19NmRecipientLineEdit13keyPressEventEP9QKeyEvent @ 155 NONAME
-	_ZThn8_N19NmRecipientLineEdit16inputMethodEventEP17QInputMethodEvent @ 156 NONAME
-	_ZThn8_N19NmRecipientLineEditD0Ev @ 157 NONAME
-	_ZThn8_N19NmRecipientLineEditD1Ev @ 158 NONAME
-	_ZThn8_N20NmAttachmentListItemD0Ev @ 159 NONAME
-	_ZThn8_N20NmAttachmentListItemD1Ev @ 160 NONAME
-	_ZThn8_N20NmBaseViewScrollArea14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 161 NONAME
-	_ZThn8_N20NmBaseViewScrollArea15mousePressEventEP24QGraphicsSceneMouseEvent @ 162 NONAME
-	_ZThn8_N20NmBaseViewScrollArea17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 163 NONAME
-	_ZThn8_N20NmBaseViewScrollAreaD0Ev @ 164 NONAME
-	_ZThn8_N20NmBaseViewScrollAreaD1Ev @ 165 NONAME
-	_ZThn8_N22NmAttachmentListWidget5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 166 NONAME
-	_ZThn8_N22NmAttachmentListWidgetD0Ev @ 167 NONAME
-	_ZThn8_N22NmAttachmentListWidgetD1Ev @ 168 NONAME
+	_ZN20NmAttachmentListItem11constructUiEv @ 47 NONAME
+	_ZN20NmAttachmentListItem11qt_metacallEN11QMetaObject4CallEiPPv @ 48 NONAME
+	_ZN20NmAttachmentListItem11qt_metacastEPKc @ 49 NONAME
+	_ZN20NmAttachmentListItem12gestureEventEP13QGestureEvent @ 50 NONAME
+	_ZN20NmAttachmentListItem12setTextColorE6QColor @ 51 NONAME
+	_ZN20NmAttachmentListItem13itemActivatedEv @ 52 NONAME
+	_ZN20NmAttachmentListItem15hideProgressBarEv @ 53 NONAME
+	_ZN20NmAttachmentListItem15itemLongPressedE7QPointF @ 54 NONAME
+	_ZN20NmAttachmentListItem15setFileNameTextERK7QString @ 55 NONAME
+	_ZN20NmAttachmentListItem15setFileSizeTextERK7QString @ 56 NONAME
+	_ZN20NmAttachmentListItem16staticMetaObjectE @ 57 NONAME DATA 16
+	_ZN20NmAttachmentListItem17removeProgressBarEv @ 58 NONAME
+	_ZN20NmAttachmentListItem19getStaticMetaObjectEv @ 59 NONAME
+	_ZN20NmAttachmentListItem19setProgressBarValueEi @ 60 NONAME
+	_ZN20NmAttachmentListItem4initEv @ 61 NONAME
+	_ZN20NmAttachmentListItemC1EP13QGraphicsItem @ 62 NONAME
+	_ZN20NmAttachmentListItemC2EP13QGraphicsItem @ 63 NONAME
+	_ZN20NmAttachmentListItemD0Ev @ 64 NONAME
+	_ZN20NmAttachmentListItemD1Ev @ 65 NONAME
+	_ZN20NmAttachmentListItemD2Ev @ 66 NONAME
+	_ZN20NmBaseViewScrollArea11qt_metacallEN11QMetaObject4CallEiPPv @ 67 NONAME
+	_ZN20NmBaseViewScrollArea11qt_metacastEPKc @ 68 NONAME
+	_ZN20NmBaseViewScrollArea14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 69 NONAME
+	_ZN20NmBaseViewScrollArea15mousePressEventEP24QGraphicsSceneMouseEvent @ 70 NONAME
+	_ZN20NmBaseViewScrollArea16longPressGestureERK7QPointF @ 71 NONAME
+	_ZN20NmBaseViewScrollArea16staticMetaObjectE @ 72 NONAME DATA 16
+	_ZN20NmBaseViewScrollArea17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 73 NONAME
+	_ZN20NmBaseViewScrollArea19getStaticMetaObjectEv @ 74 NONAME
+	_ZN20NmBaseViewScrollArea20handleMouseMoveEventEP24QGraphicsSceneMouseEvent @ 75 NONAME
+	_ZN20NmBaseViewScrollArea21handleMousePressEventEP24QGraphicsSceneMouseEvent @ 76 NONAME
+	_ZN20NmBaseViewScrollArea22handleLongPressGestureERK7QPointF @ 77 NONAME
+	_ZN20NmBaseViewScrollArea23handleMouseReleaseEventEP24QGraphicsSceneMouseEvent @ 78 NONAME
+	_ZN20NmBaseViewScrollAreaC1EP13QGraphicsItem @ 79 NONAME
+	_ZN20NmBaseViewScrollAreaC2EP13QGraphicsItem @ 80 NONAME
+	_ZN20NmBaseViewScrollAreaD0Ev @ 81 NONAME
+	_ZN20NmBaseViewScrollAreaD1Ev @ 82 NONAME
+	_ZN20NmBaseViewScrollAreaD2Ev @ 83 NONAME
+	_ZN22NmAttachmentListWidget11constructUiEv @ 84 NONAME
+	_ZN22NmAttachmentListWidget11longPressedEi7QPointF @ 85 NONAME
+	_ZN22NmAttachmentListWidget11qt_metacallEN11QMetaObject4CallEiPPv @ 86 NONAME
+	_ZN22NmAttachmentListWidget11qt_metacastEPKc @ 87 NONAME
+	_ZN22NmAttachmentListWidget12setTextColorE6QColor @ 88 NONAME
+	_ZN22NmAttachmentListWidget13itemActivatedEi @ 89 NONAME
+	_ZN22NmAttachmentListWidget15hideProgressBarEi @ 90 NONAME
+	_ZN22NmAttachmentListWidget15rearrangeLayoutEv @ 91 NONAME
+	_ZN22NmAttachmentListWidget16insertAttachmentEiRK7QStringS2_ @ 92 NONAME
+	_ZN22NmAttachmentListWidget16removeAttachmentEi @ 93 NONAME
+	_ZN22NmAttachmentListWidget16staticMetaObjectE @ 94 NONAME DATA 16
+	_ZN22NmAttachmentListWidget17handleLongPressedE7QPointF @ 95 NONAME
+	_ZN22NmAttachmentListWidget17setAttachmentSizeEiRK7QString @ 96 NONAME
+	_ZN22NmAttachmentListWidget18insertItemToLayoutEP20NmAttachmentListItem @ 97 NONAME
+	_ZN22NmAttachmentListWidget18orientationChangedEN2Qt11OrientationE @ 98 NONAME
+	_ZN22NmAttachmentListWidget19getStaticMetaObjectEv @ 99 NONAME
+	_ZN22NmAttachmentListWidget19handleItemActivatedEv @ 100 NONAME
+	_ZN22NmAttachmentListWidget19setProgressBarValueEii @ 101 NONAME
+	_ZN22NmAttachmentListWidget4initEv @ 102 NONAME
+	_ZN22NmAttachmentListWidget5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 103 NONAME
+	_ZN22NmAttachmentListWidget8findItemEPK7QObject @ 104 NONAME
+	_ZN22NmAttachmentListWidgetC1EP13QGraphicsItem @ 105 NONAME
+	_ZN22NmAttachmentListWidgetC2EP13QGraphicsItem @ 106 NONAME
+	_ZN22NmAttachmentListWidgetD0Ev @ 107 NONAME
+	_ZN22NmAttachmentListWidgetD1Ev @ 108 NONAME
+	_ZN22NmAttachmentListWidgetD2Ev @ 109 NONAME
+	_ZNK14NmHtmlLineEdit10metaObjectEv @ 110 NONAME
+	_ZNK14NmHtmlLineEdit10textCursorEv @ 111 NONAME
+	_ZNK14NmHtmlLineEdit11toPlainTextEv @ 112 NONAME
+	_ZNK14NmHtmlLineEdit6toHtmlEv @ 113 NONAME
+	_ZNK14NmHtmlLineEdit8documentEv @ 114 NONAME
+	_ZNK16NmEditorTextEdit10metaObjectEv @ 115 NONAME
+	_ZNK16NmEditorTextEdit13contentHeightEv @ 116 NONAME
+	_ZNK16NmEditorTextEdit15customTextColorEv @ 117 NONAME
+	_ZNK19NmRecipientLineEdit10metaObjectEv @ 118 NONAME
+	_ZNK20NmAttachmentListItem10metaObjectEv @ 119 NONAME
+	_ZNK20NmAttachmentListItem16progressBarValueEv @ 120 NONAME
+	_ZNK20NmBaseViewScrollArea10metaObjectEv @ 121 NONAME
+	_ZNK22NmAttachmentListWidget10metaObjectEv @ 122 NONAME
+	_ZNK22NmAttachmentListWidget13progressValueEi @ 123 NONAME
+	_ZNK22NmAttachmentListWidget5countEv @ 124 NONAME
+	_ZTI14NmHtmlLineEdit @ 125 NONAME
+	_ZTI16NmEditorTextEdit @ 126 NONAME
+	_ZTI19NmRecipientLineEdit @ 127 NONAME
+	_ZTI20NmAttachmentListItem @ 128 NONAME
+	_ZTI20NmBaseViewScrollArea @ 129 NONAME
+	_ZTI22NmAttachmentListWidget @ 130 NONAME
+	_ZTV14NmHtmlLineEdit @ 131 NONAME
+	_ZTV16NmEditorTextEdit @ 132 NONAME
+	_ZTV19NmRecipientLineEdit @ 133 NONAME
+	_ZTV20NmAttachmentListItem @ 134 NONAME
+	_ZTV20NmBaseViewScrollArea @ 135 NONAME
+	_ZTV22NmAttachmentListWidget @ 136 NONAME
+	_ZThn16_N14NmHtmlLineEditD0Ev @ 137 NONAME
+	_ZThn16_N14NmHtmlLineEditD1Ev @ 138 NONAME
+	_ZThn16_N16NmEditorTextEditD0Ev @ 139 NONAME
+	_ZThn16_N16NmEditorTextEditD1Ev @ 140 NONAME
+	_ZThn16_N19NmRecipientLineEditD0Ev @ 141 NONAME
+	_ZThn16_N19NmRecipientLineEditD1Ev @ 142 NONAME
+	_ZThn16_N20NmAttachmentListItemD0Ev @ 143 NONAME
+	_ZThn16_N20NmAttachmentListItemD1Ev @ 144 NONAME
+	_ZThn16_N20NmBaseViewScrollAreaD0Ev @ 145 NONAME
+	_ZThn16_N20NmBaseViewScrollAreaD1Ev @ 146 NONAME
+	_ZThn16_N22NmAttachmentListWidgetD0Ev @ 147 NONAME
+	_ZThn16_N22NmAttachmentListWidgetD1Ev @ 148 NONAME
+	_ZThn8_N14NmHtmlLineEditD0Ev @ 149 NONAME
+	_ZThn8_N14NmHtmlLineEditD1Ev @ 150 NONAME
+	_ZThn8_N16NmEditorTextEditD0Ev @ 151 NONAME
+	_ZThn8_N16NmEditorTextEditD1Ev @ 152 NONAME
+	_ZThn8_N19NmRecipientLineEdit13keyPressEventEP9QKeyEvent @ 153 NONAME
+	_ZThn8_N19NmRecipientLineEdit16inputMethodEventEP17QInputMethodEvent @ 154 NONAME
+	_ZThn8_N19NmRecipientLineEditD0Ev @ 155 NONAME
+	_ZThn8_N19NmRecipientLineEditD1Ev @ 156 NONAME
+	_ZThn8_N20NmAttachmentListItemD0Ev @ 157 NONAME
+	_ZThn8_N20NmAttachmentListItemD1Ev @ 158 NONAME
+	_ZThn8_N20NmBaseViewScrollArea14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 159 NONAME
+	_ZThn8_N20NmBaseViewScrollArea15mousePressEventEP24QGraphicsSceneMouseEvent @ 160 NONAME
+	_ZThn8_N20NmBaseViewScrollArea17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 161 NONAME
+	_ZThn8_N20NmBaseViewScrollAreaD0Ev @ 162 NONAME
+	_ZThn8_N20NmBaseViewScrollAreaD1Ev @ 163 NONAME
+	_ZThn8_N22NmAttachmentListWidget5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 164 NONAME
+	_ZThn8_N22NmAttachmentListWidgetD0Ev @ 165 NONAME
+	_ZThn8_N22NmAttachmentListWidgetD1Ev @ 166 NONAME
 
--- a/emailuis/nmailuiwidgets/inc/nmattachmentlistitem.h	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailuiwidgets/inc/nmattachmentlistitem.h	Wed Jun 23 18:00:21 2010 +0300
@@ -36,7 +36,6 @@
     void setTextColor(const QColor color);
     void setFileNameText(const QString &fileName);
     void setFileSizeText(const QString &fileSize);
-    void resetFileNameLength(Qt::Orientation orientation);
     void setProgressBarValue(const int value);
     int progressBarValue() const;
     void hideProgressBar();
@@ -54,7 +53,6 @@
 private: 
     void init( );
     void constructUi();
-    QSize screenSize(Qt::Orientation orientation);
     
 private:
     Q_DISABLE_COPY(NmAttachmentListItem)
--- a/emailuis/nmailuiwidgets/src/nmattachmentlistitem.cpp	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailuiwidgets/src/nmattachmentlistitem.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -24,9 +24,6 @@
 static const int PROGRESSBAR_MAX = 100;
 static const int PROGRESSBAR_HIDE_COUNTDOWN = 500;
 
-// Hardcoded file size length. Maximum (999.9 Mb) fits into size field.
-static const int FILE_SIZE_FIELD_LENGTH = 120;
-
 /*!
  @nmailuiwidgets
  \class NmAttachmentListItem
@@ -112,23 +109,6 @@
 }
 
 /*!
-    Set the length of the filename field.
- */
-void NmAttachmentListItem::resetFileNameLength(Qt::Orientation orientation)
-{
-    NM_FUNCTION;
-    
-	QSizeF reso = screenSize(orientation);
-	
-	if (orientation == Qt::Horizontal) {
-        mFileNameText->setPreferredWidth(reso.width() / 2 - FILE_SIZE_FIELD_LENGTH);
-	}
-	else {		
-        mFileNameText->setPreferredWidth(reso.width() - FILE_SIZE_FIELD_LENGTH);
-	}
-}
-
-/*!
     Set the download progress bar value (0-100)%, if value is 0 progress bar is hidden
  */
 void NmAttachmentListItem::setProgressBarValue(const int value)
@@ -235,40 +215,6 @@
 
 
 /*!
-    This function returns screen size depending on the orientation.
-    Function is copied from NmApplication.
- */
-QSize NmAttachmentListItem::screenSize(Qt::Orientation orientation)
-{
-    NM_FUNCTION;
-    
-    QSize ret(0,0);
-    HbDeviceProfile currentP = HbDeviceProfile::current();
-    HbDeviceProfile altP(currentP.alternateProfileName());
-    QSize curPSize = currentP.logicalSize();
-    QSize altPSize = altP.logicalSize();
-    if (orientation == Qt::Horizontal) {
-        // Get wide profile size in landscape
-        if (curPSize.width() > altPSize.width()) {
-            ret = curPSize;
-        }
-        else{
-            ret = altPSize;
-        }
-    }
-    else {
-        // Get narrow profile size in portrait
-        if (curPSize.width() < altPSize.width()) {
-            ret = curPSize;
-        }
-        else{
-            ret = altPSize;
-        }
-    }
-    return ret;
-}
-
-/*!
     This function handles gestures
  */
 void NmAttachmentListItem::gestureEvent(QGestureEvent *event)
--- a/emailuis/nmailuiwidgets/src/nmattachmentlistwidget.cpp	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmailuiwidgets/src/nmattachmentlistwidget.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -350,7 +350,6 @@
     } else {
         NM_ERROR(1,"NmAttachmentListWidget::constructUi: DocML loading failed.");
     }
-
 }
 
 /*!
@@ -446,11 +445,9 @@
     if(Qt::Vertical == mOrientation){
         mLayout->addItem(item,layout_count,0);
     } else {
-        item->setPreferredWidth(preferredWidth() / 2);
+        // Qt FW sets the correct width automatically based on the width of the child widgets
         mLayout->addItem(item,layout_count / 2, layout_count % 2);
     }
-    // Update maximum length of the file name field.
-    item->resetFileNameLength(mOrientation);
 }
 
 /*!
--- a/emailuis/nmhswidget/nmhswidget.pro	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmhswidget/nmhswidget.pro	Wed Jun 23 18:00:21 2010 +0300
@@ -68,6 +68,8 @@
 
 INCLUDEPATH += ./inc \
     ../../inc \
-    ../inc
+    ../inc \
+    $$APP_LAYER_SYSTEMINCLUDE
+    
 DEPENDPATH += .
 TRANSLATIONS = mailwidget.ts
--- a/emailuis/nmhswidget/src/nmhswidgetemailengine.cpp	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmhswidget/src/nmhswidgetemailengine.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -15,11 +15,11 @@
  *
  */
 
-#include <xqservicerequest.h>
 #include <QTimer>
 #include <QDir>
 #include <qpluginloader.h>
-#include "email_services_api.h"
+#include <xqapplicationmanager.h>
+#include <xqaiwdeclplat.h>
 #include "nmcommon.h"
 #include "nmmessageenvelope.h"
 #include "nmhswidgetemailengine.h"
@@ -36,7 +36,7 @@
 NmHsWidgetEmailEngine::NmHsWidgetEmailEngine(const NmId& monitoredMailboxId) :
     mMailboxId(monitoredMailboxId), 
     mFolderId(0), 
-    mAccountName(),
+    mAccountName(), 
     mUnreadCount(-1),
     mEmailInterface(0), 
     mFactory(0), 
@@ -249,7 +249,7 @@
     }
     if (folder) {
         //If messageCount in the folder is zero we must indicate unread count to be -1
-        if (folder->messageCount() == 0) {
+        if (mEnvelopeList.count() == 0) {
             mUnreadCount = -1;
         }
         else {
@@ -407,17 +407,19 @@
 void NmHsWidgetEmailEngine::launchMailAppInboxView()
 {
     NM_FUNCTION;
-
-    XQServiceRequest request(
-        emailFullServiceNameMailbox,
-        emailOperationViewInbox,
-        false);
+    
+    XQApplicationManager appManager;
+    XQAiwRequest* request = appManager.create(
+            XQI_EMAIL_INBOX_VIEW, XQOP_EMAIL_INBOX_VIEW,
+            false);
     
-    QList<QVariant> list;
-    list.append(QVariant(mMailboxId.id()));
-
-    request.setArguments(list);
-    request.send();
+    if (request) {
+        QList<QVariant> list;
+        list.append(QVariant(mMailboxId.id()));
+    
+        request->setArguments(list);
+        request->send();
+    }
 }
 
 /*!
@@ -429,16 +431,18 @@
 {
     NM_FUNCTION;
 
-    XQServiceRequest request(
-       emailFullServiceNameMessage,
-       emailOperationViewMessage,
-       false);
+    XQApplicationManager appManager;
+    XQAiwRequest* request = appManager.create(
+            XQI_EMAIL_MESSAGE_VIEW, XQOP_EMAIL_MESSAGE_VIEW,
+            false);
     
-    QList<QVariant> list;
-    list.append(QVariant(mMailboxId.id()));
-    list.append(QVariant(mFolderId.id()));
-    list.append(QVariant(messageId.id()));
-
-    request.setArguments(list);
-    request.send();
+    if (request) {
+        QList<QVariant> list;
+        list.append(QVariant(mMailboxId.id()));
+        list.append(QVariant(mFolderId.id()));
+        list.append(QVariant(messageId.id()));
+    
+        request->setArguments(list);
+        request->send();
+    }
 }
--- a/emailuis/nmindicatorplugin/src/nmsyncindicator.cpp	Fri Jun 11 13:27:14 2010 +0300
+++ b/emailuis/nmindicatorplugin/src/nmsyncindicator.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -17,7 +17,7 @@
 
 #include "nmsyncindicator.h"
 
-const char NmSyncIndicator::IndicatorType[] = "com.nokia.hb.nmsyncindicator/1.0";
+const char NmSyncIndicator::IndicatorType[] = "com.nokia.nmail.indicatorplugin.sync/1.0";
 
 NmSyncIndicator::NmSyncIndicator() :
 HbIndicatorInterface(NmSyncIndicator::IndicatorType, ProgressCategory, NoInteraction)
@@ -30,13 +30,11 @@
 
 QVariant NmSyncIndicator::indicatorData(int role) const
 {
-    if (role == MonoDecorationNameRole )
-    {
+    if (role == MonoDecorationNameRole ) {
         // Must return non-empty to make the indicator visible
         return " ";
     }
-    else
-    {
+    else {
         return QVariant();
     }
 }
--- a/ipsservices/ipssosplugin/inc/ipsplgimap4plugin.h	Fri Jun 11 13:27:14 2010 +0300
+++ b/ipsservices/ipssosplugin/inc/ipsplgimap4plugin.h	Wed Jun 23 18:00:21 2010 +0300
@@ -44,7 +44,8 @@
     void RefreshNowL(
         const TFSMailMsgId& aMailBoxId,
         MFSMailRequestObserver& aOperationObserver,
-        TInt aRequestId );
+        TInt aRequestId,
+        const TBool aSilentConnection=EFalse );
 
     void ListFoldersL(
         const TFSMailMsgId& aMailBoxId,
--- a/ipsservices/ipssosplugin/inc/ipsplgpop3plugin.h	Fri Jun 11 13:27:14 2010 +0300
+++ b/ipsservices/ipssosplugin/inc/ipsplgpop3plugin.h	Wed Jun 23 18:00:21 2010 +0300
@@ -52,7 +52,8 @@
     void RefreshNowL(
         const TFSMailMsgId& aMailBoxId,
         MFSMailRequestObserver& aOperationObserver,
-        TInt aRequestId );
+        TInt aRequestId,
+        const TBool aSilentConnection=EFalse );
 
     void ListFoldersL(
         const TFSMailMsgId& aMailBoxId,
--- a/ipsservices/ipssosplugin/inc/ipsplgsosbaseplugin.h	Fri Jun 11 13:27:14 2010 +0300
+++ b/ipsservices/ipssosplugin/inc/ipsplgsosbaseplugin.h	Wed Jun 23 18:00:21 2010 +0300
@@ -19,17 +19,16 @@
 #ifndef IPSPLGSOSBASEPLUGIN_H
 #define IPSPLGSOSBASEPLUGIN_H
 
-//<cmail>
 #include "CFSMailPlugin.h"
 #include "MFSMailRequestObserver.h"
-//</cmail>
 #include <rconnmon.h>
-
 #include "ipsplgsosbaseplugin.hrh"
 #include "ipsplgcommon.h"
 #include "ipsplgsingleopwatcher.h"
 #include "ipsplgtimeroperation.h"
-
+//<Qmail>
+#include "ipsstateextension.h"
+//</Qmail>
 class CMsvSession;
 class CIpsPlgTimerOperation;
 class CIpsPlgMsgMapper;
@@ -51,11 +50,21 @@
  */
 NONSHARABLE_CLASS ( CIpsPlgSosBasePlugin ) :
     public CFSMailPlugin,
-                             public MIpsPlgSingleOpWatcher,
-                             public MFSMailRequestObserver, // a dummy observer
-                             public MIpsPlgTimerOperationCallBack
+    public MIpsPlgSingleOpWatcher,
+    public MFSMailRequestObserver, // a dummy observer
+    public MIpsPlgTimerOperationCallBack,
+    public MStateObserverCallback
     {
+//<Qmail>
+public: //from MStateObserverCallback
+    void ActiveFolderChanged(
+        const TFSMailMsgId& aActiveMailboxId,
+        const TFSMailMsgId& aActiveFolderId);
+    
+public://from CExtendableEmail
 
+    CEmailExtension* ExtensionL( const TUid& aInterfaceUid );
+//</Qmail>    
 public:
 
     /**
@@ -63,7 +72,7 @@
     * Destructor
     */
     IMPORT_C virtual ~CIpsPlgSosBasePlugin();
-
+    
 public: //from MIpsPlgSingleOpWatcher
 
     /**
@@ -657,6 +666,14 @@
         const TFSMailMsgId& aSourceFolderId,
         const TFSMailMsgId& aDestinationFolderId );
 
+    //<Qmail>
+    /**
+     * function to handle active folder changed events
+     */
+    virtual void HandleActiveFolderChangeL(
+            const TFSMailMsgId& aActiveMailboxId,
+            const TFSMailMsgId& aActiveFolderId);
+    //</Qmail>
 private:
 
     /**
@@ -818,6 +835,10 @@
 
     // flag indicates is instance under FSEmail.exe
     TBool iIsUnderUiProcess;
+    
+    //<Qmail>
+    CIpsStateExtension*    iStateExtension;//owned
+    //</Qmail>
 	};
 
 #endif /* IPSPLGSOSBASEPLUGIN_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipsservices/ipssosplugin/inc/ipssosextendedsettingsmanager.h	Wed Jun 23 18:00:21 2010 +0300
@@ -0,0 +1,104 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef NMIPSSOSEXTENDEDSETTINGSMANAGER_H
+#define NMIPSSOSEXTENDEDSETTINGSMANAGER_H
+
+#include <qvariant.h>
+#include "nmipssettingitems.h"
+
+class NmId;
+class XQSettingsManager;
+class XQCentralRepositoryUtils;
+
+/**
+ * class to handle settings stored in central repository
+ */
+NONSHARABLE_CLASS (NmIpsSosExtendedSettingsManager)
+{
+public:
+    /**
+     * constructor
+     * @param mailbox who's settings we are handling
+     */
+    NmIpsSosExtendedSettingsManager(const NmId &mailboxId);
+    
+    /**
+     * destructor
+     */
+    virtual ~NmIpsSosExtendedSettingsManager();
+    
+    /**
+     * reads a setting from cen rep
+     * @param settingItem id of the setting
+     * @param settingValue a return parameter
+     * @return was read a success
+     */
+    bool readSetting(
+            IpsServices::SettingItem settingItem, 
+            QVariant &settingValue) const;
+    
+    /**
+     * writes a setting into cen rep
+     * @param settingItem id of the setting
+     * @param settingValue value of the setting to be stored
+     * @return was write a success
+     */
+    bool writeSetting(
+            IpsServices::SettingItem settingItem, 
+            const QVariant &settingValue);
+    
+	bool writeSetting(
+		int profileMode, 
+		IpsServices::SettingItem settingItem, 
+		const QVariant &settingValue);
+	
+    /**
+     * deletes settings
+     */
+    void deleteSettings();
+    
+    /**
+     * creates a new key-value pair
+     * @param settingItem id of the setting
+     * @param settingValue value of the setting to be stored
+     * @return was creation a success
+     */
+    bool createKeyValuePair(
+            const IpsServices::SettingItem settingItem, 
+            const QVariant &settingValue);
+
+private:
+    bool writeSettingToCenRep(
+	qint32 profileOffset, 
+	IpsServices::SettingItem settingItem, 
+	const QVariant &settingValue);
+	
+    QVariant readFromCenRep(quint32 key) const;
+    bool writeToCenRep(quint32 key, const QVariant &value) const;
+    void calculateMailboxOffset();
+    void calculateActiveProfileOffset();
+    qint32 convertToProfileOffset(int profile);
+
+private: // data
+    const NmId &mMailboxId;
+    qint32 mMailboxOffset;
+    qint32 mActiveProfileOffset;
+    XQSettingsManager* mSettingsManager; // Owned.
+};
+
+#endif // NMIPSSOSEXTENDEDSETTINGSMANAGER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipsservices/ipssosplugin/inc/ipsstateextension.h	Wed Jun 23 18:00:21 2010 +0300
@@ -0,0 +1,66 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* 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: This file defines class CIpsPlgSosBasePlugin.
+*
+*/
+#ifndef IPSSTATEEXTENSION_H
+#define IPSSTATEEXTENSION_H
+
+#include <cmailboxstateext.h>
+#include "ipsplgcommon.h"
+
+class MEmailMailboxState;
+
+class MStateObserverCallback
+    {
+public:
+    virtual void ActiveFolderChanged(
+            const TFSMailMsgId& aActiveMailboxId,
+            const TFSMailMsgId& aActiveFolderId)=0;
+    };
+
+NONSHARABLE_CLASS ( CIpsStateExtension ) :
+    public CMailboxStateExtension
+    {
+public: //from CMailboxStateExtension
+
+    static CIpsStateExtension* NewL(MStateObserverCallback& aCallback);
+
+    /**
+     * Sets data provider interface.
+     * @param aDataProvider data provider.
+     */
+    void SetStateDataProvider( MEmailMailboxState* aDataProvider );
+    
+    /**
+    * Notification that folder has changed in email application.
+    * @param aActiveMailboxId id of the mailbox container the folder
+    * @param aActiveFolderId currently active folder id or null id if
+    *        there's currently no active folder (e.g. application is closed)
+    */
+    void NotifyActiveFolderChanged(
+        const TFSMailMsgId& aActiveMailboxId,
+        const TFSMailMsgId& aActiveFolderId);
+    
+    virtual ~CIpsStateExtension();
+private:
+    CIpsStateExtension(MStateObserverCallback& aCallback);
+    void ConstructL();
+    
+private:
+    MEmailMailboxState*         iDataProvider;//not owned    
+    MStateObserverCallback&     iCallback;
+    };
+
+#endif //IPSSTATEEXTENSION_H
--- a/ipsservices/ipssosplugin/ipssosplugin.pro	Fri Jun 11 13:27:14 2010 +0300
+++ b/ipsservices/ipssosplugin/ipssosplugin.pro	Wed Jun 23 18:00:21 2010 +0300
@@ -73,7 +73,9 @@
 inc/ipsplgsosbaseplugin.hrh \
 inc/ipsplgmailstoreroperation.h \
 inc/mipsplgmailstorerobserver.h \
-inc/ipsplgmessagepartstoreroperation.h
+inc/ipsplgmessagepartstoreroperation.h \
+inc/ipsstateextension.h \
+inc/ipssosextendedsettingsmanager.h
 
     
 SOURCES   += src/ipsplgbaseoperation.cpp \
@@ -118,7 +120,9 @@
 inc/ipsplgsearch.inl \
 inc/ipsplgmsgmapper.inl \
 src/ipsplgmailstoreroperation.cpp \
-src/ipsplgmessagepartstoreroperation.cpp
+src/ipsplgmessagepartstoreroperation.cpp \
+src/ipsstateextension.cpp \
+src/ipssosextendedsettingsmanager.cpp
 
 RESOURCES +=
 
@@ -170,7 +174,8 @@
     -lConnMon \
     -lflogger \
     -lfeatmgr \
-    -lmessagestoreclient
+    -lmessagestoreclient \
+    -lxqsettingsmanager
 
     BLD_INF_RULES.prj_exports += \
       "inc/ipsplgsmtpoperation.h |../inc/ipsplgsmtpoperation.h" \
--- a/ipsservices/ipssosplugin/src/ipsplgeventhandler.cpp	Fri Jun 11 13:27:14 2010 +0300
+++ b/ipsservices/ipssosplugin/src/ipsplgeventhandler.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -1033,13 +1033,9 @@
         {
         return;
         }
-    else if ( tChanged.iMtm.iUid == KSenduiMtmSmtpUidValue )
-        {
-        // do not send entry changed events from draft messages
-        // mess up draft email
-        return;
-        }
-
+//<Qmail>
+    
+//</Qmail>
     TFSMailEvent event = static_cast<TFSMailEvent>( KErrNotFound );
 
     RArray<TFSMailMsgId> array(1);
--- a/ipsservices/ipssosplugin/src/ipsplgimap4plugin.cpp	Fri Jun 11 13:27:14 2010 +0300
+++ b/ipsservices/ipssosplugin/src/ipsplgimap4plugin.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -141,7 +141,8 @@
 void CIpsPlgImap4Plugin::RefreshNowL(
     const TFSMailMsgId& aMailBoxId,
     MFSMailRequestObserver& aOperationObserver,
-    TInt aRequestId )
+    TInt aRequestId,
+    const TBool /*aSilentConnection*/ )
     {
     FUNC_LOG;
     
@@ -165,10 +166,8 @@
     iOperations.AppendL( watcher );
     CleanupStack::Pop( watcher );
     
-	//<qmail>
     // send part of refresh
-    //EmptyOutboxL( aMailBoxId ); // not used in qmail yet
-	//</qmail>
+    EmptyOutboxL( aMailBoxId );
     }
 
 // ---------------------------------------------------------------------------
--- a/ipsservices/ipssosplugin/src/ipsplgmsgmapper.cpp	Fri Jun 11 13:27:14 2010 +0300
+++ b/ipsservices/ipssosplugin/src/ipsplgmsgmapper.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -714,8 +714,7 @@
 							{
 							// Only text/calendar part included as attachment
 							aMsg.ResetFlag( EFSMsgFlag_Attachments );
-							//Set Attachment flag for CMsvEntry (needed for sorting)
-							TRAP_IGNORE( SetAttachmentFlagL( aEntry, EFalse ) );
+							// <qmail> remove call to SetAttachmentFlagL(), because shouln't be needed any more
 							}
                 		}
                 	delete cEntry;
--- a/ipsservices/ipssosplugin/src/ipsplgpop3plugin.cpp	Fri Jun 11 13:27:14 2010 +0300
+++ b/ipsservices/ipssosplugin/src/ipsplgpop3plugin.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -138,7 +138,8 @@
 void CIpsPlgPop3Plugin::RefreshNowL(
     const TFSMailMsgId& aMailBoxId,
     MFSMailRequestObserver& aOperationObserver,
-    TInt aRequestId )
+    TInt aRequestId,
+    const TBool /*aSilentConnection*/ )
     {
     FUNC_LOG;
     TMsvId service = aMailBoxId.Id();
@@ -188,10 +189,8 @@
     iOperations.AppendL( watcher );
     CleanupStack::Pop( watcher );   // >> watcher
     	
-//<qmail>
     // send part of refresh
-    //EmptyOutboxL( aMailBoxId ); // not used in qmail yet
-//</qmail>
+    EmptyOutboxL( aMailBoxId );
     }
 
 // ---------------------------------------------------------------------------
@@ -273,14 +272,13 @@
  	
  	if( aFolderType==EFSInbox )
         {
-        //in case of pop3, mailbox id == service id == inbox id
-        CMsvEntry* cEntry = iSession->GetEntryL( aMailBoxId.Id() );
-        CleanupStack::PushL( cEntry );
-        if ( cEntry->Count() != 0 )
-            {
-            result.SetId( aMailBoxId.Id() );
-            }
-        CleanupStack::PopAndDestroy( cEntry );
+        //<qmail> removed CMsvEntry conversion 
+ 	
+        // In case of pop3, mailbox id == service id == inbox id,
+        // so no need to create CMsvEntry from mailbox id to
+        // dig if any children exists.
+        result.SetId( aMailBoxId.Id() );
+        //</qmail>
         }
     else if( aFolderType==EFSOutbox )
         {
--- a/ipsservices/ipssosplugin/src/ipsplgsosbaseplugin.cpp	Fri Jun 11 13:27:14 2010 +0300
+++ b/ipsservices/ipssosplugin/src/ipsplgsosbaseplugin.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -25,11 +25,13 @@
 #include "ipsplgmailstoreroperation.h"
 #include "ipsplgmessagepartstoreroperation.h"
 #include "BasePlugin.h" 
+//<Qmail>
+#include "ipssosextendedsettingsmanager.h"
+#include "ipssettingkeys.h"
+//</Qmail>
 //</qmail>
 
-// <cmail> S60 UID update
 #define FREESTYLE_EMAIL_UI_SID 0x200255BA
-// </cmail> S60 UID update
 
 const TInt KOpGranularity = 2;
 
@@ -39,6 +41,29 @@
 _LIT( KEmulatorIMEI, "123456789012345" );
 #endif // __WINS__
 
+//<Qmail>
+// ----------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+void CIpsPlgSosBasePlugin::ActiveFolderChanged(
+        const TFSMailMsgId& aActiveMailboxId,
+        const TFSMailMsgId& aActiveFolderId)
+    {
+    TRAP_IGNORE( HandleActiveFolderChangeL(aActiveMailboxId,aActiveFolderId) );
+    }
+
+
+// ----------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+CEmailExtension* CIpsPlgSosBasePlugin::ExtensionL( const TUid& aInterfaceUid )
+    {
+    if(aInterfaceUid != KEmailMailboxStateExtensionUid)
+        {
+        User::Leave(KErrNotSupported);
+        }
+    
+    return iStateExtension;
+    }
+//</Qmail>
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // <qmail> iSettingsApi removed
@@ -77,6 +102,7 @@
         {
         iEventHandler->UnRegisterPropertyObserver( iSyncStateHandler );
         }
+    delete iStateExtension;
     delete iEventHandler;
     delete iCachedEntry;
     delete iCachedEmailMessage;
@@ -92,6 +118,7 @@
 void CIpsPlgSosBasePlugin::BaseConstructL()
     {
     FUNC_LOG;
+    iStateExtension = CIpsStateExtension::NewL(*this);
     iEventHandler = CIpsPlgEventHandler::NewL( *this );
     iSession = CMsvSession::OpenAsyncL( *iEventHandler );
     iMsgMapper = CIpsPlgMsgMapper::NewL( *iSession, *this );
@@ -2456,4 +2483,50 @@
         }
     return ret;
     }
+//</Qmail>
+//<Qmail>
+// ---------------------------------------------------------------------------
+// CIpsPlgImap4Plugin::HandleActiveFolderChangeL
+// ---------------------------------------------------------------------------
+//
+void CIpsPlgSosBasePlugin::HandleActiveFolderChangeL(
+        const TFSMailMsgId& aActiveMailboxId,
+        const TFSMailMsgId& aActiveFolderId)
+    {
+    TMsvId service;
+    TMsvEntry folder;
+    iSession->GetEntry( aActiveFolderId.Id(), service, folder );
+    
+    
+    //currently, no actions unless this is inbox
+    //also, if id is '0', it means inbox before first sync...it doesn't really exist yet
+    if( folder.iDetails.CompareF( KIpsPlgInbox ) == 0 || folder.Id() == 0 )
+        {
+        //folder is inbox
+        if ( iSyncStateHandler->GetMailboxIpsState( aActiveMailboxId.Id() )
+                    == KIpsSosEmailSyncStarted )
+            {
+            //we won't do anything if sync is already started
+            return;
+            }
+        
+        //check are we in polling mode
+        NmIpsSosExtendedSettingsManager* eMgr= 
+                new NmIpsSosExtendedSettingsManager(aActiveMailboxId.Id());
+        
+        QVariant value;
+        bool ok = eMgr->readSetting(IpsServices::ReceptionActiveProfile, value);
+        delete eMgr;
+        
+        if ( ok )
+            {
+            TInt profile = value.toInt();
+            if ( profile != IpsServices::EmailSyncProfileManualFetch )
+                {
+                // let's sync
+                GoOnlineL(aActiveMailboxId);
+                }
+            }        
+        }        
+    }
 // </qmail>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipsservices/ipssosplugin/src/ipssosextendedsettingsmanager.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -0,0 +1,411 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <xqsettingsmanager.h>
+#include <xqcentralrepositoryutils.h>
+#include <xqcentralrepositorysearchcriteria.h>
+#include <qlist.h>
+
+#include "ipssosextendedsettingsmanager.h"
+#include "nmipssettingitems.h"
+#include "ipssettingkeys.h"
+#include "nmcommon.h"
+
+/*!
+    \class NmIpsSosExtendedSettingsManager
+    \brief The class is used for manipulating extended POP3 and IMAP4 account settings stored
+    in the Central Repository.
+*/
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+    Constructor    
+    Creates the NmIpsSosExtendedSettingsManagerfor loading and saving extended mailbox settings.
+    \param mailboxId Mailbox identifier.
+*/
+NmIpsSosExtendedSettingsManager::NmIpsSosExtendedSettingsManager(const NmId &mailboxId)
+    : mMailboxId(mailboxId), mMailboxOffset(-1), mActiveProfileOffset(-1)
+{
+    mSettingsManager = new XQSettingsManager();
+
+    calculateMailboxOffset();
+}
+
+/*!
+    Destructor
+*/
+NmIpsSosExtendedSettingsManager::~NmIpsSosExtendedSettingsManager()
+{
+    delete mSettingsManager;
+}
+
+/*!     
+    Reads extended mailbox setting.
+    \param settingItem SettingItem enum of the setting to return.
+    \param QVariant SettingValue of the found setting value.
+    \return bool <true> when the setting item was read, otherwise <false>.
+*/
+bool NmIpsSosExtendedSettingsManager::readSetting(IpsServices::SettingItem settingItem,
+                                               QVariant &settingValue) const
+{
+    bool ret(mMailboxOffset>=0);
+    if(ret) {
+        switch(settingItem) {
+            case IpsServices::DownloadPictures:
+                settingValue = readFromCenRep(IpsServices::EmailKeyPreferenceDownloadPictures);
+                break;
+            case IpsServices::MessageDivider:
+                settingValue = readFromCenRep(IpsServices::EmailKeyPreferenceMessageDivider);
+                break;
+            case IpsServices::ReceptionActiveProfile:
+                settingValue = readFromCenRep(IpsServices::EmailKeyReceptionActiveProfile);
+                break;
+            case IpsServices::ReceptionUserDefinedProfile:
+                settingValue = readFromCenRep(IpsServices::EmailKeyReceptionUserDefinedProfile);
+                break;
+            case IpsServices::ReceptionInboxSyncWindow:
+                settingValue = readFromCenRep(mActiveProfileOffset +
+                                              IpsServices::EmailKeyReceptionInboxSyncWindow);
+                break;
+            case IpsServices::ReceptionGenericSyncWindowInMessages:
+                settingValue = readFromCenRep(mActiveProfileOffset +
+                                      IpsServices::EmailKeyReceptionGenericSyncWindowInMessages);
+                break;
+            case IpsServices::ReceptionWeekDays:
+                settingValue = readFromCenRep(mActiveProfileOffset +
+                                              IpsServices::EmailKeyReceptionWeekDays);
+                break;
+            case IpsServices::ReceptionDayStartTime:
+                settingValue = readFromCenRep(mActiveProfileOffset +
+                                              IpsServices::EmailKeyReceptionDayStartTime);
+                break;
+            case IpsServices::ReceptionDayEndTime:
+                settingValue = readFromCenRep(mActiveProfileOffset +
+                                              IpsServices::EmailKeyReceptionDayEndTime);
+                break;
+            case IpsServices::ReceptionRefreshPeriodDayTime:
+                settingValue = readFromCenRep(mActiveProfileOffset +
+                                              IpsServices::EmailKeyReceptionRefreshPeriodDayTime);
+                break;
+            case IpsServices::ReceptionRefreshPeriodOther:
+                settingValue = readFromCenRep(mActiveProfileOffset +
+                                              IpsServices::EmailKeyReceptionRefreshPeriodOther);
+                break;
+            case IpsServices::UserNameHidden:
+                settingValue = readFromCenRep(IpsServices::EmailKeyUserNameHidden);
+                break;
+            case IpsServices::EmailNotificationState:
+                settingValue = readFromCenRep(IpsServices::EmailKeyEMNState);
+                break;
+            case IpsServices::FirstEmnReceived:
+                settingValue = readFromCenRep(IpsServices::EmailKeyFirstEmnReceived);
+                break;
+            case IpsServices::EmnReceivedNotSynced:
+                settingValue = readFromCenRep(IpsServices::EmailKeyEmnReceivedNotSynced);
+                break;
+            case IpsServices::AoLastSuccessfulUpdateL:
+                settingValue = readFromCenRep(IpsServices::EmailKeyAoLastSuccessfulUpdateL);
+                break;
+            case IpsServices::AoLastSuccessfulUpdateH:
+                settingValue = readFromCenRep(IpsServices::EmailKeyAoLastSuccessfulUpdateH);
+                break;
+            case IpsServices::AoLastUpdateFailed:
+                settingValue = readFromCenRep(IpsServices::EmailKeyAoLastUpdateFailed);
+                break;
+            case IpsServices::AoUpdateSuccessfulWithCurSettings:
+                settingValue = readFromCenRep(IpsServices::EmailKeyAoUpdateSuccessfulWithCurSettings);
+                break;
+            default:
+                ret = false;
+                break;
+            }
+    }
+    if(!settingValue.isValid()){
+        ret = false;
+        }
+    
+    return ret;
+}
+   
+/*!     
+    Writes extended mailbox setting.
+    \param settingItem SettingItem enum of the setting to replace.
+    \param settingValue QVariant of the new setting value.
+    \return bool <true> when the setting item was written, otherwise <false>.
+*/
+bool NmIpsSosExtendedSettingsManager::writeSetting(IpsServices::SettingItem settingItem,
+                                                const QVariant &settingValue)
+{
+    return writeSettingToCenRep(mActiveProfileOffset, settingItem, settingValue);
+}
+
+/*!     
+
+*/
+bool NmIpsSosExtendedSettingsManager::writeSetting(int profileMode,
+    IpsServices::SettingItem settingItem, const QVariant &settingValue)
+{
+    quint32 profileOffset = convertToProfileOffset(profileMode);
+    return writeSettingToCenRep(profileOffset, settingItem, settingValue);
+}
+
+/*!     
+    Deletes all the extended settings of the mailbox.
+*/
+void NmIpsSosExtendedSettingsManager::deleteSettings()
+{
+    if(mMailboxOffset>=0) {
+
+        // Find all the keys that match the criteria 0xXXXXXZZZ, where X=part of mailbox offset
+        // and Z=don't care. This will give us all the keys for the particular mailbox.
+        quint32 partialKey(mMailboxOffset);
+        quint32 bitMask(0xFFFFF000);
+        XQCentralRepositorySearchCriteria criteria(IpsServices::EmailMailboxSettingRepository,
+                                                   partialKey, bitMask);
+        // Find the keys.
+        XQCentralRepositoryUtils utils(*mSettingsManager);
+        QList<XQCentralRepositorySettingsKey> foundKeys = utils.findKeys(criteria);
+
+        // Delete the keys.
+        foreach(XQCentralRepositorySettingsKey key, foundKeys) {
+            utils.deleteKey(key);
+            }
+    }
+}
+
+/*!
+
+*/
+bool NmIpsSosExtendedSettingsManager::writeSettingToCenRep(qint32 profileOffset,
+    IpsServices::SettingItem settingItem, const QVariant &settingValue)
+{
+    bool ret(profileOffset >= 0);
+    if(ret) {
+        switch(settingItem) {
+            case IpsServices::DownloadPictures:
+                ret = writeToCenRep(
+                        IpsServices::EmailKeyPreferenceDownloadPictures, 
+                        settingValue);
+                break;
+            case IpsServices::MessageDivider:
+                ret = writeToCenRep(
+                        IpsServices::EmailKeyPreferenceMessageDivider, 
+                        settingValue);
+                break;
+            case IpsServices::ReceptionActiveProfile:
+                ret = writeToCenRep(
+                        IpsServices::EmailKeyReceptionActiveProfile, 
+                        settingValue);
+                calculateActiveProfileOffset();
+                break;
+            case IpsServices::ReceptionUserDefinedProfile:
+                ret = writeToCenRep(
+                        IpsServices::EmailKeyReceptionUserDefinedProfile, 
+                        settingValue);
+                break;
+            case IpsServices::ReceptionInboxSyncWindow:
+                ret = writeToCenRep(
+                        profileOffset + 
+                        IpsServices::EmailKeyReceptionInboxSyncWindow,
+                        settingValue);
+                break;
+            case IpsServices::ReceptionGenericSyncWindowInMessages:
+                ret = writeToCenRep(
+                        profileOffset + 
+                        IpsServices::EmailKeyReceptionGenericSyncWindowInMessages,
+                        settingValue);
+                break;
+            case IpsServices::ReceptionWeekDays:
+                ret = writeToCenRep(
+                        profileOffset + 
+                        IpsServices::EmailKeyReceptionWeekDays,
+                        settingValue);
+                break;
+            case IpsServices::ReceptionDayStartTime:
+                ret = writeToCenRep(
+                        profileOffset + 
+                        IpsServices::EmailKeyReceptionDayStartTime,
+                        settingValue);
+                break;
+            case IpsServices::ReceptionDayEndTime:
+                ret = writeToCenRep(
+                        profileOffset + 
+                        IpsServices::EmailKeyReceptionDayEndTime,
+                        settingValue);
+                break;
+            case IpsServices::ReceptionRefreshPeriodDayTime:
+                ret = writeToCenRep(
+                        profileOffset + 
+                        IpsServices::EmailKeyReceptionRefreshPeriodDayTime,
+                        settingValue);
+                break;
+            case IpsServices::ReceptionRefreshPeriodOther:
+                ret = writeToCenRep(
+                        profileOffset + 
+                        IpsServices::EmailKeyReceptionRefreshPeriodOther,
+                        settingValue);
+                break;
+            case IpsServices::UserNameHidden:
+                ret = writeToCenRep(
+                        IpsServices::EmailKeyUserNameHidden, settingValue);
+                break;
+            case IpsServices::EmailNotificationState:
+                ret = writeToCenRep(
+                        IpsServices::EmailKeyEMNState, settingValue);
+                break;
+            case IpsServices::FirstEmnReceived:
+                ret = writeToCenRep(
+                        IpsServices::EmailKeyFirstEmnReceived, settingValue);
+                break;
+            case IpsServices::EmnReceivedNotSynced:
+                ret = writeToCenRep(
+                        IpsServices::EmailKeyEmnReceivedNotSynced,
+                        settingValue);
+                break;
+            case IpsServices::AoLastSuccessfulUpdateL:
+                ret = writeToCenRep(
+                        IpsServices::EmailKeyAoLastSuccessfulUpdateL,
+                        settingValue);
+                break;
+            case IpsServices::AoLastSuccessfulUpdateH:
+                ret = writeToCenRep(
+                        IpsServices::EmailKeyAoLastSuccessfulUpdateH,
+                        settingValue);
+                break;
+            case IpsServices::AoLastUpdateFailed:
+                ret = writeToCenRep(
+                        IpsServices::EmailKeyAoLastUpdateFailed,
+                        settingValue);
+                break;
+            case IpsServices::AoUpdateSuccessfulWithCurSettings:
+                ret = writeToCenRep(
+                        IpsServices::EmailKeyAoUpdateSuccessfulWithCurSettings,
+                        settingValue);
+                break;
+            default:
+                ret = false;
+                break;
+            }
+    }
+    return ret;
+}
+
+/*!
+    Creates a new key-value pair into cenrep
+ */
+bool NmIpsSosExtendedSettingsManager::createKeyValuePair(
+            const IpsServices::SettingItem settingItem, 
+            const QVariant &settingValue)
+    {
+    
+    XQCentralRepositoryUtils* utils =
+            new XQCentralRepositoryUtils(*mSettingsManager);
+    
+    XQCentralRepositorySettingsKey settingKey(
+                  IpsServices::EmailMailboxSettingRepository,
+                  mMailboxOffset + settingItem);
+          
+    bool ret = utils->createKey(settingKey, settingValue);
+          
+    
+    delete utils;
+    
+    return ret;    
+    }
+
+/*!
+    Reads a key value from the Central Repository.
+    \param key Key identifier.
+    \return The settings value for the given key.
+*/
+QVariant NmIpsSosExtendedSettingsManager::readFromCenRep(quint32 key) const
+{
+    XQCentralRepositorySettingsKey settingKey(IpsServices::EmailMailboxSettingRepository,
+                                              mMailboxOffset + key);
+    return mSettingsManager->readItemValue(settingKey);
+}
+
+/*!
+    Writes a key value to the Central Repository.
+    \param key Key identifier.
+    \param value The settings value for the given key.
+    \return Returns <true> if the value was succesfully written, <false> if not.
+*/
+bool NmIpsSosExtendedSettingsManager::writeToCenRep(quint32 key, const QVariant &value) const
+{
+    XQCentralRepositorySettingsKey settingKey(IpsServices::EmailMailboxSettingRepository,
+                                              mMailboxOffset + key);
+    return mSettingsManager->writeItemValue(settingKey, value);
+}
+
+void NmIpsSosExtendedSettingsManager::calculateMailboxOffset()
+{
+    // Find all the keys that match the criteria 0xZZZZZ000, where Z=don't care.
+    // This will give us all the keys that hold the mailbox ids, e.g. 0x00001000, 0x00002000, etc.
+    quint32 partialKey(0x00000000);
+    quint32 bitMask(0x00000FFF);
+    XQCentralRepositorySearchCriteria criteria(IpsServices::EmailMailboxSettingRepository,
+                                               partialKey, bitMask);
+    // Set the mailbox id is value criteria for the search.
+    criteria.setValueCriteria((int)mMailboxId.id32());
+
+    // Find the keys.
+    XQCentralRepositoryUtils utils(*mSettingsManager);
+    QList<XQCentralRepositorySettingsKey> foundKeys = utils.findKeys(criteria);
+
+    // We should only get one key as a result.
+    if (foundKeys.count() == 1) {
+        mMailboxOffset = foundKeys[0].key();
+        calculateActiveProfileOffset();
+    }
+}
+
+/*!
+    Calculates the active reception schedule profile offset.
+*/
+void NmIpsSosExtendedSettingsManager::calculateActiveProfileOffset()
+{
+    QVariant activeProfile = readFromCenRep(IpsServices::EmailKeyReceptionActiveProfile);
+    mActiveProfileOffset = convertToProfileOffset(activeProfile.toInt());
+}
+
+/*!
+
+*/
+qint32 NmIpsSosExtendedSettingsManager::convertToProfileOffset(int profile)
+{
+    quint32 profileOffset(0);
+    // Possible values are defined in ipssettingkeys.h
+    switch(profile) {
+        case 0:
+            profileOffset = IpsServices::EmailProfileOffsetKUTD;
+            break;
+        case 1:
+            profileOffset = IpsServices::EmailProfileOffsetSE;
+            break;
+        case 2:
+            profileOffset = IpsServices::EmailProfileOffsetMF;
+            break;
+        case 3:
+            profileOffset = IpsServices::EmailProfileOffsetUD;
+            break;
+        default:
+            break;
+    }
+    return profileOffset;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipsservices/ipssosplugin/src/ipsstateextension.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -0,0 +1,68 @@
+/*
+* Copyright (c) 2006 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: 
+*       Extension to monitor Activer folder change events
+*
+*/
+#include "ipsstateextension.h"
+
+// ----------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+CIpsStateExtension* CIpsStateExtension::NewL(MStateObserverCallback& aCallback)
+    {
+    CIpsStateExtension* self = new(ELeave) CIpsStateExtension(aCallback);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop();
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+void CIpsStateExtension::SetStateDataProvider( MEmailMailboxState* aDataProvider )
+    {
+    iDataProvider = aDataProvider;
+    }
+
+// ----------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+void CIpsStateExtension::NotifyActiveFolderChanged(
+        const TFSMailMsgId& aActiveMailboxId,
+        const TFSMailMsgId& aActiveFolderId)
+    {
+    iCallback.ActiveFolderChanged( aActiveMailboxId, aActiveFolderId );
+    }
+
+// ----------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+CIpsStateExtension::CIpsStateExtension(MStateObserverCallback& aCallback):
+        iCallback(aCallback)
+    {
+    
+    }
+
+// ----------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+CIpsStateExtension::~CIpsStateExtension()
+    {
+    
+    }
+
+// ----------------------------------------------------------------------------
+// ----------------------------------------------------------------------------
+void CIpsStateExtension::ConstructL()
+    {
+    
+    }
+//EOF
--- a/ipsservices/nmipssettings/inc/nmipssettingshelper.h	Fri Jun 11 13:27:14 2010 +0300
+++ b/ipsservices/nmipssettings/inc/nmipssettingshelper.h	Wed Jun 23 18:00:21 2010 +0300
@@ -43,7 +43,7 @@
 
 // Constant for User Defined sync profile (EmailProfileOffsetUD)
 // \sa ipssettingkeys.h - Currently used sync profile
-const int NmIpsSettingsReceivingScheduleUserDefinedProfile = 3;
+const int NmIpsSettingsReceivingScheduleUserDefinedProfile(3);
 
 class NmIpsSettingsHelper : public QObject
 {
@@ -63,12 +63,13 @@
     void setReceivingScheduleGroupItem(HbDataFormModelItem *item);
     void setServerInfoGroupItem(HbDataFormModelItem *item);
     void createOrUpdateReceivingScheduleGroupDynamicItem(IpsServices::SettingItem item);
-    void createServerInfoGroupDynamicItems();
+    void createServerInfoGroupDynamicItems(bool hiddenItem);
     
-    int getCorrectPortRadioButtonIndex(int currentPort);
-    int getCorrectSecureRadioButtonIndex(QVariant secureSockets, QVariant secureSSLWrapper);
-    int getCorrectInboxPathRadioButtonIndex(QVariant folderPath);
-    int getCorrectOutgoingPortRadioButtonIndex(int currentPort);
+    int getCorrectIncomingPortRadioButtonIndex();
+    int getCorrectIncomingSecureRadioButtonIndex();
+    int getCorrectOutgoingSecureRadioButtonIndex();
+    int getCorrectFolderPathRadioButtonIndex();
+    int getCorrectOutgoingPortRadioButtonIndex();
     int getCorrectOutgoingAuthenticationRadioButtonIndex();
     void handleReceivingScheduleSettingChange(IpsServices::SettingItem settingItem,
         const QVariant &settingValue);
@@ -103,18 +104,13 @@
     void incomingMailServerTextChange(const QString &text);
     void saveOutgoingMailServer();
     void outgoingMailServerTextChange(const QString &text);
+    void handleModelDataChange(QModelIndex startIn, QModelIndex endIn);
     void incomingPortChange(int index);
-    void incomingPortPress(const QModelIndex &index);
     void incomingSecureConnectionItemChange(int index);
-    void incomingSecureConnectionPress(const QModelIndex &index);
     void folderPathChange(int index);
-    void folderPathPress(const QModelIndex &index);
     void outgoingPortChange(int index);
-    void outgoingPortPress(const QModelIndex &index);
     void outgoingSecureConnectionItemChange(int index);
-    void outgoingSecureConnectionPress(const QModelIndex &index);
     void outgoingAuthenticationChange(int index);
-    void outgoingAuthenticationPress(const QModelIndex &index);
     void connectionButtonPress();
 
 private slots:
@@ -132,6 +128,12 @@
     
 private:
 
+    enum AppLibUpdateOperation
+    {
+        UnregisterMailbox,
+        UpdateMailboxName
+    };
+
     void updateShowMailInMailbox();
     void deleteReceivingScheduleGroupDynamicItem(IpsServices::SettingItem item);
     void deleteServerInfoGroupDynamicItems();
@@ -139,6 +141,8 @@
     void showFolderPathInputDialog();
     void showOutgoingPortInputDialog();
     void copyReceivingScheduleSettingsFromActiveProfile(int profileMode);
+    void updateAppLib(AppLibUpdateOperation op, QString mailboxName = QString());
+    void noReceptionWeekdaysSelected();
 
     Q_DISABLE_COPY(NmIpsSettingsHelper)
 
@@ -161,7 +165,7 @@
     HbValidator *mOutgoingPortInputValidator; // Owned.
     CmApplSettingsUi *mDestinationDialog; // Owned.
     bool mServerInfoDynamicItemsVisible;
-    int mRadioButtonPreviousIndex;
+    bool mAbortDynamicRSItemHandling;
 };
 
 #endif // NMIPSSETTINGSHELPER_H
--- a/ipsservices/nmipssettings/inc/nmipssettingsplugin.h	Fri Jun 11 13:27:14 2010 +0300
+++ b/ipsservices/nmipssettings/inc/nmipssettingsplugin.h	Wed Jun 23 18:00:21 2010 +0300
@@ -80,6 +80,7 @@
     NmIpsSettingsManagerBase *mSettingsManager; // Owned.
     HbDataFormModel *mModel; // Not owned.
     HbDataForm *mForm; // Not owned.
+    bool mHiddenItem;
 };
 
 #endif // NMIPSSETTINGS_H
--- a/ipsservices/nmipssettings/nmipssettings.pro	Fri Jun 11 13:27:14 2010 +0300
+++ b/ipsservices/nmipssettings/nmipssettings.pro	Wed Jun 23 18:00:21 2010 +0300
@@ -75,8 +75,10 @@
     LIBS += -leuser
     LIBS += -llibc
     LIBS += -lcmapplsettingsui
-    LIBS += -lqtbearer
     LIBS += -lAlwaysOnlineManagerClient
+    
+    CONFIG += mobility
+    MOBILITY += bearer serviceframework
 }
 
 symbian: plugin { # copy qtstub and manifest
--- a/ipsservices/nmipssettings/src/nmipssettingshelper.cpp	Fri Jun 11 13:27:14 2010 +0300
+++ b/ipsservices/nmipssettings/src/nmipssettingshelper.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -37,7 +37,7 @@
 #include <cmmanagerdefines_shim.h>
 #include <qnetworkconfigmanager.h>
 #include <qnetworkconfiguration.h>
-
+#include <qservicemanager.h>
 
 #include "nmipssettingshelper.h"
 #include "nmipssettingsmanagerbase.h"
@@ -46,14 +46,29 @@
 
 // CONSTANTS
 
-// Dynamic receiving schedule group items.
-const IpsServices::SettingItem NmIpsSettingsReceivingSchedule[] = {
+// Dynamic receiving schedule items.
+const IpsServices::SettingItem NmIpsSettingsReceivingScheduleItems[] = {
         IpsServices::ReceptionInboxSyncWindow,
         IpsServices::ReceptionWeekDays,
         IpsServices::ReceptionDayStartTime,
         IpsServices::ReceptionDayEndTime,
         IpsServices::ReceptionRefreshPeriodDayTime};
 
+// Dynamic receiving schedule item count.
+const int NmIpsSettingsReceivingScheduleItemCount(
+    sizeof(NmIpsSettingsReceivingScheduleItems) / sizeof(NmIpsSettingsReceivingScheduleItems[0]));
+
+// Index of ReceptionDayStartTime in NmIpsSettingsReceivingScheduleItems array.
+const int NmIpsSettingsIndexOfReceptionDayStartTime(2);
+
+// Index of user defined mode.
+const int NmIpsSettingsIndexOfUserDefinedMode(3);
+
+// Receving schedule item not found value.
+const int NmIpsSettingsRecevingScheduleItemNotFound(-1);
+
+
+
 QTM_USE_NAMESPACE
 
 
@@ -85,8 +100,7 @@
   mOutgoingPortInputValidator(0),
   mDestinationDialog(0),
   mServerInfoDynamicItemsVisible(false),
-  mRadioButtonPreviousIndex(0)
-
+  mAbortDynamicRSItemHandling(false)
 {
 }
 
@@ -188,10 +202,10 @@
                     formItemData->setData(HbDataFormModelItem::HbDataFormModelItem::DescriptionRole + 1,
                         weekdayItemValues);
 
-                    formItemData->setContentWidgetData(QString("heading"),
+                    formItemData->setContentWidgetData("heading",
                         hbTrId("txt_mailips_dialog_heading_receiving_weekdays"));
 
-                    formItemData->setContentWidgetData(QString("items"), weekdayItems);
+                    formItemData->setContentWidgetData("items", weekdayItems);
 
                     mDataForm.addConnection(formItemData, SIGNAL(editingFinished()),
                         this, SLOT(receivingWeekdaysModified()));
@@ -211,14 +225,21 @@
                    }
                 }
 
-                formItemData->setContentWidgetData(QString("selectedItems"), selectedDays);
+                formItemData->setContentWidgetData("selectedItems", selectedDays);
 
-                // Every weekday selected
-                if (days == 0x7f) {
-                    formItemData->setContentWidgetData(QString("text"),
+                if (days == 0) {
+                    // Abort receiving schedule handling and delete unecessary settings items.
+                    mAbortDynamicRSItemHandling = true;
+                    noReceptionWeekdaysSelected();
+                    // Update button text nothing selected.
+                    formItemData->setContentWidgetData("text",
+                        hbTrId("txt_mailips_setlabel_download_images_val_none"));
+
+                } else if (days == 0x7f) {
+                    // Update button text every day selected.
+                    formItemData->setContentWidgetData("text",
                         hbTrId("txt_mailips_setlabel_download_images_val_every_day"));
                 }
-
                 break;
             }
 
@@ -232,7 +253,7 @@
                             hbTrId("txt_mailips_setlabel_day_start_time"));
 
                     insertContentItem(IpsServices::ReceptionDayStartTime, formItemData);
-                    formItemData->setContentWidgetData(QString("heading"),
+                    formItemData->setContentWidgetData("heading",
                         hbTrId("txt_mailips_dialog_heading_start_time"));
                     mReceivingScheduleGroupItem->appendChild(formItemData);
                     mDataForm.addConnection(formItemData, SIGNAL(timeChanged(QTime)),
@@ -255,11 +276,11 @@
                 // If not exist, create one
                 if (!formItemData) {
                     formItemData = new CpSettingFormItemData(
-                        static_cast<HbDataFormModelItem::DataItemType> (NmIpsSettingsCustomItem::TimeEditor),
+                        static_cast<HbDataFormModelItem::DataItemType>(NmIpsSettingsCustomItem::TimeEditor),
                             hbTrId("txt_mailips_setlabel_day_end_time"));
 
                     insertContentItem(IpsServices::ReceptionDayEndTime, formItemData);
-                    formItemData->setContentWidgetData(QString("heading"),
+                    formItemData->setContentWidgetData("heading",
                         hbTrId("txt_mailips_dialog_heading_end_time"));
                     mReceivingScheduleGroupItem->appendChild(formItemData);
                 }
@@ -294,7 +315,7 @@
                                      << hbTrId("txt_mailips_setlabel_val_every_15_minutes")
                                      << hbTrId("txt_mailips_setlabel_val_every_1_hour")
                                      << hbTrId("txt_mailips_setlabel_val_every_4_hours");
-                    formItemData->setContentWidgetData(QString("items"), refreshMailItems);
+                    formItemData->setContentWidgetData("items", refreshMailItems);
                     mDataForm.addConnection(
                         formItemData, SIGNAL(valueChanged(QPersistentModelIndex, QVariant)),
                         this, SLOT(refreshPeriodModified(QPersistentModelIndex, QVariant)));
@@ -308,7 +329,7 @@
                 refreshPeriod[15] = 1;
                 refreshPeriod[60] = 2;
                 refreshPeriod[240] = 3;
-                formItemData->setContentWidgetData(QString("selected"),
+                formItemData->setContentWidgetData("selected",
                     refreshPeriod.value(interval.toInt()));
                 break;
             }
@@ -324,7 +345,7 @@
 /*!
     Creates the setting items under the Serverinfo group items user authentication.
 */
-void NmIpsSettingsHelper::createServerInfoGroupDynamicItems()
+void NmIpsSettingsHelper::createServerInfoGroupDynamicItems(bool hiddenItem)
 {   
     HbDataFormModelItem *item = mContentItems.value(IpsServices::SMTPAuthentication);
     int insertIndex = mServerInfoGroupItem->indexOf(item) + 1;
@@ -335,11 +356,15 @@
     CpSettingFormItemData *usernameItem = new CpSettingFormItemData(
         HbDataFormModelItem::TextItem, hbTrId("txt_mailips_setlabel_username"));
     insertContentItem(IpsServices::OutgoingLoginName, usernameItem);
-    usernameItem->setContentWidgetData(QString("text"), username);
+    usernameItem->setContentWidgetData("text", username);
     mDataForm.addConnection(usernameItem, SIGNAL(editingFinished()),
                             this, SLOT(saveOutgoingUserName()));
     mDataForm.addConnection(usernameItem, SIGNAL(textChanged(QString)),
                             this, SLOT(outgoingUserNameTextChange(QString)));
+    if (hiddenItem) { // Starred and dimmed.
+        usernameItem->setContentWidgetData("echoMode", HbLineEdit::Password);
+        usernameItem->setEnabled(false);
+    }
     mServerInfoGroupItem->insertChild(insertIndex, usernameItem);
 
     // Password
@@ -348,8 +373,8 @@
     CpSettingFormItemData *passwordItem = new CpSettingFormItemData(
         HbDataFormModelItem::TextItem, hbTrId("txt_mailips_setlabel_password"));
     insertContentItem(IpsServices::OutgoingPassword, passwordItem);
-    passwordItem->setContentWidgetData(QString("text"), password);
-    passwordItem->setContentWidgetData(QString("echoMode"), HbLineEdit::PasswordEchoOnEdit);
+    passwordItem->setContentWidgetData("text", password);
+    passwordItem->setContentWidgetData("echoMode", HbLineEdit::PasswordEchoOnEdit);
     mDataForm.addConnection(passwordItem, SIGNAL(editingFinished()),
                             this, SLOT(saveOutgoingPassword()));
     mServerInfoGroupItem->insertChild(insertIndex + 1, passwordItem);
@@ -364,7 +389,7 @@
 {
     if (mCurrentLineEditChanged) {
         HbDataFormModelItem *item = mContentItems.value(IpsServices::EmailAlias);
-        QVariant data = item->contentWidgetData(QString("text"));
+        QVariant data = item->contentWidgetData("text");
         mSettingsManager.writeSetting(IpsServices::EmailAlias, data);
     }
     mCurrentLineEditChanged = false;
@@ -388,7 +413,7 @@
 	bool ok = true;
     if (mCurrentLineEditChanged) {
         HbDataFormModelItem *item = mContentItems.value(IpsServices::MailboxName);
-        QVariant data = item->contentWidgetData(QString("text"));
+        QVariant data = item->contentWidgetData("text");
         // Only save mailbox name if it's length is greater than zero. CEmailAccounts does not
         // allow zero-length mailbox names.
         if (data.toString().length() > 0) {
@@ -402,12 +427,15 @@
 				ok = mSettingsManager.writeSetting(IpsServices::MailboxName, data);
 			}
 
+            // Update the mailbox's name to AppLib.
+            updateAppLib(UpdateMailboxName, data.toString());
+
             QVariant property(NmSettings::MailboxName);
             emit mailboxPropertyChanged(mSettingsManager.mailboxId(), property, data);
         }
         else {
             if (mSettingsManager.readSetting(IpsServices::MailboxName, data)) {
-                item->setContentWidgetData(QString("text"), data);
+                item->setContentWidgetData("text", data);
             }
         }
     }
@@ -433,7 +461,7 @@
 		emit goOffline(mSettingsManager.mailboxId());
 		mEmitOnline = true;
 		HbDataFormModelItem *item = mContentItems.value(IpsServices::EmailAddress);
-        QVariant data = item->contentWidgetData(QString("text"));
+        QVariant data = item->contentWidgetData("text");
         mSettingsManager.writeSetting(IpsServices::EmailAddress, data);
         QVariant property(NmSettings::MailboxName);
         emit mailboxPropertyChanged(mSettingsManager.mailboxId(), property, data);
@@ -461,11 +489,11 @@
 		emit goOffline(mSettingsManager.mailboxId());
 		mEmitOnline = true;
 		HbDataFormModelItem *item = mContentItems.value(IpsServices::IncomingLoginName);
-        QVariant username = item->contentWidgetData(QString("text"));
+        QVariant username = item->contentWidgetData("text");
         mSettingsManager.writeSetting(IpsServices::IncomingLoginName, username);
         // Outgoing username needs to be updated if it is set as Same as Incoming.
         item = mContentItems.value(IpsServices::SMTPAuthentication);
-        QVariant selected = item->contentWidgetData(QString("selected"));
+        QVariant selected = item->contentWidgetData("selected");
         if (selected.toInt() == IpsServices::EMailAuthSameAsIncoming) {
             mSettingsManager.writeSetting(IpsServices::OutgoingLoginName, username);
         }
@@ -482,7 +510,7 @@
         emit goOffline(mSettingsManager.mailboxId());
         mEmitOnline = true;
         HbDataFormModelItem *item = mContentItems.value(IpsServices::OutgoingLoginName);
-        QVariant data = item->contentWidgetData(QString("text"));
+        QVariant data = item->contentWidgetData("text");
         mSettingsManager.writeSetting(IpsServices::OutgoingLoginName, data);
     }
     mCurrentLineEditChanged = false;
@@ -519,11 +547,11 @@
 	emit goOffline(mSettingsManager.mailboxId());
 	mEmitOnline = true;
 	HbDataFormModelItem *item = mContentItems.value(IpsServices::IncomingPassword);
-    QVariant password = item->contentWidgetData(QString("text"));
+    QVariant password = item->contentWidgetData("text");
     mSettingsManager.writeSetting(IpsServices::IncomingPassword, password);
     // Outgoing password needs to be updated if it is set as Same as Incoming.
     item = mContentItems.value(IpsServices::SMTPAuthentication);
-    QVariant selected = item->contentWidgetData(QString("selected"));
+    QVariant selected = item->contentWidgetData("selected");
     if (selected.toInt() == IpsServices::EMailAuthSameAsIncoming) {
         mSettingsManager.writeSetting(IpsServices::OutgoingPassword, password);
     }
@@ -537,7 +565,7 @@
     emit goOffline(mSettingsManager.mailboxId());
     mEmitOnline = true;
     HbDataFormModelItem *item = mContentItems.value(IpsServices::OutgoingPassword);
-    QVariant data = item->contentWidgetData(QString("text"));
+    QVariant data = item->contentWidgetData("text");
     mSettingsManager.writeSetting(IpsServices::OutgoingPassword, data);
 }
 /*!
@@ -547,7 +575,7 @@
 {
     if (mCurrentLineEditChanged) {
         HbDataFormModelItem *item = mContentItems.value(IpsServices::ReplyAddress);
-        QVariant data = item->contentWidgetData(QString("text"));
+        QVariant data = item->contentWidgetData("text");
         mSettingsManager.writeSetting(IpsServices::ReplyAddress, data);
     }
     mCurrentLineEditChanged = false;
@@ -598,8 +626,12 @@
         progressNote.delayedShow();
     
         if (!mSettingsManager.deleteMailbox()) {
-            // The mailbox was deleted successfully. Hide the progress note and
-            // display the "mailbox deleted" dialog.
+            // The mailbox was deleted successfully.
+
+            // Delete the mailbox also from AppLib.
+            updateAppLib(UnregisterMailbox);
+
+            // Hide the progress note and display the "mailbox deleted" dialog.
             progressNote.close();
             
             if (!mDeleteInformationDialog) {
@@ -645,26 +677,24 @@
         item->setData(HbDataFormModelItem::PropertyRole, data);
     }
 
-    // Read receiving schedule dynamic group item values and
+    // Read receiving schedule item values and
     // make a decision based on those if item should be visible or not.
-    const int dynamicGroupItemsCount(
-        sizeof(NmIpsSettingsReceivingSchedule) / sizeof(NmIpsSettingsReceivingSchedule[0]));
+    mAbortDynamicRSItemHandling = false;
+    for (int index(0); (index < NmIpsSettingsReceivingScheduleItemCount) &&
+             !mAbortDynamicRSItemHandling; ++index) {
 
-    for (int itemIndex(0); itemIndex < dynamicGroupItemsCount; ++itemIndex) {
+        // Read setting value from active profile
         QVariant setting;
-        // Read setting value from active profile
-        IpsServices::SettingItem item(NmIpsSettingsReceivingSchedule[itemIndex]);
+        IpsServices::SettingItem item(NmIpsSettingsReceivingScheduleItems[index]);
         mSettingsManager.readSetting(item, setting);
 
         // If setting value is not valid (-1=N/A) then remove setting item.
-        int value = setting.toInt();
-        if (value != -1) {
+        if (setting.toInt() != NmIpsSettingsRecevingScheduleItemNotFound) {
             createOrUpdateReceivingScheduleGroupDynamicItem(item);
         } else {
             deleteReceivingScheduleGroupDynamicItem(item);
         }
     }
-
     updateShowMailInMailbox();
 }
 
@@ -692,7 +722,7 @@
 
     HbDataFormModelItem *item = mContentItems.value(IpsServices::ReceptionInboxSyncWindow);
     if (item) {
-        item->setContentWidgetData(QString("selected"), syncWindows.value(value.toInt()));
+        item->setContentWidgetData("selected", syncWindows.value(value.toInt()));
     }
 }
 
@@ -746,7 +776,7 @@
         emit goOffline(mSettingsManager.mailboxId());
         mEmitOnline = true;
         HbDataFormModelItem *item = mContentItems.value(IpsServices::IncomingMailServer);
-        QVariant data = item->contentWidgetData(QString("text"));
+        QVariant data = item->contentWidgetData("text");
         mSettingsManager.writeSetting(IpsServices::IncomingMailServer, data);
     }
     mCurrentLineEditChanged = false;
@@ -770,7 +800,7 @@
         emit goOffline(mSettingsManager.mailboxId());
         mEmitOnline = true;
         HbDataFormModelItem *item = mContentItems.value(IpsServices::OutgoingMailServer);
-        QVariant data = item->contentWidgetData(QString("text"));
+        QVariant data = item->contentWidgetData("text");
         mSettingsManager.writeSetting(IpsServices::OutgoingMailServer, data);
     }
     mCurrentLineEditChanged = false;
@@ -786,6 +816,37 @@
     mCurrentLineEditChanged = true;
 }
 
+void NmIpsSettingsHelper::handleModelDataChange(QModelIndex startIn, QModelIndex endIn)
+{
+    Q_UNUSED(endIn);
+    HbDataFormModelItem *item = mDataFormModel.itemFromIndex(startIn);
+    
+    if(item == mContentItems.value(IpsServices::IncomingSecureSockets)) {
+        QVariant data = item->contentWidgetData("selected");
+        incomingSecureConnectionItemChange(data.toInt());
+    }
+    else if(item == mContentItems.value(IpsServices::IncomingPort)) {
+        QVariant data = item->contentWidgetData("selected");
+        incomingPortChange(data.toInt());
+    }
+    else if(item == mContentItems.value(IpsServices::OutgoingSecureSockets)) {
+        QVariant data = item->contentWidgetData("selected");
+        outgoingSecureConnectionItemChange(data.toInt());
+    }
+    else if(item == mContentItems.value(IpsServices::OutgoingPort)) {
+        QVariant data = item->contentWidgetData("selected");
+        outgoingPortChange(data.toInt());
+    }
+    else if(item == mContentItems.value(IpsServices::SMTPAuthentication)) {
+        QVariant data = item->contentWidgetData("selected");
+        outgoingAuthenticationChange(data.toInt());
+    }
+    else if(item == mContentItems.value(IpsServices::FolderPath)) {
+        QVariant data = item->contentWidgetData("selected");
+        folderPathChange(data.toInt());
+    }
+}
+
 /*!
     Saves the incoming port value into database if user has changed the value. If the user wish to
     define the port, a input dialog is shown.
@@ -793,13 +854,17 @@
 */
 void NmIpsSettingsHelper::incomingPortChange(int index)
 {
-    if (mRadioButtonPreviousIndex != index && index == IpsServices::NmIpsSettingsDefault) {
-        emit goOffline(mSettingsManager.mailboxId());
-        mEmitOnline = true;
-        int port = mSettingsManager.determineDefaultIncomingPort();
-        mSettingsManager.writeSetting(IpsServices::IncomingPort, port);
-    } else if (index == IpsServices::NmIpsSettingsUserDefined) {
-        showIncomingPortInputDialog();
+    int previousindex = getCorrectIncomingPortRadioButtonIndex();
+    
+    if (previousindex != index ) {
+        if (index == IpsServices::NmIpsSettingsDefault) {
+            emit goOffline(mSettingsManager.mailboxId());
+            mEmitOnline = true;
+            int port = mSettingsManager.determineDefaultIncomingPort();
+            mSettingsManager.writeSetting(IpsServices::IncomingPort, port);
+        } else if (index == IpsServices::NmIpsSettingsUserDefined) {
+            showIncomingPortInputDialog();
+        }  
     }
 }
 
@@ -833,6 +898,8 @@
 */
 void NmIpsSettingsHelper::handleUserDefinedIncomingPortInput(HbAction *action)
 {
+    int previousindex = getCorrectIncomingPortRadioButtonIndex();
+    
     if (action == mIncomingPortInputDialog->actions().at(0)) {
         QVariant newPort = mIncomingPortInputDialog->value();
         emit goOffline(mSettingsManager.mailboxId());
@@ -841,7 +908,7 @@
     } else {
         //set selected value back if user canceled.
         HbDataFormModelItem *item = mContentItems.value(IpsServices::IncomingPort);
-        item->setContentWidgetData(QString("selected"), mRadioButtonPreviousIndex);
+        item->setContentWidgetData("selected", previousindex);
     }
 }
 
@@ -849,11 +916,13 @@
     Used for getting the index to display in the port radio button list 
     \return index Used to set the selected value
 */
-int NmIpsSettingsHelper::getCorrectPortRadioButtonIndex(int currentPort)
+int NmIpsSettingsHelper::getCorrectIncomingPortRadioButtonIndex()
 {
+    QVariant incomingPort;
+        mSettingsManager.readSetting(IpsServices::IncomingPort, incomingPort);
     int index = 0;
     int port = mSettingsManager.determineDefaultIncomingPort();
-    if (port == currentPort) {
+    if (port == incomingPort.toInt()) {
         index = IpsServices::NmIpsSettingsDefault;
     } else {
         index = IpsServices::NmIpsSettingsUserDefined;
@@ -862,23 +931,13 @@
 }
 
 /*!
-    Sets the previous index value to indicate that user has edited the field
-    \param text Reference to the item in the radio button list.
-*/
-void NmIpsSettingsHelper::incomingPortPress(const QModelIndex &index)
-{
-    Q_UNUSED(index);
-    HbDataFormModelItem *item = mContentItems.value(IpsServices::IncomingPort);
-    QVariant data = item->contentWidgetData(QString("selected"));
-    mRadioButtonPreviousIndex = data.toInt();
-}
-
-/*!
     Saves the incoming secure connection value into database if user has changed the value.
 */
 void NmIpsSettingsHelper::incomingSecureConnectionItemChange(int index)
-{
-    if (mRadioButtonPreviousIndex != index) {
+{  
+    int previousindex = getCorrectIncomingSecureRadioButtonIndex();
+    
+    if (previousindex != index) {
         emit goOffline(mSettingsManager.mailboxId());
         mEmitOnline = true;
         switch (index) {
@@ -886,50 +945,69 @@
                 mSettingsManager.writeSetting(IpsServices::IncomingSecureSockets, true);
                 mSettingsManager.writeSetting(IpsServices::IncomingSSLWrapper, false);
                 break;
-
+    
             case IpsServices::EMailSslTls: // On (SSL/TLS)
                 mSettingsManager.writeSetting(IpsServices::IncomingSecureSockets, false);
                 mSettingsManager.writeSetting(IpsServices::IncomingSSLWrapper, true);
                 break;
-
+    
             case IpsServices::EMailSecurityOff: // Off
                 mSettingsManager.writeSetting(IpsServices::IncomingSecureSockets, false);
                 mSettingsManager.writeSetting(IpsServices::IncomingSSLWrapper, false);
                 break;
-
-        	 default:
+    
+             default:
                 break;
         }
         // Update incoming port value only if default incoming port used
         HbDataFormModelItem *item = mContentItems.value(IpsServices::IncomingPort);
-        QVariant data = item->contentWidgetData(QString("selected"));
+        QVariant data = item->contentWidgetData("selected");
         // Default incoming port selected
         if (data.toInt() == IpsServices::NmIpsSettingsDefault) {
-			int port = mSettingsManager.determineDefaultIncomingPort();
-			mSettingsManager.writeSetting(IpsServices::IncomingPort, port);
+            int port = mSettingsManager.determineDefaultIncomingPort();
+            mSettingsManager.writeSetting(IpsServices::IncomingPort, port);
         }
     }
 }
 
 /*!
-    Sets the previous index value to indicate that user has edited the field.
-    \param text Reference to the item in the radio button list.
-*/
-void NmIpsSettingsHelper::incomingSecureConnectionPress(const QModelIndex &index)
-{
-	Q_UNUSED(index);
-	HbDataFormModelItem *item = mContentItems.value(IpsServices::IncomingSecureSockets);
-    QVariant data = item->contentWidgetData(QString("selected"));
-    mRadioButtonPreviousIndex = data.toInt();
-}
-
-/*!
     Used for getting the index to display in the secure connection radio button list.
     \return index Used to set the selected value
 */
-int NmIpsSettingsHelper::getCorrectSecureRadioButtonIndex(QVariant secureSockets, 
-                                                          QVariant secureSSLWrapper)
+int NmIpsSettingsHelper::getCorrectIncomingSecureRadioButtonIndex()
 {
+    QVariant secureSockets;
+    QVariant secureSSLWrapper;
+    mSettingsManager.readSetting(IpsServices::IncomingSecureSockets, secureSockets);
+    mSettingsManager.readSetting(IpsServices::IncomingSSLWrapper, secureSSLWrapper);
+    
+    IpsServices::TIpsSetDataSecurityTypes securityType = IpsServices::EMailStartTls;
+    // secureSockets == True
+    if (secureSockets.toBool()) { 
+        securityType = IpsServices::EMailStartTls;
+    }
+    // secureSockets == False & secureSSLWrapper == True
+    else if (secureSSLWrapper.toBool()) {
+        securityType = IpsServices::EMailSslTls;
+    }
+    // secureSockets == False & secureSSLWrapper == False
+    else {
+        securityType = IpsServices::EMailSecurityOff;
+    }
+    return securityType;
+}
+
+/*!
+    Used for getting the index to display in the secure connection radio button list.
+    \return index Used to set the selected value
+*/
+int NmIpsSettingsHelper::getCorrectOutgoingSecureRadioButtonIndex()
+{
+    QVariant secureSockets;
+    QVariant secureSSLWrapper;
+    mSettingsManager.readSetting(IpsServices::OutgoingSecureSockets, secureSockets);
+    mSettingsManager.readSetting(IpsServices::OutgoingSSLWrapper, secureSSLWrapper);
+    
     IpsServices::TIpsSetDataSecurityTypes securityType = IpsServices::EMailStartTls;
     // secureSockets == True
     if (secureSockets.toBool()) { 
@@ -951,11 +1029,15 @@
 */
 void NmIpsSettingsHelper::folderPathChange(int index)
 {
-    if (mRadioButtonPreviousIndex != index && index == IpsServices::NmIpsSettingsDefault) {
-        // Empty string sets the folder path to default.
-        mSettingsManager.writeSetting(IpsServices::FolderPath, QString(""));
-    } else if (index == IpsServices::NmIpsSettingsUserDefined) {
-        showFolderPathInputDialog();       
+    int previousindex = getCorrectFolderPathRadioButtonIndex();
+    
+    if (previousindex != index ) {
+        if (index == IpsServices::NmIpsSettingsDefault) {
+            // Empty string sets the folder path to default.
+            mSettingsManager.writeSetting(IpsServices::FolderPath, "");
+        } else if (index == IpsServices::NmIpsSettingsUserDefined) {
+            showFolderPathInputDialog();       
+        }
     }
 }
 
@@ -984,6 +1066,8 @@
 */
 void NmIpsSettingsHelper::handleUserDefinedFolderPathInput(HbAction *action)
 {
+    int previousindex = getCorrectFolderPathRadioButtonIndex();
+    
     HbDataFormModelItem *item = mContentItems.value(IpsServices::FolderPath);
     
     if (action == mFolderPathInputDialog->actions().at(0)) { 
@@ -991,34 +1075,21 @@
         mSettingsManager.writeSetting(IpsServices::FolderPath, newFolderPath);
         //set selected index to default if user inputed empty string.
         if (newFolderPath.toString().isEmpty()) {
-            item->setContentWidgetData(QString("selected"), IpsServices::NmIpsSettingsDefault);
+            item->setContentWidgetData("selected", IpsServices::NmIpsSettingsDefault);
         }
     } else {
         //set selected value back if user canceled.
-        item->setContentWidgetData(QString("selected"), mRadioButtonPreviousIndex);
+        item->setContentWidgetData("selected", previousindex);
     }
 }
 
 /*!
-    Sets the previous index value to indicate that user has edited the field.
-
-    \param text Reference to the item in the radio button list.
-*/
-void NmIpsSettingsHelper::folderPathPress(const QModelIndex &index)
-{
-    Q_UNUSED(index);
-    HbDataFormModelItem *item = mContentItems.value(IpsServices::FolderPath);
-    QVariant data = item->contentWidgetData(QString("selected"));
-    mRadioButtonPreviousIndex = data.toInt();
-}
-
-/*!
     Handles weekdays modifications.
 */
 void NmIpsSettingsHelper::receivingWeekdaysModified()
 {
     HbDataFormModelItem *item = mContentItems.value(IpsServices::ReceptionWeekDays);
-    QVariant widgetData = item->contentWidgetData(QString("selectedItems"));
+    QVariant widgetData = item->contentWidgetData("selectedItems");
     QList<QVariant> selectedIndexes = widgetData.value< QList<QVariant> >();
     QVariant itemData = item->data(HbDataFormModelItem::DescriptionRole + 1);
     QList<QVariant> itemValues = itemData.value< QList<QVariant> >();
@@ -1035,9 +1106,11 @@
     }
 
     // Although the mode might not be changed we need to still update the button text.
-    // Every weekday selected.
-    if (days == 0x7f) {
-        item->setContentWidgetData(QString("text"),
+    if (days == 0) {
+        noReceptionWeekdaysSelected();
+        item->setContentWidgetData("text", hbTrId("txt_mailips_setlabel_download_images_val_none"));
+    } else if (days == 0x7f) {
+        item->setContentWidgetData("text",
             hbTrId("txt_mailips_setlabel_download_images_val_every_day"));
     }
 }
@@ -1096,8 +1169,11 @@
     Used for getting the index to display in the inbox path radio button list 
     \return index Used to set the selected value
 */
-int NmIpsSettingsHelper::getCorrectInboxPathRadioButtonIndex(QVariant folderPath)
+int NmIpsSettingsHelper::getCorrectFolderPathRadioButtonIndex()
 {
+    QVariant folderPath;
+    mSettingsManager.readSetting(IpsServices::FolderPath, folderPath);
+    
     int index(0);
     if (folderPath.toString().isEmpty()) {
         index = IpsServices::NmIpsSettingsDefault;
@@ -1139,7 +1215,7 @@
 
     // update selection
     HbDataFormModelItem *syncProfile = contentItem(IpsServices::ReceptionActiveProfile);
-    syncProfile->setContentWidgetData(QString("currentIndex"), 3);
+    syncProfile->setContentWidgetData("currentIndex", NmIpsSettingsIndexOfUserDefinedMode);
 }
 
 /*!
@@ -1152,8 +1228,8 @@
     const QString snapPrefix("S_");
 
     QNetworkConfigurationManager netMan;
-    QNetworkConfiguration conf = netMan.configurationFromIdentifier( snapPrefix +
-                                                                     QString::number(identifier));
+    QNetworkConfiguration conf =
+        netMan.configurationFromIdentifier(snapPrefix + QString::number(identifier));
     return conf.name();
 }
 
@@ -1165,22 +1241,70 @@
 {
     // Read receiving schedule dynamic group item values and
     // make a decision based on those if item should be visible or not.
-    const int dynamicGroupItemsCount(
-        sizeof(NmIpsSettingsReceivingSchedule) / sizeof(NmIpsSettingsReceivingSchedule[0]));
-
     NmIpsExtendedSettingsManager &extendedSettingsManager =
         mSettingsManager.extendedSettingsManager();
 
-    for (int itemIndex(0); itemIndex < dynamicGroupItemsCount; ++itemIndex) {
+    for (int index(0); index < NmIpsSettingsReceivingScheduleItemCount; ++index) {
         QVariant setting;
         // Read setting value from active profile
-        IpsServices::SettingItem item(NmIpsSettingsReceivingSchedule[itemIndex]);
+        IpsServices::SettingItem item(NmIpsSettingsReceivingScheduleItems[index]);
         mSettingsManager.readSetting(item, setting);
 
         // write settings to user defined profile.
         extendedSettingsManager.writeSetting(profileMode, item, setting);
     }
 }
+
+/*!
+    Updates the mailbox entry in AppLib.
+    \param op App Library operation.
+    \param mailboxName Mailbox name.
+*/
+void NmIpsSettingsHelper::updateAppLib(AppLibUpdateOperation op, QString mailboxName)
+{
+    // Find and load the interface.
+    QServiceManager manager;
+    QServiceFilter filter("com.nokia.symbian.IEmailRegisterAccount");
+    QList<QServiceInterfaceDescriptor> interfaces = manager.findInterfaces(filter);
+    QObject *registerInterface = 0;
+    if (!interfaces.isEmpty()) {
+        registerInterface = manager.loadInterface(interfaces.first());
+    }
+
+    if (registerInterface) {
+        quint64 mailboxId(mSettingsManager.mailboxId().id());
+        switch(op) {
+            case UnregisterMailbox:
+                // Try to remove the mailbox from the App Library.
+                (void)QMetaObject::invokeMethod(registerInterface,
+                    "unregisterMailbox",
+                    Q_ARG(quint64, mailboxId));
+                break;
+            case UpdateMailboxName:
+                // Update the mailbox's name in the App Library.
+                (void)QMetaObject::invokeMethod(registerInterface,
+                    "updateMailboxName",
+                    Q_ARG(quint64, mailboxId),
+                    Q_ARG(QString, mailboxName));
+                break;
+            default:
+                break;
+        }
+    }
+}
+
+/*!
+    Deletes ReceptionDayStartTime, ReceptionDayEndTime and ReceptionRefreshPeriodDayTime
+    setting items.
+*/
+void NmIpsSettingsHelper::noReceptionWeekdaysSelected()
+{
+    for (int index(NmIpsSettingsIndexOfReceptionDayStartTime);
+            index < NmIpsSettingsReceivingScheduleItemCount; ++index) {
+        deleteReceivingScheduleGroupDynamicItem(NmIpsSettingsReceivingScheduleItems[index]);
+    }
+}
+
 /*!
     Saves the outgoing port value into database if user has changed the value. If the user wish to
     define the port, a input dialog is shown.
@@ -1188,13 +1312,17 @@
 */
 void NmIpsSettingsHelper::outgoingPortChange(int index)
 {
-    if (mRadioButtonPreviousIndex != index && index == IpsServices::NmIpsSettingsDefault) {
-        emit goOffline(mSettingsManager.mailboxId());
-        mEmitOnline = true;
-        int port = mSettingsManager.determineDefaultOutgoingPort();
-        mSettingsManager.writeSetting(IpsServices::OutgoingPort, port);
-    } else if (index == IpsServices::NmIpsSettingsUserDefined) {
-        showOutgoingPortInputDialog();
+    int previousindex = getCorrectOutgoingPortRadioButtonIndex();
+    
+    if (previousindex != index) {
+        if (index == IpsServices::NmIpsSettingsDefault) {
+            emit goOffline(mSettingsManager.mailboxId());
+            mEmitOnline = true;
+            int port = mSettingsManager.determineDefaultOutgoingPort();
+            mSettingsManager.writeSetting(IpsServices::OutgoingPort, port);
+        } else if (index == IpsServices::NmIpsSettingsUserDefined) {
+            showOutgoingPortInputDialog();
+        }
     }
 }
 
@@ -1229,6 +1357,8 @@
 */
 void NmIpsSettingsHelper::handleUserDefinedOutgoingPortInput(HbAction *action)
 {
+    int previousindex = getCorrectOutgoingPortRadioButtonIndex();
+    
     if (action == mOutgoingPortInputDialog->actions().at(0)) {
         QVariant newPort = mOutgoingPortInputDialog->value();
         emit goOffline(mSettingsManager.mailboxId());
@@ -1237,7 +1367,7 @@
     } else {
         //set selected value back if user canceled.
         HbDataFormModelItem *item = mContentItems.value(IpsServices::OutgoingPort);
-        item->setContentWidgetData(QString("selected"), mRadioButtonPreviousIndex);
+        item->setContentWidgetData("selected", previousindex);
     }
 }
 
@@ -1253,32 +1383,23 @@
         if (mSettingsManager.writeSetting(IpsServices::Connection, QVariant(destId))) {
             QString destName(destinationNameFromIdentifier(destId));
             HbDataFormModelItem *item = mContentItems.value(IpsServices::Connection);
-            item->setContentWidgetData(QString("text"), destName);
+            item->setContentWidgetData("text", destName);
         }
     }
 }
 
 /*!
-    Sets the previous index value to indicate that user has edited the field.
-    \param index Reference to the item in the radio button list.
-*/
-void NmIpsSettingsHelper::outgoingPortPress(const QModelIndex &index)
-{
-    Q_UNUSED(index);
-    HbDataFormModelItem *item = mContentItems.value(IpsServices::OutgoingPort);
-    QVariant data = item->contentWidgetData(QString("selected"));
-    mRadioButtonPreviousIndex = data.toInt();
-}
-
-/*!
     Used for getting the index to display in the outgoing port radio button list.
     \return index Used to set the selected value.
 */
-int NmIpsSettingsHelper::getCorrectOutgoingPortRadioButtonIndex(int currentPort)
+int NmIpsSettingsHelper::getCorrectOutgoingPortRadioButtonIndex()
 {
+    QVariant outgoingPort;
+    mSettingsManager.readSetting(IpsServices::OutgoingPort, outgoingPort);
+    
     int index = 0;
     int port = mSettingsManager.determineDefaultOutgoingPort();
-    if (port == currentPort) {
+    if (port == outgoingPort.toInt()) {
         index = IpsServices::NmIpsSettingsDefault;
     } else {
         index = IpsServices::NmIpsSettingsUserDefined;
@@ -1312,7 +1433,11 @@
     
     if (outgoingAuthentication) {
         if (outgoingLoginName == incomingLoginName && outgoingPassword == incomingPassword) {
-            index = IpsServices::EMailAuthSameAsIncoming;    
+            index = IpsServices::EMailAuthSameAsIncoming;
+            HbDataFormModelItem *item = mContentItems.value(IpsServices::OutgoingLoginName);
+            if (item) {
+                index = IpsServices::EMailAuthUserAuthentication;
+            }
         } else {
             index = IpsServices::EMailAuthUserAuthentication;
         }
@@ -1325,8 +1450,10 @@
     \param index Selected radio button index.
 */
 void NmIpsSettingsHelper::outgoingSecureConnectionItemChange(int index)
-{
-    if (mRadioButtonPreviousIndex != index) {
+{      
+    int previousindex = getCorrectOutgoingSecureRadioButtonIndex();
+    
+    if (previousindex != index) {
         emit goOffline(mSettingsManager.mailboxId());
         mEmitOnline = true;
         switch (index) {
@@ -1350,7 +1477,7 @@
         }
         // Update outgoing port value only if default outgoing port used
         HbDataFormModelItem *item = mContentItems.value(IpsServices::OutgoingPort);
-        QVariant data = item->contentWidgetData(QString("selected"));
+        QVariant data = item->contentWidgetData("selected");
         // Default outgoing port selected
         if (data.toInt() == IpsServices::NmIpsSettingsDefault) {
 			int port = mSettingsManager.determineDefaultOutgoingPort();
@@ -1360,25 +1487,15 @@
 }
 
 /*!
-    Sets the previous index value to indicate that user has edited the field.
-    \param index Reference to the item in the radio button list.
-*/
-void NmIpsSettingsHelper::outgoingSecureConnectionPress(const QModelIndex &index)
-{
-	Q_UNUSED(index);
-	HbDataFormModelItem *item = mContentItems.value(IpsServices::OutgoingSecureSockets);
-    QVariant data = item->contentWidgetData(QString("selected"));
-    mRadioButtonPreviousIndex = data.toInt();
-}
-
-/*!
     Saves the outgoing authetication value into database if user has changed the value and
     updates dynamic group items.
     \param index Selected radio button index.
 */
 void NmIpsSettingsHelper::outgoingAuthenticationChange(int index)
 {
-    if (mRadioButtonPreviousIndex != index) {
+    int previousindex = getCorrectOutgoingAuthenticationRadioButtonIndex();
+    
+    if (previousindex != index) {
         QVariant loginName;
         QVariant loginPassword;
         emit goOffline(mSettingsManager.mailboxId());
@@ -1402,7 +1519,7 @@
 
             case IpsServices::EMailAuthUserAuthentication: // User authentication
                 mSettingsManager.writeSetting(IpsServices::SMTPAuthentication, true);
-                createServerInfoGroupDynamicItems();
+                createServerInfoGroupDynamicItems(false);
                 break;
                 
              default:
@@ -1412,18 +1529,6 @@
 }
 
 /*!
-    Sets the previous index value to indicate that user has edited the field.
-    \param index Reference to the item in the radio button list.
-*/
-void NmIpsSettingsHelper::outgoingAuthenticationPress(const QModelIndex &index)
-{
-    Q_UNUSED(index);
-    HbDataFormModelItem *item = mContentItems.value(IpsServices::SMTPAuthentication);
-    QVariant data = item->contentWidgetData(QString("selected"));
-    mRadioButtonPreviousIndex = data.toInt();
-}
-
-/*!
     Launches the connection selection dialog.
 */
 void NmIpsSettingsHelper::connectionButtonPress()
--- a/ipsservices/nmipssettings/src/nmipssettingsmultiselectionitem.cpp	Fri Jun 11 13:27:14 2010 +0300
+++ b/ipsservices/nmipssettings/src/nmipssettingsmultiselectionitem.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -25,6 +25,9 @@
 
 #include "nmipssettingsmultiselectionitem.h"
 
+// CONSTANTS
+const QChar NmIpsSettingsMultiSelectionItemSpace(' ');
+
 /*!
     \class NmIpsSettingsMultiSelectionItem
     \brief The class implements a custom HbDataFormViewItem for showing multi selection dialog.
@@ -36,8 +39,6 @@
 /*!
     Constructor of NmIpsSettingsMultiSelectionItem.
 */
-
-
 NmIpsSettingsMultiSelectionItem::NmIpsSettingsMultiSelectionItem(
     QGraphicsItem *parent, Qt::WindowFlags wFlags)
  : HbWidget(parent, wFlags),
@@ -207,10 +208,11 @@
     const int itemCount(mItems.count());
     if (mItems.count() >= mSelectedItems.count()) {
         // Construct separator for button text.
-        QChar groupSeparator = HbExtendedLocale::system().groupSeparator();
-        QString separator(" ");
-        separator.insert(0, groupSeparator);
-
+        QChar groupSeparator(HbExtendedLocale::system().groupSeparator());
+        QString separator(groupSeparator);
+        if (!groupSeparator.isSpace()) {
+            separator.append(NmIpsSettingsMultiSelectionItemSpace);
+        }
         QString buttonText;
         QListIterator<QVariant> itemIterator(mSelectedItems);
         while (itemIterator.hasNext()) {
@@ -226,6 +228,13 @@
                 }
             }
         }
+        // If empty text is set to the button, next time when some "real" text is set to the button
+        // the text is drawn from left to the center of button. Text is drawn multiple times to
+        // wrong place while it travelling from left side to the center of button.
+        // To prevent this feature, one space is set to button instead of real empty string.
+        if (buttonText.isEmpty()) {
+            buttonText = " ";
+        }
         mButton->setText(buttonText);
     }
 }
--- a/ipsservices/nmipssettings/src/nmipssettingsplugin.cpp	Fri Jun 11 13:27:14 2010 +0300
+++ b/ipsservices/nmipssettings/src/nmipssettingsplugin.cpp	Wed Jun 23 18:00:21 2010 +0300
@@ -59,7 +59,8 @@
 */
 NmIpsSettingsPlugin::NmIpsSettingsPlugin()
 : mSettingsHelper(0),
-  mSettingsManager(0)
+  mSettingsManager(0),
+  mHiddenItem(false)
 {
     QString lang = QLocale::system().name();
     QString path = "Z:/resource/qt/translations/";
@@ -134,6 +135,13 @@
         connect(mSettingsHelper, SIGNAL(createUserDefinedMode()),
                 this, SLOT(createUserDefinedMode()));
 
+        connect(mModel, SIGNAL(dataChanged(QModelIndex, QModelIndex)), 
+                mSettingsHelper, SLOT(handleModelDataChange(QModelIndex, QModelIndex)));
+        
+        // Get the value if some ui items need to be hidden.
+        QVariant data;
+        mSettingsManager->readSetting(IpsServices::UserNameHidden, data);
+        mHiddenItem = data.toBool();
         // Add items to the model.
         initGroupItems();
         result = true;
@@ -212,10 +220,8 @@
 */
 void NmIpsSettingsPlugin::initPreferenceItems(HbDataFormModelItem &item) const
 {
-
     // 1. Connection
     QVariant destId;
-
     mSettingsManager->readSetting(IpsServices::Connection, destId);
     QString destName(mSettingsHelper->destinationNameFromIdentifier(destId.toUInt()));
     HbDataFormModelItem::DataItemType buttonItem =
@@ -376,8 +382,13 @@
                          mSettingsHelper, SLOT(saveIncomingUserName()));
     mForm->addConnection(usernameItem, SIGNAL(textChanged(QString)),
                          mSettingsHelper, SLOT(incomingUserNameTextChange(QString)));
+    if (mHiddenItem) { // Starred and dimmed.
+        usernameItem->setContentWidgetData(QString("echoMode"), HbLineEdit::Password);
+        usernameItem->setEnabled(false);
+    }
     item.appendChild(usernameItem);
-
+    
+    
     // 3. Password
     QVariant password;
     mSettingsManager->readSetting(IpsServices::IncomingPassword, password);
@@ -390,7 +401,7 @@
                          mSettingsHelper, SLOT(saveIncomingPassword()));
     item.appendChild(passwordItem);
 
-    // Reply to address
+    // 4. Reply to address
     QVariant replyToAddress;
     mSettingsManager->readSetting(IpsServices::ReplyAddress, replyToAddress);
     CpSettingFormItemData *replyToItem = new CpSettingFormItemData(
@@ -421,13 +432,13 @@
                          mSettingsHelper, SLOT(saveIncomingMailServer()));
     mForm->addConnection(incomingMailServerItem, SIGNAL(textChanged(QString)),
                          mSettingsHelper, SLOT(incomingMailServerTextChange(QString)));
+    if (mHiddenItem) { // Starred and dimmed.
+        incomingMailServerItem->setContentWidgetData(QString("echoMode"), HbLineEdit::Password);
+        incomingMailServerItem->setEnabled(false);
+    }
     item.appendChild(incomingMailServerItem);
     
     // 2. Incoming Secure connection
-    QVariant secureSockets;
-    QVariant secureSSLWrapper;
-    mSettingsManager->readSetting(IpsServices::IncomingSecureSockets, secureSockets);
-    mSettingsManager->readSetting(IpsServices::IncomingSSLWrapper, secureSSLWrapper);
     CpSettingFormItemData *incomingSecureConnectionItem =
         new CpSettingFormItemData(HbDataFormModelItem::RadioButtonListItem, hbTrId(
             "txt_mailips_setlabel_incoming_security"));
@@ -436,37 +447,31 @@
     showSCItems << hbTrId("txt_mailips_setlabel_security_val_on_starttls")
                 << hbTrId("txt_mailips_setlabel_security_val_on_ssltls")
                 << hbTrId("txt_mailips_setlabel_security_val_off");
-
     incomingSecureConnectionItem->setContentWidgetData(QString("items"), showSCItems);
     int incomingSecureConnectionItemIndex = 
-        mSettingsHelper->getCorrectSecureRadioButtonIndex(secureSockets, secureSSLWrapper);
+        mSettingsHelper->getCorrectIncomingSecureRadioButtonIndex();
     incomingSecureConnectionItem->setContentWidgetData(QString("selected"), 
                                                        incomingSecureConnectionItemIndex);
-    mForm->addConnection(incomingSecureConnectionItem, SIGNAL(itemSelected(int)),    		  
-    		mSettingsHelper, SLOT(incomingSecureConnectionItemChange(int)));
-    mForm->addConnection(incomingSecureConnectionItem, SIGNAL(pressed(const QModelIndex &)),    		  
-    		mSettingsHelper, SLOT(incomingSecureConnectionPress(const QModelIndex &)));
+    if (mHiddenItem) {
+        incomingSecureConnectionItem->setEnabled(false);
+    }
     item.appendChild(incomingSecureConnectionItem);
     
     // 3. Incoming mail server port
-    QVariant incomingPort;
-    mSettingsManager->readSetting(IpsServices::IncomingPort, incomingPort);
     CpSettingFormItemData *incomingPortItem =
         new CpSettingFormItemData(HbDataFormModelItem::RadioButtonListItem, hbTrId(
             "txt_mailips_setlabel_incoming_port"));
-    mSettingsHelper->insertContentItem(IpsServices::IncomingPort, incomingPortItem);    
-    mForm->addConnection(incomingPortItem, SIGNAL(itemSelected(int)),
-                         mSettingsHelper, SLOT(incomingPortChange(int)));
-    mForm->addConnection(incomingPortItem, SIGNAL(pressed(const QModelIndex &)),              
-                         mSettingsHelper, SLOT(incomingPortPress(const QModelIndex &)));
+    mSettingsHelper->insertContentItem(IpsServices::IncomingPort, incomingPortItem);
     QStringList incomingPortItems;
     incomingPortItems << hbTrId("txt_mailips_setlabel_incoming_port_default")
                       << hbTrId("txt_mailips_setlabel_incoming_port_user_defined");
     incomingPortItem->setContentWidgetData(QString("items"), incomingPortItems);
-    int incomingPortItemIndex = 
-        mSettingsHelper->getCorrectPortRadioButtonIndex(incomingPort.toInt()); 
+    int incomingPortItemIndex = mSettingsHelper->getCorrectIncomingPortRadioButtonIndex(); 
     incomingPortItem->setContentWidgetData(QString("selected"), incomingPortItemIndex);
-    item.appendChild(incomingPortItem);    
+    if (mHiddenItem) {
+        incomingPortItem->setEnabled(false);
+    }
+    item.appendChild(incomingPortItem);
     
     // 4. Outgoing mail server address
     QVariant outgoingMailServer;
@@ -479,52 +484,45 @@
                          mSettingsHelper, SLOT(saveOutgoingMailServer()));
     mForm->addConnection(outgoingMailServerItem, SIGNAL(textChanged(QString)),
                          mSettingsHelper, SLOT(outgoingMailServerTextChange(QString)));
+    if (mHiddenItem) {// Starred and dimmed.
+        outgoingMailServerItem->setContentWidgetData(QString("echoMode"), HbLineEdit::Password);
+        outgoingMailServerItem->setEnabled(false);
+    }
     item.appendChild(outgoingMailServerItem);
     
     // 5. Outgoing secure connection
-    QVariant outgoingSecureSockets;
-    QVariant outgoingSSLWrapper;
-    mSettingsManager->readSetting(IpsServices::OutgoingSecureSockets, outgoingSecureSockets);
-    mSettingsManager->readSetting(IpsServices::OutgoingSSLWrapper, outgoingSSLWrapper);
     CpSettingFormItemData *outgoingSecureConnectionItem =
         new CpSettingFormItemData(HbDataFormModelItem::RadioButtonListItem, hbTrId(
             "txt_mailips_setlabel_outgoing_security"));
     mSettingsHelper->insertContentItem(IpsServices::OutgoingSecureSockets, outgoingSecureConnectionItem);
     QStringList outgoingShowSCItems;
     outgoingShowSCItems << hbTrId("txt_mailips_setlabel_security_val_on_starttls")
-                << hbTrId("txt_mailips_setlabel_security_val_on_ssltls")
-                << hbTrId("txt_mailips_setlabel_security_val_off");
-
+                        << hbTrId("txt_mailips_setlabel_security_val_on_ssltls")
+                        << hbTrId("txt_mailips_setlabel_security_val_off");
     outgoingSecureConnectionItem->setContentWidgetData(QString("items"), outgoingShowSCItems);
     int outgoingSecureConnectionItemIndex = 
-        mSettingsHelper->getCorrectSecureRadioButtonIndex(outgoingSecureSockets, 
-														  outgoingSSLWrapper);
+        mSettingsHelper->getCorrectOutgoingSecureRadioButtonIndex();
     outgoingSecureConnectionItem->setContentWidgetData(QString("selected"), 
                                                        outgoingSecureConnectionItemIndex);
-    mForm->addConnection(outgoingSecureConnectionItem, SIGNAL(itemSelected(int)),    		  
-    		mSettingsHelper, SLOT(outgoingSecureConnectionItemChange(int)));
-    mForm->addConnection(outgoingSecureConnectionItem, SIGNAL(pressed(const QModelIndex &)),    		  
-    		mSettingsHelper, SLOT(outgoingSecureConnectionPress(const QModelIndex &)));
+    if (mHiddenItem) {
+        outgoingSecureConnectionItem->setEnabled(false);
+    }
     item.appendChild(outgoingSecureConnectionItem);
 
     // 6. Outgoing mail server port
-    QVariant outgoingPort;
-    mSettingsManager->readSetting(IpsServices::OutgoingPort, outgoingPort);
     CpSettingFormItemData *outgoingPortItem =
         new CpSettingFormItemData(HbDataFormModelItem::RadioButtonListItem, hbTrId(
             "txt_mailips_setlabel_outgoing_port"));
-    mSettingsHelper->insertContentItem(IpsServices::OutgoingPort, outgoingPortItem);    
-    mForm->addConnection(outgoingPortItem, SIGNAL(itemSelected(int)),
-                         mSettingsHelper, SLOT(outgoingPortChange(int)));
-    mForm->addConnection(outgoingPortItem, SIGNAL(pressed(const QModelIndex &)),              
-                         mSettingsHelper, SLOT(outgoingPortPress(const QModelIndex &)));
+    mSettingsHelper->insertContentItem(IpsServices::OutgoingPort, outgoingPortItem);
     QStringList outgoingPortItems;
     outgoingPortItems << hbTrId("txt_mailips_setlabel_incoming_port_default")
                       << hbTrId("txt_mailips_setlabel_incoming_port_user_defined");
     outgoingPortItem->setContentWidgetData(QString("items"), outgoingPortItems);
-    int outgoingPortItemIndex = 
-        mSettingsHelper->getCorrectOutgoingPortRadioButtonIndex(outgoingPort.toInt()); 
+    int outgoingPortItemIndex = mSettingsHelper->getCorrectOutgoingPortRadioButtonIndex(); 
     outgoingPortItem->setContentWidgetData(QString("selected"), outgoingPortItemIndex);
+    if (mHiddenItem) {
+        outgoingPortItem->setEnabled(false);
+    }
     item.appendChild(outgoingPortItem);
     
     // 7. Outgoing authentication.
@@ -532,10 +530,6 @@
         new CpSettingFormItemData(HbDataFormModelItem::RadioButtonListItem, hbTrId(
             "txt_mailips_setlabel_outgoing_mail_authentication"));
     mSettingsHelper->insertContentItem(IpsServices::SMTPAuthentication, outgoingAuthenticationItem);
-    mForm->addConnection(outgoingAuthenticationItem, SIGNAL(itemSelected(int)),
-                         mSettingsHelper, SLOT(outgoingAuthenticationChange(int)));
-    mForm->addConnection(outgoingAuthenticationItem, SIGNAL(pressed(const QModelIndex &)),              
-                         mSettingsHelper, SLOT(outgoingAuthenticationPress(const QModelIndex &)));
     QStringList outgoingAuthenticationItems;
     outgoingAuthenticationItems << hbTrId("txt_mailips_setlabel_outgoing_authentication_none")
                                 << hbTrId("txt_mailips_setlabel_outgoing_authentication_same")
@@ -545,28 +539,25 @@
         mSettingsHelper->getCorrectOutgoingAuthenticationRadioButtonIndex(); 
     outgoingAuthenticationItem->setContentWidgetData(QString("selected"), outgoingAuthenticationIndex);
     item.appendChild(outgoingAuthenticationItem);
+    if (mHiddenItem) {
+        outgoingAuthenticationItem->setEnabled(false);
+    }
     if (outgoingAuthenticationIndex == IpsServices::EMailAuthUserAuthentication) {
-        mSettingsHelper->createServerInfoGroupDynamicItems();
+        mSettingsHelper->createServerInfoGroupDynamicItems(mHiddenItem);
     }
     
     // 8. Folder path
     // This item is only shown for IMAP4 account.
     if (mSettingsManager->accountType() == IpsServices::EMailImap) {
-        QVariant folderPath;
-        mSettingsManager->readSetting(IpsServices::FolderPath, folderPath);
         CpSettingFormItemData *folderPathItem =
             new CpSettingFormItemData(HbDataFormModelItem::RadioButtonListItem, hbTrId(
                 "txt_mailips_setlabel_folder_path"));
         mSettingsHelper->insertContentItem(IpsServices::FolderPath, folderPathItem);    
-        mForm->addConnection(folderPathItem, SIGNAL(itemSelected(int)),
-                             mSettingsHelper, SLOT(folderPathChange(int)));
-        mForm->addConnection(folderPathItem, SIGNAL(pressed(const QModelIndex &)),              
-                             mSettingsHelper, SLOT(folderPathPress(const QModelIndex &)));
         QStringList folderPathItems;
         folderPathItems << hbTrId("txt_mailips_setlabel_folder_path_val_default")
-                       << hbTrId("txt_mailips_setlabel_folder_path_user_defined");
+                        << hbTrId("txt_mailips_setlabel_folder_path_user_defined");
         folderPathItem->setContentWidgetData(QString("items"), folderPathItems);
-        int folderPathItemIndex = mSettingsHelper->getCorrectInboxPathRadioButtonIndex(folderPath);
+        int folderPathItemIndex = mSettingsHelper->getCorrectFolderPathRadioButtonIndex();
         folderPathItem->setContentWidgetData(QString("selected"), folderPathItemIndex);
         item.appendChild(folderPathItem);
     }
Binary file ipsservices/nmipssettings/translations/mailips.qm has changed
--- a/ipsservices/nmipssettings/translations/mailips.ts	Fri Jun 11 13:27:14 2010 +0300
+++ b/ipsservices/nmipssettings/translations/mailips.ts	Wed Jun 23 18:00:21 2010 +0300
@@ -12,6 +12,26 @@
     <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>        
+    <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-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>        
+    <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-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_outgoing_mail_authentication">
     <comment>Setting label under Server info txt_mailips_subhead_server_info for defining the type of authentication for outgoing mail. Setting item in server info: what is used for outgoing mail authetication</comment>        
     <source>Outgoing mail authentication</source>
@@ -32,16 +52,6 @@
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_long_caption_mailips">
-    <comment>Name of the mail application.</comment>        
-    <source>Mail</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>qtl_pri_large_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>mail</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_folder_path_val_default">
     <comment>Value for txt_mailips_setlabel_folder_path. Default folder path will be used.</comment>        
     <source>Default</source>
@@ -52,63 +62,23 @@
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_mailips_setlabel_incoming_port">
-    <comment>Setting label under Server info txt_mailips_subhead_server_info for defining the incoming port for mail connection.</comment>        
-    <source>Incoming port</source>
+<message numerus="no" id="txt_mailips_dialog_heading_connection">
+    <comment>Title text in setting dialog opened from txt_mailips_setlabel_connection</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-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_setlabel_incoming_port_default">
-    <comment>Value for txt_mailips_setlabel_incoming_port</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-positionid>setlabel_13_val</extra-loc-positionid>
+    <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
+    <extra-loc-viewid>mail_15</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_incoming_mail_server">
-    <comment>Setting label under Server info txt_mailips_subhead_server_info for defining the incoming mail server. Setting item in server info</comment>        
-    <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-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_setlabel_my_name">
-    <comment>Setting item in Prefences: defines user&apos;s own name</comment>        
-    <source>My name</source>
+<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>        
+    <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_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_subhead_preferences">
-    <comment>Subheding. Group box for expanding/ collapsing preferences in settings view. Opens list of preferences where the user can define the name of the user (My name), Mailbox name and other settings.</comment>        
-    <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-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>        
-    <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-positionid>setlabel_5</extra-loc-positionid>
+    <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
+    <extra-loc-viewid>mail_16</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>
@@ -152,6 +122,16 @@
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
+<message numerus="no" id="txt_mailips_list_popup_sec_thursday">
+    <comment>Option item in txt_mailips_dialog_heading_receiving_weekdays setting dialog.</comment>        
+    <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-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_mail_server">
     <comment>Setting label under Server info txt_mailips_subhead_server_info for defining the outgoing mail server. Setting item in server info</comment>        
     <source>Outgoing mail server</source>
@@ -162,16 +142,6 @@
     <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>        
-    <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-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_the_mailbox_is_refreshed_as_defin">
     <comment>info text to explain the profile (txt_mailmfe_setlabel_selected_mode_val_user_defined)</comment>        
     <source>The mailbox is refreshed as defined by the user</source>
@@ -182,23 +152,13 @@
     <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_sat">
-    <comment>One of the values for txt_mailips_setlabel_receiving_weekdays. Saturday setting item</comment>        
-    <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-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_setlabel_download_images_val_wed">
-    <comment>One of the values for txt_mailips_setlabel_receiving_weekdays. Wednesday setting item</comment>        
-    <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-positionid>setlabel_3_val</extra-loc-positionid>
+<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>        
+    <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-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
@@ -232,23 +192,23 @@
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_mailips_setlabel_security_val_off">
-    <comment>Value for txt_mailips_setlabel_secure_connection. Secure connection off</comment>        
-    <source>Off</source>
+<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_dataform_button_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>mail_06_d</extra-loc-viewid>
-    <extra-loc-positionid>setlabel_11_12_val</extra-loc-positionid>
+    <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_setlabel_show_mail_in_other_folders">
-    <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 other folders (than Inbox) from server (50, 100, 200 or All).</comment>        
-    <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-positionid>setlabel_2</extra-loc-positionid>
+<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>        
+    <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-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
@@ -272,26 +232,6 @@
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_mailips_setlabel_refresh_mail">
-    <comment>Setting label under Receiving schedule &gt; Selected mode &gt; Save energy  (txt_mailips_setlabel_selected_mode_val_save_energy). Label for selecting the refreshing interval during daytime</comment>        
-    <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-positionid>setlabel_6</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_mail_address">
-    <comment>Setting label under User info for defining the user´s mail address related to the mailbox. Setting item in user info</comment>        
-    <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-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_mailbox_name">
     <comment>Setting item in Prefences: Defines the mailbox name</comment>        
     <source>Mailbox name</source>
@@ -302,13 +242,33 @@
     <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>        
-    <source>Connection</source>
+<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>        
+    <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-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_wednesday">
+    <comment>Option item in txt_mailips_dialog_heading_receiving_weekdays setting dialog.</comment>        
+    <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-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_d</extra-loc-viewid>
-    <extra-loc-positionid>setlabel_8</extra-loc-positionid>
+    <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>
@@ -322,6 +282,16 @@
     <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>
@@ -342,46 +312,6 @@
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_mailips_subhead_receiving_schedule">
-    <comment>Subheading. Group box for expanding/ collapsing synchronization settings in settings view. Opens list of settings related to how often/at what intervals the mailbox is synchronized with the content on the mail server ie. how often/at what intervals the devices receives data from the mail server.</comment>        
-    <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-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_download_images_val_thu">
-    <comment>One of the values for txt_mailips_setlabel_receiving_weekdays. Thursday setting item</comment>        
-    <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-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_subhead_server_info">
-    <comment>Subheading. Group box for expanding/ collapsing Server settings in settings view. Opens list of settings related to Server settings (server name, domain name, secure connection on/off). </comment>        
-    <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-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_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-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_list_the_mailbox_is_refreshed_every_15">
     <comment>info text to explain the profile (txt_mailmfe_setlabel_selected_mode_val_save_energy)</comment>        
     <source>The mailbox is refreshed every 15 minutes during daytime</source>
@@ -392,43 +322,23 @@
     <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>        
-    <source>User defined</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>qtl_dataform_combobox_sec</extra-loc-layout_id>    
+<message numerus="no" id="txt_mailips_list_popup_sec_all">
+    <comment>One of the values for txt_mailips_setlabel_show_mail_in_inbox and txt_mailips_setlabel_show_mail_in_other_folders. The user can select that all the mail messages in the mailbox are synced to phone..</comment>        
+    <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-positionid>setlabel_20_val</extra-loc-positionid>
+    <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_fri">
-    <comment>One of the values for txt_mailips_setlabel_receiving_weekdays. Friday setting item</comment>        
-    <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-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_setlabel_incoming_port_user_defined">
-    <comment>Value for txt_mailips_setlabel_incoming_port</comment>        
-    <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-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_val_every_4_hours">
-    <comment>Value for txt_mailips_setlabel_refresh_mail. The mailbox is refreshed every four hours</comment>        
-    <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-positionid>setlabel_6_val</extra-loc-positionid>
+<message numerus="no" id="txt_mailips_list_popup_sec_saturday">
+    <comment>Option item in txt_mailips_dialog_heading_receiving_weekdays setting dialog.</comment>        
+    <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-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
@@ -442,16 +352,6 @@
     <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>        
-    <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-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_the_mailbox_is_uptodate_during">
     <comment>info text to explain the profile (txt_mailmfe_setlabel_selected_mode_val_keep_uptoda)</comment>        
     <source>The mailbox is up-to-date during daytime</source>
@@ -462,13 +362,13 @@
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_mailips_setlabel_outgoing_authentication_user">
-    <comment>Value for txt_mailips_setlabel_outgoing_mail_authentication. User defines the authentication</comment>        
-    <source>User authentication</source>
+<message numerus="no" id="txt_mailips_dialog_heading_outgoing_authentication">
+    <comment>Title text in setting dialog opened from txt_mailips_setlabel_refresh_mail</comment>        
+    <source>Outgoing mail 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-positionid>setlabel_10_val</extra-loc-positionid>
+    <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
+    <extra-loc-viewid>mail_14</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>
@@ -492,16 +392,6 @@
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_mailips_setlabel_password">
-    <comment>Setting label under User info for defining the user´s mail password related to the mailbox. Setting item in user info</comment>        
-    <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-positionid>setlabel_3</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>        
     <source>Fetch manually</source>
@@ -512,26 +402,16 @@
     <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_only_by">
-    <comment>info text to explain the profile (txt_mailmfe_setlabel_selected_mode_val_fetch_manually)</comment>        
-    <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>
+<message numerus="no" id="txt_mailips_list_popup_sec_no_authentication">
+    <comment>Option item in txt_mailips_dialog_heading_refresh_mail setting dialog.</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-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_val_every_15_minutes">
-    <comment>Value for txt_mailips_setlabel_refresh_mail. The mailbox is refreshed every 15 minutes</comment>        
-    <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-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_day_start_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 start time of the day</comment>        
     <source>Day start time</source>
@@ -542,13 +422,13 @@
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_mailips_subhead_user_info">
-    <comment>Subheading. Group box for expanding/ collapsing credential settings in settings view. Opens list of settings related to the user info (mail address, username, password) for the mailbox. </comment>        
-    <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-positionid>subhead</extra-loc-positionid>
+<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>        
+    <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-positionid>list</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
@@ -572,13 +452,473 @@
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_mailnips_setlabel_signature">
-    <comment>Setting item in preferences.</comment>        
-    <source>Signature</source>
+<message numerus="no" id="txt_mailips_list_popup_sec_user_authentication">
+    <comment>Option item in txt_mailips_dialog_heading_refresh_mail setting dialog.</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-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_none">
+    <comment>Value for txt_mailips_setlabel_outgoing_mail_authentication. No authetication</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_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_long_caption_mailips">
+    <comment>Name of the mail application.</comment>        
+    <source>Mail</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>qtl_pri_large_graphic</extra-loc-layout_id>    
+    <extra-loc-viewid>mail</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_incoming_port">
+    <comment>Setting label under Server info txt_mailips_subhead_server_info for defining the incoming port for mail connection.</comment>        
+    <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-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>        
+    <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-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_incoming_port_default">
+    <comment>Value for txt_mailips_setlabel_incoming_port</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-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>        
+    <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-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>        
+    <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-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_friday">
+    <comment>Option item in txt_mailips_dialog_heading_receiving_weekdays setting dialog.</comment>        
+    <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-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_incoming_mail_server">
+    <comment>Setting label under Server info txt_mailips_subhead_server_info for defining the incoming mail server. Setting item in server info</comment>        
+    <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-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>        
+    <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-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_my_name">
+    <comment>Setting item in Prefences: defines user&apos;s own name</comment>        
+    <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-positionid>setlabel_10</extra-loc-positionid>
+    <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_subhead_preferences">
+    <comment>Subheding. Group box for expanding/ collapsing preferences in settings view. Opens list of preferences where the user can define the name of the user (My name), Mailbox name and other settings.</comment>        
+    <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-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>        
+    <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-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>
+    <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_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>        
+    <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-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_setlabel_download_images_val_wed">
+    <comment>One of the values for txt_mailips_setlabel_receiving_weekdays. Wednesday setting item</comment>        
+    <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-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_setlabel_download_images_val_sat">
+    <comment>One of the values for txt_mailips_setlabel_receiving_weekdays. Saturday setting item</comment>        
+    <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-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_sunday">
+    <comment>Option item in txt_mailips_dialog_heading_receiving_weekdays setting dialog.</comment>        
+    <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-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_security_val_off">
+    <comment>Value for txt_mailips_setlabel_secure_connection. Secure connection off</comment>        
+    <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-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_setlabel_show_mail_in_other_folders">
+    <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 other folders (than Inbox) from server (50, 100, 200 or All).</comment>        
+    <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-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_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-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_tuesday">
+    <comment>Option item in txt_mailips_dialog_heading_receiving_weekdays setting dialog.</comment>        
+    <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-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_refresh_mail">
+    <comment>Setting label under Receiving schedule &gt; Selected mode &gt; Save energy  (txt_mailips_setlabel_selected_mode_val_save_energy). Label for selecting the refreshing interval during daytime</comment>        
+    <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-positionid>setlabel_6</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_mail_address">
+    <comment>Setting label under User info for defining the user´s mail address related to the mailbox. Setting item in user info</comment>        
+    <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-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>        
+    <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-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>        
+    <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-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_thu">
+    <comment>One of the values for txt_mailips_setlabel_receiving_weekdays. Thursday setting item</comment>        
+    <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-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_subhead_receiving_schedule">
+    <comment>Subheading. Group box for expanding/ collapsing synchronization settings in settings view. Opens list of settings related to how often/at what intervals the mailbox is synchronized with the content on the mail server ie. how often/at what intervals the devices receives data from the mail server.</comment>        
+    <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-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_subhead_server_info">
+    <comment>Subheading. Group box for expanding/ collapsing Server settings in settings view. Opens list of settings related to Server settings (server name, domain name, secure connection on/off). </comment>        
+    <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-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_list_popup_sec_monday">
+    <comment>Option item in txt_mailips_dialog_heading_receiving_weekdays setting dialog.</comment>        
+    <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-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_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-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>        
+    <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-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>        
+    <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-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_download_images_val_fri">
+    <comment>One of the values for txt_mailips_setlabel_receiving_weekdays. Friday setting item</comment>        
+    <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-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_setlabel_val_every_4_hours">
+    <comment>Value for txt_mailips_setlabel_refresh_mail. The mailbox is refreshed every four hours</comment>        
+    <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-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_incoming_port_user_defined">
+    <comment>Value for txt_mailips_setlabel_incoming_port</comment>        
+    <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-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>        
+    <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-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>        
+    <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-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_outgoing_authentication_user">
+    <comment>Value for txt_mailips_setlabel_outgoing_mail_authentication. User defines the authentication</comment>        
+    <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-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>        
+    <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-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_password">
+    <comment>Setting label under User info for defining the user´s mail password related to the mailbox. Setting item in user info</comment>        
+    <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-positionid>setlabel_3</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_every_15_minutes">
+    <comment>Value for txt_mailips_setlabel_refresh_mail. The mailbox is refreshed every 15 minutes</comment>        
+    <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-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_list_the_mailbox_is_refreshed_only_by">
+    <comment>info text to explain the profile (txt_mailmfe_setlabel_selected_mode_val_fetch_manually)</comment>        
+    <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-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_subhead_user_info">
+    <comment>Subheading. Group box for expanding/ collapsing credential settings in settings view. Opens list of settings related to the user info (mail address, username, password) for the mailbox. </comment>        
+    <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-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>        
+    <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-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_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-positionid>setlabel_1</extra-loc-positionid>
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
@@ -592,16 +932,6 @@
     <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-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_button_delete_mailbox">
     <comment>Button for deleting the mailbox. </comment>        
     <source>Delete mailbox</source>
@@ -612,15 +942,5 @@
     <extra-loc-feature>mail</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_mailips_setlabel_outgoing_authentication_none">
-    <comment>Value for txt_mailips_setlabel_outgoing_mail_authentication. No authetication</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_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>
 </context>
 </TS>