mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 22:57:35 +00:00
LibGUI+Userland: Rename try_load_from_gml()
-> load_from_gml()
:^)
It's the only one, so the `try` prefix is unnecessary now.
This commit is contained in:
parent
e4e12f3a96
commit
f0395a2042
85 changed files with 107 additions and 107 deletions
|
@ -26,7 +26,7 @@ GameSizeDialog::GameSizeDialog(GUI::Window* parent, size_t board_size, size_t ta
|
|||
set_resizable(false);
|
||||
|
||||
auto main_widget = set_main_widget<GUI::Widget>().release_value_but_fixme_should_propagate_errors();
|
||||
main_widget->try_load_from_gml(game_size_dialog_gml).release_value_but_fixme_should_propagate_errors();
|
||||
main_widget->load_from_gml(game_size_dialog_gml).release_value_but_fixme_should_propagate_errors();
|
||||
|
||||
auto board_size_spinbox = main_widget->find_descendant_of_type_named<GUI::SpinBox>("board_size_spinbox");
|
||||
board_size_spinbox->set_value(m_board_size);
|
||||
|
|
|
@ -67,7 +67,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
window->resize(315, 336);
|
||||
|
||||
auto main_widget = TRY(window->set_main_widget<GUI::Widget>());
|
||||
TRY(main_widget->try_load_from_gml(game_window_gml));
|
||||
TRY(main_widget->load_from_gml(game_window_gml));
|
||||
|
||||
Game game { board_size, target_tile, evil_ai };
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ SettingsDialog::SettingsDialog(GUI::Window* parent, size_t board_rows, size_t bo
|
|||
set_resizable(false);
|
||||
|
||||
auto main_widget = set_main_widget<GUI::Widget>().release_value_but_fixme_should_propagate_errors();
|
||||
main_widget->try_load_from_gml(settings_dialog_gml).release_value_but_fixme_should_propagate_errors();
|
||||
main_widget->load_from_gml(settings_dialog_gml).release_value_but_fixme_should_propagate_errors();
|
||||
|
||||
auto board_rows_spinbox = main_widget->find_descendant_of_type_named<GUI::SpinBox>("board_rows_spinbox");
|
||||
board_rows_spinbox->set_value(m_board_rows);
|
||||
|
|
|
@ -83,7 +83,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
window->resize(304, 325);
|
||||
|
||||
auto main_widget = TRY(window->set_main_widget<GUI::Widget>());
|
||||
TRY(main_widget->try_load_from_gml(flood_window_gml));
|
||||
TRY(main_widget->load_from_gml(flood_window_gml));
|
||||
|
||||
auto board_widget = TRY(main_widget->find_descendant_of_type_named<GUI::Widget>("board_widget_container")->try_add<BoardWidget>(board_rows, board_columns));
|
||||
board_widget->board()->randomize();
|
||||
|
|
|
@ -53,7 +53,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
window->set_title("Game Of Life");
|
||||
|
||||
auto main_widget = TRY(window->set_main_widget<GUI::Widget>());
|
||||
TRY(main_widget->try_load_from_gml(game_of_life_gml));
|
||||
TRY(main_widget->load_from_gml(game_of_life_gml));
|
||||
main_widget->set_fill_with_background_color(true);
|
||||
|
||||
auto& main_toolbar = *main_widget->find_descendant_of_type_named<GUI::Toolbar>("toolbar");
|
||||
|
|
|
@ -51,7 +51,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
window->set_title("Hearts");
|
||||
|
||||
auto widget = TRY(window->set_main_widget<GUI::Widget>());
|
||||
TRY(widget->try_load_from_gml(hearts_gml));
|
||||
TRY(widget->load_from_gml(hearts_gml));
|
||||
|
||||
auto& game = *widget->find_descendant_of_type_named<Hearts::Game>("game");
|
||||
game.set_focus(true);
|
||||
|
|
|
@ -47,7 +47,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
window->set_resizable(false);
|
||||
|
||||
auto main_widget = TRY(window->set_main_widget<GUI::Widget>());
|
||||
TRY(main_widget->try_load_from_gml(master_word_gml));
|
||||
TRY(main_widget->load_from_gml(master_word_gml));
|
||||
auto& game = *main_widget->find_descendant_of_type_named<MasterWord::WordGame>("word_game");
|
||||
auto& statusbar = *main_widget->find_descendant_of_type_named<GUI::Statusbar>("statusbar");
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ CustomGameDialog::CustomGameDialog(Window* parent_window)
|
|||
set_title("Custom game");
|
||||
|
||||
auto main_widget = set_main_widget<GUI::Widget>().release_value_but_fixme_should_propagate_errors();
|
||||
main_widget->try_load_from_gml(minesweeper_custom_game_window_gml).release_value_but_fixme_should_propagate_errors();
|
||||
main_widget->load_from_gml(minesweeper_custom_game_window_gml).release_value_but_fixme_should_propagate_errors();
|
||||
|
||||
m_columns_spinbox = *main_widget->find_descendant_of_type_named<GUI::SpinBox>("columns_spinbox");
|
||||
m_rows_spinbox = *main_widget->find_descendant_of_type_named<GUI::SpinBox>("rows_spinbox");
|
||||
|
|
|
@ -50,7 +50,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
window->resize(139, 177);
|
||||
|
||||
auto widget = TRY(window->set_main_widget<GUI::Widget>());
|
||||
TRY(widget->try_load_from_gml(minesweeper_window_gml));
|
||||
TRY(widget->load_from_gml(minesweeper_window_gml));
|
||||
|
||||
auto& separator = *widget->find_descendant_of_type_named<GUI::HorizontalSeparator>("separator");
|
||||
auto& container = *widget->find_descendant_of_type_named<GUI::Widget>("container");
|
||||
|
|
|
@ -49,7 +49,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
window->resize(324, 345);
|
||||
|
||||
auto widget = TRY(window->set_main_widget<GUI::Widget>());
|
||||
TRY(widget->try_load_from_gml(snake_gml));
|
||||
TRY(widget->load_from_gml(snake_gml));
|
||||
|
||||
auto& game = *widget->find_descendant_of_type_named<Snake::Game>("game");
|
||||
game.set_focus(true);
|
||||
|
|
|
@ -84,7 +84,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
update_mode(Solitaire::Mode::SingleCardDraw);
|
||||
|
||||
auto widget = TRY(window->set_main_widget<GUI::Widget>());
|
||||
TRY(widget->try_load_from_gml(solitaire_gml));
|
||||
TRY(widget->load_from_gml(solitaire_gml));
|
||||
|
||||
auto& game = *widget->find_descendant_of_type_named<Solitaire::Game>("game");
|
||||
game.set_focus(true);
|
||||
|
|
|
@ -118,7 +118,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
update_statistic_display(StatisticDisplay::HighScore);
|
||||
|
||||
auto widget = TRY(window->set_main_widget<GUI::Widget>());
|
||||
TRY(widget->try_load_from_gml(spider_gml));
|
||||
TRY(widget->load_from_gml(spider_gml));
|
||||
|
||||
auto& game = *widget->find_descendant_of_type_named<Spider::Game>("game");
|
||||
game.set_focus(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue