# HG changeset patch # User hgs # Date 1273798105 -10800 # Node ID b4618f2cf6acd56b650cd00a4f412b497a827cd7 # Parent 2dc6caa42ec3d6866b9ad226424ae3f6346e0613 201017_1 diff -r 2dc6caa42ec3 -r b4618f2cf6ac emailuis/nmailui/src/nmmessagelistview.cpp --- a/emailuis/nmailui/src/nmmessagelistview.cpp Fri May 14 15:41:10 2010 +0300 +++ b/emailuis/nmailui/src/nmmessagelistview.cpp Fri May 14 03:48:25 2010 +0300 @@ -597,12 +597,12 @@ break; case NmFolderSent: { - mFolderLabel->setPlainText(hbTrId("txt_mail_subhead_sent_items")); + mFolderLabel->setPlainText(hbTrId("txt_mail_subhead_sent")); } break; case NmFolderDeleted: { - mFolderLabel->setPlainText(hbTrId("txt_mail_subhead_deleted_items")); + mFolderLabel->setPlainText(hbTrId("txt_mail_subhead_deleted")); } break; case NmFolderInbox: diff -r 2dc6caa42ec3 -r b4618f2cf6ac emailuis/nmframeworkadapter/src/nmfwaaddattachmentsoperation.cpp --- a/emailuis/nmframeworkadapter/src/nmfwaaddattachmentsoperation.cpp Fri May 14 15:41:10 2010 +0300 +++ b/emailuis/nmframeworkadapter/src/nmfwaaddattachmentsoperation.cpp Fri May 14 03:48:25 2010 +0300 @@ -60,7 +60,7 @@ } /*! - Called after base object construction, runs the + Called after base object construction via timer event, runs the async operation. \sa NmOperation @@ -109,10 +109,7 @@ HBufC *fileName = NmConverter::qstringToHBufCLC(mFileList.first()); mRequestId = mFSMessage->AddNewAttachmentL(*fileName, *this); CleanupStack::PopAndDestroy(fileName); - } else { - completeOperation(NmNoError); } - } /*! diff -r 2dc6caa42ec3 -r b4618f2cf6ac emailuis/nmframeworkadapter/src/nmfwaremoveattachmentoperation.cpp --- a/emailuis/nmframeworkadapter/src/nmfwaremoveattachmentoperation.cpp Fri May 14 15:41:10 2010 +0300 +++ b/emailuis/nmframeworkadapter/src/nmfwaremoveattachmentoperation.cpp Fri May 14 03:48:25 2010 +0300 @@ -53,7 +53,7 @@ } /*! - Called after base object construction, runs the + Called after base object construction via timer event, runs the async operation. \sa NmOperation @@ -83,22 +83,16 @@ // Search through all attachments from message and remove attachment // if message part match. - bool found(false); for (int i=0; iGetPartId().GetNmId().id()) { mRequestId = msg->RemoveChildPartL(attachments[i]->GetPartId(),*this); - found = true; break; } } - attachments.ResetAndDestroy(); + attachments.ResetAndDestroy(); + delete msg; msg = NULL; - // if attachment is not found, request to plugin is not made - // and the operation should be completed here - if (!found) { - completeOperation(NmNotFoundError); - } } /*! diff -r 2dc6caa42ec3 -r b4618f2cf6ac ipsservices/nmimapclientplugin/inc/nmimapclientplugin.h --- a/ipsservices/nmimapclientplugin/inc/nmimapclientplugin.h Fri May 14 15:41:10 2010 +0300 +++ b/ipsservices/nmimapclientplugin/inc/nmimapclientplugin.h Fri May 14 03:48:25 2010 +0300 @@ -21,7 +21,7 @@ #include "nmbaseclientplugin.h" #include "nmuiextensioninterface.h" #include "nmuienginedef.h" -#include "nmactionrequest.h" +#include "nmactionrequest.h" class NmUiEngine; class NmSettingsViewLauncher; @@ -47,11 +47,12 @@ void switchToStandardFolderOutbox(); void switchToStandardFolderDrafts(); void switchToStandardFolderSent(); - + protected: virtual quint32 pluginId(); - + private: + NmUiEngine *mUiEngine; // Singleton instance NmActionRequest mListOptionsMenuRequest; NmSettingsViewLauncher *mSettingsViewLauncher; // owned }; diff -r 2dc6caa42ec3 -r b4618f2cf6ac ipsservices/nmimapclientplugin/src/nmimapclientplugin.cpp --- a/ipsservices/nmimapclientplugin/src/nmimapclientplugin.cpp Fri May 14 15:41:10 2010 +0300 +++ b/ipsservices/nmimapclientplugin/src/nmimapclientplugin.cpp Fri May 14 03:48:25 2010 +0300 @@ -33,9 +33,11 @@ Constructs a new NmImapClientPlugin. */ NmImapClientPlugin::NmImapClientPlugin() -: mListOptionsMenuRequest(NULL), +: mUiEngine(NULL), +mListOptionsMenuRequest(NULL), mSettingsViewLauncher(NULL) { + mUiEngine = NmUiEngine::instance(); } /*! @@ -108,7 +110,7 @@ // Set active action NmFolderType curFolderType(NmFolderOther); if (mUiEngine) { - curFolderType = mUiEngine->folderTypeById(request.mailboxId(),request.folderId()); + curFolderType = mUiEngine->folderTypeById(request.mailboxId(),request.folderId()); } switch (curFolderType){ case NmFolderInbox: { diff -r 2dc6caa42ec3 -r b4618f2cf6ac ipsservices/nmpopclientplugin/inc/nmpopclientplugin.h --- a/ipsservices/nmpopclientplugin/inc/nmpopclientplugin.h Fri May 14 15:41:10 2010 +0300 +++ b/ipsservices/nmpopclientplugin/inc/nmpopclientplugin.h Fri May 14 03:48:25 2010 +0300 @@ -21,7 +21,7 @@ #include "nmbaseclientplugin.h" #include "nmuiextensioninterface.h" #include "nmuienginedef.h" -#include "nmactionrequest.h" +#include "nmactionrequest.h" class NmUiEngine; class NmSettingsViewLauncher; @@ -47,11 +47,12 @@ void switchToStandardFolderOutbox(); void switchToStandardFolderDrafts(); void switchToStandardFolderSent(); - + protected: virtual quint32 pluginId(); private: + NmUiEngine *mUiEngine; // Singleton instance NmActionRequest mListOptionsMenuRequest; NmSettingsViewLauncher *mSettingsViewLauncher; // owned }; diff -r 2dc6caa42ec3 -r b4618f2cf6ac ipsservices/nmpopclientplugin/src/nmpopclientplugin.cpp --- a/ipsservices/nmpopclientplugin/src/nmpopclientplugin.cpp Fri May 14 15:41:10 2010 +0300 +++ b/ipsservices/nmpopclientplugin/src/nmpopclientplugin.cpp Fri May 14 03:48:25 2010 +0300 @@ -34,9 +34,11 @@ */ NmPopClientPlugin::NmPopClientPlugin() : mSettingsViewLauncher(NULL), +mUiEngine(NULL), mListOptionsMenuRequest(NULL) { NMLOG("NmPopClientPlugin::NmPopClientPlugin()-->"); + mUiEngine = NmUiEngine::instance(); NMLOG("<--NmPopClientPlugin::NmPopClientPlugin()"); } @@ -74,24 +76,24 @@ NMLOG(QString("request.mailboxId().pluginId32()=%1").arg(request.mailboxId().pluginId32())); return; } - + // Get the NmBaseClientPlugin implementation of the UI actions. NmBaseClientPlugin::getActions(request, actionList); - + // Append POP plugin specific actions switch (request.menuType()) { case NmActionOptionsMenu: - { + { if (request.contextView()==NmActionContextViewMessageList){ mListOptionsMenuRequest = request; // Create sub-menu for standard folders selection HbMenu *standardFolders = new HbMenu(); - NmAction *inboxAction = new NmAction(0); + NmAction *inboxAction = new NmAction(0); inboxAction->setObjectName("popclientplugin_folders_inbox"); inboxAction->setText(hbTrId("txt_mail_opt_folders_inbox")); inboxAction->setCheckable(true); connect(inboxAction, SIGNAL(triggered()), this, SLOT(switchToStandardFolderInbox())); - standardFolders->addAction(inboxAction); + standardFolders->addAction(inboxAction); NmAction *outboxAction = new NmAction(0); outboxAction->setObjectName("popclientplugin_folders_outbox"); outboxAction->setText(hbTrId("txt_mail_opt_folders_outbox")); @@ -109,12 +111,12 @@ sentAction->setText(hbTrId("txt_mail_opt_folders_sent")); sentAction->setCheckable(true); connect(sentAction, SIGNAL(triggered()), this, SLOT(switchToStandardFolderSent())); - standardFolders->addAction(sentAction); + standardFolders->addAction(sentAction); // Set active action NmFolderType curFolderType(NmFolderOther); if (mUiEngine) { - curFolderType = mUiEngine->folderTypeById(request.mailboxId(),request.folderId()); - } + curFolderType = mUiEngine->folderTypeById(request.mailboxId(),request.folderId()); + } switch (curFolderType){ case NmFolderInbox: { inboxAction->setChecked(true); @@ -123,7 +125,7 @@ case NmFolderOutbox: { outboxAction->setChecked(true); break; - } + } case NmFolderDrafts: { draftsAction->setChecked(true); break; @@ -133,20 +135,20 @@ break; } } - + // Add folders selection with sub-menu - NmAction *foldersAction = new NmAction(0); + NmAction *foldersAction = new NmAction(0); foldersAction->setObjectName("baseclientplugin_folders"); foldersAction->setText(hbTrId("txt_mail_opt_folders")); foldersAction->setMenu(standardFolders); - actionList.append(foldersAction); + actionList.append(foldersAction); } } break; default: break; - } - + } + NMLOG("<--NmPopClientPlugin::getActions()"); } @@ -184,12 +186,12 @@ mSettingsViewLauncher->launchSettingsView(id, mailbox->name()); } - + NMLOG("<--NmPopClientPlugin::settings()"); } /*! - Private slot to switch message list contents + Private slot to switch message list contents to standard folder inbox */ void NmPopClientPlugin::switchToStandardFolderInbox() @@ -198,13 +200,13 @@ NmId folderId=mUiEngine->standardFolderId(mListOptionsMenuRequest.mailboxId(),NmFolderInbox); NmActionResponse response(NmActionResponseCommandSwitchFolder, NmActionOptionsMenu, NmActionContextViewNone, mListOptionsMenuRequest.mailboxId(), - folderId); + folderId); mListOptionsMenuRequest.observer()->handleActionCommand(response); } } /*! - Private slot to switch message list contents + Private slot to switch message list contents to standard folder outbox */ void NmPopClientPlugin::switchToStandardFolderOutbox() @@ -213,13 +215,13 @@ NmId folderId=mUiEngine->standardFolderId(mListOptionsMenuRequest.mailboxId(),NmFolderOutbox); NmActionResponse response(NmActionResponseCommandSwitchFolder, NmActionOptionsMenu, NmActionContextViewNone, mListOptionsMenuRequest.mailboxId(), - folderId); + folderId); mListOptionsMenuRequest.observer()->handleActionCommand(response); - } + } } /*! - Private slot to switch message list contents + Private slot to switch message list contents to standard folder drafts */ void NmPopClientPlugin::switchToStandardFolderDrafts() @@ -228,13 +230,13 @@ NmId folderId=mUiEngine->standardFolderId(mListOptionsMenuRequest.mailboxId(),NmFolderDrafts); NmActionResponse response(NmActionResponseCommandSwitchFolder, NmActionOptionsMenu, NmActionContextViewNone, mListOptionsMenuRequest.mailboxId(), - folderId); + folderId); mListOptionsMenuRequest.observer()->handleActionCommand(response); } } /*! - Private slot to switch message list contents + Private slot to switch message list contents to standard folder sent */ void NmPopClientPlugin::switchToStandardFolderSent() @@ -243,7 +245,7 @@ NmId folderId=mUiEngine->standardFolderId(mListOptionsMenuRequest.mailboxId(),NmFolderSent); NmActionResponse response(NmActionResponseCommandSwitchFolder, NmActionOptionsMenu, NmActionContextViewNone, mListOptionsMenuRequest.mailboxId(), - folderId); + folderId); mListOptionsMenuRequest.observer()->handleActionCommand(response); } }