diff options
author | Karol Kosek <krkk@serenityos.org> | 2023-02-11 20:51:04 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-02-13 00:45:09 +0000 |
commit | e39adc4772dbc575fc8209130129270ceea24229 (patch) | |
tree | b86180f19b56c66008246cbeea1d198847572f55 /Userland/Applications/FileManager | |
parent | b5cb9a9ebb0c1203b9f47479b7fc15f9af8e421e (diff) | |
download | serenity-e39adc4772dbc575fc8209130129270ceea24229.zip |
Userland: Set Button text using the new String class
Diffstat (limited to 'Userland/Applications/FileManager')
-rw-r--r-- | Userland/Applications/FileManager/PropertiesWindow.cpp | 8 | ||||
-rw-r--r-- | Userland/Applications/FileManager/PropertiesWindow.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Applications/FileManager/PropertiesWindow.cpp b/Userland/Applications/FileManager/PropertiesWindow.cpp index 310f218137..75632ab82d 100644 --- a/Userland/Applications/FileManager/PropertiesWindow.cpp +++ b/Userland/Applications/FileManager/PropertiesWindow.cpp @@ -156,17 +156,17 @@ ErrorOr<void> PropertiesWindow::create_widgets(bool disable_rename) button_widget->layout()->add_spacer(); - auto ok_button = TRY(make_button("OK", button_widget)); + auto ok_button = TRY(make_button(String::from_utf8_short_string("OK"sv), button_widget)); ok_button->on_click = [this](auto) { if (apply_changes()) close(); }; - auto cancel_button = TRY(make_button("Cancel", button_widget)); + auto cancel_button = TRY(make_button(String::from_utf8_short_string("Cancel"sv), button_widget)); cancel_button->on_click = [this](auto) { close(); }; - m_apply_button = TRY(make_button("Apply", button_widget)); + m_apply_button = TRY(make_button(String::from_utf8_short_string("Apply"sv), button_widget)); m_apply_button->on_click = [this](auto) { apply_changes(); }; m_apply_button->set_enabled(false); @@ -268,7 +268,7 @@ ErrorOr<void> PropertiesWindow::setup_permission_checkboxes(GUI::CheckBox& box_r return {}; } -ErrorOr<NonnullRefPtr<GUI::Button>> PropertiesWindow::make_button(DeprecatedString text, GUI::Widget& parent) +ErrorOr<NonnullRefPtr<GUI::Button>> PropertiesWindow::make_button(String text, GUI::Widget& parent) { auto button = TRY(parent.try_add<GUI::Button>(text)); button->set_fixed_size(70, 22); diff --git a/Userland/Applications/FileManager/PropertiesWindow.h b/Userland/Applications/FileManager/PropertiesWindow.h index ae6ab20819..030342d074 100644 --- a/Userland/Applications/FileManager/PropertiesWindow.h +++ b/Userland/Applications/FileManager/PropertiesWindow.h @@ -79,7 +79,7 @@ private: return "Unknown"; } - static ErrorOr<NonnullRefPtr<GUI::Button>> make_button(DeprecatedString, GUI::Widget& parent); + static ErrorOr<NonnullRefPtr<GUI::Button>> make_button(String, GUI::Widget& parent); ErrorOr<void> setup_permission_checkboxes(GUI::CheckBox& box_read, GUI::CheckBox& box_write, GUI::CheckBox& box_execute, PermissionMasks masks, mode_t mode); void permission_changed(mode_t mask, bool set); bool apply_changes(); |