From: Oleksander Kostenko Date: Tue, 22 Nov 2016 08:06:29 +0000 (+0200) Subject: TizenRefApp-7681 Incorrect text in Pop Up when exceed the max number of attachment X-Git-Tag: submit/tizen_3.0/20161122.132720~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F36%2F99236%2F2;p=profile%2Fmobile%2Fapps%2Fnative%2Fmessage.git TizenRefApp-7681 Incorrect text in Pop Up when exceed the max number of attachment Change-Id: Ia1752ec1c0f1f9f1fb7f6fb7bccefbde4a255f55 Signed-off-by: Oleksander Kostenko --- diff --git a/src/Conversation/Body/Controller/inc/Body.h b/src/Conversation/Body/Controller/inc/Body.h index d1e75c09..c872227a 100644 --- a/src/Conversation/Body/Controller/inc/Body.h +++ b/src/Conversation/Body/Controller/inc/Body.h @@ -71,7 +71,6 @@ namespace Msg void notifyContentChanged(); void updateTextMetricIfNeeded(); void showTooLargePopup(const std::list &tooBigFiles); - void showTooMuchAttachedPopup(int willBeAttached); void showTooMuchAttachedPopup(); void showMaxCharactersPopup(); void showResizingPopup(); @@ -91,7 +90,6 @@ namespace Msg PopupList &createPopupList(const std::string &title); void onTooLargePopupDel(Evas_Object *obj, void *eventInfo); - void onTooMuchAttachedPopupDel(Evas_Object *obj, void *eventInfo); void onResizingPopupDel(Evas_Object *obj, void *eventInfo); std::string createVcfFile(const AppControlComposeRef &cmd); @@ -116,7 +114,6 @@ namespace Msg WorkingDirRef m_WorkingDir; Ecore_Job *m_pOnChangedJob; bool m_TooLargePopupShow; - bool m_TooMuchAttachedPopupShow; bool m_ResizingPopupShow; bool m_MmsRecipFlag; AttachmentHandler m_AttachmentHandler; diff --git a/src/Conversation/Body/Controller/src/Body.cpp b/src/Conversation/Body/Controller/src/Body.cpp index 8ce8db08..82479043 100644 --- a/src/Conversation/Body/Controller/src/Body.cpp +++ b/src/Conversation/Body/Controller/src/Body.cpp @@ -44,7 +44,6 @@ Body::Body(Evas_Object *parent, App &app, WorkingDirRef workingDir, ConvList &co , m_WorkingDir(workingDir) , m_pOnChangedJob(nullptr) , m_TooLargePopupShow(false) - , m_TooMuchAttachedPopupShow(false) , m_ResizingPopupShow(false) , m_MmsRecipFlag(false) , m_AttachmentHandler(workingDir) @@ -407,34 +406,11 @@ void Body::showTooLargePopup(const std::list &tooBigFiles) } } -void Body::showTooMuchAttachedPopup(int willBeAttached) -{ - if (!m_TooMuchAttachedPopupShow) - { - Popup &popup = m_App.getPopupManager().getPopup(); - popup.addEventCb(EVAS_CALLBACK_DEL, EVAS_EVENT_CALLBACK(Body, onTooMuchAttachedPopupDel), this); - popup.addButton(msgt("IDS_MSG_BUTTON_OK_ABB"), Popup::OkButtonId); - int maxCount = m_App.getMsgEngine().getSettings().getAttachmentsMaxCount(); - std::string content(msgArgs("IDS_MSGF_BODY_MAXIMUM_NUMBER_OF_ATTACHMENTS_HP1SS_EXCEEDED_ONLY_FIRST_P2SS_WILL_BE_ADDED", std::to_string(maxCount).c_str(), std::to_string(willBeAttached).c_str())); - popup.setContent(content); - popup.show(); - m_TooMuchAttachedPopupShow = true; - } -} - void Body::showTooMuchAttachedPopup() { - if (!m_TooMuchAttachedPopupShow) - { - Popup &popup = m_App.getPopupManager().getPopup(); - popup.addEventCb(EVAS_CALLBACK_DEL, EVAS_EVENT_CALLBACK(Body, onTooMuchAttachedPopupDel), this); - popup.addButton(msgt("IDS_MSG_BUTTON_OK_ABB"), Popup::OkButtonId); - int maxCount = m_App.getMsgEngine().getSettings().getAttachmentsMaxCount(); - std::string content(msgArgs("IDS_MSGF_POP_MAXIMUM_NUMBER_OF_ATTACHMENTS_HPS_EXCEEDED", std::to_string(maxCount).c_str())); - popup.setContent(content); - popup.show(); - m_TooMuchAttachedPopupShow = true; - } + int maxCount = m_App.getMsgEngine().getSettings().getAttachmentsMaxCount(); + std::string content(msgArgs("IDS_MSG_TPOP_CANT_ADD_MORE_THAN_PD_ATTACHMENTS", maxCount)); + notification_status_message_post(content.c_str()); } void Body::showResizingPopup() @@ -471,12 +447,6 @@ void Body::onTooLargePopupDel(Evas_Object *obj, void *eventInfo) m_TooLargePopupShow = false; } -void Body::onTooMuchAttachedPopupDel(Evas_Object *obj, void *eventInfo) -{ - MSG_LOG(""); - m_TooMuchAttachedPopupShow = false; -} - void Body::onResizingPopupDel(Evas_Object *obj, void *eventInfo) { MSG_LOG("");