27 #include <centralrepository.h> |
27 #include <centralrepository.h> |
28 #include <MmsEngineDomainCRKeys.h> |
28 #include <MmsEngineDomainCRKeys.h> |
29 #include <ccsdefs.h> |
29 #include <ccsdefs.h> |
30 #include <xqappmgr.h> |
30 #include <xqappmgr.h> |
31 #include <xqaiwrequest.h> |
31 #include <xqaiwrequest.h> |
|
32 #include <xqserviceutil.h> |
32 #include <sqldb.h> |
33 #include <sqldb.h> |
33 |
34 |
34 // USER INCLUDES |
35 // USER INCLUDES |
35 #include "uniscrollarea.h" |
36 #include "uniscrollarea.h" |
36 #include "unicontentswidget.h" |
37 #include "unicontentswidget.h" |
41 #include "conversationsenginedefines.h" |
42 #include "conversationsenginedefines.h" |
42 #include "conversationsengine.h" |
43 #include "conversationsengine.h" |
43 #include "debugtraces.h" |
44 #include "debugtraces.h" |
44 #include "nativemessageconsts.h" |
45 #include "nativemessageconsts.h" |
45 #include "mmsconformancecheck.h" |
46 #include "mmsconformancecheck.h" |
|
47 #include "msgsendutil.h" |
46 |
48 |
47 // LOCAL CONSTANTS |
49 // LOCAL CONSTANTS |
48 const QString REPLY_ICON("qtg_mono_reply"); |
50 const QString REPLY_ICON("qtg_mono_reply"); |
49 const QString REPLY_ALL_ICON("qtg_mono_reply_all"); |
51 const QString REPLY_ALL_ICON("qtg_mono_reply_all"); |
50 const QString FORWARD_ICON("qtg_mono_forward_msg"); |
52 const QString FORWARD_ICON("qtg_mono_forward_msg"); |
112 HbToolBar* toolbar = this->toolBar(); |
114 HbToolBar* toolbar = this->toolBar(); |
113 toolbar->setOrientation(Qt::Horizontal); |
115 toolbar->setOrientation(Qt::Horizontal); |
114 |
116 |
115 int sendingState = mViewFeeder->sendingState(); |
117 int sendingState = mViewFeeder->sendingState(); |
116 |
118 |
117 if (mViewFeeder->sendingState() == ConvergedMessage::Failed) |
119 if(mViewFeeder->sendingState() != ConvergedMessage::Failed) |
118 { |
|
119 toolbar->addAction(HbIcon(SEND_ICON), ""); |
|
120 } |
|
121 else |
|
122 { |
120 { |
123 // do not show reply option for multi recipient outgoing message |
121 // do not show reply option for multi recipient outgoing message |
124 if(!(!mViewFeeder->isIncoming() && mViewFeeder->recipientCount()>1)) |
122 if(!(!mViewFeeder->isIncoming() && mViewFeeder->recipientCount()>1)) |
125 { |
123 { |
126 toolbar->addAction(HbIcon(REPLY_ICON), "", this, SLOT(handleReplyAction())); |
124 QString from, alias; |
|
125 mViewFeeder->fromAddressAndAlias(from, alias); |
|
126 QScopedPointer<MsgSendUtil> sendUtil(new MsgSendUtil()); |
|
127 if (!(mViewFeeder->isIncoming() && !(sendUtil->isValidAddress(from)))) { |
|
128 toolbar->addAction(HbIcon(REPLY_ICON), "", this, SLOT(handleReplyAction())); |
|
129 } |
127 } |
130 } |
128 |
131 |
129 if (mViewFeeder->recipientCount() > 1) |
132 if (mViewFeeder->recipientCount() > 1) |
130 { |
133 { |
131 toolbar->addAction(HbIcon(REPLY_ALL_ICON), "", this, SLOT(handleReplyAllAction())); |
134 toolbar->addAction(HbIcon(REPLY_ALL_ICON), "", this, SLOT(handleReplyAllAction())); |
135 if (isForwardOk()) |
138 if (isForwardOk()) |
136 { |
139 { |
137 toolbar->addAction(HbIcon(FORWARD_ICON), "", this, SLOT(handleFwdAction())); |
140 toolbar->addAction(HbIcon(FORWARD_ICON), "", this, SLOT(handleFwdAction())); |
138 } |
141 } |
139 |
142 |
140 toolbar->addAction(HbIcon(DELETE_ICON), "", this, SLOT(handleDeleteAction())); |
143 // No delete action for viewer when launched as a service |
|
144 if(!XQServiceUtil::isService()) |
|
145 { |
|
146 toolbar->addAction(HbIcon(DELETE_ICON), "", |
|
147 this, SLOT(handleDeleteAction())); |
|
148 } |
141 } |
149 } |
142 |
150 |
143 //--------------------------------------------------------------- |
151 //--------------------------------------------------------------- |
144 // UnifiedViewer::clearContent |
152 // UnifiedViewer::clearContent |
145 // @see header file |
153 // @see header file |