mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-12 20:11:51 +00:00
LibWebView: Disable autocomplete when search is disabled
Search suggestions don't make much sense when search itself is disabled. We now auto-disable autocomplete when search is disabled.
This commit is contained in:
parent
9267172e28
commit
1a9e78a774
Notes:
github-actions[bot]
2025-05-11 15:48:59 +00:00
Author: https://github.com/trflynn89
Commit: 1a9e78a774
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4694
3 changed files with 13 additions and 5 deletions
|
@ -120,10 +120,14 @@ void SettingsUI::load_available_engines()
|
|||
|
||||
void SettingsUI::set_search_engine(JsonValue const& search_engine)
|
||||
{
|
||||
if (search_engine.is_null())
|
||||
if (search_engine.is_null()) {
|
||||
WebView::Application::settings().set_search_engine({});
|
||||
else if (search_engine.is_string())
|
||||
WebView::Application::settings().set_autocomplete_engine({});
|
||||
} else if (search_engine.is_string()) {
|
||||
WebView::Application::settings().set_search_engine(search_engine.as_string());
|
||||
}
|
||||
|
||||
load_current_settings();
|
||||
}
|
||||
|
||||
void SettingsUI::add_custom_search_engine(JsonValue const& search_engine)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue