diff options
author | Linus Groh <mail@linusgroh.de> | 2021-02-20 12:03:28 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-20 12:19:46 +0100 |
commit | 3583b62ad36d8ece413eea5514493bf16fb954f7 (patch) | |
tree | c91686af537213dc64813d9b8935f22d64ba1598 /Userland | |
parent | 3b9f110161bc78d8534a29e3f14030e1f5a15574 (diff) | |
download | serenity-3583b62ad36d8ece413eea5514493bf16fb954f7.zip |
LibGUI: Swap order of InputBox value and parent window args
This is now consistent with the other dialog classes.
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Applications/FileManager/DirectoryView.cpp | 4 | ||||
-rw-r--r-- | Userland/Applications/HexEditor/HexEditorWidget.cpp | 8 | ||||
-rw-r--r-- | Userland/Applications/IRCClient/IRCAppWindow.cpp | 30 | ||||
-rw-r--r-- | Userland/Applications/IRCClient/IRCWindow.cpp | 2 | ||||
-rw-r--r-- | Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp | 2 | ||||
-rw-r--r-- | Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp | 4 | ||||
-rw-r--r-- | Userland/Demos/WidgetGallery/main.cpp | 2 | ||||
-rw-r--r-- | Userland/DevTools/HackStudio/Debugger/DebugInfoWidget.cpp | 2 | ||||
-rw-r--r-- | Userland/DevTools/HackStudio/Git/GitWidget.cpp | 2 | ||||
-rw-r--r-- | Userland/DevTools/HackStudio/HackStudioWidget.cpp | 4 | ||||
-rw-r--r-- | Userland/Libraries/LibGUI/FilePicker.cpp | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibGUI/InputBox.cpp | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibGUI/InputBox.h | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibGUI/TextEditor.cpp | 2 |
14 files changed, 34 insertions, 34 deletions
diff --git a/Userland/Applications/FileManager/DirectoryView.cpp b/Userland/Applications/FileManager/DirectoryView.cpp index 9e3595c5b1..02c411b36d 100644 --- a/Userland/Applications/FileManager/DirectoryView.cpp +++ b/Userland/Applications/FileManager/DirectoryView.cpp @@ -499,7 +499,7 @@ void DirectoryView::setup_actions() { m_mkdir_action = GUI::Action::create("New directory...", { Mod_Ctrl | Mod_Shift, Key_N }, Gfx::Bitmap::load_from_file("/res/icons/16x16/mkdir.png"), [&](const GUI::Action&) { String value; - if (GUI::InputBox::show(value, window(), "Enter name:", "New directory") == GUI::InputBox::ExecOK && !value.is_empty()) { + if (GUI::InputBox::show(window(), value, "Enter name:", "New directory") == GUI::InputBox::ExecOK && !value.is_empty()) { auto new_dir_path = LexicalPath::canonicalized_path(String::formatted("{}/{}", path(), value)); int rc = mkdir(new_dir_path.characters(), 0777); if (rc < 0) { @@ -511,7 +511,7 @@ void DirectoryView::setup_actions() m_touch_action = GUI::Action::create("New file...", { Mod_Ctrl | Mod_Shift, Key_F }, Gfx::Bitmap::load_from_file("/res/icons/16x16/new.png"), [&](const GUI::Action&) { String value; - if (GUI::InputBox::show(value, window(), "Enter name:", "New file") == GUI::InputBox::ExecOK && !value.is_empty()) { + if (GUI::InputBox::show(window(), value, "Enter name:", "New file") == GUI::InputBox::ExecOK && !value.is_empty()) { auto new_file_path = LexicalPath::canonicalized_path(String::formatted("{}/{}", path(), value)); struct stat st; int rc = stat(new_file_path.characters(), &st); diff --git a/Userland/Applications/HexEditor/HexEditorWidget.cpp b/Userland/Applications/HexEditor/HexEditorWidget.cpp index e909a16f62..2ab3ca8edf 100644 --- a/Userland/Applications/HexEditor/HexEditorWidget.cpp +++ b/Userland/Applications/HexEditor/HexEditorWidget.cpp @@ -77,7 +77,7 @@ HexEditorWidget::HexEditorWidget() } String value; - if (GUI::InputBox::show(value, window(), "Enter new file size:", "New file size") == GUI::InputBox::ExecOK && !value.is_empty()) { + if (GUI::InputBox::show(window(), value, "Enter new file size:", "New file size") == GUI::InputBox::ExecOK && !value.is_empty()) { auto file_size = value.to_int(); if (file_size.has_value() && file_size.value() > 0) { m_document_dirty = false; @@ -143,7 +143,7 @@ HexEditorWidget::HexEditorWidget() m_goto_decimal_offset_action = GUI::Action::create("Go To Offset (Decimal)...", { Mod_Ctrl | Mod_Shift, Key_G }, Gfx::Bitmap::load_from_file("/res/icons/16x16/go-forward.png"), [this](const GUI::Action&) { String value; - if (GUI::InputBox::show(value, window(), "Enter Decimal offset:", "Go To") == GUI::InputBox::ExecOK && !value.is_empty()) { + if (GUI::InputBox::show(window(), value, "Enter Decimal offset:", "Go To") == GUI::InputBox::ExecOK && !value.is_empty()) { auto new_offset = value.to_int(); if (new_offset.has_value()) m_editor->set_position(new_offset.value()); @@ -152,7 +152,7 @@ HexEditorWidget::HexEditorWidget() m_goto_hex_offset_action = GUI::Action::create("Go To Offset (Hex)...", { Mod_Ctrl, Key_G }, Gfx::Bitmap::load_from_file("/res/icons/16x16/go-forward.png"), [this](const GUI::Action&) { String value; - if (GUI::InputBox::show(value, window(), "Enter Hex offset:", "Go To") == GUI::InputBox::ExecOK && !value.is_empty()) { + if (GUI::InputBox::show(window(), value, "Enter Hex offset:", "Go To") == GUI::InputBox::ExecOK && !value.is_empty()) { auto new_offset = strtol(value.characters(), nullptr, 16); m_editor->set_position(new_offset); } @@ -161,7 +161,7 @@ HexEditorWidget::HexEditorWidget() auto& edit_menu = menubar->add_menu("Edit"); edit_menu.add_action(GUI::Action::create("Fill selection...", { Mod_Ctrl, Key_B }, [&](const GUI::Action&) { String value; - if (GUI::InputBox::show(value, window(), "Fill byte (hex):", "Fill Selection") == GUI::InputBox::ExecOK && !value.is_empty()) { + if (GUI::InputBox::show(window(), value, "Fill byte (hex):", "Fill Selection") == GUI::InputBox::ExecOK && !value.is_empty()) { auto fill_byte = strtol(value.characters(), nullptr, 16); m_editor->fill_selection(fill_byte); } diff --git a/Userland/Applications/IRCClient/IRCAppWindow.cpp b/Userland/Applications/IRCClient/IRCAppWindow.cpp index 8d4f931025..726bba39b4 100644 --- a/Userland/Applications/IRCClient/IRCAppWindow.cpp +++ b/Userland/Applications/IRCClient/IRCAppWindow.cpp @@ -93,7 +93,7 @@ void IRCAppWindow::setup_client() if (m_client->hostname().is_empty()) { String value; - if (GUI::InputBox::show(value, this, "Enter server:", "Connect to server") == GUI::InputBox::ExecCancel) + if (GUI::InputBox::show(this, value, "Enter server:", "Connect to server") == GUI::InputBox::ExecCancel) ::exit(0); m_client->set_server(value, 6667); @@ -107,7 +107,7 @@ void IRCAppWindow::setup_actions() { m_join_action = GUI::Action::create("Join channel", { Mod_Ctrl, Key_J }, Gfx::Bitmap::load_from_file("/res/icons/16x16/irc-join.png"), [&](auto&) { String value; - if (GUI::InputBox::show(value, this, "Enter channel name:", "Join channel") == GUI::InputBox::ExecOK && !value.is_empty()) + if (GUI::InputBox::show(this, value, "Enter channel name:", "Join channel") == GUI::InputBox::ExecOK && !value.is_empty()) m_client->handle_join_action(value); }); @@ -125,13 +125,13 @@ void IRCAppWindow::setup_actions() m_whois_action = GUI::Action::create("Whois user", Gfx::Bitmap::load_from_file("/res/icons/16x16/irc-whois.png"), [&](auto&) { String value; - if (GUI::InputBox::show(value, this, "Enter nickname:", "IRC WHOIS lookup") == GUI::InputBox::ExecOK && !value.is_empty()) + if (GUI::InputBox::show(this, value, "Enter nickname:", "IRC WHOIS lookup") == GUI::InputBox::ExecOK && !value.is_empty()) m_client->handle_whois_action(value); }); m_open_query_action = GUI::Action::create("Open query", { Mod_Ctrl, Key_O }, Gfx::Bitmap::load_from_file("/res/icons/16x16/irc-open-query.png"), [&](auto&) { String value; - if (GUI::InputBox::show(value, this, "Enter nickname:", "Open IRC query with...") == GUI::InputBox::ExecOK && !value.is_empty()) + if (GUI::InputBox::show(this, value, "Enter nickname:", "Open IRC query with...") == GUI::InputBox::ExecOK && !value.is_empty()) m_client->handle_open_query_action(value); }); @@ -141,7 +141,7 @@ void IRCAppWindow::setup_actions() m_change_nick_action = GUI::Action::create("Change nickname", Gfx::Bitmap::load_from_file("/res/icons/16x16/irc-nick.png"), [this](auto&) { String value; - if (GUI::InputBox::show(value, this, "Enter nickname:", "Change nickname") == GUI::InputBox::ExecOK && !value.is_empty()) + if (GUI::InputBox::show(this, value, "Enter nickname:", "Change nickname") == GUI::InputBox::ExecOK && !value.is_empty()) m_client->handle_change_nick_action(value); }); @@ -151,7 +151,7 @@ void IRCAppWindow::setup_actions() return; } String value; - if (GUI::InputBox::show(value, this, "Enter topic:", "Change topic") == GUI::InputBox::ExecOK && !value.is_empty()) + if (GUI::InputBox::show(this, value, "Enter topic:", "Change topic") == GUI::InputBox::ExecOK && !value.is_empty()) m_client->handle_change_topic_action(window->channel().name(), value); }); @@ -161,7 +161,7 @@ void IRCAppWindow::setup_actions() return; } String value; - if (GUI::InputBox::show(value, this, "Enter nick:", "Invite user") == GUI::InputBox::ExecOK && !value.is_empty()) + if (GUI::InputBox::show(this, value, "Enter nick:", "Invite user") == GUI::InputBox::ExecOK && !value.is_empty()) m_client->handle_invite_user_action(window->channel().name(), value); }); @@ -179,7 +179,7 @@ void IRCAppWindow::setup_actions() return; } String value; - if (GUI::InputBox::show(value, this, "Enter nick:", "Voice user") == GUI::InputBox::ExecOK && !value.is_empty()) + if (GUI::InputBox::show(this, value, "Enter nick:", "Voice user") == GUI::InputBox::ExecOK && !value.is_empty()) m_client->handle_voice_user_action(window->channel().name(), value); }); @@ -189,7 +189,7 @@ void IRCAppWindow::setup_actions() return; } String value; - if (GUI::InputBox::show(value, this, "Enter nick:", "DeVoice user") == GUI::InputBox::ExecOK && !value.is_empty()) + if (GUI::InputBox::show(this, value, "Enter nick:", "DeVoice user") == GUI::InputBox::ExecOK && !value.is_empty()) m_client->handle_devoice_user_action(window->channel().name(), value); }); @@ -199,7 +199,7 @@ void IRCAppWindow::setup_actions() return; } String value; - if (GUI::InputBox::show(value, this, "Enter nick:", "Hop user") == GUI::InputBox::ExecOK && !value.is_empty()) + if (GUI::InputBox::show(this, value, "Enter nick:", "Hop user") == GUI::InputBox::ExecOK && !value.is_empty()) m_client->handle_hop_user_action(window->channel().name(), value); }); @@ -209,7 +209,7 @@ void IRCAppWindow::setup_actions() return; } String value; - if (GUI::InputBox::show(value, this, "Enter nick:", "DeHop user") == GUI::InputBox::ExecOK && !value.is_empty()) + if (GUI::InputBox::show(this, value, "Enter nick:", "DeHop user") == GUI::InputBox::ExecOK && !value.is_empty()) m_client->handle_dehop_user_action(window->channel().name(), value); }); @@ -219,7 +219,7 @@ void IRCAppWindow::setup_actions() return; } String value; - if (GUI::InputBox::show(value, this, "Enter nick:", "Op user") == GUI::InputBox::ExecOK && !value.is_empty()) + if (GUI::InputBox::show(this, value, "Enter nick:", "Op user") == GUI::InputBox::ExecOK && !value.is_empty()) m_client->handle_op_user_action(window->channel().name(), value); }); @@ -229,7 +229,7 @@ void IRCAppWindow::setup_actions() return; } String value; - if (GUI::InputBox::show(value, this, "Enter nick:", "DeOp user") == GUI::InputBox::ExecOK && !value.is_empty()) + if (GUI::InputBox::show(this, value, "Enter nick:", "DeOp user") == GUI::InputBox::ExecOK && !value.is_empty()) m_client->handle_deop_user_action(window->channel().name(), value); }); @@ -239,10 +239,10 @@ void IRCAppWindow::setup_actions() return; } String nick_value; - if (GUI::InputBox::show(nick_value, this, "Enter nick:", "Kick user") != GUI::InputBox::ExecOK || nick_value.is_empty()) + if (GUI::InputBox::show(this, nick_value, "Enter nick:", "Kick user") != GUI::InputBox::ExecOK || nick_value.is_empty()) return; String reason_value; - if (GUI::InputBox::show(reason_value, this, "Enter reason:", "Reason") == GUI::InputBox::ExecOK) + if (GUI::InputBox::show(this, reason_value, "Enter reason:", "Reason") == GUI::InputBox::ExecOK) m_client->handle_kick_user_action(window->channel().name(), nick_value, reason_value.characters()); }); diff --git a/Userland/Applications/IRCClient/IRCWindow.cpp b/Userland/Applications/IRCClient/IRCWindow.cpp index 7a84795b8f..5391ae6596 100644 --- a/Userland/Applications/IRCClient/IRCWindow.cpp +++ b/Userland/Applications/IRCClient/IRCWindow.cpp @@ -142,7 +142,7 @@ IRCWindow::IRCWindow(IRCClient& client, void* owner, Type type, const String& na if (IRCClient::is_nick_prefix(nick[0])) nick = nick.substring(1, nick.length() - 1); String value; - if (GUI::InputBox::show(value, window(), "Enter reason:", "Reason") == GUI::InputBox::ExecOK) + if (GUI::InputBox::show(window(), value, "Enter reason:", "Reason") == GUI::InputBox::ExecOK) m_client->handle_kick_user_action(m_name.characters(), m_client->nick_without_prefix(nick.characters()), value); })); diff --git a/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp b/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp index 3c88339b71..180b2a4837 100644 --- a/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp +++ b/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp @@ -67,7 +67,7 @@ void KeyboardMapperWidget::create_frame() tmp_button.on_click = [this, &tmp_button]() { String value; - if (GUI::InputBox::show(value, window(), "New Character:", "Select Character") == GUI::InputBox::ExecOK) { + if (GUI::InputBox::show(window(), value, "New Character:", "Select Character") == GUI::InputBox::ExecOK) { int i = m_keys.find_first_index(&tmp_button).value_or(0); ASSERT(i > 0); diff --git a/Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp b/Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp index 6aa8718a99..4dea836926 100644 --- a/Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp +++ b/Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp @@ -100,7 +100,7 @@ SpreadsheetWidget::SpreadsheetWidget(NonnullRefPtrVector<Sheet>&& sheets, bool s auto& sheet = m_tab_context_menu_sheet_view->sheet(); String new_name; - if (GUI::InputBox::show(new_name, window(), String::formatted("New name for '{}'", sheet.name()), "Rename sheet") == GUI::Dialog::ExecOK) { + if (GUI::InputBox::show(window(), new_name, String::formatted("New name for '{}'", sheet.name()), "Rename sheet") == GUI::Dialog::ExecOK) { sheet.set_name(new_name); sheet.update(); m_tab_widget->set_tab_title(static_cast<GUI::Widget&>(*m_tab_context_menu_sheet_view), new_name); @@ -109,7 +109,7 @@ SpreadsheetWidget::SpreadsheetWidget(NonnullRefPtrVector<Sheet>&& sheets, bool s m_tab_context_menu->add_action(rename_action); m_tab_context_menu->add_action(GUI::Action::create("Add new sheet...", [this](auto&) { String name; - if (GUI::InputBox::show(name, window(), "Name for new sheet", "Create sheet") == GUI::Dialog::ExecOK) { + if (GUI::InputBox::show(window(), name, "Name for new sheet", "Create sheet") == GUI::Dialog::ExecOK) { NonnullRefPtrVector<Sheet> new_sheets; new_sheets.append(m_workbook->add_sheet(name)); setup_tabs(move(new_sheets)); diff --git a/Userland/Demos/WidgetGallery/main.cpp b/Userland/Demos/WidgetGallery/main.cpp index f1d8c77563..e94072146a 100644 --- a/Userland/Demos/WidgetGallery/main.cpp +++ b/Userland/Demos/WidgetGallery/main.cpp @@ -462,7 +462,7 @@ int main(int argc, char** argv) auto& input_button = input_button_container.add<GUI::Button>("Input..."); String value; input_button.on_click = [&](auto) { - if (GUI::InputBox::show(value, window, "Enter input:", "Input Box") == GUI::InputBox::ExecOK && !value.is_empty()) + if (GUI::InputBox::show(window, value, "Enter input:", "Input Box") == GUI::InputBox::ExecOK && !value.is_empty()) input_label.set_text(value); }; diff --git a/Userland/DevTools/HackStudio/Debugger/DebugInfoWidget.cpp b/Userland/DevTools/HackStudio/Debugger/DebugInfoWidget.cpp index 622538057d..9ccaae9bdc 100644 --- a/Userland/DevTools/HackStudio/Debugger/DebugInfoWidget.cpp +++ b/Userland/DevTools/HackStudio/Debugger/DebugInfoWidget.cpp @@ -126,7 +126,7 @@ NonnullRefPtr<GUI::Widget> DebugInfoWidget::build_variables_tab() return; String value; - if (GUI::InputBox::show(value, window(), "Enter new value:", "Set variable value") == GUI::InputBox::ExecOK) { + if (GUI::InputBox::show(window(), value, "Enter new value:", "Set variable value") == GUI::InputBox::ExecOK) { auto& model = static_cast<VariablesModel&>(*m_variables_view->model()); model.set_variable_value(index, value, window()); } diff --git a/Userland/DevTools/HackStudio/Git/GitWidget.cpp b/Userland/DevTools/HackStudio/Git/GitWidget.cpp index 95ef6928ec..8be825760f 100644 --- a/Userland/DevTools/HackStudio/Git/GitWidget.cpp +++ b/Userland/DevTools/HackStudio/Git/GitWidget.cpp @@ -153,7 +153,7 @@ void GitWidget::unstage_file(const LexicalPath& file) void GitWidget::commit() { String message; - auto res = GUI::InputBox::show(message, window(), "Commit message:", "Commit"); + auto res = GUI::InputBox::show(window(), message, "Commit message:", "Commit"); if (res != GUI::InputBox::ExecOK || message.is_empty()) return; dbgln("commit message: {}", message); diff --git a/Userland/DevTools/HackStudio/HackStudioWidget.cpp b/Userland/DevTools/HackStudio/HackStudioWidget.cpp index f2cfdf2a8d..97d75973aa 100644 --- a/Userland/DevTools/HackStudio/HackStudioWidget.cpp +++ b/Userland/DevTools/HackStudio/HackStudioWidget.cpp @@ -310,7 +310,7 @@ NonnullRefPtr<GUI::Action> HackStudioWidget::create_new_file_action() { return GUI::Action::create("Add new file to project...", { Mod_Ctrl, Key_N }, Gfx::Bitmap::load_from_file("/res/icons/16x16/new.png"), [this](const GUI::Action&) { String filename; - if (GUI::InputBox::show(filename, window(), "Enter name of new file:", "Add new file to project") != GUI::InputBox::ExecOK) + if (GUI::InputBox::show(window(), filename, "Enter name of new file:", "Add new file to project") != GUI::InputBox::ExecOK) return; auto file = Core::File::construct(filename); if (!file->open((Core::IODevice::OpenMode)(Core::IODevice::WriteOnly | Core::IODevice::MustBeNew))) { @@ -325,7 +325,7 @@ NonnullRefPtr<GUI::Action> HackStudioWidget::create_new_directory_action() { return GUI::Action::create("Add new directory to project...", { Mod_Ctrl | Mod_Shift, Key_N }, Gfx::Bitmap::load_from_file("/res/icons/16x16/mkdir.png"), [this](const GUI::Action&) { String directory_name; - if (GUI::InputBox::show(directory_name, window(), "Enter name of new directory:", "Add new folder to project") != GUI::InputBox::ExecOK) + if (GUI::InputBox::show(window(), directory_name, "Enter name of new directory:", "Add new folder to project") != GUI::InputBox::ExecOK) return; auto formatted_dir_name = LexicalPath::canonicalized_path(String::formatted("{}/{}", m_project->model().root_path(), directory_name)); int rc = mkdir(formatted_dir_name.characters(), 0755); diff --git a/Userland/Libraries/LibGUI/FilePicker.cpp b/Userland/Libraries/LibGUI/FilePicker.cpp index c73697b908..8f2a4fba6b 100644 --- a/Userland/Libraries/LibGUI/FilePicker.cpp +++ b/Userland/Libraries/LibGUI/FilePicker.cpp @@ -139,7 +139,7 @@ FilePicker::FilePicker(Window* parent_window, Mode mode, const StringView& file_ auto mkdir_action = Action::create("New directory...", Gfx::Bitmap::load_from_file("/res/icons/16x16/mkdir.png"), [this](const Action&) { String value; - if (InputBox::show(value, this, "Enter name:", "New directory") == InputBox::ExecOK && !value.is_empty()) { + if (InputBox::show(this, value, "Enter name:", "New directory") == InputBox::ExecOK && !value.is_empty()) { auto new_dir_path = LexicalPath::canonicalized_path(String::formatted("{}/{}", m_model->root_path(), value)); int rc = mkdir(new_dir_path.characters(), 0777); if (rc < 0) { diff --git a/Userland/Libraries/LibGUI/InputBox.cpp b/Userland/Libraries/LibGUI/InputBox.cpp index 8e24da6fa6..5c85779091 100644 --- a/Userland/Libraries/LibGUI/InputBox.cpp +++ b/Userland/Libraries/LibGUI/InputBox.cpp @@ -46,7 +46,7 @@ InputBox::~InputBox() { } -int InputBox::show(String& text_value, Window* parent_window, const StringView& prompt, const StringView& title) +int InputBox::show(Window* parent_window, String& text_value, const StringView& prompt, const StringView& title) { auto box = InputBox::construct(parent_window, prompt, title); box->set_resizable(false); diff --git a/Userland/Libraries/LibGUI/InputBox.h b/Userland/Libraries/LibGUI/InputBox.h index 1eb7c490d6..c2fa24f282 100644 --- a/Userland/Libraries/LibGUI/InputBox.h +++ b/Userland/Libraries/LibGUI/InputBox.h @@ -35,7 +35,7 @@ class InputBox : public Dialog { public: virtual ~InputBox() override; - static int show(String& text_value, Window* parent_window, const StringView& prompt, const StringView& title); + static int show(Window* parent_window, String& text_value, const StringView& prompt, const StringView& title); private: explicit InputBox(Window* parent_window, const StringView& prompt, const StringView& title); diff --git a/Userland/Libraries/LibGUI/TextEditor.cpp b/Userland/Libraries/LibGUI/TextEditor.cpp index 1005098f2b..106cc37edf 100644 --- a/Userland/Libraries/LibGUI/TextEditor.cpp +++ b/Userland/Libraries/LibGUI/TextEditor.cpp @@ -105,7 +105,7 @@ void TextEditor::create_actions() m_go_to_line_action = Action::create( "Go to line...", { Mod_Ctrl, Key_L }, Gfx::Bitmap::load_from_file("/res/icons/16x16/go-forward.png"), [this](auto&) { String value; - if (InputBox::show(value, window(), "Line:", "Go to line") == InputBox::ExecOK) { + if (InputBox::show(window(), value, "Line:", "Go to line") == InputBox::ExecOK) { auto line_target = value.to_uint(); if (line_target.has_value()) { set_cursor_and_focus_line(line_target.value() - 1, 0); |