--- a/messagingapp/msgui/unifiedviewer/src/unifiedviewer.cpp Fri Jun 04 10:25:39 2010 +0100
+++ b/messagingapp/msgui/unifiedviewer/src/unifiedviewer.cpp Fri Jun 11 13:35:48 2010 +0300
@@ -38,8 +38,6 @@
#include "conversationsengine.h"
#include "debugtraces.h"
#include "nativemessageconsts.h"
-#include "mmsconformancecheck.h"
-#include "UniEditorGenUtils.h" // This is needed for KDefaultMaxSize
// LOCAL CONSTANTS
const QString REPLY_ICON("qtg_mono_reply");
@@ -57,8 +55,10 @@
// UnifiedViewer::UnifiedViewer
// constructor
//----------------------------------------------------------------------------
-UnifiedViewer::UnifiedViewer(const qint32 messageId, QGraphicsItem *parent) :
- MsgBaseView(parent)
+UnifiedViewer::UnifiedViewer(const qint32 messageId,
+ int canForwardMessage,
+ QGraphicsItem *parent) :
+ MsgBaseView(parent), mForwardMessage(false)
{
QDEBUG_WRITE("UnifiedViewer contruction start");
@@ -70,6 +70,8 @@
mMessageId = messageId;
mViewFeeder = new UniViewerFeeder(mMessageId, this);
+ if (canForwardMessage > 0) mForwardMessage = true;
+
mScrollArea = new UniScrollArea(this);
this->setWidget(mScrollArea);
@@ -115,10 +117,14 @@
else
{
toolbar->addAction(HbIcon(REPLY_ICON), "");
- toolbar->addAction(HbIcon(REPLY_ALL_ICON), "");
+
+ if (mViewFeeder->recipientCount() > 1)
+ {
+ toolbar->addAction(HbIcon(REPLY_ALL_ICON), "");
+ }
}
- if (validateMsgForForward())
+ if (mForwardMessage)
{
toolbar->addAction(HbIcon(FORWARD_ICON), "", this, SLOT(handleFwdAction()));
}
@@ -265,27 +271,6 @@
}
//---------------------------------------------------------------
-// UnifiedViewer::validateMsgForForward
-// @see header file
-//---------------------------------------------------------------
-bool UnifiedViewer::validateMsgForForward()
-{
- if (mViewFeeder->msgType() == KSenduiMtmMmsUidValue)
- {
- bool retValue = false;
-
- //Validate if the mms msg can be forwarded or not
- MmsConformanceCheck* mmsConformanceCheck = new MmsConformanceCheck;
- retValue = mmsConformanceCheck->validateMsgForForward(mMessageId);
-
- delete mmsConformanceCheck;
- return retValue;
- }
-
- return true;
-}
-
-//---------------------------------------------------------------
// UnifiedViewer::onDialogDeleteMsg
// @see header file
//---------------------------------------------------------------