TSAM-5386 Logs, Contacts Tabs Names not Changed when Changing Language 64/76264/1
authorEugene Kurzberg <i.kurtsberg@samsung.com>
Thu, 23 Jun 2016 08:06:03 +0000 (11:06 +0300)
committerEugene Kurzberg <i.kurtsberg@samsung.com>
Thu, 23 Jun 2016 08:06:03 +0000 (11:06 +0300)
Change-Id: I65a6e09bdbacc3dd0e1ba293b25527e8a945ed4e
Signed-off-by: Eugene Kurzberg <i.kurtsberg@samsung.com>
lib-apps-common/src/Ux/SelectView.cpp

index fc9bd67..3774f0c 100644 (file)
@@ -171,7 +171,9 @@ void SelectView::updatePageTitle()
                return;
        }
 
+       char buffer[TITLE_BUFFER_SIZE];
        const char *title = nullptr;
+
        switch (m_SelectMode) {
                case SelectNone:
                        title = m_Strings.titleDefault;
@@ -181,16 +183,18 @@ void SelectView::updatePageTitle()
                        break;
                case SelectMulti:
                        if (m_SelectLimit) {
-                               title = m_Strings.titleWithLimit;
+                               snprintf(buffer, sizeof(buffer), _(m_Strings.titleWithLimit), m_SelectCount, m_SelectLimit);
+                               title = buffer;
+                       } else if (m_SelectCount) {
+                               snprintf(buffer, sizeof(buffer), _(m_Strings.titleWithCount), m_SelectCount);
+                               title = buffer;
                        } else {
-                               title = m_SelectCount ? m_Strings.titleWithCount : m_Strings.titleMulti;
+                               title = m_Strings.titleMulti;
                        }
                        break;
        }
 
-       char buffer[TITLE_BUFFER_SIZE];
-       snprintf(buffer, sizeof(buffer), _(title), m_SelectCount, m_SelectLimit);
-       page->setTitle(buffer);
+       page->setTitle(title);
 }
 
 void SelectView::updatePageButtons()