summaryrefslogtreecommitdiff
path: root/Applications/KeyboardMapper
diff options
context:
space:
mode:
authorTom <tomut@yahoo.com>2020-07-16 07:54:42 -0600
committerAndreas Kling <kling@serenityos.org>2020-07-16 16:10:21 +0200
commit65a11fb5f913be1e403e47222fb7a696100b2323 (patch)
tree0d2d551bb772cac884ea758a41a79257fd10b913 /Applications/KeyboardMapper
parent27bd2eab2288c79206f3571bc2c46a20fc9a4254 (diff)
downloadserenity-65a11fb5f913be1e403e47222fb7a696100b2323.zip
LibGUI: Add InputBox::show with required parent window argument
Similar to MessageBox::show, this encourages passing in a window.
Diffstat (limited to 'Applications/KeyboardMapper')
-rw-r--r--Applications/KeyboardMapper/KeyboardMapperWidget.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/Applications/KeyboardMapper/KeyboardMapperWidget.cpp b/Applications/KeyboardMapper/KeyboardMapperWidget.cpp
index c4eca7c29f..72283e19aa 100644
--- a/Applications/KeyboardMapper/KeyboardMapperWidget.cpp
+++ b/Applications/KeyboardMapper/KeyboardMapperWidget.cpp
@@ -66,10 +66,8 @@ void KeyboardMapperWidget::create_frame()
tmp_button.set_enabled(keys[i].enabled);
tmp_button.on_click = [&]() {
- auto input_box = GUI::InputBox::construct("New Character:", "Select Character", window());
- if (input_box->exec() == GUI::InputBox::ExecOK) {
- auto value = input_box->text_value();
-
+ String value;
+ if (GUI::InputBox::show(value, window(), "New Character:", "Select Character") == GUI::InputBox::ExecOK) {
int i = m_keys.find_first_index(&tmp_button).value_or(0);
ASSERT(i > 0);