diff options
author | Alexander Tkachev | 2019-07-15 18:35:24 +0700 |
---|---|---|
committer | Matan Bareket | 2019-07-30 14:51:41 -0400 |
commit | d04c1dfad422d9ea8c2b460ff01b88911d9fd3ef (patch) | |
tree | 5f29d43b0b19b8c5c018386a38572e20af84ed48 /gui/options.cpp | |
parent | faa19c7bf097e6a7f1f76c29b0faba12d5781d19 (diff) | |
download | scummvm-rg350-d04c1dfad422d9ea8c2b460ff01b88911d9fd3ef.tar.gz scummvm-rg350-d04c1dfad422d9ea8c2b460ff01b88911d9fd3ef.tar.bz2 scummvm-rg350-d04c1dfad422d9ea8c2b460ff01b88911d9fd3ef.zip |
COMMON: Add getHumanReadableBytes() in util.h
This function was used in cloud-related DownloadDialog before,
and now it is also used in Options > Cloud tab.
Diffstat (limited to 'gui/options.cpp')
-rw-r--r-- | gui/options.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gui/options.cpp b/gui/options.cpp index 8d2bda5af0..5d90b70813 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -38,6 +38,7 @@ #include "common/textconsole.h" #include "common/translation.h" #include "common/updates.h" +#include "common/util.h" #include "audio/mididrv.h" #include "audio/musicplugin.h" @@ -2340,7 +2341,9 @@ void GlobalOptionsDialog::setupCloudTab() { if (_storageUsedSpaceDesc) _storageUsedSpaceDesc->setVisible(shown); if (_storageUsedSpace) { uint64 usedSpace = CloudMan.getStorageUsedSpace(_selectedStorageIndex); - _storageUsedSpace->setLabel(Common::String::format(_("%llu bytes"), usedSpace)); + Common::String usedSpaceNumber, usedSpaceUnits; + usedSpaceNumber = Common::getHumanReadableBytes(usedSpace, usedSpaceUnits); + _storageUsedSpace->setLabel(Common::String::format("%s %s", usedSpaceNumber.c_str(), _(usedSpaceUnits.c_str()))); _storageUsedSpace->setVisible(shown); } if (_storageLastSyncDesc) _storageLastSyncDesc->setVisible(shown); |