1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 17:47:36 +00:00

Browser: Show an example url placeholder in the search engine InputBox

This makes it more clear what the format for a search engine url is :^)
This commit is contained in:
networkException 2021-07-06 16:50:20 +02:00 committed by Andreas Kling
parent 72776b2f61
commit 2483a78313

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, Jakob-Niklas See <git@nwex.de>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -313,7 +314,7 @@ void BrowserWindow::build_menus()
auto custom_search_engine_action = GUI::Action::create_checkable("Custom", [&](auto& action) {
String search_engine;
if (GUI::InputBox::show(this, search_engine, "Enter URL template:", "Custom Search Engine") != GUI::InputBox::ExecOK || search_engine.is_empty()) {
if (GUI::InputBox::show(this, search_engine, "Enter URL template:", "Custom Search Engine", "https://host/search?q={}") != GUI::InputBox::ExecOK || search_engine.is_empty()) {
m_disable_search_engine_action->activate();
return;
}