From a5d95ee21de03ee0531847aafe3ab7e37bd517ab Mon Sep 17 00:00:00 2001 From: william Date: Fri, 20 Mar 2015 08:09:47 +0100 Subject: Display the number of items in a directory in the statusBar --- lumina-fm/MainUI.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'lumina-fm') diff --git a/lumina-fm/MainUI.cpp b/lumina-fm/MainUI.cpp index 187922e1..1a8612c7 100644 --- a/lumina-fm/MainUI.cpp +++ b/lumina-fm/MainUI.cpp @@ -445,15 +445,11 @@ void MainUI::setCurrentDir(QString dir){ //if(olddir!=rawdir){ emit DirChanged(rawdir); //This will be automatically run when a new dir is loaded //} - 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); + if(isUserWritable){ ui->label_dir_stats->setText(""); } + else{ ui->label_dir_stats->setText(tr("Limited Access Directory")); } + QString strSize = QString(tr("Items:")) + QString::number(fsmod->rootDirectory().entryInfoList().size()); + ui->statusbar->showMessage(strSize); ui->tool_addToDir->setVisible(isUserWritable); ui->tool_addNewFile->setVisible(isUserWritable); ui->actionUpDir->setEnabled(dir!="/"); -- cgit