diff options
author | r.kuznetsov <r.kuznetsov@corp.mail.ru> | 2016-01-27 12:23:18 +0300 |
---|---|---|
committer | Sergey Yershov <yershov@corp.mail.ru> | 2016-03-23 16:15:41 +0300 |
commit | ed5591f21aecfae2ab465c07a360232adfdbe689 (patch) | |
tree | ef7b34a000a181560d952c1cbc3ea706bb9beac2 /drape_frontend/gui | |
parent | 6f19401ac87f4e1016529cf74786836f5c76b181 (diff) |
[old-map-downloader] Added hiding mwm size on download button before migration
Diffstat (limited to 'drape_frontend/gui')
-rw-r--r-- | drape_frontend/gui/country_status_helper.cpp | 16 | ||||
-rw-r--r-- | drape_frontend/gui/country_status_helper.hpp | 1 |
2 files changed, 11 insertions, 6 deletions
diff --git a/drape_frontend/gui/country_status_helper.cpp b/drape_frontend/gui/country_status_helper.cpp index d326d694a6..6dcc7aa4d4 100644 --- a/drape_frontend/gui/country_status_helper.cpp +++ b/drape_frontend/gui/country_status_helper.cpp @@ -55,6 +55,7 @@ void FormatMapSize(uint64_t sizeInBytes, string & units, size_t & sizeToDownload } char const * DownloadMapButtonID = "country_status_download"; +char const * DownloadMapWithoutSizeButtonID = "country_status_download_without_size"; char const * TryAgainButtonID = "try_again"; char const * DownloadCancelButtonID = "country_download_cancel"; char const * DownloadingLabelID = "country_status_downloading"; @@ -222,10 +223,14 @@ void CountryStatusHelper::FillControlsForFailed() string CountryStatusHelper::FormatDownloadMap() { - size_t size; - string units; - FormatMapSize(m_countryInfo.m_mapSize, units, size); - return strings::Format(GetLocalizedString(DownloadMapButtonID), size, units); + if (m_countryInfo.m_showMapSize) + { + size_t size; + string units; + FormatMapSize(m_countryInfo.m_mapSize, units, size); + return strings::Format(GetLocalizedString(DownloadMapButtonID), size, units); + } + return GetLocalizedString(DownloadMapWithoutSizeButtonID); } string CountryStatusHelper::FormatInQueueMap() @@ -245,8 +250,7 @@ string CountryStatusHelper::FormatTryAgain() string CountryStatusHelper::FormatCancel() { - //TODO: Uncomment after adding localization for country_download_cancel - return "Cancel";//GetLocalizedString(DownloadCancelButtonID); + return GetLocalizedString(DownloadCancelButtonID); } } // namespace gui diff --git a/drape_frontend/gui/country_status_helper.hpp b/drape_frontend/gui/country_status_helper.hpp index 0a755851bc..29d684f71c 100644 --- a/drape_frontend/gui/country_status_helper.hpp +++ b/drape_frontend/gui/country_status_helper.hpp @@ -20,6 +20,7 @@ struct CountryInfo string m_currentCountryName; size_t m_mapSize = 0; size_t m_downloadProgress = 0; + bool m_showMapSize = true; }; class CountryStatusHelper |