diff options
author | william <william.os4y@gmail.com> | 2015-03-24 09:22:27 +0100 |
---|---|---|
committer | william <william.os4y@gmail.com> | 2015-03-24 09:22:27 +0100 |
commit | eacbc905796f89ad90197b0328692d8c500dbcf6 (patch) | |
tree | b463ab4ece79b708be9428284ee3be294446d9b8 /lumina-fm/MainUI.cpp | |
parent | Merge remote-tracking branch 'upstream/master' into fmNumbers (diff) | |
download | lumina-eacbc905796f89ad90197b0328692d8c500dbcf6.tar.gz lumina-eacbc905796f89ad90197b0328692d8c500dbcf6.tar.bz2 lumina-eacbc905796f89ad90197b0328692d8c500dbcf6.zip |
create FileSystemCapacity and put it in LuminaOS
Diffstat (limited to 'lumina-fm/MainUI.cpp')
-rw-r--r-- | lumina-fm/MainUI.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lumina-fm/MainUI.cpp b/lumina-fm/MainUI.cpp index d445a9cd..1f5a65d0 100644 --- a/lumina-fm/MainUI.cpp +++ b/lumina-fm/MainUI.cpp @@ -469,12 +469,11 @@ void MainUI::setCurrentDir(QString dir){ if(isUserWritable){ ui->label_dir_stats->setText(""); } else{ ui->label_dir_stats->setText(tr("Limited Access Directory")); } + + //collect some statistics of dir and display them in statusbar QFileInfoList fileList = fsmod->rootDirectory().entryInfoList(); QString msgStatusBar = ItemsInstatusBar(fileList, tr("Items")); - //3 following lines should be in LOS - QStringList mountInfo = LUtils::getCmdOutput("df " + dir); - QString::SectionFlag skipEmpty = QString::SectionSkipEmpty; - QString capacity = mountInfo[1].section(" ",4,4, skipEmpty); + QString capacity = LOS::FileSystemCapacity(dir) ; if (msgStatusBar.isEmpty()) msgStatusBar += tr("Capacity: ") + capacity; else msgStatusBar += tr(", Capacity: ") + capacity; if (!msgStatusBar.isEmpty()) ui->statusbar->showMessage(msgStatusBar); |