diff options
author | william os4y <william.os4y@gmail.com> | 2015-02-26 21:49:55 +0100 |
---|---|---|
committer | william os4y <william.os4y@gmail.com> | 2015-02-26 21:49:55 +0100 |
commit | a8fe20e682615b329dbe6520dbf985d42c207790 (patch) | |
tree | b7e88ad812320b7d704ed2a0cacb5c13b4b4163b /lumina-fm | |
parent | Merge remote-tracking branch 'upstream/master' (diff) | |
download | lumina-a8fe20e682615b329dbe6520dbf985d42c207790.tar.gz lumina-a8fe20e682615b329dbe6520dbf985d42c207790.tar.bz2 lumina-a8fe20e682615b329dbe6520dbf985d42c207790.zip |
display Items count in the bottom bar
Diffstat (limited to 'lumina-fm')
-rw-r--r-- | lumina-fm/MainUI.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lumina-fm/MainUI.cpp b/lumina-fm/MainUI.cpp index fe3240dc..9b7ebcc6 100644 --- a/lumina-fm/MainUI.cpp +++ b/lumina-fm/MainUI.cpp @@ -445,8 +445,15 @@ void MainUI::setCurrentDir(QString dir){ //if(olddir!=rawdir){ emit DirChanged(rawdir); //This will be automatically run when a new dir is loaded //} - if(isUserWritable){ ui->label_dir_stats->setText(""); } - else{ ui->label_dir_stats->setText(tr("Limited Access Directory")); } + if(isUserWritable){ + if (DEBUG) {qDebug() << "# Items:" << fsmod->rootDirectory().entryInfoList().size();} + QString strSize = QString(tr("Items:")) + QString::number(fsmod->rootDirectory().entryInfoList().size()); + ui->label_dir_stats->setText(strSize); + } + else{ + QString strSize = QString(tr("Limited Access Directory. Items:")) + QString::number(fsmod->rootDirectory().entryInfoList().size()); + ui->label_dir_stats->setText(strSize); + } ui->tool_addToDir->setVisible(isUserWritable); ui->tool_addNewFile->setVisible(isUserWritable); ui->actionUpDir->setEnabled(dir!="/"); |