TizenRefApp-7052 Changing os system language is not taken into account in thread... 19/86519/2
authorDenis Dolzhenko <d.dolzhenko@samsung.com>
Thu, 1 Sep 2016 14:26:15 +0000 (17:26 +0300)
committerDenis Dolzhenko <d.dolzhenko@samsung.com>
Thu, 1 Sep 2016 14:39:36 +0000 (17:39 +0300)
Change-Id: I8abe267955f90095b3d755e9f83f565f4ba43161
Signed-off-by: Denis Dolzhenko <d.dolzhenko@samsung.com>
src/MsgThread/Controller/inc/ThreadList.h
src/MsgThread/Controller/inc/ThreadSearchList.h
src/MsgThread/Controller/src/MsgThread.cpp
src/MsgThread/Controller/src/ThreadList.cpp
src/MsgThread/Controller/src/ThreadListItem.cpp
src/MsgThread/Controller/src/ThreadSearchList.cpp
src/MsgThread/View/inc/MsgThreadSearchPanel.h
src/MsgThread/View/src/MsgThreadSearchPanel.cpp

index fcd57f8878b6c885b00f4750a93717f35e860e2f..20baf4da43f03ad0bb86d9b3fe708a88dc9595cf 100644 (file)
@@ -64,6 +64,7 @@ namespace Msg
 
             // ISystemSettingsManager:
             virtual void onTimeFormatChanged();
+            virtual void onLanguageChanged();
 
         private:
             void showSelectAllItem(bool show, bool resetCheck = true);
index 1b0aade74807a72ab664f9246e89418073e3b206..7e4a24ae1c371568e3c909df89d0663d249d4e2d 100644 (file)
@@ -54,6 +54,7 @@ namespace Msg
 
             // ISystemSettingsManager:
             virtual void onTimeFormatChanged();
+            virtual void onLanguageChanged();
 
             // IMsgStorageListener:
             virtual void onMsgStorageUpdate(const MsgIdList &msgIdList);
@@ -61,6 +62,7 @@ namespace Msg
             virtual void onMsgStorageDelete(const MsgIdList &msgIdList);
 
             void search();
+            void updateTime();
 
         private:
             App &m_App;
index ae3f2bcb6649ecda4e102fde35d3bd2c0295c7ed..9fe43530d59539e4f33b437a86a143b990accdc0 100644 (file)
@@ -70,7 +70,6 @@ Evas_Object *MsgThread::createSearchPanel(Evas_Object *parent)
 {
     m_pSearchPanel = new MsgThreadSearchPanel(*m_pLayout);
     m_pSearchPanel->setListener(this);
-    m_pSearchPanel->setGuideText("Search");
     return *m_pSearchPanel;
 }
 
index 6e44ed85d39f95776a14757771f3b7deca25d5c7..b9f71fa9d8ad721330fedab68ba62f39e05da891 100644 (file)
@@ -369,3 +369,9 @@ void ThreadList::onTimeFormatChanged()
 
     ListView::updateRealizedItems();
 }
+
+void ThreadList::onLanguageChanged()
+{
+    MSG_LOG("");
+    updateItems();
+}
index c3261224df559cb4a53372c2527a8f3ec1304600..fe07c51afeaa8b16bfc5c89d2e28d057988dea2b 100644 (file)
@@ -107,3 +107,4 @@ void ThreadListItem::update()
         update(*msgThread);
 }
 
+
index 060838a513391f7267190258bc6a722e3a620db2..6380561439a1eb8b2e063f4048d1a3d719081b93 100644 (file)
@@ -122,6 +122,17 @@ void ThreadSearchList::search()
         m_pListener->onSearchListChanged();
 }
 
+void ThreadSearchList::updateTime()
+{
+    auto items = ListView::getItems<BaseThreadListItem>();
+    for(BaseThreadListItem *item : items)
+    {
+        item->updateTime();
+    }
+
+    ListView::updateRealizedItems();
+}
+
 void ThreadSearchList::onListItemSelected(ListItem &listItem)
 {
     if(m_pListener)
@@ -160,11 +171,11 @@ void ThreadSearchList::onMsgStorageDelete(const MsgIdList &msgIdList)
 void ThreadSearchList::onTimeFormatChanged()
 {
     MSG_LOG("");
-    auto items = ListView::getItems<BaseThreadListItem>();
-    for(BaseThreadListItem *item : items)
-    {
-        item->updateTime();
-    }
+    updateTime();
+}
 
-    ListView::updateRealizedItems();
+void ThreadSearchList::onLanguageChanged()
+{
+    MSG_LOG("");
+    updateTime();
 }
index 2526924a29a8aeb75e8bf0264896b38f1dd3c084..a1850b3d8c0410e38037c5f8287fa89c1a9d1219 100644 (file)
@@ -36,7 +36,6 @@ namespace Msg
             std::string getEntryText() const;
             void clearEntry();
             void showClearButton(bool visible);
-            void setGuideText(const std::string &text);
             void setEntryFocus(bool focus);
             bool isEmpty() const;
 
index 6d7564400005c8f64b83a0b26d2680365e5bd263..4309686c24bfd62bc71201826f03664a12478fb3 100644 (file)
@@ -18,6 +18,7 @@
 #include "MsgThreadSearchPanel.h"
 #include "CallbackAssist.h"
 #include "PathUtils.h"
+#include "LangUtils.h"
 
 #include <efl_extension.h>
 
@@ -82,6 +83,7 @@ Evas_Object *MsgThreadSearchPanel::createEntry(Evas_Object *parent)
     elm_entry_autocapital_type_set(m_pEntry, ELM_AUTOCAPITAL_TYPE_NONE);
     elm_entry_input_panel_return_key_type_set(m_pEntry, ELM_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH);
     elm_object_focus_allow_set(m_pEntry, EINA_TRUE);
+    setText(m_pEntry, msgt("IDS_MSG_NPBODY_SEARCH"), "elm.guide");
     evas_object_show(m_pEntry);
 
     evas_object_smart_callback_add(m_pEntry, "changed", SMART_CALLBACK(MsgThreadSearchPanel, onEntryChanged), this);;
@@ -146,11 +148,6 @@ void MsgThreadSearchPanel::showClearButton(bool visible)
     emitSignal(sig, "");
 }
 
-void MsgThreadSearchPanel::setGuideText(const std::string &text)
-{
-    elm_object_part_text_set(m_pEntry, "elm.guide", text.c_str());
-}
-
 void MsgThreadSearchPanel::onEntryChanged(Evas_Object *obj, void *eventInfo)
 {
     showClearButton(!isEmpty());