TizenRefApp-6477 Update title layout in "selection" mode (Conversation) 50/73250/1
authorDenis Dolzhenko <d.dolzhenko@samsung.com>
Tue, 7 Jun 2016 09:15:23 +0000 (12:15 +0300)
committerDenis Dolzhenko <d.dolzhenko@samsung.com>
Tue, 7 Jun 2016 09:15:23 +0000 (12:15 +0300)
Change-Id: I610d8e17e079d143d92ceb5c5179a08d853d2dc6
Signed-off-by: Denis Dolzhenko <d.dolzhenko@samsung.com>
src/Conversation/Main/Controller/inc/Conversation.h
src/Conversation/Main/Controller/src/Conversation.cpp

index 9280f3e..a30fcd9 100644 (file)
@@ -150,6 +150,7 @@ namespace Msg
             void createMsgInputPanel(Evas_Object *parent);
             void updateMsgInputPanel();
             void updateNavibar();
+            void updateSelectMsgTitle();
             void createMainLayout(Evas_Object *parent);
             void createConvList(Evas_Object *parent);
             void destroyConvList();
index 16a65dc..d05a4ab 100644 (file)
@@ -740,7 +740,7 @@ void Conversation::updateNavibar()
     {
         if(m_pConvList->getMode() == ConvList::SelectMode)
         {
-            naviBar.setTitle(msgt("IDS_MSG_OPT_DELETE"));
+            updateSelectMsgTitle();
             naviBar.showButton(NaviCancelButtonId, true);
             naviBar.showButton(NaviOkButtonId, true);
             naviBar.disabledButton(NaviOkButtonId, true);
@@ -758,6 +758,18 @@ void Conversation::updateNavibar()
     }
 }
 
+void Conversation::updateSelectMsgTitle()
+{
+    if(m_pConvList && m_pConvList->getMode() == ConvList::SelectMode)
+    {
+        int checked = m_pConvList->getMessageCheckedCount();
+        if(checked > 0)
+            getNaviBar().setTitle(msgArgs("IDS_MSG_HEADER_PD_SELECTED_ABB3", checked));
+        else
+            getNaviBar().setTitle(msgt("IDS_MSGF_HEADER_SELECT_MESSAGES"));
+    }
+}
+
 void Conversation::onButtonClicked(MessageInputPanel &obj, MessageInputPanel::ButtonId id)
 {
     MSG_LOG("MessageInputPanel: button clicked: id = ", id);
@@ -1044,6 +1056,7 @@ void Conversation::onSlideShow(MsgId id)
 void Conversation::onConvListItemChecked()
 {
     getNaviBar().disabledButton(NaviOkButtonId, m_pConvList->getMessageCheckedCount() == 0);
+    updateSelectMsgTitle();
 }
 
 void Conversation::onFileSelected(AttachPanel &panel, const AttachPanel::FileList &files)
@@ -1062,4 +1075,5 @@ void Conversation::onLanguageChanged()
 {
     MSG_LOG("");
     updateMsgInputPanel();
+    updateSelectMsgTitle();
 }