diff options
author | Junior Rantila <junior.rantila@gmail.com> | 2022-08-06 02:50:22 +0200 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2022-08-09 20:09:33 -0400 |
commit | d40b0439d8fa3c911041dc4c3e1d80c1519a2d77 (patch) | |
tree | db8e34645702cf5bcaf9fd15dd9636a6454b6624 | |
parent | 407a88ebf6291cb3f9d8abd9a3d2f9dc6c17d544 (diff) | |
download | serenity-d40b0439d8fa3c911041dc4c3e1d80c1519a2d77.zip |
Terminal: Propagate more errors
-rw-r--r-- | Userland/Applications/Terminal/main.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Applications/Terminal/main.cpp b/Userland/Applications/Terminal/main.cpp index e91aa8923e..404323b5cd 100644 --- a/Userland/Applications/Terminal/main.cpp +++ b/Userland/Applications/Terminal/main.cpp @@ -192,10 +192,10 @@ static ErrorOr<NonnullRefPtr<GUI::Window>> create_find_window(VT::TerminalWidget find_textbox->set_text(terminal.selected_text().replace("\n"sv, " "sv, ReplaceMode::All)); auto find_backwards = TRY(find->try_add<GUI::Button>()); find_backwards->set_fixed_width(25); - find_backwards->set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/upward-triangle.png"sv).release_value_but_fixme_should_propagate_errors()); + find_backwards->set_icon(TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/upward-triangle.png"sv))); auto find_forwards = TRY(find->try_add<GUI::Button>()); find_forwards->set_fixed_width(25); - find_forwards->set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/downward-triangle.png"sv).release_value_but_fixme_should_propagate_errors()); + find_forwards->set_icon(TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/downward-triangle.png"sv))); find_textbox->on_return_pressed = [find_backwards]() mutable { find_backwards->click(); @@ -338,7 +338,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) auto show_scroll_bar = Config::read_bool("Terminal"sv, "Terminal"sv, "ShowScrollBar"sv, true); terminal->set_show_scrollbar(show_scroll_bar); - auto open_settings_action = GUI::Action::create("&Settings", Gfx::Bitmap::try_load_from_file("/res/icons/16x16/settings.png"sv).release_value_but_fixme_should_propagate_errors(), + auto open_settings_action = GUI::Action::create("&Settings", TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/settings.png"sv)), [&](auto&) { GUI::Process::spawn_or_show_error(window, "/bin/TerminalSettings"sv); }); @@ -347,7 +347,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) TRY(terminal->context_menu().try_add_action(open_settings_action)); auto file_menu = TRY(window->try_add_menu("&File")); - TRY(file_menu->try_add_action(GUI::Action::create("Open New &Terminal", { Mod_Ctrl | Mod_Shift, Key_N }, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/app-terminal.png"sv).release_value_but_fixme_should_propagate_errors(), [&](auto&) { + TRY(file_menu->try_add_action(GUI::Action::create("Open New &Terminal", { Mod_Ctrl | Mod_Shift, Key_N }, TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/app-terminal.png"sv)), [&](auto&) { GUI::Process::spawn_or_show_error(window, "/bin/Terminal"sv); }))); @@ -397,7 +397,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) TRY(edit_menu->try_add_action(terminal->copy_action())); TRY(edit_menu->try_add_action(terminal->paste_action())); TRY(edit_menu->try_add_separator()); - TRY(edit_menu->try_add_action(GUI::Action::create("&Find...", { Mod_Ctrl | Mod_Shift, Key_F }, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/find.png"sv).release_value_but_fixme_should_propagate_errors(), + TRY(edit_menu->try_add_action(GUI::Action::create("&Find...", { Mod_Ctrl | Mod_Shift, Key_F }, TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/find.png"sv)), [&](auto&) { find_window->show(); find_window->move_to_front(); |