--- a/emailuis/nmailui/src/nmmessagelistview.cpp Fri May 14 03:48:25 2010 +0300
+++ b/emailuis/nmailui/src/nmmessagelistview.cpp Fri May 14 04:17:40 2010 +0300
@@ -597,12 +597,12 @@
break;
case NmFolderSent:
{
- mFolderLabel->setPlainText(hbTrId("txt_mail_subhead_sent"));
+ mFolderLabel->setPlainText(hbTrId("txt_mail_subhead_sent_items"));
}
break;
case NmFolderDeleted:
{
- mFolderLabel->setPlainText(hbTrId("txt_mail_subhead_deleted"));
+ mFolderLabel->setPlainText(hbTrId("txt_mail_subhead_deleted_items"));
}
break;
case NmFolderInbox:
--- a/emailuis/nmframeworkadapter/src/nmfwaaddattachmentsoperation.cpp Fri May 14 03:48:25 2010 +0300
+++ b/emailuis/nmframeworkadapter/src/nmfwaaddattachmentsoperation.cpp Fri May 14 04:17:40 2010 +0300
@@ -60,7 +60,7 @@
}
/*!
- Called after base object construction via timer event, runs the
+ Called after base object construction, runs the
async operation.
\sa NmOperation
@@ -109,7 +109,10 @@
HBufC *fileName = NmConverter::qstringToHBufCLC(mFileList.first());
mRequestId = mFSMessage->AddNewAttachmentL(*fileName, *this);
CleanupStack::PopAndDestroy(fileName);
+ } else {
+ completeOperation(NmNoError);
}
+
}
/*!
--- a/emailuis/nmframeworkadapter/src/nmfwaremoveattachmentoperation.cpp Fri May 14 03:48:25 2010 +0300
+++ b/emailuis/nmframeworkadapter/src/nmfwaremoveattachmentoperation.cpp Fri May 14 04:17:40 2010 +0300
@@ -53,7 +53,7 @@
}
/*!
- Called after base object construction via timer event, runs the
+ Called after base object construction, runs the
async operation.
\sa NmOperation
@@ -83,16 +83,22 @@
// Search through all attachments from message and remove attachment
// if message part match.
+ bool found(false);
for (int i=0; i<attachments.Count(); ++i) {
if (mAttachmentPartId.id() == attachments[i]->GetPartId().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);
+ }
}
/*!
--- a/ipsservices/nmimapclientplugin/inc/nmimapclientplugin.h Fri May 14 03:48:25 2010 +0300
+++ b/ipsservices/nmimapclientplugin/inc/nmimapclientplugin.h Fri May 14 04:17:40 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,12 +47,11 @@
void switchToStandardFolderOutbox();
void switchToStandardFolderDrafts();
void switchToStandardFolderSent();
-
+
protected:
virtual quint32 pluginId();
-
+
private:
- NmUiEngine *mUiEngine; // Singleton instance
NmActionRequest mListOptionsMenuRequest;
NmSettingsViewLauncher *mSettingsViewLauncher; // owned
};
--- a/ipsservices/nmimapclientplugin/src/nmimapclientplugin.cpp Fri May 14 03:48:25 2010 +0300
+++ b/ipsservices/nmimapclientplugin/src/nmimapclientplugin.cpp Fri May 14 04:17:40 2010 +0300
@@ -33,11 +33,9 @@
Constructs a new NmImapClientPlugin.
*/
NmImapClientPlugin::NmImapClientPlugin()
-: mUiEngine(NULL),
-mListOptionsMenuRequest(NULL),
+: mListOptionsMenuRequest(NULL),
mSettingsViewLauncher(NULL)
{
- mUiEngine = NmUiEngine::instance();
}
/*!
@@ -110,7 +108,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: {
--- a/ipsservices/nmpopclientplugin/inc/nmpopclientplugin.h Fri May 14 03:48:25 2010 +0300
+++ b/ipsservices/nmpopclientplugin/inc/nmpopclientplugin.h Fri May 14 04:17:40 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,12 +47,11 @@
void switchToStandardFolderOutbox();
void switchToStandardFolderDrafts();
void switchToStandardFolderSent();
-
+
protected:
virtual quint32 pluginId();
private:
- NmUiEngine *mUiEngine; // Singleton instance
NmActionRequest mListOptionsMenuRequest;
NmSettingsViewLauncher *mSettingsViewLauncher; // owned
};
--- a/ipsservices/nmpopclientplugin/src/nmpopclientplugin.cpp Fri May 14 03:48:25 2010 +0300
+++ b/ipsservices/nmpopclientplugin/src/nmpopclientplugin.cpp Fri May 14 04:17:40 2010 +0300
@@ -34,11 +34,9 @@
*/
NmPopClientPlugin::NmPopClientPlugin()
: mSettingsViewLauncher(NULL),
-mUiEngine(NULL),
mListOptionsMenuRequest(NULL)
{
NMLOG("NmPopClientPlugin::NmPopClientPlugin()-->");
- mUiEngine = NmUiEngine::instance();
NMLOG("<--NmPopClientPlugin::NmPopClientPlugin()");
}
@@ -76,24 +74,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"));
@@ -111,12 +109,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);
@@ -125,7 +123,7 @@
case NmFolderOutbox: {
outboxAction->setChecked(true);
break;
- }
+ }
case NmFolderDrafts: {
draftsAction->setChecked(true);
break;
@@ -135,20 +133,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()");
}
@@ -186,12 +184,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()
@@ -200,13 +198,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()
@@ -215,13 +213,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()
@@ -230,13 +228,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()
@@ -245,7 +243,7 @@
NmId folderId=mUiEngine->standardFolderId(mListOptionsMenuRequest.mailboxId(),NmFolderSent);
NmActionResponse response(NmActionResponseCommandSwitchFolder, NmActionOptionsMenu,
NmActionContextViewNone, mListOptionsMenuRequest.mailboxId(),
- folderId);
+ folderId);
mListOptionsMenuRequest.observer()->handleActionCommand(response);
}
}