diff options
author | Ken Moore <ken@ixsystems.com> | 2017-06-16 15:42:55 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-06-16 15:42:55 -0400 |
commit | f173b388b9c8aa208e9afbf3f70168db4f8bdc4f (patch) | |
tree | 6cc1e73c2c22d39ce73954adbb00994e8a18cced /src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp | |
parent | Speed up the loading of thumbnails in lumina-fm. Now all the scaling and such... (diff) | |
download | lumina-f173b388b9c8aa208e9afbf3f70168db4f8bdc4f.tar.gz lumina-f173b388b9c8aa208e9afbf3f70168db4f8bdc4f.tar.bz2 lumina-f173b388b9c8aa208e9afbf3f70168db4f8bdc4f.zip |
Get the new side-pane TreeView up and running with q5sys's input.
Diffstat (limited to 'src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp')
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp index e5004742..23269ec2 100644 --- a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp +++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp @@ -72,8 +72,8 @@ dirtreeModel = new QFileSystemModel(this); dirtreeModel->setFilter(QDir::NoDotAndDotDot | QDir::AllDirs); // remove extraneous dirs dirtreeModel->setRootPath(folderTreePath); - //ui->folderViewPane->setModel(dirtreeModel) - + ui->folderViewPane->setModel(dirtreeModel); + ui->splitter->setSizes( QList<int>() << this->width()/3 << 2*this->width()/3); //---------------------------------------------------// //Now update the rest of the UI @@ -158,12 +158,11 @@ return showdirtree; } - /* void DirWidget::on_folderViewPane_clicked(const QModelIndex &index){ - QString tPath = dirtreeModel->fileInfo(index).absoluteFilePath(); // get what was clicked - ChangeDir(tPath); + QString tPath = dirtreeModel->fileInfo(index).absoluteFilePath(); // get what was clicked + ChangeDir(tPath); } - */ + //---------------------------------------------------// @@ -574,7 +573,7 @@ contextMenu->addAction(LXDG::findIcon("edit-cut",""), tr("Cut Selection"), this, SLOT(cutFiles()), kCut->key() )->setEnabled(canmodify); contextMenu->addAction(LXDG::findIcon("edit-copy",""), tr("Copy Selection"), this, SLOT(copyFiles()), kCopy->key() )->setEnabled(canmodify); //---------------------------------------------------// - contextMenu->addAction(LXDG::findIcon("archive",""), tr("Auto-Extract"), this, SLOT(autoExtractFiles()), kExtract->key() )->setEnabled(canmodify); + if(LUtils::isValidBinary("lumina-archiver") && sel.length() ==1){ contextMenu->addAction(LXDG::findIcon("archive",""), tr("Auto-Extract"), this, SLOT(autoExtractFiles()), kExtract->key() )->setEnabled(canmodify); } //---------------------------------------------------// } if( QApplication::clipboard()->mimeData()->hasFormat("x-special/lumina-copied-files") ){ @@ -617,6 +616,9 @@ ui->actionBack->setEnabled( currentBrowser()->history().length()>1 ); line_dir->setText(normalbasedir); emit TabNameChanged(ID, normalbasedir.section("/",-1)); + QModelIndex index = dirtreeModel->index(cur,0); + ui->folderViewPane->setCurrentIndex( index ); + ui->folderViewPane->scrollTo(index); } void DirWidget::dirStatusChanged(QString stat){ |