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