{
UnknownType,
MainType, //Type from home screen
- ReplyType, //Type for reply message button clicked
- ViewType, //Type for view message button clicked
+ ReplyType, //Type for reply message button clicked from Active Notification
+ ViewType, //Type for view message button clicked from Active Notification
NotificationType, //Type from notification panel
- SendFailedType //Send failed message type
+ SendFailedType //Send failed message type from notification panel
};
public:
MsgId getMessageId() const;
DefaultType getDefaultType() const;
+ const std::string& getReplyText() const;
private:
bool isNotificationPanel(app_control_h handle) const;
void parse(app_control_h handle);
void replyMessage(app_control_h handle);
void viewMessage(app_control_h handle);
+ void makeReplyText(app_control_h handle);
private:
MsgId m_MsgId;
DefaultType m_DefaultType;
+ std::string m_ReplyText;
};
}
*/
#include "AppControlDefault.h"
+#include "AppControlUtils.h"
using namespace Msg;
{
const char *notificationPanel = "http://tizen.org/appcontrol/data/notification";
const char *keyType = "type";
- const char *valueReply = "reply";
const char *valueNewMsg = "new_msg";
const char *valueSendFailed = "send_failed_msg";
const char *keyMsgId = "msgId";
return m_DefaultType;
}
+const std::string& AppControlDefault::getReplyText() const
+{
+ return m_ReplyText;
+}
+
void AppControlDefault::parse(app_control_h handle)
{
char *key = nullptr;
std::string type = key;
free(key);
- if(type == valueReply)
- m_DefaultType = ReplyType;
- else if(type == valueNewMsg)
+ if(type == valueNewMsg)
viewMessage(handle);
else if(type == valueSendFailed)
m_DefaultType = SendFailedType;
void AppControlDefault::viewMessage(app_control_h handle)
{
+ makeReplyText(handle);
if(isNotificationPanel(handle))
m_DefaultType = NotificationType;
else
- m_DefaultType = ViewType;
+ m_DefaultType = m_ReplyText.empty() ? ViewType : ReplyType;
+}
+
+void AppControlDefault::makeReplyText(app_control_h handle)
+{
+ m_ReplyText = AppControlUtils::getExtraData(handle, APP_CONTROL_DATA_TEXT);
}
const char *cancelButtonDefTextId = "IDS_MSG_ACBUTTON_CANCEL_ABB";
const char *okButtonDefTextId = "IDS_MSG_ACBUTTON_DONE_ABB";
const char *buttonTypeKey = "BTkey";
- const char *textColorBlueDisableButtons = "#216959";
+ const char *textColorBlueDisableButtons = "#abd1d6";
const char *textColorBlueTitleButtons = "#2e8b99";
const char *textColorWhiteTitleButtons = "#fafafa";
const int textSizeCenterButton = 50;
#include "MessageMms.h"
#include "WorkingDir.h"
#include "AppControlCompose.h"
+#include "AppControlDefault.h"
#include "AttachmentHandler.h"
#include "ComposeListItem.h"
void read(Message &msg);
void write(const Message &msg);
void execCmd(const AppControlComposeRef &cmd);
+ void execCmd(const AppControlDefaultRef &cmd);
private:
ComposeListItem &getComposeItem();
void Body::execCmd(const AppControlComposeRef &cmd)
{
+ clear();
setText(cmd->getMessageText());
std::list<std::string> path = cmd->getFileList();
if(!cmd->getVcfInfo().contactsIdList.empty())
addAttachments(path);
}
+void Body::execCmd(const AppControlDefaultRef &cmd)
+{
+ if(cmd->getDefaultType() == AppControlDefault::ReplyType)
+ {
+ clear();
+ setText(cmd->getReplyText());
+ }
+}
+
void Body::onMaxLengthReached()
{
MSG_LOG("");
else
navigateToBottom();
if(cmd->getDefaultType() == AppControlDefault::ReplyType)
+ {
+ m_pBody->execCmd(cmd);
m_pBody->setFocus(true);
+ }
}
void Conversation::create()
if(msg)
setThreadId(msg->getThreadId());
if(m_DefferedCmd.defaultCmd->getDefaultType() == AppControlDefault::ReplyType && m_pBody)
+ {
+ m_pBody->execCmd(m_DefferedCmd.defaultCmd);
m_pBody->setFocus(true);
+ }
}
}
else if(m_DefferedCmd.composeCmd)