mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
FileManager: Make PropertiesWindow::make_button()
non-fallible
This commit is contained in:
parent
b4e134cb52
commit
5df88dab07
2 changed files with 7 additions and 7 deletions
|
@ -84,17 +84,17 @@ ErrorOr<void> PropertiesWindow::create_widgets(bool disable_rename)
|
|||
|
||||
button_widget.add_spacer();
|
||||
|
||||
auto ok_button = TRY(make_button("OK"_string, button_widget));
|
||||
ok_button->on_click = [this](auto) {
|
||||
auto& ok_button = make_button("OK"_string, button_widget);
|
||||
ok_button.on_click = [this](auto) {
|
||||
if (apply_changes())
|
||||
close();
|
||||
};
|
||||
auto cancel_button = TRY(make_button("Cancel"_string, button_widget));
|
||||
cancel_button->on_click = [this](auto) {
|
||||
auto& cancel_button = make_button("Cancel"_string, button_widget);
|
||||
cancel_button.on_click = [this](auto) {
|
||||
close();
|
||||
};
|
||||
|
||||
m_apply_button = TRY(make_button("Apply"_string, button_widget));
|
||||
m_apply_button = make_button("Apply"_string, button_widget);
|
||||
m_apply_button->on_click = [this](auto) { apply_changes(); };
|
||||
m_apply_button->set_enabled(false);
|
||||
|
||||
|
@ -592,7 +592,7 @@ ErrorOr<void> PropertiesWindow::setup_permission_checkboxes(GUI::CheckBox& box_r
|
|||
return {};
|
||||
}
|
||||
|
||||
ErrorOr<NonnullRefPtr<GUI::Button>> PropertiesWindow::make_button(String text, GUI::Widget& parent)
|
||||
GUI::Button& PropertiesWindow::make_button(String text, GUI::Widget& parent)
|
||||
{
|
||||
auto& button = parent.add<GUI::Button>(text);
|
||||
button.set_fixed_size(70, 22);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue