--- 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);
}
}