TizenRefApp-7681 Incorrect text in Pop Up when exceed the max number of attachment 36/99236/2
authorOleksander Kostenko <o.kostenko@samsung.com>
Tue, 22 Nov 2016 08:06:29 +0000 (10:06 +0200)
committerOleksander Kostenko <o.kostenko@samsung.com>
Tue, 22 Nov 2016 09:52:06 +0000 (11:52 +0200)
Change-Id: Ia1752ec1c0f1f9f1fb7f6fb7bccefbde4a255f55
Signed-off-by: Oleksander Kostenko <o.kostenko@samsung.com>
src/Conversation/Body/Controller/inc/Body.h
src/Conversation/Body/Controller/src/Body.cpp

index d1e75c09c5a2e44a33b5af8453f4f7b14edd0239..c872227ad0711be5567ed884efcf9bebff43efa9 100644 (file)
@@ -71,7 +71,6 @@ namespace Msg
             void notifyContentChanged();
             void updateTextMetricIfNeeded();
             void showTooLargePopup(const std::list <std::string> &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;
index 8ce8db08604dbb9849bb925a39dd2ee6a305bae6..82479043038e1f08dcea2f2ef0804923bf59b2da 100644 (file)
@@ -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 <std::string> &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("");