TizenRefApp-8416 Fix translatable text in ContextPopup 28/126228/1
authorDenis Dolzhenko <d.dolzhenko@samsung.com>
Thu, 20 Apr 2017 13:57:00 +0000 (16:57 +0300)
committerDenis Dolzhenko <d.dolzhenko@samsung.com>
Thu, 20 Apr 2017 13:57:00 +0000 (16:57 +0300)
Change-Id: I6571291ad02feb2679e569d32919721765e9a4aa
Signed-off-by: Denis Dolzhenko <d.dolzhenko@samsung.com>
src/Common/View/inc/CtxPopup.h
src/Common/View/inc/SelectCtxPopup.h
src/Common/View/src/CtxPopup.cpp
src/Conversation/Controller/src/ConvFrame.cpp
src/MsgThread/Controller/src/MsgThreadFrame.cpp
src/Settings/Controller/src/SettingsBlockListFrame.cpp

index 1d9e91470e8d3ce36b68dec019daf6ad480beadd..86e64f06c4ddacd19b2879197cf962dea2e53c78 100644 (file)
@@ -52,7 +52,7 @@ namespace Msg {
             CtxPopup();
             virtual ~CtxPopup();
 
-            CtxPopupItem *appendItem(const std::string &text, Evas_Object *icon = nullptr,
+            CtxPopupItem *appendItem(const TText &text, Evas_Object *icon = nullptr,
                                      CtxPopupItemPressedCb cb = nullptr, void *userData = nullptr);
             void setDirectionPriority(Elm_Ctxpopup_Direction first, Elm_Ctxpopup_Direction second,
                                       Elm_Ctxpopup_Direction third, Elm_Ctxpopup_Direction fourth);
index 7e3ed99217b66091e42dbe3679f3ede6455147dc..675c18b656c0028bf8200d3e183bcc7d13bdaecf 100644 (file)
@@ -25,8 +25,8 @@ namespace Msg {
 
         public:
             SelectCtxPopup();
-            CtxPopupItem *appendTopItem(const std::string &text, CtxPopupItemPressedCb cb = nullptr, void *userData = nullptr);
-            CtxPopupItem *appendBottomItem(const std::string &text, CtxPopupItemPressedCb cb = nullptr, void *userData = nullptr);
+            CtxPopupItem *appendTopItem(const TText &text, CtxPopupItemPressedCb cb = nullptr, void *userData = nullptr);
+            CtxPopupItem *appendBottomItem(const TText &text, CtxPopupItemPressedCb cb = nullptr, void *userData = nullptr);
             void go();
 
         private:
@@ -42,13 +42,13 @@ namespace Msg {
         setStyle("select_mode");
     }
 
-    inline CtxPopupItem *SelectCtxPopup::appendTopItem(const std::string &text, CtxPopupItemPressedCb cb, void *userData)
+    inline CtxPopupItem *SelectCtxPopup::appendTopItem(const TText &text, CtxPopupItemPressedCb cb, void *userData)
     {
         m_pTopItem = appendItem(text, nullptr, cb, userData);
         return m_pTopItem;
     }
 
-    inline CtxPopupItem *SelectCtxPopup::appendBottomItem(const std::string &text, CtxPopupItemPressedCb cb, void *userData)
+    inline CtxPopupItem *SelectCtxPopup::appendBottomItem(const TText &text, CtxPopupItemPressedCb cb, void *userData)
     {
         m_pBottomItem = appendItem(text, nullptr, cb, userData);
         return m_pBottomItem;
index fc6416770c7a50e64db05dddc66ddf60889944fb..8d5a890c69f4831381d3aa7b83f28ca384ceaf29 100644 (file)
@@ -54,10 +54,11 @@ CtxPopup::~CtxPopup()
     MSG_LOG("Destructor");
 }
 
-CtxPopupItem *CtxPopup::appendItem(const std::string &text, Evas_Object *icon, CtxPopupItemPressedCb cb, void *userData)
+CtxPopupItem *CtxPopup::appendItem(const TText &text, Evas_Object *icon, CtxPopupItemPressedCb cb, void *userData)
 {
     auto *newItem = new CtxPopupItem(*this, cb, userData);
-    Elm_Object_Item *elmItem = elm_ctxpopup_item_append(getEo(), text.c_str(), icon, on_item_pressed_cb, newItem);
+    Elm_Object_Item *elmItem = elm_ctxpopup_item_append(getEo(), "", icon, on_item_pressed_cb, newItem);
+    ViewItem::setText(elmItem, text);
 
     if (elmItem) {
         newItem->setElmObjItem(elmItem);
index d352c0defaa1823de1bdb3f6bd9a6bdd521eeecd..913bd995636b64f167126e50bc56de2d6d7e030c 100644 (file)
@@ -204,9 +204,9 @@ void ConvFrame::showSelectPopup()
     unsigned checkableCount = m_pList->getCheckableItemsCount();
 
     if (checkedCount < checkableCount)
-        ctx->appendTopItem(msg("WDS_MSG_OPT_SELECT_ALL_ABB"), makeCbLast(&ConvFrame::onSelectAllButtonClicked), this);
+        ctx->appendTopItem(msgt("WDS_MSG_OPT_SELECT_ALL_ABB"), makeCbLast(&ConvFrame::onSelectAllButtonClicked), this);
     if (checkedCount > 0)
-        ctx->appendBottomItem(msg("WDS_MSG_OPT_DESELECT_ALL_ABB"), makeCbLast(&ConvFrame::onDeselectAllButtonClicked), this);
+        ctx->appendBottomItem(msgt("WDS_MSG_OPT_DESELECT_ALL_ABB"), makeCbLast(&ConvFrame::onDeselectAllButtonClicked), this);
 
     if (m_pSelectButton)
         ctx->align(m_pSelectButton->getInnerButton());
index 461a4faed8ab3088e8dcd5c14ad739c697bae9f2..025dd501f9873588045919ba8fd31d59f6d3da29 100644 (file)
@@ -160,9 +160,9 @@ void MsgThreadFrame::showSelectPopup()
     int checkableCount = m_pThreadList->getCheckableItemsCount();
 
     if (checkedCount < checkableCount)
-        ctx->appendTopItem(msg("WDS_MSG_OPT_SELECT_ALL_ABB"), makeCbLast(&MsgThreadFrame::onSelectAllButtonClicked), this);
+        ctx->appendTopItem(msgt("WDS_MSG_OPT_SELECT_ALL_ABB"), makeCbLast(&MsgThreadFrame::onSelectAllButtonClicked), this);
     if (checkedCount > 0)
-        ctx->appendBottomItem(msg("WDS_MSG_OPT_DESELECT_ALL_ABB"), makeCbLast(&MsgThreadFrame::onDeselectAllButtonClicked), this);
+        ctx->appendBottomItem(msgt("WDS_MSG_OPT_DESELECT_ALL_ABB"), makeCbLast(&MsgThreadFrame::onDeselectAllButtonClicked), this);
 
     if (m_pSelectButton)
         ctx->align(m_pSelectButton->getInnerButton());
index bf95a278a795b89952382e90934cbf68ce414f87..514223a4ef0d953bd3d83abd32894b6f279b2780 100644 (file)
@@ -167,9 +167,9 @@ void SettingsBlockListFrame::showSelectPopup()
     int checkableCount = m_pList->getCheckableItemsCount();
 
     if (checkedCount < checkableCount)
-        ctx->appendTopItem(msg("WDS_MSG_OPT_SELECT_ALL_ABB"), makeCbLast(&SettingsBlockListFrame::onSelectAllButtonClicked), this);
+        ctx->appendTopItem(msgt("WDS_MSG_OPT_SELECT_ALL_ABB"), makeCbLast(&SettingsBlockListFrame::onSelectAllButtonClicked), this);
     if (checkedCount > 0)
-        ctx->appendBottomItem(msg("WDS_MSG_OPT_DESELECT_ALL_ABB"), makeCbLast(&SettingsBlockListFrame::onDeselectAllButtonClicked), this);
+        ctx->appendBottomItem(msgt("WDS_MSG_OPT_DESELECT_ALL_ABB"), makeCbLast(&SettingsBlockListFrame::onDeselectAllButtonClicked), this);
 
     if (m_pSelectButton)
         ctx->align(m_pSelectButton->getInnerButton());