From e5814f2bae65e9b757a26e8b263d5e868dbb2f41 Mon Sep 17 00:00:00 2001 From: Mike Skec Date: Wed, 30 Dec 2020 16:38:06 +1100 Subject: Add preference to show hidden files in directory listings also improved listing code so that files and dirs with spaces now display and function properly --- src/dialogs/settingsdialog.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/dialogs/settingsdialog.cpp') diff --git a/src/dialogs/settingsdialog.cpp b/src/dialogs/settingsdialog.cpp index 563c728..269a0bd 100644 --- a/src/dialogs/settingsdialog.cpp +++ b/src/dialogs/settingsdialog.cpp @@ -218,6 +218,12 @@ void SettingsDialog::setOptions(const GenericSettings &options) this->ui->scheme_error->setChecked(true); } + if(this->current_options.show_hidden_files_in_dirs) { + this->ui->show_hidden_files->setChecked(true); + } else { + this->ui->hide_hidden_files->setChecked(true); + } + this->ui->max_redirects->setValue(this->current_options.max_redirections); this->ui->redirection_mode->setCurrentIndex(0); @@ -610,6 +616,16 @@ void SettingsDialog::on_scheme_error_clicked() this->current_options.use_os_scheme_handler = false; } +void SettingsDialog::on_show_hidden_files_clicked() +{ + this->current_options.show_hidden_files_in_dirs = true; +} + +void SettingsDialog::on_hide_hidden_files_clicked() +{ + this->current_options.show_hidden_files_in_dirs = false; +} + void SettingsDialog::on_redirection_mode_currentIndexChanged(int index) { this->current_options.redirection_policy = GenericSettings::RedirectionWarning(this->ui->redirection_mode->itemData(index).toInt()); -- cgit v1.2.3