mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 20:57:44 +00:00
Userland: Replace manual checking by using GUI::InputType::NonemptyText
Do this where we were already checking if the input was empty after the InputBox was submitted. Those places gain interactive input validation. :^)
This commit is contained in:
parent
55dbfd24c0
commit
8095d9276b
9 changed files with 13 additions and 14 deletions
|
@ -119,8 +119,7 @@ ContentFilterSettingsWidget::ContentFilterSettingsWidget()
|
|||
m_add_new_domain_button->on_click = [&](unsigned) {
|
||||
DeprecatedString text;
|
||||
|
||||
if (GUI::InputBox::show(window(), text, "Enter domain name"sv, "Add domain to Content Filter"sv) == GUI::Dialog::ExecResult::OK
|
||||
&& !text.is_empty()) {
|
||||
if (GUI::InputBox::show(window(), text, "Enter domain name"sv, "Add domain to Content Filter"sv, {}, GUI::InputType::NonemptyText) == GUI::Dialog::ExecResult::OK) {
|
||||
m_domain_list_model->add_domain(move(text));
|
||||
set_modified(true);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue