diff options
| author | Mike Skec <skec@protonmail.ch> | 2021-02-27 09:23:59 +1100 |
|---|---|---|
| committer | Felix Queißner <felix@ib-queissner.de> | 2021-02-27 11:47:39 +0100 |
| commit | 23feba7e5a1396110d543a676e018bcbdfa50d39 (patch) | |
| tree | d4e2a6fed26a490a5ba2df4f755f6ad90b2203b1 /src/dialogs/settingsdialog.cpp | |
| parent | 435532d97dcfbb23e46f51f690914fd910cc65ee (diff) | |
| download | kristall-23feba7e5a1396110d543a676e018bcbdfa50d39.tar.gz | |
Adds emoji toggle preference.
Diffstat (limited to 'src/dialogs/settingsdialog.cpp')
| -rw-r--r-- | src/dialogs/settingsdialog.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/dialogs/settingsdialog.cpp b/src/dialogs/settingsdialog.cpp index e9c0e45..4bd0f8c 100644 --- a/src/dialogs/settingsdialog.cpp +++ b/src/dialogs/settingsdialog.cpp @@ -301,6 +301,24 @@ void SettingsDialog::setOptions(const GenericSettings &options) this->ui->urlbarhl_none->setChecked(true); } + if (kristall::EMOJIS_SUPPORTED && this->current_options.emojis_enabled) + { + this->ui->emojis_on->setChecked(true); + } + else + { + this->ui->emojis_off->setChecked(true); + + // Grey out emoji options on unsupported emoji builds + if (!kristall::EMOJIS_SUPPORTED) + { + this->ui->emojis_on->setEnabled(false); + this->ui->emojis_off->setEnabled(false); + this->ui->emojis_label->setToolTip( + this->ui->emojis_label->toolTip() + " (not supported in this build)"); + } + } + if(this->current_options.fancy_quotes) { this->ui->fancyquotes_on->setChecked(true); } else { @@ -831,6 +849,16 @@ void SettingsDialog::on_urlbarhl_none_clicked() this->current_options.fancy_urlbar = false; } +void SettingsDialog::on_emojis_on_clicked() +{ + this->current_options.emojis_enabled = true; +} + +void SettingsDialog::on_emojis_off_clicked() +{ + this->current_options.emojis_enabled = false; +} + void SettingsDialog::on_fancyquotes_on_clicked() { this->current_options.fancy_quotes = true; |
