1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:57:35 +00:00

LibGUI+Userland: Remove Toolbar::try_add_{action,separator}()

These calls largely occur during initialization before there's
unsaved state worth preserving
This commit is contained in:
thankyouverycool 2023-08-15 04:36:28 -04:00 committed by Andreas Kling
parent eafdb06d87
commit 57f3b18109
10 changed files with 109 additions and 131 deletions

View file

@ -200,9 +200,9 @@ ErrorOr<void> MainWidget::initialize_fallibles(GUI::Window& window)
open_page(help_index_path);
});
(void)TRY(m_toolbar->try_add_action(*m_go_back_action));
(void)TRY(m_toolbar->try_add_action(*m_go_forward_action));
(void)TRY(m_toolbar->try_add_action(*m_go_home_action));
m_toolbar->add_action(*m_go_back_action);
m_toolbar->add_action(*m_go_forward_action);
m_toolbar->add_action(*m_go_home_action);
auto file_menu = window.add_menu("&File"_string);
file_menu->add_action(GUI::CommonActions::make_quit_action([](auto&) {