mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 21:22:39 -05:00
Show the total size of the volume along with the free space.
This should help identifying the correct player by size, since the free space is only useful to figure if there is enough space to install Rockbox. Change units to GiB since that is more useful given the size of current devices. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30139 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
cad91ed938
commit
21a38713a6
3 changed files with 41 additions and 7 deletions
|
|
@ -63,9 +63,10 @@ QString Sysinfo::getInfo()
|
|||
info += "<b>" + tr("Filesystem") + "</b><br/>";
|
||||
QStringList drives = Autodetection::mountpoints();
|
||||
for(int i = 0; i < drives.size(); i++) {
|
||||
info += tr("%1, %2 MiB available")
|
||||
info += tr("%1, %2 GiB of %3 GiB available")
|
||||
.arg(QDir::toNativeSeparators(drives.at(i)))
|
||||
.arg(Utils::filesystemFree(drives.at(i)) / (1024*1024));
|
||||
.arg((double)Utils::filesystemFree(drives.at(i)) / (1<<30), 0, 'f', 2)
|
||||
.arg((double)Utils::filesystemTotal(drives.at(i)) / (1<<30), 0, 'f', 2);
|
||||
if(i + 1 < drives.size())
|
||||
info += "<br/>";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue