diff options
author | Ken Moore <ken@ixsystems.com> | 2018-03-21 14:10:48 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2018-03-21 14:10:48 -0400 |
commit | f71b705ac5e676f0d1f2c1fa75c7bd789d59ceec (patch) | |
tree | 45f458f590a15cdba4c85c486409b97b3e2d17b7 /src-qt5/desktop-utils/lumina-fm/MainUI.cpp | |
parent | Fix up the RSS reader. (diff) | |
download | lumina-f71b705ac5e676f0d1f2c1fa75c7bd789d59ceec.tar.gz lumina-f71b705ac5e676f0d1f2c1fa75c7bd789d59ceec.tar.bz2 lumina-f71b705ac5e676f0d1f2c1fa75c7bd789d59ceec.zip |
Add a "Verify File Delete" view option to lumina-fm
When checked (default) it will prompt about filesystem deletions.
When unchecked, it will not prompt and just delete the items.
Diffstat (limited to 'src-qt5/desktop-utils/lumina-fm/MainUI.cpp')
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/MainUI.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp index 8455e3aa..b2f976d2 100644 --- a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp +++ b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp @@ -302,7 +302,7 @@ void MainUI::loadSettings(){ on_actionShow_Thumbnails_triggered(); //make sure to update models too //ui->actionView_showDirTreePane->setChecked( settings->value("showdirtree", false).toBool()); //on_actionView_showDirTreePane_triggered(); //make sure to update the models too - + ui->actionVerify_File_Delete->setChecked( settings->value("showdeleteprompt", true).toBool()); //ui->actionShow_Action_Buttons->setChecked(settings->value("showactions", true).toBool() ); //on_actionShow_Action_Buttons_triggered(); //make sure to update the UI //ui->actionShow_Thumbnails->setChecked( settings->value("showthumbnails", true).toBool() ); @@ -472,6 +472,11 @@ void MainUI::on_actionView_Hidden_Files_triggered(){ } +void MainUI::on_actionVerify_File_Delete_triggered(){ +//Now save this setting for later + settings->setValue("showdeleteprompt", ui->actionView_Hidden_Files->isChecked()); +} + void MainUI::treeWidgetWidthChanged(float percent){ //NOTE: Percent needs to be between 0-75 if(percent > 75){ percent = 75; } @@ -922,10 +927,12 @@ void MainUI::RemoveFiles(QStringList list){ } //Verify permanent removal of file/dir - QMessageBox dlgQ(QMessageBox::Question, tr("Verify Removal"), tr("WARNING: This will permanently delete the file(s) from the system!")+"\n"+tr("Are you sure you want to continue?"), QMessageBox::Yes | QMessageBox::No, this); - dlgQ.setDetailedText(tr("Items to be removed:")+"\n\n"+names.join("\n")); - dlgQ.exec(); - if(dlgQ.result() != QMessageBox::Yes){ return; } //cancelled + if(ui->actionVerify_File_Delete->isChecked()){ + QMessageBox dlgQ(QMessageBox::Question, tr("Verify Removal"), tr("WARNING: This will permanently delete the file(s) from the system!")+"\n"+tr("Are you sure you want to continue?"), QMessageBox::Yes | QMessageBox::No, this); + dlgQ.setDetailedText(tr("Items to be removed:")+"\n\n"+names.join("\n")); + dlgQ.exec(); + if(dlgQ.result() != QMessageBox::Yes){ return; } //cancelled + } //Now remove the file/dir qDebug() << " - Delete: "<<paths; |