From 7261fc4bbf05034deb3e502128a6852c788aaa69 Mon Sep 17 00:00:00 2001 From: Mike Skec Date: Wed, 24 Feb 2021 08:17:05 +1100 Subject: SettingsDialog: search engine combobox fix Custom search engines were not being displayed in the combobox after closing/reopening the settings dialog, it was defaulting to the default option. This fixes that. Also adds the Veronica gopher search engine to list of default options --- src/dialogs/settingsdialog.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/dialogs') diff --git a/src/dialogs/settingsdialog.cpp b/src/dialogs/settingsdialog.cpp index e622711..e9c0e45 100644 --- a/src/dialogs/settingsdialog.cpp +++ b/src/dialogs/settingsdialog.cpp @@ -257,11 +257,13 @@ void SettingsDialog::setOptions(const GenericSettings &options) this->ui->start_page->setText(this->current_options.start_page); this->ui->search_engine->clear(); - this->ui->search_engine->setEditText(this->current_options.search_engine); + QString search = this->current_options.search_engine; this->ui->search_engine->lineEdit()->setPlaceholderText("URL with '%1' in place of query"); this->ui->search_engine->addItem("gemini://geminispace.info/search?%1"); this->ui->search_engine->addItem("gemini://gus.guru/search?%1"); this->ui->search_engine->addItem("gemini://houston.coder.town/search?%1"); + this->ui->search_engine->addItem("gopher://gopher.floodgap.com:70/7/v2/vs?%1"); + this->ui->search_engine->setCurrentText(search); if(this->current_options.gophermap_display == GenericSettings::PlainText) { this->ui->gophermap_text->setChecked(true); -- cgit v1.2.3