1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:17:36 +00:00

Userland: Set Button text using the new String class

This commit is contained in:
Karol Kosek 2023-02-11 20:51:04 +01:00 committed by Linus Groh
parent b5cb9a9ebb
commit e39adc4772
49 changed files with 134 additions and 127 deletions

View file

@ -48,17 +48,17 @@ private:
FilePicker(Window* parent_window, Mode type = Mode::Open, StringView filename = "Untitled"sv, StringView path = Core::StandardPaths::home_directory(), ScreenPosition screen_position = Dialog::ScreenPosition::CenterWithinParent, Optional<Vector<FileTypeFilter>> allowed_file_types = {});
static DeprecatedString ok_button_name(Mode mode)
static String ok_button_name(Mode mode)
{
switch (mode) {
case Mode::Open:
case Mode::OpenMultiple:
case Mode::OpenFolder:
return "Open";
return String::from_utf8_short_string("Open"sv);
case Mode::Save:
return "Save";
return String::from_utf8_short_string("Save"sv);
default:
return "OK";
return String::from_utf8_short_string("OK"sv);
}
}