diff options
Diffstat (limited to 'lumina-fm/MainUI.cpp')
-rw-r--r-- | lumina-fm/MainUI.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/lumina-fm/MainUI.cpp b/lumina-fm/MainUI.cpp index c4b74dbd..e14d16d0 100644 --- a/lumina-fm/MainUI.cpp +++ b/lumina-fm/MainUI.cpp @@ -445,15 +445,18 @@ void MainUI::setCurrentDir(QString dir){ //qDebug() << "History:" << history; tabBar->setTabData(tabBar->currentIndex(), history); //Now adjust the items as necessary - ui->tool_goToPlayer->setVisible(false); - ui->tool_goToRestore->setVisible(false); - ui->tool_goToImages->setVisible(false); + if(rawdir != olddir){ + //The Filesystem model will need to load the new directory (triggering the background checks) + ui->tool_goToPlayer->setVisible(false); + ui->tool_goToRestore->setVisible(false); + ui->tool_goToImages->setVisible(false); + } //Make sure the shortcut buttons are enabled as necessary // If the dir is already loaded into the fsmodel cache it will not emit the directoryLoaded() signal - if(rawdir == olddir){ + /*if(rawdir == olddir){ emit DirChanged(rawdir); //This will be automatically run when a new dir is loaded } - emit Si_AdaptStatusBar(fsmod->rootDirectory().entryInfoList(), rawdir, tr("Items")); + emit Si_AdaptStatusBar(fsmod->rootDirectory().entryInfoList(), rawdir, tr("Items"));*/ if(isUserWritable){ ui->label_dir_stats->setText(""); } else{ ui->label_dir_stats->setText(tr("Limited Access Directory")); } @@ -551,7 +554,7 @@ void MainUI::AvailableBackups(QString basedir, QStringList snapdirs){ } void MainUI::DisplayStatusBar(QString msg){ - qDebug() << "message to show in the status bar:" << msg; + //qDebug() << "message to show in the status bar:" << msg; ui->statusbar->showMessage(msg); } @@ -846,6 +849,7 @@ void MainUI::currentDirectoryLoaded(){ ui->tool_goToRestore->setVisible(false); ui->tool_goToImages->setVisible(false); emit DirChanged(getCurrentDir()); + emit Si_AdaptStatusBar(fsmod->rootDirectory().entryInfoList(), getCurrentDir(), tr("Items")); ItemSelectionChanged(); } @@ -978,7 +982,8 @@ void MainUI::ItemSelectionChanged(){ QFileInfoList sel = getSelectedItems(); //display info related to files selected. //TO CHECK: impact if filesystem is very slow - if (sel.size()>0) worker->createStatusBarMsg(sel, "", tr("Items selected")); + if(sel.size()>0){ emit Si_AdaptStatusBar(sel, "", tr("Items selected")); } + else{ emit Si_AdaptStatusBar(fsmod->rootDirectory().entryInfoList(), getCurrentDir(), tr("Items")); } ui->tool_act_run->setEnabled(sel.length()==1); ui->tool_act_runwith->setEnabled(sel.length()==1); |