1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:17:35 +00:00

LibGUI+Userland: Port StatusBar::text() and set_text functions to String

This commit is contained in:
Karol Kosek 2023-06-04 10:24:38 +02:00 committed by Sam Atkins
parent 2064f544c6
commit 2029750519
27 changed files with 88 additions and 88 deletions

View file

@ -24,8 +24,6 @@
#include <LibGUI/Window.h>
#include <LibMain/Main.h>
char const* click_tip = "Tip: click the board to toggle individual cells, or click+drag to toggle multiple cells";
ErrorOr<int> serenity_main(Main::Arguments arguments)
{
TRY(Core::System::pledge("stdio rpath recvfd sendfd unix"));
@ -41,6 +39,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil(nullptr, nullptr));
auto click_tip = TRY("Tip: click the board to toggle individual cells, or click+drag to toggle multiple cells"_string);
auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-gameoflife"sv));
auto window = TRY(GUI::Window::try_create());
@ -147,7 +147,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
board_widget->on_running_state_change = [&]() {
if (board_widget->is_running()) {
statusbar.set_text("Running...");
statusbar.set_text("Running..."_string.release_value_but_fixme_should_propagate_errors());
toggle_running_toolbar_button->set_icon(*paused_icon);
main_widget->set_override_cursor(Gfx::StandardCursor::None);
} else {
@ -171,7 +171,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
board_widget->on_stall = [&] {
toggle_running_action->activate();
statusbar.set_text("Stalled...");
statusbar.set_text("Stalled..."_string.release_value_but_fixme_should_propagate_errors());
};
board_widget->on_cell_toggled = [&](auto, auto, auto) {