diff options
| author | Mike Skec <skec@protonmail.ch> | 2021-02-18 17:44:17 +1100 |
|---|---|---|
| committer | Felix Queißner <felix@ib-queissner.de> | 2021-02-18 11:23:23 +0100 |
| commit | 6e127eb49d6a71e4d05cbb2e29fc164e718a903c (patch) | |
| tree | a11e635dd5ae465c1173fe85e992c8e618fe2e7c /src/dialogs/settingsdialog.cpp | |
| parent | fb230927ab64ebcb4f2fe75f33658127421738b9 (diff) | |
| download | kristall-6e127eb49d6a71e4d05cbb2e29fc164e718a903c.tar.gz | |
Add unlimited cache life option
Diffstat (limited to 'src/dialogs/settingsdialog.cpp')
| -rw-r--r-- | src/dialogs/settingsdialog.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/dialogs/settingsdialog.cpp b/src/dialogs/settingsdialog.cpp index 4cc0ed6..b943a56 100644 --- a/src/dialogs/settingsdialog.cpp +++ b/src/dialogs/settingsdialog.cpp @@ -121,7 +121,7 @@ void SettingsDialog::setGeminiStyle(DocumentStyle const &style) this->ui->enable_justify_text->setChecked(this->current_style.justify_text); this->ui->enable_text_width->setChecked(this->current_style.text_width_enabled); - + this->ui->text_width->setEnabled(this->current_style.text_width_enabled); this->ui->text_width->setValue(this->current_style.text_width); this->ui->line_height_p->setValue(this->current_style.line_height_p); @@ -301,6 +301,8 @@ void SettingsDialog::setOptions(const GenericSettings &options) this->ui->cache_limit->setValue(this->current_options.cache_limit); this->ui->cache_threshold->setValue(this->current_options.cache_threshold); this->ui->cache_life->setValue(this->current_options.cache_life); + this->ui->enable_unlimited_cache_life->setChecked(this->current_options.cache_unlimited_life); + this->ui->cache_life->setEnabled(!this->current_options.cache_unlimited_life); } GenericSettings SettingsDialog::options() const @@ -837,3 +839,9 @@ void SettingsDialog::on_cache_life_valueChanged(int life) { this->current_options.cache_life = life; } + +void SettingsDialog::on_enable_unlimited_cache_life_clicked(bool checked) +{ + this->current_options.cache_unlimited_life = checked; + this->ui->cache_life->setEnabled(!checked); +} |
